@rpg-engine/long-bow 0.7.93 → 0.7.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"long-bow.esm.js","sources":["../src/components/Arrow/SelectArrow.tsx","../src/constants/uiColors.ts","../src/components/AsyncDropdown.tsx","../src/constants/uiFonts.ts","../src/components/Button.tsx","../src/components/shared/SpriteFromAtlas.tsx","../src/components/Item/Inventory/ErrorBoundary.tsx","../src/components/shared/Ellipsis.tsx","../src/components/PropertySelect/PropertySelect.tsx","../src/components/Character/CharacterSelection.tsx","../src/components/Chat/Chat.tsx","../src/components/Input.tsx","../src/components/RPGUI/RPGUIContainer.tsx","../src/components/shared/Column.tsx","../src/components/Chatdeprecated/ChatDeprecated.tsx","../src/hooks/useChat.ts","../src/components/ChatRevamp/SearchCharacter.tsx","../src/components/ChatRevamp/ChatContent.tsx","../src/components/ChatRevamp/ChatTabs.tsx","../src/components/ChatRevamp/ExpandButton.tsx","../src/components/ChatRevamp/RecentChats.tsx","../src/components/ChatRevamp/ChatRevamp.tsx","../src/components/CheckButton.tsx","../src/components/CheckItem.tsx","../src/components/Shortcuts/SingleShortcut.ts","../src/components/Shortcuts/useShortcutCooldown.ts","../src/components/CircularController/CircularController.tsx","../src/hooks/useLocalStorage.ts","../src/hooks/useOutsideAlerter.ts","../src/components/DraggableContainer.tsx","../src/components/Dropdown.tsx","../src/components/Abstractions/ModalPortal.tsx","../src/hooks/useTouchTarget.ts","../src/components/Item/Inventory/ItemSlotRarity.ts","../src/components/Item/Inventory/ItemGem.tsx","../src/components/Item/Inventory/ItemSlotQty/ItemSlotQty.tsx","../src/components/Item/Inventory/ItemSlotRenderer.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../src/components/Item/Inventory/context/ItemSlotDetailsContext.tsx","../src/components/Item/Inventory/context/ItemSlotDraggingContext.tsx","../src/components/Item/Inventory/ItemSlot.tsx","../src/components/Item/Cards/ItemInfo.tsx","../src/components/Item/Cards/ItemInfoDisplay.tsx","../src/components/Item/Cards/ItemTooltip.tsx","../src/components/Item/Cards/MobileItemTooltip.tsx","../src/components/Item/Cards/ItemInfoWrapper.tsx","../src/libs/itemCounter.ts","../src/components/CraftBook/utils/modifyString.ts","../src/components/CraftBook/CraftingTooltip.tsx","../src/components/CraftBook/CraftingRecipe.tsx","../src/components/CraftBook/utils/calculateMaxCraftable.ts","../src/components/CraftBook/CraftBook.tsx","../src/components/DropdownSelectorContainer.tsx","../src/hooks/useCursorPosition.ts","../src/components/Item/Inventory/DraggedItem.tsx","../src/components/RelativeListMenu.tsx","../src/components/Item/Inventory/ItemSlotTooltips.tsx","../src/components/Equipment/EquipmentSet.tsx","../src/components/Table/Table.tsx","../src/components/Friends/SearchFriend.tsx","../src/components/Friends/FriendList.tsx","../src/constants/uiDevices.ts","../src/libs/StringHelpers.ts","../src/components/typography/DynamicText.tsx","../src/components/NPCDialog/NPCDialogText.tsx","../src/hooks/useEventListener.ts","../src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx","../src/components/NPCDialog/NPCDialog.tsx","../src/components/NPCDialog/NPCMultiDialog.tsx","../src/components/HistoryDialog.tsx","../src/components/ImageCarousel/ImageCarousel.tsx","../src/components/ImageCarousel/SimpleImageCarousel.tsx","../src/components/InternalTabs/InternalTabs.tsx","../src/components/Abstractions/SlotsContainer.tsx","../src/hooks/useScrollOnDrag.ts","../src/components/Shortcuts/ShortcutsSetter.tsx","../src/components/RangeSlider.tsx","../src/components/QuantitySelector/QuantitySelector.tsx","../src/components/QuantitySelector/QuantitySelectorModal.tsx","../src/components/Item/Inventory/ItemQuantitySelectorModal.tsx","../src/components/Item/Inventory/ItemContainer.tsx","../src/components/itemSelector/ItemSelector.tsx","../src/components/Leaderboard/LeaderboardTable.tsx","../src/components/Leaderboard/Leaderboard.tsx","../src/components/ListMenu.tsx","../src/components/Pager.tsx","../src/components/ConfirmModal.tsx","../src/components/Marketplace/MarketplaceRows.tsx","../src/components/Marketplace/filters/index.tsx","../src/components/Marketplace/BuyPanel.tsx","../src/components/Marketplace/ManagmentPanel.tsx","../src/components/Marketplace/Marketplace.tsx","../src/components/Multitab/TabBody.tsx","../src/components/Multitab/Tab.tsx","../src/components/Multitab/TabsContainer.tsx","../src/components/PartySystem/PartyCreate/PartyCreate.tsx","../src/components/PartySystem/PartyDashboard/PartyRows.tsx","../src/components/PartySystem/PartyDashboard/PartyDashboard.tsx","../src/components/PartySystem/PartyInvite/PlayersRows.tsx","../src/components/PartySystem/PartyInvite/PartyInvite.tsx","../src/components/Text/HighlightedText.tsx","../src/components/PartySystem/PartyManager/PartyManagerRows.tsx","../src/components/PartySystem/PartyManager/PartyManager.tsx","../src/components/PartySystem/mockedConstantes/mockedValues.tsx","../src/components/ProgressBar.tsx","../src/components/Quests/QuestInfo/QuestInfo.tsx","../src/components/Quests/QuestList.tsx","../src/components/RadioButton.tsx","../src/components/RPGUI/RPGUIScrollbar.tsx","../src/components/RPGUI/RPGUIOverrides.tsx","../src/components/RPGUI/RPGUIRoot.tsx","../src/components/Shortcuts/Shortcuts.tsx","../src/components/SimpleProgressBar.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/SkillProgressBar.tsx","../src/components/SkillsContainer.tsx","../src/libs/CastingTypeHelper.ts","../src/components/Spellbook/cards/SpellInfo.tsx","../src/components/Spellbook/cards/SpellInfoDisplay.tsx","../src/components/Spellbook/cards/MobileSpellTooltip.tsx","../src/components/Spellbook/cards/SpellTooltip.tsx","../src/components/Spellbook/cards/SpellInfoWrapper.tsx","../src/components/Spellbook/Spell.tsx","../src/components/Spellbook/Spellbook.tsx","../src/components/Stepper.tsx","../src/components/TextArea.tsx","../src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx","../src/components/TimeWidget/TimeWidget.tsx","../src/components/TradingMenu/PremiumLabel.tsx","../src/components/TradingMenu/TradingItemRow.tsx","../src/components/TradingMenu/useTradingGold.ts","../src/components/TradingMenu/TradingMenu.tsx","../src/components/Truncate.tsx","../src/components/Image/ZoomableImage.tsx","../src/components/Tutorial/TutorialStepper.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport LeftArrowClickIcon from './img/arrow01-left-clicked.png';\nimport LeftArrowIcon from './img/arrow01-left.png';\nimport RightArrowClickIcon from './img/arrow01-right-clicked.png';\nimport RightArrowIcon from './img/arrow01-right.png';\n\nexport interface ArrowBarProps extends React.HTMLAttributes<HTMLDivElement> {\n direction: 'right' | 'left';\n onPointerDown: () => void;\n size?: number;\n scale?: number;\n}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n scale = 1,\n onPointerDown,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow\n size={size}\n scale={scale}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n scale={scale}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></RightArrow>\n )}\n </>\n );\n};\n\ninterface IArrowProps {\n size?: number;\n scale?: number;\n}\n\nconst LeftArrow = styled.span<IArrowProps>`\n background-image: url(${LeftArrowIcon});\n background-size: 100% 100%;\n left: 0;\n position: absolute;\n width: ${props => props.size || 40}px;\n height: ${props => props.size || 42}px;\n transform: scale(${props => props.scale || 1});\n :active {\n background-image: url(${LeftArrowClickIcon});\n }\n z-index: 2;\n`;\n\nconst RightArrow = styled.span<IArrowProps>`\n background-image: url(${RightArrowIcon});\n right: 0;\n position: absolute;\n width: ${props => props.size || 40}px;\n height: ${props => props.size || 42}px;\n background-size: 100% 100%;\n transform: scale(${props => props.scale || 1});\n :active {\n background-image: url(${RightArrowClickIcon});\n }\n z-index: 2;\n`;\n\nexport default SelectArrow;\n","export const uiColors = {\n lightGray: '#888',\n gray: '#4E4A4E',\n darkGray: '#3e3e3e',\n darkYellow: '#FFC857',\n yellow: '#FFFF00',\n orange: '#D27D2C',\n cardinal: '#C5283D',\n red: '#D04648',\n darkRed: '#442434',\n raisinBlack: '#191923',\n navyBlue: '#0E79B2',\n purple: '#6833A3',\n darkPurple: '#522761',\n blue: '#597DCE',\n darkBlue: '#30346D',\n brown: '#854C30',\n lightGreen: '#66cd1c',\n brownGreen: '#346524',\n white: '#fff'\n};\n","import React, { useEffect, useState } from 'react';\nimport { BeatLoader } from 'react-spinners';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\nimport { uiColors } from '../constants/uiColors';\n\nexport interface IAsyncDropdownOptionsProps {\n id: number;\n value: string;\n option: string | JSX.Element;\n}\n\nexport interface IAsyncDropdownProps {\n options: IAsyncDropdownOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n defaultValue?: string;\n opensUp?: boolean;\n}\n\nexport const AsyncDropdown: React.FC<IAsyncDropdownProps> = ({\n options,\n width,\n onChange,\n defaultValue,\n opensUp = false,\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>(\n defaultValue || options?.[0]?.value\n );\n const [selectedOption, setSelectedOption] = useState<string | JSX.Element>(\n options?.find(option => option.value === defaultValue)?.option ||\n options?.[0]?.option\n );\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n if (defaultValue) {\n setSelectedValue(defaultValue);\n setSelectedOption(\n //@ts-ignore\n options?.find(option => option.value === defaultValue)?.option\n );\n } else if (options?.length > 0) {\n setSelectedValue(options[0].value);\n setSelectedOption(options[0].option);\n }\n }, [options, defaultValue]);\n\n const handleSelection = (value: string, option: string | JSX.Element) => {\n if (value !== selectedValue) {\n setSelectedValue(value);\n setSelectedOption(option);\n onChange(value);\n }\n };\n\n return (\n <Container onMouseLeave={() => setOpened(false)} width={width}>\n <DropdownSelect\n id={`dropdown-${dropdownId}`}\n className=\"rpgui-dropdown-imp rpgui-dropdown-imp-header\"\n onPointerUp={() => setOpened(prev => !prev)}\n >\n <DropdownDisplay>\n <DropdownLabel>▼</DropdownLabel> {selectedOption}\n {!options.length && <BeatLoader size={4} color={uiColors.white} />}\n </DropdownDisplay>\n </DropdownSelect>\n\n <DropdownOptions\n className=\"rpgui-dropdown-imp\"\n opened={opened}\n opensUp={opensUp}\n >\n {options?.map(option => (\n <li\n key={option.id}\n onPointerUp={() => {\n handleSelection(option.value, option.option);\n setOpened(false);\n }}\n >\n {option.option}\n </li>\n ))}\n </DropdownOptions>\n </Container>\n );\n};\n\nconst DropdownDisplay = styled.span`\n display: flex;\n flex-wrap: wrap;\n justify-content: start;\n align-items: center;\n`;\n\nconst DropdownLabel = styled.label`\n margin-right: 0.5rem;\n`;\n\nconst Container = styled.div<{ width: string | undefined }>`\n position: relative;\n width: ${props => props.width || '100%'};\n`;\n\nconst DropdownSelect = styled.p`\n width: 100%;\n box-sizing: border-box;\n\n label {\n display: inline-block;\n transform: translateY(-2px);\n }\n`;\n\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n opensUp: boolean;\n}>`\n position: absolute;\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n bottom: ${props => (props.opensUp ? '100%' : 'auto')};\n top: ${props => (props.opensUp ? 'auto' : '100%')};\n margin: 0;\n padding: 0;\n\n @media (max-width: 768px) {\n padding: 8px 0;\n }\n`;\n","export const uiFonts = {\n size: {\n xxsmall: '8px',\n xsmall: '9px',\n small: '12px',\n medium: '14px',\n large: '16px',\n xLarge: '18px',\n xxLarge: '20px',\n xxxLarge: '24px',\n },\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\nexport enum ButtonTypes {\n RPGUIButton = 'rpgui-button',\n RPGUIGoldButton = 'rpgui-button golden',\n}\n\nexport interface IButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n disabled?: boolean;\n children: React.ReactNode;\n buttonType: ButtonTypes;\n onPointerDown?: (e: any) => void;\n}\n\nexport const Button = ({\n disabled = false,\n children,\n buttonType,\n onPointerDown,\n ...props\n}: IButtonProps) => {\n return (\n <ButtonContainer\n className={`${buttonType}`}\n disabled={disabled}\n {...props}\n onPointerDown={onPointerDown}\n >\n <p>{children}</p>\n </ButtonContainer>\n );\n};\n\nconst ButtonContainer = styled.button`\n height: 45px;\n font-size: ${uiFonts.size.small};\n`;\n","import { GRID_HEIGHT, GRID_WIDTH } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n atlasJSON: any;\n atlasIMG: any;\n spriteKey: string;\n width?: number;\n height?: number;\n grayScale?: boolean;\n opacity?: number;\n onPointerDown?: () => void;\n containerStyle?: any;\n imgStyle?: any;\n imgScale?: number;\n imgClassname?: string;\n centered?: boolean;\n borderRadius?: string;\n}\n\nexport const SpriteFromAtlas: React.FC<IProps> = ({\n atlasJSON,\n atlasIMG,\n spriteKey,\n width = GRID_WIDTH,\n height = GRID_HEIGHT,\n imgScale = 2,\n imgStyle,\n onPointerDown,\n containerStyle,\n grayScale = false,\n opacity = 1,\n imgClassname,\n centered,\n borderRadius,\n}) => {\n //! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).\n //!Due to React's limitations, we cannot import it from the public folder directly!\n\n const spriteData =\n atlasJSON?.frames?.[spriteKey] ||\n atlasJSON?.frames?.['others/no-image.png'];\n\n if (!spriteData) {\n console.error(\n `SpriteFromAtlas: Could not find sprite with key ${spriteKey} in atlasJSON.`\n );\n return null;\n }\n\n return (\n <Container\n width={width}\n height={height}\n hasHover={grayScale}\n onPointerDown={onPointerDown}\n style={containerStyle}\n >\n <ImgSprite\n className={`sprite-from-atlas-img ${imgClassname || ''}`}\n atlasIMG={atlasIMG}\n frame={spriteData.frame}\n scale={imgScale}\n grayScale={grayScale}\n opacity={opacity}\n style={imgStyle}\n centered={centered}\n borderRadius={borderRadius}\n />\n </Container>\n );\n};\n\ninterface IImgSpriteProps {\n atlasIMG: any;\n frame: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n scale: number;\n grayScale: boolean;\n opacity: number;\n centered?: boolean;\n borderRadius?: string;\n}\n\ninterface IContainerProps {\n width: number;\n height: number;\n hasHover: boolean;\n}\n\nconst Container = styled.div`\n width: ${(props: IContainerProps) => props.width}px;\n height: ${(props: IContainerProps) => props.height}px;\n ${(props: IContainerProps) =>\n !props.hasHover\n ? `&:hover {\n filter: sepia(100%) saturate(300%) brightness(70%) hue-rotate(180deg);\n }`\n : ``}\n`;\n\nconst ImgSprite = styled.div<IImgSpriteProps>`\n width: ${props => props.frame.w}px;\n height: ${props => props.frame.h}px;\n background-image: url(${props => props.atlasIMG});\n background-position: -${props => props.frame.x}px -${props => props.frame.y}px;\n transform: scale(${props => props.scale});\n position: relative;\n top: ${props => (props.centered ? '0' : '8px')};\n left: ${props => (props.centered ? '0' : '8px')};\n filter: ${props => (props.grayScale ? 'grayscale(100%)' : 'none')};\n opacity: ${props => props.opacity};\n border-radius: ${props => (props.borderRadius ? props.borderRadius : '0')};\n`;\n","import React, { Component, ErrorInfo, ReactNode } from 'react';\nimport atlasJSON from '../../../mocks/atlas/items/items.json';\nimport atlasIMG from '../../../mocks/atlas/items/items.png';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\n\ninterface Props {\n children?: ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n public state: State = {\n hasError: false,\n };\n\n public static getDerivedStateFromError(_: Error): State {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n public componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('Uncaught error:', error, errorInfo);\n }\n\n public render() {\n if (this.state.hasError) {\n return (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={'others/no-image.png'}\n imgScale={3}\n />\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n children: React.ReactNode;\n maxLines?: 1 | 2 | 3;\n maxWidth: string;\n fontSize?: string;\n center?: boolean;\n}\n\nexport const Ellipsis = ({\n children,\n maxLines = 1,\n maxWidth,\n fontSize,\n center,\n}: IProps) => {\n return (\n <Container maxWidth={maxWidth} fontSize={fontSize} center={center}>\n <span className={`ellipsis-${maxLines}-lines`}>{children}</span>\n </Container>\n );\n};\n\ninterface IContainerProps {\n maxWidth?: string;\n fontSize?: string;\n center?: boolean;\n}\n\nconst Container = styled.span<IContainerProps>`\n display: block;\n margin: 0;\n\n .ellipsis-1-lines {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n max-width: ${props => props.maxWidth};\n font-size: ${props => props.fontSize};\n\n ${props => props.center && `margin: 0 auto;`}\n }\n\n .ellipsis-2-lines {\n display: block;\n display: -webkit-box;\n max-width: ${props => props.maxWidth}px;\n\n height: 25px;\n margin: 0 auto;\n line-height: 1;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: ${props => props.fontSize};\n }\n\n .ellipsis-3-lines {\n display: block;\n display: -webkit-box;\n max-width: ${props => props.maxWidth}px;\n\n height: 43px;\n margin: 0 auto;\n line-height: 1;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: ${props => props.fontSize};\n }\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { Ellipsis } from '../shared/Ellipsis';\n\nexport interface IPropertySelectProps {\n availableProperties: Array<IPropertiesProps>;\n selectedProperty?: IPropertiesProps;\n children?: React.ReactNode;\n onChange: (selectedProperty: IPropertiesProps) => void;\n}\n\nexport interface IPropertiesProps {\n id: string;\n name: string;\n}\n\nexport const PropertySelect: React.FC<IPropertySelectProps> = ({\n availableProperties,\n onChange,\n}) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const propertiesLength = availableProperties.length - 1;\n\n const onLeftClick = () => {\n if (currentIndex === 0) setCurrentIndex(propertiesLength);\n else setCurrentIndex(index => index - 1);\n };\n const onRightClick = () => {\n if (currentIndex === propertiesLength) setCurrentIndex(0);\n else setCurrentIndex(index => index + 1);\n };\n\n useEffect(() => {\n onChange(availableProperties[currentIndex]);\n }, [currentIndex]);\n\n useEffect(() => {\n setCurrentIndex(0);\n }, [JSON.stringify(availableProperties)]);\n\n const getCurrentSelectionName = () => {\n const item = availableProperties[currentIndex];\n if (item) {\n return item.name;\n }\n return '';\n };\n\n return (\n <Container>\n <TextOverlay>\n <p>\n <Item>\n <Ellipsis maxLines={1} maxWidth=\"60%\" center>\n {getCurrentSelectionName()}\n </Ellipsis>\n </Item>\n </p>\n </TextOverlay>\n <div className=\"rpgui-progress-track\"></div>\n\n <SelectArrow direction=\"left\" onPointerDown={onLeftClick}></SelectArrow>\n <SelectArrow direction=\"right\" onPointerDown={onRightClick}></SelectArrow>\n </Container>\n );\n};\n\nconst Item = styled.span`\n font-size: 1rem;\n color: white;\n text-align: center;\n z-index: 1;\n position: absolute;\n top: 12px;\n width: 100%;\n\n p {\n margin: 0 auto;\n font-size: ${uiFonts.size.small};\n }\n`;\n\nconst TextOverlay = styled.div`\n width: 100%;\n position: relative;\n`;\n\ninterface IContainerProps {\n percentageWidth?: number;\n minWidth?: number;\n style?: Record<string, any>;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: start;\n align-items: flex-start;\n min-width: 100px;\n width: 40%;\n`;\n\nexport default PropertySelect;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nimport { ErrorBoundary } from '../Item/Inventory/ErrorBoundary';\nimport PropertySelect, {\n IPropertiesProps,\n} from '../PropertySelect/PropertySelect';\n\nexport interface ICharacterProps {\n name: string;\n textureKey: string;\n}\n\nexport interface ICharacterSelectionProps {\n availableCharacters: ICharacterProps[];\n atlasJSON: any;\n atlasIMG: any;\n onChange: (textureKey: string) => void;\n}\n\nexport const CharacterSelection: React.FC<ICharacterSelectionProps> = ({\n availableCharacters,\n atlasJSON,\n atlasIMG,\n onChange,\n}) => {\n const propertySelectValues = availableCharacters.map((item) => {\n return {\n id: item.textureKey,\n name: item.name,\n };\n });\n\n const [selectedValue, setSelectedValue] = useState<IPropertiesProps>();\n const [selectedSpriteKey, setSelectedSpriteKey] = useState('');\n\n const onSelectedValueChange = () => {\n const textureKey = selectedValue ? selectedValue.id : '';\n const spriteKey = textureKey ? textureKey + '/down/standing/0.png' : '';\n\n if (spriteKey === selectedSpriteKey) {\n return;\n }\n\n setSelectedSpriteKey(spriteKey);\n onChange(textureKey);\n };\n\n useEffect(() => {\n onSelectedValueChange();\n }, [selectedValue]);\n\n useEffect(() => {\n setSelectedValue(propertySelectValues[0]);\n }, [availableCharacters]);\n\n return (\n <Container>\n {selectedSpriteKey && atlasIMG && atlasJSON && (\n <ErrorBoundary>\n <SpriteFromAtlas\n spriteKey={selectedSpriteKey}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n imgScale={4}\n height={80}\n width={64}\n containerStyle={{\n display: 'flex',\n alignItems: 'center',\n paddingBottom: '15px',\n }}\n imgStyle={{\n left: '22px',\n }}\n />\n </ErrorBoundary>\n )}\n <PropertySelect\n availableProperties={propertySelectValues}\n onChange={(value) => {\n setSelectedValue(value);\n }}\n />\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n image-rendering: pixelated;\n`;\n\nexport default CharacterSelection;\n","import dayjs from 'dayjs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { FaTimes } from 'react-icons/fa';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { ChatMessage } from '../ChatRevamp/types';\n\nexport interface IStyles {\n textColor?: string;\n buttonColor?: string;\n buttonBackgroundColor?: string;\n width?: string;\n height?: string;\n}\n\nexport interface IEmitter {\n _id: string;\n name: string;\n}\n\nexport interface IChatProps {\n chatMessages: ChatMessage[];\n onSendChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n opacity?: number;\n sendMessage: boolean;\n styles?: IStyles;\n isExpanded: boolean;\n}\n\nexport const Chat: React.FC<IChatProps> = ({\n chatMessages,\n onSendChatMessage,\n onCloseButton,\n onFocus,\n onBlur,\n styles = {\n textColor: '#ff6600',\n buttonColor: '#ff6600',\n buttonBackgroundColor: '#333',\n width: '100%',\n height: '100%',\n },\n isExpanded,\n}) => {\n const [message, setMessage] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (isExpanded) {\n scrollChatToBottom();\n }\n inputRef.current?.focus();\n }, [chatMessages, isExpanded]);\n\n const scrollChatToBottom = () => {\n const scrollingElement = document.querySelector('.chat-body');\n if (scrollingElement) {\n scrollingElement.scrollTop = scrollingElement.scrollHeight;\n }\n };\n\n const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!message.trim()) return;\n onSendChatMessage(message);\n setMessage('');\n };\n\n const truncateName = (name: string, maxLength: number = 10) => {\n return name.length > maxLength ? name.slice(0, maxLength) + '...' : name;\n };\n\n const formatMessage = (chatMessage: ChatMessage) => {\n const timestamp = dayjs(chatMessage.createdAt).format('HH:mm');\n const truncatedName = truncateName(chatMessage.emitter.name);\n return `${timestamp} ${truncatedName}: ${chatMessage.message}`;\n };\n\n return (\n <ChatContainer\n width={styles.width || 'auto'}\n height={styles.height || 'auto'}\n isExpanded={isExpanded}\n >\n {isExpanded && (\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n <CloseButton onClick={onCloseButton}>\n <FaTimes />\n </CloseButton>\n <MessagesContainer className=\"chat-body\">\n {chatMessages.map((chatMessage, index) => (\n <Message\n color={styles.textColor || uiColors.yellow}\n key={`${chatMessage._id}_${index}`}\n >\n {formatMessage(chatMessage)}\n </Message>\n ))}\n </MessagesContainer>\n </ErrorBoundary>\n )}\n <Form onSubmit={handleSubmit} isExpanded={isExpanded}>\n <TextField\n ref={inputRef}\n value={message}\n onChange={e => setMessage(e.target.value)}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n placeholder=\"Type your message...\"\n />\n <SendButton type=\"submit\" disabled={!message.trim()}>\n ▶\n </SendButton>\n </Form>\n </ChatContainer>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\ninterface IMessageProps {\n color: string;\n}\n\nconst ChatContainer = styled.div<IContainerProps & { isExpanded: boolean }>`\n width: ${props => props.width};\n height: ${props => (props.isExpanded ? props.height : 'auto')};\n background-color: rgba(30, 30, 30, 0.3);\n display: flex;\n flex-direction: column;\n position: relative;\n border-radius: 8px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n overflow: hidden;\n`;\n\nconst CloseButton = styled.button`\n position: absolute;\n top: 8px;\n right: 8px;\n background-color: transparent;\n border: none;\n color: white;\n font-size: 16px;\n cursor: pointer;\n z-index: 1;\n`;\n\nconst MessagesContainer = styled.div`\n flex-grow: 1;\n overflow-y: auto;\n padding: 12px;\n margin-bottom: 8px;\n\n scrollbar-width: thin;\n scrollbar-color: rgba(51, 51, 51, 0.4) rgba(30, 30, 30, 0.4);\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: rgba(30, 30, 30, 0.4);\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(51, 51, 51, 0.4);\n border-radius: 3px;\n }\n`;\n\nconst Message = styled.div<IMessageProps>`\n margin-bottom: 6px;\n color: ${({ color }) => color};\n font-family: 'Press Start 2P', cursive;\n font-size: 0.7rem;\n line-height: 1.4;\n word-break: break-word;\n`;\n\nconst Form = styled.form<{ isExpanded: boolean }>`\n display: flex;\n padding: 8px;\n background-color: rgba(42, 42, 42, 0.4);\n border-radius: ${props => (props.isExpanded ? '0' : '8px')};\n`;\n\nconst TextField = styled.input`\n flex-grow: 1;\n background-color: rgba(26, 26, 26, 0.6);\n color: #ff6600;\n border: 1px solid rgba(51, 51, 51, 0.6);\n border-radius: 4px;\n padding: 8px;\n margin-right: 8px;\n font-family: 'Press Start 2P', cursive;\n font-size: 0.7rem;\n height: 32px;\n transition: border-color 0.3s, background-color 0.3s;\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.5);\n font-size: 0.6rem;\n }\n\n &:focus {\n outline: none;\n border-color: #ff6600;\n background-color: rgba(42, 42, 42, 0.9);\n }\n`;\n\nconst SendButton = styled.button`\n background-color: transparent;\n color: #ff6600;\n border: none;\n padding: 8px 12px;\n font-size: 14px;\n cursor: pointer;\n transition: opacity 0.3s ease;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n","import React from 'react';\n\nexport interface IInputProps\n extends React.DetailedHTMLProps<\n React.InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n > {\n innerRef?: React.Ref<HTMLInputElement>;\n}\n\nexport const Input: React.FC<IInputProps> = ({ ...props }) => {\n const { innerRef, ...rest } = props;\n\n return <input {...rest} ref={props.innerRef} />;\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\nexport enum RPGUIContainerTypes {\n Framed = 'framed',\n FramedGold = 'framed-golden',\n FramedGold2 = 'framed-golden-2',\n FramedGrey = 'framed-grey',\n}\nexport interface IRPGUIContainerProps {\n type: RPGUIContainerTypes;\n children: React.ReactNode;\n width?: string;\n height?: string;\n className?: string;\n}\n\nexport const RPGUIContainer: React.FC<IRPGUIContainerProps> = ({\n children,\n type,\n width = '50%',\n height,\n className,\n}) => {\n return (\n <Container\n width={width}\n height={height || 'auto'}\n className={`rpgui-container ${type} ${className}`}\n >\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\nconst Container = styled.div<IContainerProps>`\n height: ${props => props.height};\n width: ${({ width }) => width};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n`;\n","import styled from 'styled-components';\n\ninterface IColumn {\n flex?: number;\n alignItems?: string;\n justifyContent?: string;\n flexWrap?: string;\n}\n\nexport const Column = styled.div<IColumn>`\n flex: ${props => props.flex || 'auto'};\n display: flex;\n flex-wrap: ${props => props.flexWrap || 'nowrap'};\n align-items: ${props => props.alignItems || 'flex-start'};\n justify-content: ${props => props.justifyContent || 'flex-start'};\n`;\n","import { ILocalChatMessage } from '@rpg-engine/shared';\nimport dayjs from 'dayjs';\nimport React, { useEffect, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { Input } from '../Input';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { Column } from '../shared/Column';\n\ninterface IEmitter {\n _id: string;\n name: string;\n}\nexport interface IChatDeprecatedProps {\n chatMessages: ILocalChatMessage[];\n onSendChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n opacity?: number;\n width?: string;\n height?: string;\n}\n\nexport const ChatDeprecated: React.FC<IChatDeprecatedProps> = ({\n chatMessages,\n onSendChatMessage,\n opacity = 1,\n width = '100%',\n height = '250px',\n onCloseButton,\n onFocus,\n onBlur,\n}) => {\n const [message, setMessage] = useState('');\n\n useEffect(() => {\n scrollChatToBottom();\n }, []);\n\n useEffect(() => {\n scrollChatToBottom();\n }, [chatMessages]);\n\n const scrollChatToBottom = () => {\n const scrollingElement = document.querySelector('.chat-body');\n if (scrollingElement) {\n scrollingElement.scrollTop = scrollingElement.scrollHeight;\n }\n };\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n onSendChatMessage(message);\n setMessage('');\n };\n const getInputValue = (value: string) => {\n setMessage(value);\n };\n\n const onRenderMessageLines = (\n emitter: IEmitter,\n createdAt: string | undefined,\n message: string\n ) => {\n return `${dayjs(createdAt || new Date()).format('HH:mm')} ${\n emitter?.name ? `${emitter.name}: ` : 'Unknown: '\n } ${message}`;\n };\n\n const onRenderChatMessages = (chatMessages: ILocalChatMessage[]) => {\n return chatMessages?.length ? (\n chatMessages?.map(({ _id, createdAt, emitter, message }, index) => (\n <MessageText key={`${_id}_${index}`}>\n {onRenderMessageLines(emitter, createdAt as string, message)}\n </MessageText>\n ))\n ) : (\n <MessageText>No messages available.</MessageText>\n );\n };\n\n return (\n <Container>\n <CustomContainer\n type={RPGUIContainerTypes.FramedGrey}\n width={width}\n height={height}\n className=\"chat-container\"\n opacity={opacity}\n >\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n {onCloseButton && (\n <CloseButton onPointerDown={onCloseButton}>X</CloseButton>\n )}\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGrey}\n width={'100%'}\n height={'80%'}\n className=\"chat-body dark-background\"\n >\n {onRenderChatMessages(chatMessages)}\n </RPGUIContainer>\n\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <CustomInput\n value={message}\n id=\"inputMessage\"\n onChange={e => getInputValue(e.target.value)}\n height={20}\n className=\"chat-input dark-background\"\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n id=\"chat-send-button\"\n >\n Send\n </Button>\n </Column>\n </Form>\n </ErrorBoundary>\n </CustomContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n position: relative;\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 2px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 0.7rem;\n`;\n\nconst CustomInput = styled(Input)`\n height: 30px;\n width: 100%;\n\n .rpgui-content .input {\n min-height: 39px;\n }\n`;\n\ninterface ICustomContainerProps {\n opacity: number;\n}\n\nconst CustomContainer = styled(RPGUIContainer)`\n display: block;\n\n opacity: ${(props: ICustomContainerProps) => props.opacity};\n\n &:hover {\n opacity: 1;\n }\n\n .dark-background {\n background-color: ${uiColors.darkGray} !important;\n }\n\n .chat-body {\n &.rpgui-container.framed-grey {\n background: unset;\n }\n max-height: 170px;\n overflow-y: auto;\n }\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst MessageText = styled.p`\n display: block !important;\n width: 100%;\n font-size: ${uiFonts.size.xsmall} !important;\n overflow-y: auto;\n margin: 0;\n`;\n","import { useEffect, useState } from 'react';\nimport { PrivateChatCharacter } from '../components/ChatRevamp/types';\n\ninterface IUseChat {\n minimizedByDefault: boolean;\n isPrivate: boolean;\n onChangeTab: (tabId: string) => void;\n onPreviousChatCharacterClick?: (character: PrivateChatCharacter) => void;\n hideSearchCharacterUI?: () => void;\n unseenMessageCharacterIds?: string[];\n}\n\nexport const useChat = ({\n minimizedByDefault,\n isPrivate,\n onChangeTab,\n onPreviousChatCharacterClick,\n hideSearchCharacterUI,\n unseenMessageCharacterIds,\n}: IUseChat) => {\n const [showRecentChats, setShowRecentChats] = useState(false);\n const [isExpanded, setIsExpanded] = useState(!minimizedByDefault);\n\n useEffect(() => {\n if (isPrivate) {\n setIsExpanded(true);\n }\n }, [isPrivate]);\n\n const toggleExpand = () => setIsExpanded(prev => !prev);\n\n const toggleRecentChats = () => setShowRecentChats(prev => !prev);\n\n const handleTabChange = (tabId: string) => {\n if (tabId === 'private') {\n setIsExpanded(true);\n }\n onChangeTab(tabId);\n };\n\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n if (onPreviousChatCharacterClick) {\n onPreviousChatCharacterClick(character);\n }\n if (hideSearchCharacterUI) {\n hideSearchCharacterUI();\n }\n };\n\n return {\n showRecentChats,\n isExpanded,\n toggleExpand,\n toggleRecentChats,\n handleTabChange,\n handlePreviousChatCharacterClick,\n hasUnseenMessages:\n unseenMessageCharacterIds && unseenMessageCharacterIds?.length > 0,\n };\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport { RxMagnifyingGlass } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { IStyles } from '../Chat/Chat';\nimport { Column } from '../shared/Column';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { PrivateChatCharacter } from './types';\n\ninterface ISearchCharacterProps {\n onFocus?: () => void;\n onBlur?: () => void;\n onChangeCharacterName: (characterName: string) => void;\n styles?: IStyles;\n recentCharacters?: PrivateChatCharacter[];\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n hideSearchCharacterUI: () => void;\n}\n\nexport const SearchCharacter = ({\n onChangeCharacterName,\n onBlur,\n onFocus,\n recentCharacters,\n hideSearchCharacterUI,\n onCharacterClick,\n styles = {\n textColor: '#c65102',\n buttonColor: '#005b96',\n buttonBackgroundColor: 'rgba(0,0,0,.2)',\n width: '80%',\n height: 'auto',\n },\n}: ISearchCharacterProps) => {\n const [characterName, setCharacterName] = useState('');\n const searchCharacterRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n if (searchCharacterRef.current) {\n searchCharacterRef.current.focus();\n }\n }, 100);\n\n return () => clearTimeout(timer);\n }, []);\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!characterName || characterName.trim() === '') return;\n onChangeCharacterName(characterName);\n };\n\n const handleCharacterClick = (character: PrivateChatCharacter) => {\n if (!onCharacterClick) return;\n setCharacterName('');\n onCharacterClick(character);\n hideSearchCharacterUI();\n };\n\n return (\n <SearchContainer>\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <TextField\n value={characterName}\n ref={searchCharacterRef}\n id=\"characterName\"\n name=\"characterName\"\n onChange={e => {\n setCharacterName(e.target.value);\n onChangeCharacterName(e.target.value);\n }}\n placeholder=\"Search for a character...\"\n height={20}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <SearchButton\n type=\"submit\"\n buttonColor={styles?.buttonColor || '#005b96'}\n buttonBackgroundColor={\n styles?.buttonBackgroundColor || 'rgba(0,0,0,.5)'\n }\n id=\"chat-send-button\"\n style={{ borderRadius: '20%' }}\n >\n <RxMagnifyingGlass size={15} />\n </SearchButton>\n </Column>\n </Form>\n\n {recentCharacters && recentCharacters.length > 0 && (\n <ListContainer>\n {recentCharacters.map(character => (\n <ListElement\n onPointerDown={() => handleCharacterClick(character)}\n key={character._id}\n >\n <Ellipsis maxWidth=\"150px\" maxLines={1}>\n {character.name}\n </Ellipsis>\n </ListElement>\n ))}\n </ListContainer>\n )}\n </SearchContainer>\n );\n};\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst SearchContainer = styled.div`\n width: 100%;\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst TextField = styled.input`\n width: 100%;\n background-color: rgba(0, 0, 0, 0.25) !important;\n border: none !important;\n max-height: 28px !important;\n`;\n\nconst SearchButton = styled.button<IButtonProps>`\n color: ${({ buttonColor }) => buttonColor};\n background-color: ${({ buttonBackgroundColor }) => buttonBackgroundColor};\n width: 28px;\n height: 28px;\n border: none !important;\n`;\n\nconst ListContainer = styled.ul`\n border: none;\n overflow-y: scroll;\n list-style: none;\n padding: 0;\n`;\n\nconst ListElement = styled.li`\n margin: 0.5rem 0 !important;\n font-size: ${uiFonts.size.small};\n padding: 0.5rem 2px;\n\n &:hover {\n color: #ff0;\n background-color: ${uiColors.darkGray};\n }\n\n button {\n all: unset;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Chat, IStyles } from '../Chat/Chat';\nimport { SearchCharacter } from './SearchCharacter';\nimport { ChatMessage, PrivateChatCharacter } from './types';\n\ninterface ChatContentProps {\n isPrivate: boolean;\n isTrade: boolean;\n isGlobal: boolean;\n searchCharacterUI: boolean;\n chatMessages: ChatMessage[];\n onSendGlobalChatMessage: (message: string) => void;\n onSendLocalChatMessage: (message: string) => void;\n onSendPrivateChatMessage: (message: string) => void;\n onSendTradeMessage: (message: string) => void;\n onCloseButton: () => void;\n styles?: IStyles;\n onFocus?: () => void;\n onBlur?: () => void;\n isExpanded: boolean;\n autoCloseOnSend: boolean;\n onChangeCharacterName: (characterName: string) => void;\n privateChatCharacters?: PrivateChatCharacter[];\n hideSearchCharacterUI: () => void;\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n isGuild: boolean;\n onSendGuildChatMessage: (message: string) => void;\n}\n\nexport const ChatContent: React.FC<ChatContentProps> = ({\n isPrivate,\n isTrade,\n isGlobal,\n searchCharacterUI,\n chatMessages,\n onSendLocalChatMessage,\n onSendGlobalChatMessage,\n onSendPrivateChatMessage,\n onSendTradeMessage,\n onCloseButton,\n styles,\n onFocus,\n onBlur,\n isExpanded,\n autoCloseOnSend,\n onChangeCharacterName,\n privateChatCharacters,\n hideSearchCharacterUI,\n onCharacterClick,\n isGuild,\n onSendGuildChatMessage,\n}) => {\n const handleSendMessage = (message: string) => {\n if (autoCloseOnSend) {\n onCloseButton();\n }\n\n if (isPrivate) {\n onSendPrivateChatMessage(message);\n } else if (isTrade) {\n onSendTradeMessage(message);\n } else if (isGuild) {\n onSendGuildChatMessage(message);\n } else if (isGlobal) {\n onSendGlobalChatMessage(message);\n } else {\n onSendLocalChatMessage(message);\n }\n };\n\n if (isPrivate && searchCharacterUI) {\n return (\n <SearchCharacter\n onFocus={onFocus}\n onBlur={onBlur}\n onChangeCharacterName={onChangeCharacterName}\n styles={styles}\n recentCharacters={privateChatCharacters}\n hideSearchCharacterUI={hideSearchCharacterUI}\n onCharacterClick={onCharacterClick}\n />\n );\n }\n\n return (\n <ChatWrapper>\n <Chat\n chatMessages={chatMessages}\n onSendChatMessage={handleSendMessage}\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={isExpanded}\n />\n </ChatWrapper>\n );\n};\n\nconst ChatWrapper = styled.div`\n flex-grow: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface ChatTabsProps {\n tabs: { label: string; id: string }[];\n activeTab: string;\n onChangeTab: (tabId: string) => void;\n}\n\nexport const ChatTabs: React.FC<ChatTabsProps> = ({\n tabs,\n activeTab,\n onChangeTab,\n}) => (\n <TabContainer>\n {tabs.map((tab, index) => (\n <Tab\n key={`${tab.label}_${index}`}\n active={tab.id === activeTab}\n onPointerDown={() => onChangeTab(tab.id)}\n >\n {tab.label}\n </Tab>\n ))}\n </TabContainer>\n);\n\nconst TabContainer = styled.div`\n display: flex;\n gap: 10px;\n align-items: center;\n flex-grow: 1;\n`;\n\nconst Tab = styled.button<{ active: boolean }>`\n width: 120px;\n color: white;\n font-size: 0.8rem;\n all: unset;\n padding: 0.6rem;\n font-size: 0.8rem;\n border-radius: 5px 5px 0 0;\n border-width: 0.25rem 0.25rem 0 0.25rem;\n border-style: solid;\n border-color: ${props =>\n props.active ? 'rgba(198, 81, 2, 0.5)' : 'rgba(128, 128, 128, 0.5)'};\n background-color: ${props =>\n props.active ? uiColors.orange : 'rgba(0, 0, 0, 0.2)'};\n color: ${props => (props.active ? 'white' : uiColors.darkGray)};\n`;\n","import React from 'react';\nimport { IoMdContract, IoMdExpand } from 'react-icons/io';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface ExpandButtonProps {\n isExpanded: boolean;\n onClick: () => void;\n}\n\nexport const ExpandButton: React.FC<ExpandButtonProps> = ({\n isExpanded,\n onClick,\n}) => (\n <StyledExpandButton isExpanded={isExpanded} onClick={onClick}>\n {isExpanded ? <IoMdContract size={20} /> : <IoMdExpand size={20} />}\n </StyledExpandButton>\n);\n\nconst StyledExpandButton = styled.button<{ isExpanded: boolean }>`\n position: absolute;\n top: 0;\n ${({ isExpanded }) => (isExpanded ? 'right: 0' : 'left: 0.5rem')};\n width: 30px;\n height: 30px;\n background-color: ${uiColors.orange};\n color: white;\n border: none;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: all 0.3s ease;\n z-index: 10;\n\n &:hover {\n background-color: ${uiColors.orange};\n }\n`;\n","import React from 'react';\nimport { RxCross2, RxMagnifyingGlass } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { PrivateChatCharacter } from './types';\n\ninterface IRecentChatsProps {\n showRecentChats: boolean;\n toggleRecentChats: () => void;\n hasUnseenMessages: boolean;\n showSearchCharacterUI: () => void;\n recentChatCharacters?: PrivateChatCharacter[];\n recentSelectedChatCharacterId?: string;\n unseenMessageCharacterIds?: string[];\n onPreviousChatCharacterClick: (character: PrivateChatCharacter) => void;\n onRemoveRecentChatCharacter?: (character: PrivateChatCharacter) => void;\n isPrivate: boolean;\n hideSearchCharacterUI: () => void; // Add this line\n}\n\nexport const RecentChats: React.FC<IRecentChatsProps> = ({\n showRecentChats,\n toggleRecentChats,\n hasUnseenMessages,\n showSearchCharacterUI,\n recentChatCharacters,\n recentSelectedChatCharacterId,\n unseenMessageCharacterIds,\n onPreviousChatCharacterClick,\n onRemoveRecentChatCharacter,\n isPrivate,\n hideSearchCharacterUI, // Add this line\n}) => {\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n onPreviousChatCharacterClick(character);\n hideSearchCharacterUI(); // Call hideSearchCharacterUI here\n };\n\n return (\n <RecentChatTabContainer isOpen={showRecentChats} isPrivate={isPrivate}>\n <RecentChatTopBar>\n <BurgerIconContainer\n onPointerDown={toggleRecentChats}\n hasUnseenMessages={hasUnseenMessages}\n >\n <BurgerLineIcon />\n <BurgerLineIcon />\n <BurgerLineIcon />\n </BurgerIconContainer>\n {showRecentChats && (\n <SearchButton onPointerDown={showSearchCharacterUI}>\n <RxMagnifyingGlass size={16} color={uiColors.white} />\n </SearchButton>\n )}\n </RecentChatTopBar>\n <RecentChatLogContainer isOpen={showRecentChats}>\n {recentChatCharacters?.map(character => (\n <ListElementContainer key={character._id}>\n <ListElement\n active={character._id === recentSelectedChatCharacterId}\n onPointerDown={() => handlePreviousChatCharacterClick(character)}\n >\n <StatusDot\n isUnseen={\n unseenMessageCharacterIds?.includes(character._id) ?? false\n }\n />\n <Ellipsis maxWidth=\"140px\" maxLines={1}>\n {character.name}\n </Ellipsis>\n </ListElement>\n <CloseButton\n className=\"close-button\"\n onPointerDown={() => onRemoveRecentChatCharacter?.(character)}\n >\n <RxCross2 size={16} />\n </CloseButton>\n </ListElementContainer>\n ))}\n </RecentChatLogContainer>\n </RecentChatTabContainer>\n );\n};\n\nconst RecentChatTabContainer = styled.div<{\n isPrivate: boolean;\n isOpen: boolean;\n}>`\n display: ${props => (props.isPrivate ? 'flex' : 'none')};\n flex-direction: column;\n border-right: 1px solid ${uiColors.gray};\n outline: none;\n width: ${props => (props.isOpen ? '25%' : '30px')};\n max-width: 200px;\n min-width: ${props => (props.isOpen ? '180px' : '30px')};\n transition: all 0.3s ease-in-out;\n overflow: hidden;\n height: 100%;\n @media (max-width: 768px) {\n width: ${props => (props.isOpen ? '50%' : '30px')};\n min-width: ${props => (props.isOpen ? '150px' : '30px')};\n }\n`;\n\nconst RecentChatTopBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 30px;\n flex-shrink: 0;\n`;\n\nconst SearchButton = styled.button`\n border: none;\n background-color: transparent;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 2px;\n padding: 4px;\n position: relative;\n`;\n\nconst BurgerIconContainer = styled.button<{ hasUnseenMessages: boolean }>`\n border: none;\n background-color: transparent;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n padding: 4px;\n gap: 2px;\n position: relative;\n\n &:after {\n content: '';\n width: 6px;\n height: 6px;\n position: absolute;\n top: 0;\n right: 2px;\n border-radius: 50%;\n background-color: ${uiColors.lightGreen};\n display: ${props => (props.hasUnseenMessages ? 'block' : 'none')};\n }\n`;\n\nconst BurgerLineIcon = styled.span`\n width: 1rem;\n height: 2px;\n background-color: #ffffff;\n`;\n\nconst RecentChatLogContainer = styled.div<{ isOpen: boolean }>`\n display: ${props => (props.isOpen ? 'flex' : 'none')};\n opacity: ${props => (props.isOpen ? 1 : 0)};\n flex-direction: column;\n gap: 0.25rem; // Reduce this from 0.5rem to 0.25rem\n transition: opacity 0.3s ease-in-out;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n flex-grow: 1;\n height: 0;\n\n /* Firefox */\n scrollbar-width: thin;\n scrollbar-color: rgba(51, 51, 51, 0.4) rgba(30, 30, 30, 0.4);\n\n /* WebKit and Chromium-based browsers */\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: rgba(30, 30, 30, 0.2);\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(255, 102, 0, 0.5);\n border-radius: 4px;\n border: 2px solid rgba(30, 30, 30, 0.2);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 102, 0, 0.7);\n }\n`;\n\nconst ListElementContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 2px 0; // Add small vertical padding\n`;\n\nconst ListElement = styled.button<{ active: boolean }>`\n margin: 0 !important; // Remove vertical margins\n font-size: ${uiFonts.size.small} !important;\n padding: 2px;\n all: unset;\n color: ${props => (props.active ? uiColors.yellow : uiColors.white)};\n width: 100%;\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n\n &:hover {\n color: #ff0;\n }\n max-width: calc(100% - 24px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nconst StatusDot = styled.span<{ isUnseen: boolean }>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: ${props =>\n props.isUnseen ? uiColors.lightGreen : uiColors.gray};\n display: inline-block;\n margin-right: 6px;\n`;\n\nconst CloseButton = styled.button`\n all: unset;\n font-size: ${uiFonts.size.xxsmall};\n margin: 0 0.5rem;\n transition: all 0.2s ease-in-out;\n background-color: ${uiColors.red};\n color: ${uiColors.white};\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n &:hover {\n background-color: ${uiColors.white};\n color: ${uiColors.red};\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useChat } from '../../hooks/useChat';\nimport { Chat } from '../Chat/Chat';\nimport { ChatContent } from './ChatContent';\nimport { ChatTabs } from './ChatTabs';\nimport { ExpandButton } from './ExpandButton';\nimport { RecentChats } from './RecentChats';\nimport { IChatRevampProps } from './types';\n\nexport const ChatRevamp = ({\n chatMessages,\n onSendGlobalChatMessage,\n onSendGuildChatMessage, // Add this new prop\n onChangeCharacterName,\n onFocus,\n onBlur,\n onCloseButton,\n styles,\n tabs,\n onChangeTab,\n activeTab = 'global',\n privateChatCharacters,\n onCharacterClick,\n onSendPrivateChatMessage,\n recentChatCharacters,\n recentSelectedChatCharacterId,\n onPreviousChatCharacterClick,\n onRemoveRecentChatCharacter,\n unseenMessageCharacterIds,\n onSendTradeMessage,\n searchCharacterUI,\n hideSearchCharacterUI,\n showSearchCharacterUI,\n minimizedByDefault = false,\n autoCloseOnSend,\n onSendLocalChatMessage,\n}: IChatRevampProps) => {\n const isPrivate = activeTab === 'private';\n const isTrade = activeTab === 'trade';\n const isGuild = activeTab === 'guild';\n const isGlobal = activeTab === 'global';\n const chatHook = useChat({\n minimizedByDefault,\n isPrivate,\n onChangeTab,\n onPreviousChatCharacterClick,\n unseenMessageCharacterIds,\n });\n\n return (\n <ChatRevampContainer>\n <TopBar isExpanded={chatHook.isExpanded}>\n {chatHook.isExpanded && (\n <ChatTabs\n tabs={tabs}\n activeTab={activeTab}\n onChangeTab={chatHook.handleTabChange}\n />\n )}\n <ExpandButton\n isExpanded={chatHook.isExpanded}\n onClick={chatHook.toggleExpand}\n />\n </TopBar>\n <AllChatsContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n isExpanded={chatHook.isExpanded}\n >\n {chatHook.isExpanded ? (\n <ExpandedChatContent>\n {isPrivate && (\n <RecentChats\n showRecentChats={chatHook.showRecentChats}\n toggleRecentChats={chatHook.toggleRecentChats}\n hasUnseenMessages={chatHook.hasUnseenMessages || false}\n showSearchCharacterUI={showSearchCharacterUI}\n recentChatCharacters={recentChatCharacters}\n recentSelectedChatCharacterId={recentSelectedChatCharacterId}\n unseenMessageCharacterIds={unseenMessageCharacterIds}\n onPreviousChatCharacterClick={\n chatHook.handlePreviousChatCharacterClick\n }\n onRemoveRecentChatCharacter={onRemoveRecentChatCharacter}\n isPrivate={isPrivate}\n hideSearchCharacterUI={hideSearchCharacterUI}\n />\n )}\n <ChatContentWrapper isPrivate={isPrivate}>\n <ChatContent\n isPrivate={isPrivate}\n isTrade={isTrade}\n isGuild={isGuild}\n isGlobal={isGlobal}\n searchCharacterUI={searchCharacterUI}\n chatMessages={chatMessages}\n onSendGlobalChatMessage={onSendGlobalChatMessage}\n onSendPrivateChatMessage={onSendPrivateChatMessage}\n onSendTradeMessage={onSendTradeMessage}\n onSendGuildChatMessage={onSendGuildChatMessage}\n onSendLocalChatMessage={onSendLocalChatMessage}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={chatHook.isExpanded}\n autoCloseOnSend={autoCloseOnSend || false}\n onChangeCharacterName={onChangeCharacterName}\n privateChatCharacters={privateChatCharacters}\n hideSearchCharacterUI={hideSearchCharacterUI}\n onCharacterClick={onCharacterClick}\n />\n </ChatContentWrapper>\n </ExpandedChatContent>\n ) : (\n <CollapsedChatInput>\n <Chat\n chatMessages={[]}\n onSendChatMessage={onSendLocalChatMessage}\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={false}\n />\n </CollapsedChatInput>\n )}\n </AllChatsContainer>\n </ChatRevampContainer>\n );\n};\n\nconst ChatRevampContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n`;\n\nconst TopBar = styled.div<{ isExpanded: boolean }>`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n min-height: ${({ isExpanded }) => (isExpanded ? 'auto' : '32px')};\n`;\n\nconst AllChatsContainer = styled.div<{\n width: string;\n height: string;\n isExpanded: boolean;\n}>`\n width: ${({ width }) => width};\n height: ${({ height, isExpanded }) => (isExpanded ? height : 'auto')};\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n display: flex;\n gap: 10px;\n flex-wrap: wrap;\n`;\n\nconst ChatContentWrapper = styled.div<{ isPrivate: boolean }>`\n flex-grow: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: ${props => (props.isPrivate ? '75%' : '100%')};\n`;\n\nconst CollapsedChatInput = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nconst ExpandedChatContent = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n`;\n","import React, { useEffect, useState } from 'react';\n\nexport interface ICheckItems {\n label: string;\n value: string;\n}\n\nexport interface ICheckProps {\n items: ICheckItems[];\n onChange: (selectedValues: IChecklistSelectedValues) => void;\n}\n\nexport interface IChecklistSelectedValues {\n [label: string]: boolean;\n}\n\nexport const CheckButton: React.FC<ICheckProps> = ({ items, onChange }) => {\n const generateSelectedValuesList = () => {\n const selectedValues: IChecklistSelectedValues = {};\n\n items.forEach(item => {\n selectedValues[item.label] = false;\n });\n\n return selectedValues;\n };\n\n const [selectedValues, setSelectedValues] = useState<\n IChecklistSelectedValues\n >(generateSelectedValuesList());\n\n const handleClick = (label: string) => {\n setSelectedValues({\n ...selectedValues,\n [label]: !selectedValues[label],\n });\n };\n\n useEffect(() => {\n if (selectedValues) {\n onChange(selectedValues);\n }\n }, [selectedValues]);\n\n return (\n <div id=\"elemento-checkbox\">\n {items?.map((element, index) => {\n return (\n <div key={`${element.label}_${index}`}>\n <input\n className=\"rpgui-checkbox\"\n type=\"checkbox\"\n checked={selectedValues[element.label]}\n onChange={() => {}}\n />\n <label onPointerDown={() => handleClick(element.label)}>\n {element.label}\n </label>\n <br />\n </div>\n );\n })}\n </div>\n );\n};\n","import React, { useState } from 'react';\n\nexport interface ICheckItemProps {\n label?: string;\n defaultValue?: boolean;\n onChange: (label: string | undefined, selected: boolean) => void;\n}\n\nexport const CheckItem: React.FC<ICheckItemProps> = ({\n label,\n defaultValue = false,\n onChange,\n}) => {\n const [checked, setChecked] = useState(defaultValue);\n\n const handleClick = () => {\n const newCheckedState = !checked;\n setChecked(newCheckedState);\n onChange(label, newCheckedState);\n };\n\n return (\n <div onPointerDown={handleClick}>\n <input\n className=\"rpgui-checkbox\"\n type=\"checkbox\"\n checked={checked}\n readOnly\n />\n <label>{label}</label>\n <br />\n </div>\n );\n};\n","import styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport const SingleShortcut = styled.button`\n width: 3rem;\n height: 3rem;\n background-color: ${uiColors.lightGray};\n border: 2px solid ${uiColors.darkGray};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n span {\n pointer-events: none;\n }\n\n .mana {\n position: absolute;\n top: -5px;\n right: 0;\n font-size: 0.65rem;\n color: ${uiColors.blue};\n }\n\n .qty {\n position: absolute;\n top: -5px;\n right: 0;\n font-size: 0.65rem;\n }\n\n .magicWords {\n margin-top: 4px;\n }\n\n .keyboard {\n position: absolute;\n bottom: -5px;\n left: 0;\n font-size: 0.65rem;\n color: ${uiColors.yellow};\n }\n\n .onCooldown {\n color: ${uiColors.gray};\n }\n\n .cooldown {\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background-color: rgba(0 0 0 / 60%);\n font-size: 0.7rem;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${uiColors.darkYellow};\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n\n &:disabled {\n opacity: 0.5;\n }\n`;\n","import { useEffect, useRef, useState } from 'react';\n\nexport const useShortcutCooldown = (\n onShortcutCast: (index: number) => void\n) => {\n const [shortcutCooldown, setShortcutCooldown] = useState(0);\n const cooldownTimeout = useRef<NodeJS.Timeout | null>(null);\n\n const handleShortcutCast = (index: number) => {\n if (shortcutCooldown <= 0) setShortcutCooldown(1.5);\n onShortcutCast(index);\n };\n\n useEffect(() => {\n if (cooldownTimeout.current) clearTimeout(cooldownTimeout.current);\n\n if (shortcutCooldown > 0) {\n cooldownTimeout.current = setTimeout(() => {\n setShortcutCooldown(shortcutCooldown - 0.1);\n }, 100);\n }\n }, [shortcutCooldown]);\n\n return { shortcutCooldown, handleShortcutCast };\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SingleShortcut } from '../Shortcuts/SingleShortcut';\nimport { useShortcutCooldown } from '../Shortcuts/useShortcutCooldown';\n\nexport type CircularControllerProps = {\n onActionClick: () => void;\n onCancelClick: () => void;\n onShortcutClick: (index: number) => void;\n mana: number;\n shortcuts: IShortcut[];\n inventory?: IItemContainer | null;\n atlasIMG: any;\n atlasJSON: any;\n spellCooldowns?: Record<string, number>;\n};\n\nexport const CircularController: React.FC<CircularControllerProps> = ({\n onActionClick,\n onCancelClick,\n onShortcutClick,\n mana,\n shortcuts,\n inventory,\n atlasIMG,\n atlasJSON,\n spellCooldowns,\n}) => {\n const { handleShortcutCast, shortcutCooldown } = useShortcutCooldown(\n onShortcutClick\n );\n\n const onTouchStart = (e: React.TouchEvent<HTMLButtonElement>) => {\n const target = e.target as HTMLButtonElement;\n target?.classList.add('active');\n };\n\n const onTouchEnd = (\n action: () => void,\n e: React.TouchEvent<HTMLButtonElement>\n ) => {\n const target = e.target as HTMLButtonElement;\n setTimeout(() => {\n target?.classList.remove('active');\n }, 100);\n action();\n };\n\n const renderShortcut = (i: number) => {\n const buildClassName = (classBase: string, isOnCooldown: boolean) => {\n return `${classBase} ${isOnCooldown ? 'onCooldown' : ''}`;\n };\n\n let variant = '';\n\n if (i === 0) variant = 'top';\n else if (i >= 3) variant = `bottom-${i - 3}`;\n\n const onShortcutClickBinded =\n shortcuts[i]?.type !== ShortcutType.None\n ? handleShortcutCast.bind(null, i)\n : () => {};\n\n const isOnShortcutCooldown = shortcutCooldown > 0;\n\n if (shortcuts[i]?.type === ShortcutType.Item) {\n const payload = shortcuts[i]?.payload as IItem | undefined;\n\n let itemsFromEquipment: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === payload?.key) {\n itemsFromEquipment.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty = itemsFromEquipment.reduce(\n (acc, item) => acc + (item?.stackQty || 1),\n 0\n );\n\n return (\n <StyledShortcut\n key={i}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onShortcutClickBinded)}\n disabled={false}\n className={variant}\n >\n {isOnShortcutCooldown && (\n <span className=\"cooldown\">{shortcutCooldown.toFixed(1)}</span>\n )}\n {payload && (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n imgScale={1.4}\n imgStyle={{ left: '4px' }}\n containerStyle={{ pointerEvents: 'none' }}\n />\n )}\n <span className={buildClassName('qty', isOnShortcutCooldown)}>\n {totalQty}\n </span>\n </StyledShortcut>\n );\n }\n\n const payload = shortcuts[i]?.payload as IRawSpell | undefined;\n\n const spellCooldown = !payload\n ? 0\n : spellCooldowns?.[payload.magicWords.replaceAll(' ', '_')] ??\n shortcutCooldown;\n const cooldown =\n spellCooldown > shortcutCooldown ? spellCooldown : shortcutCooldown;\n const isOnCooldown = cooldown > 0 && !!payload;\n\n const CONTAINER_STYLE = { width: '32px', height: '32px' };\n const IMAGE_SCALE = 1.5;\n\n return (\n <StyledShortcut\n key={i}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onShortcutClickBinded)}\n disabled={mana < (payload?.manaCost ?? 0)}\n className={variant}\n >\n {isOnCooldown && (\n <span className=\"cooldown\">\n {cooldown.toFixed(cooldown < 10 ? 1 : 0)}\n </span>\n )}\n <span className={buildClassName('mana', isOnCooldown)}>\n {payload && payload.manaCost}\n </span>\n <span className=\"magicWords\">\n {payload?.texturePath ? (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath}\n imgScale={IMAGE_SCALE}\n containerStyle={CONTAINER_STYLE}\n centered={true}\n borderRadius=\"50%\"\n />\n ) : (\n payload?.magicWords.split(' ').map(word => word[0])\n )}\n </span>\n </StyledShortcut>\n );\n };\n\n return (\n <ButtonsContainer>\n <ShortcutsContainer>\n {Array.from({ length: 12 }).map((_, i) => renderShortcut(i))}\n </ShortcutsContainer>\n <Button\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onActionClick)}\n >\n <div className=\"rpgui-icon sword\" />\n </Button>\n\n <CancelButton\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onCancelClick)}\n >\n <span>X</span>\n </CancelButton>\n </ButtonsContainer>\n );\n};\n\nconst Button = styled.button`\n width: 4.3rem;\n height: 4.3rem;\n background-color: ${uiColors.lightGray};\n border: 2px solid ${uiColors.darkGray};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n transition: all 0.1s;\n margin-top: -3rem;\n top: -144px;\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n\n .sword {\n transform: rotate(-45deg);\n height: 2.5rem;\n width: 1.9rem;\n pointer-events: none;\n }\n`;\n\nconst CancelButton = styled(Button)`\n width: 3rem;\n height: 3rem;\n font-size: 0.8rem;\n position: relative;\n left: 2.6rem;\n\n span {\n margin-top: 4px;\n margin-left: 2px;\n pointer-events: none;\n }\n`;\n\nconst ButtonsContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n\n scale: 0.9;\n`;\n\nconst ShortcutsContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n flex-direction: column;\n margin-top: 3rem;\n\n .top {\n transform: translate(93%, 25%);\n }\n\n .bottom-0 {\n transform: translate(93%, -25%);\n }\n\n .bottom-1 {\n transform: translate(320%, calc(-4.5rem));\n }\n\n .bottom-2 {\n transform: translate(-13.5%, calc(-5.6rem - 25%));\n }\n\n .bottom-3 {\n transform: translate(318%, calc(-15.8rem - 25%));\n }\n\n .bottom-4 {\n transform: translate(-15%, calc(-20.2rem - 25%));\n }\n .bottom-5 {\n transform: translate(210%, calc(-15rem - 25%));\n }\n\n .bottom-6 {\n transform: translate(210%, calc(-25.7rem - 25%));\n }\n\n .bottom-7 {\n transform: translate(304%, calc(-24.9rem - 25%));\n }\n\n .bottom-8 {\n transform: translate(-101%, calc(-27.7rem - 25%));\n }\n`;\n\nconst StyledShortcut = styled(SingleShortcut)`\n width: 2.5rem;\n height: 2.5rem;\n transition: all 0.1s;\n\n .mana,\n .qty {\n font-size: 0.5rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n background-color: ${uiColors.lightGray};\n }\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n`;\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nimport { useState } from 'react';\n\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === 'undefined') {\n return initialValue;\n }\n try {\n // Get from local storage by key\n const item = window.localStorage.getItem(key);\n // Parse stored json or if none return initialValue\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n // If error also return initialValue\n console.log(error);\n return initialValue;\n }\n });\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue = (value: T | ((val: T) => T)) => {\n try {\n // Allow value to be a function so we have same API as useState\n const valueToStore =\n value instanceof Function ? value(storedValue) : value;\n // Save state\n setStoredValue(valueToStore);\n // Save to local storage\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n // A more advanced implementation would handle the error case\n console.log(error);\n }\n };\n\n return [storedValue, setValue] as const;\n}\n","import { useEffect } from 'react';\n\nexport function useOutsideClick(ref: any, id: string) {\n useEffect(() => {\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event: any) {\n if (ref.current && !ref.current.contains(event.target)) {\n const event = new CustomEvent('clickOutside', {\n detail: {\n id,\n },\n });\n document.dispatchEvent(event);\n }\n }\n // Bind the event listener\n document.addEventListener('pointerdown', handleClickOutside);\n return () => {\n // Unbind the event listener on clean up\n document.removeEventListener('pointerdown', handleClickOutside);\n };\n }, [ref]);\n}\n","import React, { useEffect, useRef } from 'react';\nimport Draggable from 'react-draggable';\nimport styled, { css } from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport { IPosition } from '../types/eventTypes';\nimport { RPGUIContainerTypes } from './RPGUI/RPGUIContainer';\n\nexport interface IDraggableContainerProps {\n children: React.ReactNode;\n width?: string;\n height?: string;\n minWidth?: string;\n minHeight?: string;\n className?: string;\n type?: RPGUIContainerTypes;\n title?: string;\n imgSrc?: string;\n imgWidth?: string;\n onCloseButton?: () => void;\n cancelDrag?: string;\n onPositionChange?: (position: IPosition) => void;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n scale?: number;\n dragDisabled?: boolean;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nexport const DraggableContainer: React.FC<IDraggableContainerProps> = ({\n children,\n width = '50%',\n height,\n minHeight,\n minWidth,\n className,\n type = RPGUIContainerTypes.FramedGold,\n onCloseButton,\n title,\n imgSrc,\n imgWidth = '20px',\n cancelDrag,\n onPositionChange,\n onPositionChangeEnd,\n onPositionChangeStart,\n onOutsideClick,\n initialPosition = { x: 0, y: 0 },\n scale,\n dragDisabled = false,\n isFullScreen,\n opacity,\n}) => {\n const draggableRef = useRef(null);\n\n if (isFullScreen) {\n width = '100%';\n height = '100%';\n }\n\n useOutsideClick(draggableRef, 'item-container');\n\n useEffect(() => {\n document.addEventListener('clickOutside', event => {\n const e = event as CustomEvent;\n\n if (e.detail.id === 'item-container') {\n if (onOutsideClick) {\n onOutsideClick();\n }\n }\n });\n\n return () => {\n document.removeEventListener('clickOutside', _e => {});\n };\n }, []);\n\n return (\n <Draggable\n cancel={`.container-close,input,button,${cancelDrag}`}\n disabled={dragDisabled}\n onDrag={(_e, data) => {\n if (onPositionChange) {\n onPositionChange({\n x: data.x,\n y: data.y,\n });\n }\n }}\n onStop={(_e, data) => {\n if (onPositionChangeEnd) {\n onPositionChangeEnd({\n x: data.x,\n y: data.y,\n });\n }\n }}\n onStart={(_e, data) => {\n if (onPositionChangeStart) {\n onPositionChangeStart({\n x: data.x,\n y: data.y,\n });\n }\n }}\n defaultPosition={initialPosition}\n scale={scale}\n >\n <Container\n ref={draggableRef}\n width={width}\n height={height || 'auto'}\n minWidth={minWidth}\n minHeight={minHeight}\n className={`rpgui-container ${type} ${className}`}\n isFullScreen={isFullScreen}\n opacity={opacity}\n >\n {title && (\n <TitleContainer className=\"drag-handler\">\n <Title>\n {imgSrc && <Icon src={imgSrc} width={imgWidth} />}\n {title}\n </Title>\n </TitleContainer>\n )}\n {onCloseButton && (\n <CloseButton\n className=\"container-close\"\n onPointerDown={onCloseButton}\n >\n X\n </CloseButton>\n )}\n\n {children}\n </Container>\n </Draggable>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n minWidth?: string;\n minHeight?: string;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n height: ${props => props.height};\n width: ${({ width }) => width};\n min-width: ${({ minWidth }) => minWidth || 'auto'};\n min-height: ${({ minHeight }) => minHeight || 'auto'};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n\n overflow-y: hidden;\n\n ${({ opacity }) =>\n opacity &&\n css`\n opacity: ${opacity};\n `}\n\n ${({ isFullScreen }) =>\n isFullScreen &&\n css`\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n `}\n\n &.rpgui-container {\n padding-top: 1.5rem;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n @media (max-width: 950px) {\n font-size: 1.7rem;\n padding: 12px;\n }\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n max-height: 42px;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.large};\n`;\n\ninterface ICustomIconProps {\n width: string;\n}\n\nconst Icon = styled.img<ICustomIconProps>`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.xsmall};\n width: ${({ width }) => width};\n margin-right: 0.5rem;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport interface IOptionsProps {\n id: number;\n value: string;\n option: string | JSX.Element;\n}\n\nexport interface IDropdownProps {\n options: IOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n opensUp?: boolean; // Add a new prop to control the dropdown direction\n}\n\nexport const Dropdown: React.FC<IDropdownProps> = ({\n options,\n width,\n onChange,\n opensUp = false, // Default value is false\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>('');\n const [selectedOption, setSelectedOption] = useState<string | JSX.Element>(\n ''\n );\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n const firstOption = options[0];\n\n if (firstOption) {\n let change = !selectedValue;\n if (!change) {\n change = options.filter(o => o.value === selectedValue).length < 1;\n }\n\n if (change) {\n setSelectedValue(firstOption.value);\n setSelectedOption(firstOption.option);\n }\n }\n }, [options]);\n\n useEffect(() => {\n if (selectedValue) {\n onChange(selectedValue);\n }\n }, [selectedValue]);\n\n return (\n <Container onMouseLeave={() => setOpened(false)} width={width}>\n <DropdownSelect\n id={`dropdown-${dropdownId}`}\n className=\"rpgui-dropdown-imp rpgui-dropdown-imp-header\"\n onPointerUp={() => setOpened(prev => !prev)}\n >\n <label>▼</label> {selectedOption}\n </DropdownSelect>\n\n <DropdownOptions\n className=\"rpgui-dropdown-imp\"\n opened={opened}\n opensUp={opensUp}\n >\n {options.map(option => {\n return (\n <li\n key={option.id}\n onPointerUp={() => {\n setSelectedValue(option.value);\n setSelectedOption(option.option);\n setOpened(false);\n }}\n >\n {option.option}\n </li>\n );\n })}\n </DropdownOptions>\n </Container>\n );\n};\n\nconst Container = styled.div<{ width: string | undefined }>`\n position: relative;\n width: ${props => props.width || '100%'};\n`;\n\nconst DropdownSelect = styled.p`\n width: 100%;\n box-sizing: border-box;\n\n label {\n display: inline-block;\n transform: translateY(-2px);\n }\n`;\n\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n opensUp: boolean;\n}>`\n position: absolute;\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n bottom: ${props => (props.opensUp ? '100%' : 'auto')};\n top: ${props => (props.opensUp ? 'auto' : '100%')};\n margin: 0;\n padding: 0;\n @media (max-width: 768px) {\n padding: 8px 0;\n }\n`;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport styled from 'styled-components';\n\nconst modalRoot = document.getElementById('modal-root')!;\n\ninterface ModalPortalProps {\n children: React.ReactNode;\n}\n\nconst ModalPortal: React.FC<ModalPortalProps> = ({ children }) => {\n return ReactDOM.createPortal(\n <Container className=\"rpgui-content\">{children}</Container>,\n modalRoot\n );\n};\n\nconst Container = styled.div`\n position: static !important;\n`;\n\nexport default ModalPortal;\n","import { useCallback } from 'react';\n\ninterface IEventWithTarget {\n target: EventTarget | null;\n}\n\ninterface ITouchEvent extends IEventWithTarget {\n changedTouches?: TouchList;\n\n touches?: TouchList;\n}\n\nexport function useTouchTarget() {\n const getTouchTarget = useCallback(\n (e: MouseEvent | TouchEvent | IEventWithTarget): HTMLElement => {\n // Check if it's a touch event\n if ('changedTouches' in e || 'touches' in e) {\n const touchEvent = e as ITouchEvent;\n const touch = touchEvent.changedTouches?.[0] || touchEvent.touches?.[0];\n\n if (touch) {\n return document.elementFromPoint(\n touch.clientX,\n touch.clientY\n ) as HTMLElement;\n }\n }\n\n // If it's not a touch event or touch is not available, fallback to target\n return (e.target as HTMLElement) || document.body;\n },\n []\n );\n\n return getTouchTarget;\n}\n\nexport default useTouchTarget;\n","import { IItem, ItemRarities } from '@rpg-engine/shared';\n\n\nexport const rarityColor = (item: IItem | null) => {\n switch (item?.rarity) {\n case ItemRarities.Uncommon:\n return 'rgba(13, 193, 13, 0.6)';\n case ItemRarities.Rare:\n return 'rgba(8, 104, 187, 0.6)';\n case ItemRarities.Epic:\n return 'rgba(191, 0, 255, 0.6)';\n case ItemRarities.Legendary:\n return 'rgba(255, 191, 0,0.6)';\n default:\n return null;\n }\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n item: IItem;\n}\n\nconst gemColors: { [key: string]: string } = {\n 'emerald-gem': '#50C878', // Emerald green\n 'topaz-radiance': '#FFC87C', // Topaz yellow\n 'sapphire-gem': '#0F52BA', // Sapphire blue\n 'ruby-gem': '#E0115F', // Ruby red\n 'misty-quartz-gem': '#D9D9F3', // Misty Quartz purple\n 'coral-reef-gem': '#FF7F50', // Coral reef orange\n 'jasper-gem': '#D73B3E', // Jasper red\n 'earthstone-gem': '#8B4513', // Earthstone brown\n 'obsidian-gem': '#0B0C0E', // Obsidian black\n 'amethyst-gem': '#9966CC', // Amethyst purple\n};\n\nconst defaultColor = '#FFFFFF'; // Default color (white)\n\nexport const onRenderGems = (item: IItem) => {\n const gemQty = item.attachedGems?.length || 0;\n\n if (gemQty > 0) {\n return <ItemSlotQty item={item} />;\n }\n return undefined;\n};\n\nexport const ItemSlotQty = ({ item }: IProps): JSX.Element => {\n const itemId = item._id;\n\n return (\n <ItemQtyContainer key={`qty-${itemId}`} className=\"item-slot-qty\">\n {item.attachedGems?.map((gem, index) => (\n <Gem\n key={`${itemId}-gem-${index}`}\n color={gemColors[gem.key] || defaultColor}\n />\n ))}\n </ItemQtyContainer>\n );\n};\n\nconst ItemQtyContainer = styled.div`\n position: relative;\n width: 85%;\n height: 16px;\n top: 28px;\n left: 0px;\n pointer-events: none;\n transform: scale(0.8);\n display: flex;\n align-items: center;\n justify-content: flex-start; /* Align gems to the left */\n opacity: 0.8;\n`;\n\nconst Gem = styled.div<{ color: string }>`\n width: 8px;\n height: 8px;\n background: ${({ color }) =>\n `radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 30%), \n linear-gradient(45deg, ${color}, ${color} 50%, rgba(255, 255, 255, 0.2))`};\n border: 1px solid black;\n transform: rotate(45deg);\n margin: 0 2px;\n box-shadow: 0 0 5px ${({ color }) => color}; /* Glow effect */\n transition: transform 0.2s, box-shadow 0.2s; /* Smooth transition for hover effect */\n\n &:hover {\n transform: rotate(45deg) scale(1.2);\n box-shadow: 0 0 10px ${({ color }) => color}; /* Enhanced glow on hover */\n }\n`;\n\nexport default ItemSlotQty;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../../../constants/uiFonts';\nimport { Ellipsis } from '../../../shared/Ellipsis';\n\ninterface IProps {\n itemId: string;\n stackQty: number;\n qtyClassName: string;\n}\n\nexport const onRenderStackInfo = (itemId: string, stackQty: number) => {\n const isFractionalStackQty = stackQty % 1 !== 0;\n const isLargerThan999 = stackQty > 999;\n\n let qtyClassName = 'regular';\n if (isLargerThan999) qtyClassName = 'small';\n if (isFractionalStackQty) qtyClassName = 'xsmall';\n\n if (stackQty > 1) {\n return (\n <ItemSlotQty\n itemId={itemId}\n stackQty={stackQty}\n qtyClassName={qtyClassName}\n />\n );\n }\n return undefined;\n};\n\nexport const ItemSlotQty = ({\n itemId,\n stackQty,\n qtyClassName,\n}: IProps): JSX.Element => {\n return (\n <ItemQtyContainer key={`qty-${itemId}`} className=\"item-slot-qty\">\n <Ellipsis maxLines={1} maxWidth=\"48px\">\n <ItemQty className={qtyClassName}>\n {Math.round(stackQty * 100) / 100}{' '}\n </ItemQty>\n </Ellipsis>\n </ItemQtyContainer>\n );\n};\n\nconst ItemQtyContainer = styled.div`\n position: relative;\n width: 85%;\n height: 16px;\n top: 25px;\n left: 2px;\n pointer-events: none;\n\n display: flex;\n justify-content: flex-end;\n`;\n\nconst ItemQty = styled.span`\n &.regular {\n font-size: ${uiFonts.size.small};\n }\n &.small {\n font-size: ${uiFonts.size.xsmall};\n }\n &.xsmall {\n font-size: ${uiFonts.size.xxsmall};\n }\n`;\n","import {\n IItem,\n ItemContainerType,\n ItemSlotType,\n getItemTextureKeyPath,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { onRenderGems } from './ItemGem';\nimport { EquipmentSlotSpriteByType } from './ItemSlot';\nimport { onRenderStackInfo } from './ItemSlotQty/ItemSlotQty';\n\ninterface IProps {\n containerType: ItemContainerType | null | undefined;\n atlasJSON: any;\n atlasIMG: any;\n slotSpriteMask: ItemSlotType | null | undefined;\n item: IItem | null;\n}\n\nexport const ItemSlotRenderer: React.FC<IProps> = ({\n containerType,\n atlasJSON,\n atlasIMG,\n slotSpriteMask,\n item,\n}) => {\n const renderStackInfo = (item: IItem) => {\n return (\n item.stackQty &&\n item.stackQty > 1 &&\n onRenderStackInfo(item._id, item.stackQty)\n );\n };\n\n const renderGems = (item: IItem) => {\n return item.attachedGems && onRenderGems(item);\n };\n\n const renderItem = (item: IItem | null) => {\n if (!item?.texturePath) {\n return null;\n }\n\n return (\n <ErrorBoundary key={item._id}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.texturePath,\n texturePath: item.texturePath,\n stackQty: item.stackQty || 1,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={3}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n {renderStackInfo(item)}\n {renderGems(item)}\n </ErrorBoundary>\n );\n };\n\n const renderEquipment = (itemToRender: IItem | null) => {\n if (\n !itemToRender?.texturePath ||\n !itemToRender.allowedEquipSlotType?.includes(slotSpriteMask!)\n ) {\n return (\n <ErrorBoundary key={uuidv4()}>\n <SpriteFromAtlas\n key={uuidv4()}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={EquipmentSlotSpriteByType[slotSpriteMask!]}\n imgScale={3}\n grayScale={true}\n opacity={0.4}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n </ErrorBoundary>\n );\n }\n\n return renderItem(itemToRender);\n };\n\n const onRenderSlot = (itemToRender: IItem | null) => {\n switch (containerType) {\n case ItemContainerType.Equipment:\n return renderEquipment(itemToRender);\n default:\n return renderItem(itemToRender);\n }\n };\n\n return <>{onRenderSlot(item)}</>;\n};\n","import {\n ActionsForEquipmentSet,\n ActionsForInventory,\n ActionsForLoot,\n ActionsForMapContainer,\n DepotSocketEvents,\n IItem,\n ItemContainerType,\n ItemSocketEvents,\n ItemSocketEventsDisplayLabels,\n ItemType,\n} from '@rpg-engine/shared';\n\nexport interface IContextMenuItem {\n id: string;\n text: string;\n}\n\nconst generateContextMenuListOptions = (actionsByTypeList: any) => {\n const contextMenu: IContextMenuItem[] = actionsByTypeList.map(\n (action: string) => {\n return { id: action, text: ItemSocketEventsDisplayLabels[action] };\n }\n );\n return contextMenu;\n};\n\nexport const generateContextMenu = (\n item: IItem,\n itemContainerType: ItemContainerType | null,\n isDepotSystem?: boolean\n) => {\n let contextActionMenu: IContextMenuItem[] = [];\n\n if (itemContainerType === ItemContainerType.Inventory) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Equipment\n );\n break;\n case ItemType.Container:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Container\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Tool\n );\n break;\n\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Other\n );\n break;\n }\n\n if (isDepotSystem) {\n contextActionMenu.push({\n id: DepotSocketEvents.Deposit,\n text: 'Deposit',\n });\n }\n\n const contextActionMenuDontHaveUseWith = !contextActionMenu.find(action =>\n action.text.toLowerCase().includes('use with')\n );\n\n if (item.hasUseWith && contextActionMenuDontHaveUseWith) {\n contextActionMenu.push({\n id: ItemSocketEvents.UseWith,\n text: ItemSocketEvents.UseWith,\n });\n }\n }\n if (itemContainerType === ItemContainerType.Equipment) {\n switch (item.type) {\n case ItemType.Container:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForEquipmentSet.Container\n );\n\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForEquipmentSet.Equipment\n );\n }\n }\n if (itemContainerType === ItemContainerType.Loot) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Equipment\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Tool);\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Other\n );\n break;\n }\n }\n if (itemContainerType === ItemContainerType.MapContainer) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Equipment\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Tool\n );\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Other\n );\n break;\n }\n\n const contextActionMenuDontHaveUseWith = !contextActionMenu.find(action =>\n action.text.toLowerCase().includes('use with')\n );\n\n if (item.hasUseWith && contextActionMenuDontHaveUseWith) {\n contextActionMenu.push({ id: 'use-with', text: 'Use with...' });\n }\n }\n if (itemContainerType === ItemContainerType.Depot) {\n contextActionMenu = [\n {\n id: ItemSocketEvents.GetItemInfo,\n text: ItemSocketEventsDisplayLabels.GetItemInfo,\n },\n { id: DepotSocketEvents.Withdraw, text: 'Withdraw' },\n ];\n }\n\n return contextActionMenu;\n};\n","import { IItem, ItemContainerType } from '@rpg-engine/shared';\nimport React, {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { generateContextMenu, IContextMenuItem } from '../itemContainerHelper';\n\ninterface IPosition {\n x: number;\n y: number;\n}\n\ninterface IItemSlotDetailsState {\n item: IItem | null;\n isTooltipVisible: boolean;\n isTooltipMobileVisible: boolean;\n isContextMenuVisible: boolean;\n contextMenuPosition: IPosition;\n contextActions: IContextMenuItem[];\n clearContextActions: () => void;\n clearDetailsState: () => void;\n}\n\ninterface IItemSlotDetailsContext {\n detailsState: IItemSlotDetailsState;\n updateDetailsState: (newState: Partial<IItemSlotDetailsState>) => void;\n clearDetailsState: () => void;\n setContextActions: (\n item: IItem | null,\n containerType: string | null,\n isDepotSystem: boolean,\n isContextMenuDisabled: boolean\n ) => void;\n clearContextActions: () => void;\n}\n\nconst initialDetailsState: IItemSlotDetailsState = {\n item: null,\n isTooltipVisible: false,\n isTooltipMobileVisible: false,\n isContextMenuVisible: false,\n contextMenuPosition: { x: 0, y: 0 },\n contextActions: [],\n clearContextActions: () => {},\n clearDetailsState: () => {},\n};\n\nconst ItemSlotDetailsContext = createContext<IItemSlotDetailsContext>({\n detailsState: initialDetailsState,\n updateDetailsState: () => {},\n clearDetailsState: () => {},\n setContextActions: () => {},\n clearContextActions: () => {},\n});\n\nexport const useItemSlotDetails = (): IItemSlotDetailsContext =>\n useContext(ItemSlotDetailsContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const ItemSlotDetailsProvider: React.FC<IProps> = ({ children }) => {\n const [detailsState, setDetailsState] = useState<IItemSlotDetailsState>(\n initialDetailsState\n );\n\n const updateDetailsState = useCallback(\n (newState: Partial<IItemSlotDetailsState>): void => {\n setDetailsState(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n []\n );\n\n const clearDetailsState = useCallback(() => {\n setDetailsState(initialDetailsState);\n }, [setDetailsState]);\n\n const setContextActions = useCallback(\n (\n item: IItem | null,\n containerType: string | null,\n isDepotSystem: boolean,\n isContextMenuDisabled: boolean\n ): void => {\n if (item && containerType && !isContextMenuDisabled) {\n const newContextActions = generateContextMenu(\n item,\n containerType as ItemContainerType,\n isDepotSystem\n );\n updateDetailsState({ contextActions: newContextActions });\n } else {\n updateDetailsState({ contextActions: [] });\n }\n },\n []\n );\n\n const clearContextActions = useCallback(() => {\n updateDetailsState({ contextActions: [] });\n }, [updateDetailsState]);\n\n const contextValue = useMemo(\n () => ({\n detailsState,\n updateDetailsState,\n clearDetailsState,\n setContextActions,\n clearContextActions,\n }),\n [\n detailsState,\n updateDetailsState,\n clearDetailsState,\n setContextActions,\n clearContextActions,\n ]\n );\n\n return (\n <ItemSlotDetailsContext.Provider value={contextValue}>\n {children}\n </ItemSlotDetailsContext.Provider>\n );\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React, {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { IPosition } from '../../../../types/eventTypes';\n\ninterface IDraggingState {\n item: IItem | null;\n isDragging: boolean;\n position: IPosition;\n dropPosition: IPosition | null;\n isFocused: boolean;\n draggingDistance: number;\n}\n\ninterface IDraggingContext {\n draggingState: IDraggingState;\n updateDraggingState: (newState: Partial<IDraggingState>) => void;\n clearDraggingState: () => void;\n}\n\nconst initialDraggingState: IDraggingState = {\n item: null,\n isDragging: false,\n position: { x: 0, y: 0 },\n dropPosition: null,\n isFocused: false,\n draggingDistance: 0,\n};\n\nconst ItemSlotDraggingContext = createContext<IDraggingContext>({\n draggingState: initialDraggingState,\n updateDraggingState: () => {},\n clearDraggingState: () => {},\n});\n\nexport const useItemSlotDragging = (): IDraggingContext =>\n useContext(ItemSlotDraggingContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const ItemSlotDraggingProvider: React.FC<IProps> = ({ children }) => {\n const [draggingState, setDraggingState] = useState<IDraggingState>(\n initialDraggingState\n );\n\n const updateDraggingState = useCallback(\n (newState: Partial<IDraggingState>): void => {\n setDraggingState(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n []\n );\n\n const clearDraggingState = useCallback(() => {\n setDraggingState(initialDraggingState);\n }, []);\n\n const contextValue = useMemo(\n () => ({\n draggingState,\n updateDraggingState,\n clearDraggingState,\n }),\n [draggingState, updateDraggingState, clearDraggingState]\n );\n\n return (\n <ItemSlotDraggingContext.Provider value={contextValue}>\n {children}\n </ItemSlotDraggingContext.Provider>\n );\n};\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n isMobile,\n ItemContainerType,\n ItemSlotType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport styled from 'styled-components';\nimport useTouchTarget from '../../../hooks/useTouchTarget';\nimport { IPosition } from '../../../types/eventTypes';\nimport { rarityColor } from './ItemSlotRarity';\nimport { ItemSlotRenderer } from './ItemSlotRenderer';\nimport { useItemSlotDetails } from './context/ItemSlotDetailsContext';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\nexport const EquipmentSlotSpriteByType: any = {\n Neck: 'accessories/corruption-necklace.png',\n LeftHand: 'swords/broad-sword.png',\n Ring: 'rings/iron-ring.png',\n Head: 'helmets/viking-helmet.png',\n Torso: 'armors/iron-armor.png',\n Legs: 'legs/studded-legs.png',\n Feet: 'boots/iron-boots.png',\n Inventory: 'containers/bag.png',\n RightHand: 'shields/plate-shield.png',\n Accessory: 'ranged-weapons/arrow.png',\n};\n\ninterface IProps {\n slotIndex: number;\n item: IItem | null;\n itemContainer?: IItemContainer | null;\n itemContainerType?: ItemContainerType | null;\n slotSpriteMask?: ItemSlotType | null;\n onMouseOver?: (\n event: any,\n slotIndex: number,\n item: IItem | null,\n x: number,\n y: number\n ) => void;\n onMouseOut?: () => void;\n onPointerDown: (\n ItemType: ItemType,\n itemContainerType: ItemContainerType | null,\n item: IItem\n ) => void;\n onDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n dragScale?: number;\n checkIfItemCanBeMoved?: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;\n onPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n isContextMenuDisabled?: boolean;\n isSelectingShortcut?: boolean;\n equipmentSet?: IEquipmentSet | null;\n setItemShortcut?: (item: IItem, shortcutIndex: number) => void;\n isDepotSystem?: boolean;\n}\n\ninterface IProps {\n slotIndex: number;\n item: IItem | null;\n itemContainer?: IItemContainer | null;\n itemContainerType?: ItemContainerType | null;\n slotSpriteMask?: ItemSlotType | null;\n onMouseOver?: (\n event: any,\n slotIndex: number,\n item: IItem | null,\n x: number,\n y: number\n ) => void;\n onMouseOut?: () => void;\n onPointerDown: (\n ItemType: ItemType,\n itemContainerType: ItemContainerType | null,\n item: IItem\n ) => void;\n onDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n dragScale?: number;\n checkIfItemCanBeMoved?: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;\n onPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n isContextMenuDisabled?: boolean;\n isSelectingShortcut?: boolean;\n equipmentSet?: IEquipmentSet | null;\n setItemShortcut?: (item: IItem, shortcutIndex: number) => void;\n isDepotSystem?: boolean;\n}\n\nexport const ItemSlot: React.FC<IProps> = observer(\n ({\n slotIndex,\n item,\n itemContainerType: containerType,\n slotSpriteMask,\n onMouseOver,\n onMouseOut,\n onPointerDown,\n atlasJSON,\n atlasIMG,\n isContextMenuDisabled = false,\n onDragEnd,\n onDragStart,\n onPlaceDrop,\n onOutsideDrop: onDrop,\n checkIfItemCanBeMoved,\n openQuantitySelector,\n checkIfItemShouldDragEnd,\n dragScale,\n isSelectingShortcut,\n\n setItemShortcut,\n isDepotSystem,\n }) => {\n const {\n detailsState,\n updateDetailsState,\n setContextActions,\n } = useItemSlotDetails();\n\n const getTouchTarget = useTouchTarget();\n\n const {\n isContextMenuVisible,\n clearDetailsState,\n clearContextActions,\n } = detailsState;\n\n const dragContainer = useRef<HTMLDivElement>(null);\n\n const {\n draggingState,\n updateDraggingState,\n clearDraggingState,\n } = useItemSlotDragging();\n\n const { isFocused, isDragging, draggingDistance } = draggingState;\n\n useEffect(() => {\n // Reset drag position and focus when item changes\n updateDraggingState({\n position: { x: 0, y: 0 },\n isFocused: false,\n });\n }, [\n containerType,\n isDepotSystem,\n setContextActions,\n clearContextActions,\n isContextMenuDisabled, // Added missing dependency\n ]);\n\n useEffect(() => {\n // Reset drag position and focus when item changes\n clearDraggingState();\n\n // Clear context actions when component unmounts or dependencies change\n return () => {\n clearContextActions();\n };\n }, [\n containerType,\n isDepotSystem,\n setContextActions,\n clearContextActions,\n isContextMenuDisabled,\n updateDraggingState, // Add this dependency\n ]);\n\n const resetItem = () => {\n clearDraggingState();\n clearDetailsState();\n };\n\n const onSuccessfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) {\n updateDraggingState({\n position: { x: 0, y: 0 },\n isFocused: false,\n });\n } else if (item) {\n onDragEnd?.(quantity);\n }\n };\n\n const refreshContextActions = () => {\n setContextActions(\n item,\n containerType as ItemContainerType,\n isDepotSystem ?? false,\n isContextMenuDisabled\n );\n };\n\n const onDraggableStop: DraggableEventHandler = (e, data) => {\n requestAnimationFrame(() => {\n updateDraggingState({\n item: null,\n });\n\n let target = e.target as HTMLElement;\n\n if (isMobile()) {\n target = getTouchTarget(e as MouseEvent);\n }\n\n handleShortcutSetter(target);\n removeDraggingClass(target);\n\n const shouldHandleDraggedItemResult = shouldHandleDraggedItem();\n\n if (shouldHandleDraggedItemResult) {\n handleDraggedItem(e, data);\n } else if (item && !isDragging) {\n handleContextMenuOrTooltip(e as React.MouseEvent);\n }\n });\n };\n\n /**\n * Handles the shortcut setter logic if the target element is a shortcut setter.\n */\n const handleShortcutSetter = (target: HTMLElement) => {\n if (target?.id.includes('shortcutSetter') && setItemShortcut && item) {\n const index = parseInt(target.id.split('_')[1], 10);\n if (!isNaN(index)) {\n setItemShortcut(item, index);\n }\n }\n };\n\n /**\n * Removes the dragging CSS class from the target element.\n */\n const removeDraggingClass = (target: HTMLElement) => {\n target.classList.remove('react-draggable-dragging');\n };\n\n /**\n * Determines whether the dragged item should be processed.\n */\n const shouldHandleDraggedItem = (): boolean => {\n return !!(isDragging && draggingState.item && !isSelectingShortcut);\n };\n\n /**\n * Handles the logic when an item has been dragged.\n */\n const handleDraggedItem = useCallback(\n (e: any, data: any) => {\n const targetClasses = Array.from((e.target as HTMLElement).classList);\n const isOutsideDrop =\n targetClasses.some(elm => elm.includes('rpgui-content')) ||\n targetClasses.length === 0;\n\n if (isOutsideDrop && draggingState.isDragging && draggingState.item) {\n console.log('ITEM SLOT: Outside drop', draggingState.item.key);\n onDrop?.(draggingState.item, { x: data.x, y: data.y });\n clearDraggingState();\n } else {\n updateDraggingState({\n dropPosition: {\n x: data.x,\n y: data.y,\n },\n isDragging: false,\n });\n\n const targetElement = dragContainer.current;\n if (!targetElement) return;\n\n const { x, y } = getElementTransform(targetElement);\n\n updateDraggingState({\n position: { x, y },\n });\n\n processDragEnd(item!);\n }\n },\n [\n draggingState.isDragging,\n draggingState.item,\n onDrop,\n clearDraggingState,\n updateDraggingState,\n ]\n );\n\n /**\n * Retrieves the current transform position of the dragged element.\n */\n const getElementTransform = (\n element: HTMLElement\n ): { x: number; y: number } => {\n const style = window.getComputedStyle(element);\n const matrix = new DOMMatrixReadOnly(style.transform);\n return { x: matrix.m41, y: matrix.m42 };\n };\n\n const processDragEnd = useCallback(\n (item: IItem) => {\n if (checkIfItemCanBeMoved?.()) {\n if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) {\n resetItem();\n return;\n }\n\n if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) {\n openQuantitySelector(item.stackQty, onSuccessfulDrag);\n } else {\n onSuccessfulDrag(item.stackQty);\n }\n } else {\n resetItem();\n }\n },\n [\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n openQuantitySelector,\n onSuccessfulDrag,\n resetItem,\n ]\n );\n\n /**\n * Handles the context menu or tooltip display after dragging stops without a drop.\n */\n const handleContextMenuOrTooltip = (\n e: React.MouseEvent | React.TouchEvent\n ) => {\n const isTouchEvent = e.type === 'touchend';\n const shouldShowMobileTooltip =\n !isContextMenuDisabled && isTouchEvent && !isSelectingShortcut;\n const shouldToggleContextMenu =\n !isContextMenuDisabled && !isSelectingShortcut && !isTouchEvent;\n\n if (shouldShowMobileTooltip) {\n updateDetailsState({\n item,\n isTooltipMobileVisible: true,\n isContextMenuVisible: false, // Ensure context menu is hidden\n });\n } else if (shouldToggleContextMenu) {\n const mouseEvent = e as React.MouseEvent;\n updateDetailsState({\n item,\n isContextMenuVisible: !isContextMenuVisible && !isMobile(),\n isTooltipMobileVisible: false, // Ensure mobile tooltip is hidden\n contextMenuPosition: {\n x: mouseEvent.clientX - 10,\n y: mouseEvent.clientY - 5,\n },\n });\n }\n\n if (item) {\n onPointerDown(item.type, containerType ?? null, item);\n }\n };\n\n const onDraggableStart: DraggableEventHandler = () => {\n if (!item || isSelectingShortcut) {\n return;\n }\n\n refreshContextActions();\n\n if (onDragStart && containerType) {\n onDragStart(item, slotIndex, containerType);\n }\n };\n\n const onDraggableProgress: DraggableEventHandler = (_e, _data) => {\n // increment draggingDistance by 1\n updateDraggingState({\n draggingDistance: draggingState.draggingDistance + 1,\n });\n\n if (draggingDistance > 10) {\n updateDraggingState({\n isDragging: true,\n isFocused: true,\n });\n }\n\n if (!draggingState.item) {\n updateDraggingState({\n item: item,\n });\n }\n };\n\n return (\n <Container\n isDraggingItem={!!draggingState.item}\n item={item}\n className=\"rpgui-icon empty-slot\"\n onMouseUp={() => {\n const data = item ? item : null;\n if (onPlaceDrop && containerType)\n onPlaceDrop(data, slotIndex, containerType);\n }}\n onTouchEnd={e => {\n const { clientX, clientY } = e.changedTouches[0];\n const simulatedEvent = new MouseEvent('mouseup', {\n clientX,\n clientY,\n bubbles: true,\n });\n\n document\n .elementFromPoint(clientX, clientY)\n ?.dispatchEvent(simulatedEvent);\n }}\n onPointerDown={\n onDragStart !== undefined && onDragEnd !== undefined\n ? undefined\n : () => {\n if (item) onPointerDown(item.type, containerType ?? null, item);\n }\n }\n isSelectingShortcut={\n isSelectingShortcut &&\n (item?.type === ItemType.Consumable ||\n item?.type === ItemType.Tool ||\n item?.subType === ItemSubType.Seed)\n }\n >\n <Draggable\n axis={isSelectingShortcut ? 'none' : 'both'}\n defaultClassName={item ? 'draggable' : 'empty-slot'}\n scale={dragScale}\n disabled={onDragStart === undefined || onDragEnd === undefined}\n onStop={onDraggableStop}\n onStart={onDraggableStart}\n onDrag={onDraggableProgress}\n position={draggingState.position}\n cancel=\".empty-slot\"\n bounds=\".item-container-body, .equipment-container-body\"\n >\n <ItemContainer\n ref={dragContainer}\n isFocused={isFocused}\n onMouseOver={event => {\n onMouseOver?.(\n event,\n slotIndex,\n item,\n event.clientX,\n event.clientY\n );\n }}\n onMouseOut={() => {\n if (onMouseOut) onMouseOut();\n }}\n onMouseEnter={() => {\n updateDetailsState({\n item,\n isTooltipVisible: true,\n });\n }}\n onMouseLeave={() => {\n updateDetailsState({\n item,\n isTooltipVisible: false,\n });\n }}\n >\n <ItemSlotRenderer\n item={item}\n slotSpriteMask={slotSpriteMask}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n containerType={containerType}\n />\n </ItemContainer>\n </Draggable>\n </Container>\n );\n }\n);\n\ninterface ContainerTypes {\n item: IItem | null;\n containerType?: ItemContainerType | null;\n isSelectingShortcut?: boolean;\n isDraggingItem?: boolean;\n}\n\nconst Container = styled.div<ContainerTypes>`\n margin: 0.1rem;\n\n .react-draggable-dragging {\n // If dragging item, set opacity to 0\n opacity: ${({ isDraggingItem }) => (isDraggingItem ? 0 : 1)};\n }\n\n position: relative;\n\n .sprite-from-atlas-img--item {\n position: relative;\n top: 1.5rem;\n left: 1.5rem;\n border-color: ${({ item }) => rarityColor(item)};\n box-shadow: ${({ item }) => `0 0 5px 2px ${rarityColor(item)}`} inset,\n ${({ item }) => `0 0 4px 3px ${rarityColor(item)}`};\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n border-radius: 12px;\n pointer-events: none;\n animation: ${({ isSelectingShortcut }) =>\n isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none'};\n\n @keyframes bg-color-change {\n 0% {\n background-color: rgba(255 255 255 / 0.5);\n }\n 50% {\n background-color: transparent;\n }\n 100% {\n background-color: rgba(255 255 255 / 0.5);\n }\n }\n }\n`;\n\nconst ItemContainer = styled.div<{ isFocused?: boolean }>`\n width: 64px;\n height: 64px;\n\n position: relative;\n ${props => props.isFocused && 'z-index: 100; pointer-events: none;'};\n`;\n","import { IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ErrorBoundary } from '../Inventory/ErrorBoundary';\nimport { EquipmentSlotSpriteByType } from '../Inventory/ItemSlot';\nimport { rarityColor } from '../Inventory/ItemSlotRarity';\n\ninterface IItemInfoProps {\n item: IItem;\n itemToCompare?: IItem;\n atlasIMG: any;\n atlasJSON: any;\n}\n\ninterface IItemStat {\n key: keyof IItem;\n label?: string;\n higherIsWorse?: boolean;\n}\n\nconst statisticsToDisplay: IItemStat[] = [\n { key: 'attack' },\n { key: 'defense' },\n { key: 'maxRange', label: 'Range' },\n { key: 'weight', higherIsWorse: true },\n];\n\nexport const ItemInfo: React.FC<IItemInfoProps> = ({\n item,\n itemToCompare,\n atlasIMG,\n atlasJSON,\n}) => {\n const renderStatistics = () => {\n const statistics: React.ReactNode[] = [];\n\n for (const stat of statisticsToDisplay) {\n const itemStatistic = item[stat.key];\n\n if (itemStatistic) {\n const label =\n stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);\n\n const isItemToCompare = !!itemToCompare;\n\n const isOnlyInOneItem = isItemToCompare && !itemToCompare?.[stat.key];\n const statDiff =\n parseInt(itemStatistic.toString()) -\n parseInt(itemToCompare?.[stat.key]?.toString() ?? '0');\n\n const isDifference = isItemToCompare && statDiff !== 0;\n const isBetter =\n (statDiff > 0 && !stat.higherIsWorse) ||\n (statDiff < 0 && stat.higherIsWorse);\n\n statistics.push(\n <Statistic key={stat.key} className={isOnlyInOneItem ? 'better' : ''}>\n <div className=\"label\">{label}:</div>\n <div\n className={`value ${\n isDifference ? (isBetter ? 'better' : 'worse') : ''\n }`}\n >\n {`${itemStatistic.toString()} ${\n isDifference ? `(${statDiff > 0 ? '+' : ''}${statDiff})` : ''\n }`}\n </div>\n </Statistic>\n );\n }\n }\n\n return statistics;\n };\n\n const renderMissingStatistic = () => {\n const statistics: React.ReactNode[] = [];\n\n for (const stat of statisticsToDisplay) {\n const itemToCompareStatistic = itemToCompare?.[stat.key];\n\n if (itemToCompareStatistic && !item[stat.key]) {\n const label =\n stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);\n\n statistics.push(\n <Statistic key={stat.key} className=\"worse\">\n <div className=\"label\">{label}:</div>\n <div className=\"value worse\">\n {itemToCompareStatistic.toString()}\n </div>\n </Statistic>\n );\n }\n }\n\n return statistics;\n };\n\n const renderEntityEffects = () => {\n if (!item.entityEffects || !item.entityEffectChance) return null;\n\n return item.entityEffects.map((effect, index) => (\n <Statistic key={index} $isSpecial>\n {effect[0].toUpperCase() + effect.slice(1)} ({item.entityEffectChance}%)\n </Statistic>\n ));\n };\n\n const renderAvaibleSlots = () => {\n if (!item.allowedEquipSlotType) return null;\n\n return item.allowedEquipSlotType.map((slotType, index) => (\n <ErrorBoundary key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={EquipmentSlotSpriteByType[slotType]}\n imgScale={2}\n grayScale={true}\n opacity={0.4}\n containerStyle={{ width: '32px', height: '32px' }}\n />\n </ErrorBoundary>\n ));\n };\n\n const skillName = item.minRequirements?.skill?.name;\n\n return (\n <Container item={item}>\n <Header>\n <div>\n <Title>{item.name}</Title>\n {item.rarity !== 'Common' && (\n <Rarity item={item}>{item.rarity}</Rarity>\n )}\n <Type>{item.subType}</Type>\n </div>\n <AllowedSlots>{renderAvaibleSlots()}</AllowedSlots>\n </Header>\n\n {item.minRequirements && (\n <LevelRequirement>\n <div className=\"title\">Requirements:</div>\n <div>- Level: {item.minRequirements?.level}</div>\n {skillName && (\n <div>\n - {skillName.charAt(0).toUpperCase() + skillName.slice(1)}:{' '}\n {item.minRequirements?.skill?.level}\n </div>\n )}\n </LevelRequirement>\n )}\n\n {renderStatistics()}\n {renderEntityEffects()}\n {item.usableEffectDescription && (\n <Statistic $isSpecial>{item.usableEffectDescription}</Statistic>\n )}\n {item.equippedBuffDescription && (\n <Statistic $isSpecial>{item.equippedBuffDescription}</Statistic>\n )}\n {item.isTwoHanded && <Statistic $isSpecial>Two handed</Statistic>}\n\n <Description>{item.description}</Description>\n\n {item.maxStackSize && item.maxStackSize !== 1 && (\n <StackInfo>\n x{Math.round((item.stackQty ?? 1) * 100) / 100}({item.maxStackSize})\n </StackInfo>\n )}\n\n {renderMissingStatistic().length > 0 && (\n <MissingStatistics>\n <Statistic>Equipped Diff</Statistic>\n {itemToCompare && renderMissingStatistic()}\n </MissingStatistics>\n )}\n </Container>\n );\n};\n\nconst Container = styled.div<{ item: IItem }>`\n color: white;\n background-color: #222;\n border-radius: 5px;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n border: 3px solid ${({ item }) => rarityColor(item) ?? uiColors.lightGray};\n height: max-content;\n width: 18rem;\n\n @media (max-width: 640px) {\n width: 80vw;\n }\n`;\n\nconst Title = styled.div`\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n margin-bottom: 0.5rem;\n display: flex;\n align-items: center;\n margin: 0;\n`;\n\nconst Rarity = styled.div<{ item: IItem }>`\n font-size: ${uiFonts.size.small};\n font-weight: normal;\n margin-top: 0.2rem;\n color: ${({ item }) => rarityColor(item)};\n filter: brightness(1.5);\n`;\n\nconst Type = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n color: ${uiColors.lightGray};\n`;\n\nconst LevelRequirement = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n margin-bottom: 1rem;\n color: ${uiColors.orange};\n\n .title {\n margin-bottom: 4px;\n }\n\n div {\n margin-bottom: 2px;\n }\n`;\n\nconst Statistic = styled.div<{ $isSpecial?: boolean }>`\n margin-bottom: 0.4rem;\n width: 100%;\n color: ${({ $isSpecial }) => ($isSpecial ? uiColors.darkYellow : 'inherit')};\n\n .label {\n display: inline-block;\n margin-right: 0.5rem;\n color: inherit;\n }\n\n .value {\n display: inline-block;\n color: inherit;\n }\n\n &.better,\n .better {\n color: ${uiColors.lightGreen};\n }\n\n &.worse,\n .worse {\n color: ${uiColors.cardinal};\n }\n`;\n\nconst Description = styled.div`\n margin-top: 1.5rem;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.lightGray};\n font-style: italic;\n`;\n\nconst Header = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n`;\n\nconst AllowedSlots = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-left: auto;\n align-self: flex-start;\n`;\n\nconst StackInfo = styled.div`\n width: 100%;\n text-align: right;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.orange};\n margin-top: 1rem;\n`;\n\nconst MissingStatistics = styled.div`\n margin-top: 1rem;\n color: ${uiColors.cardinal};\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport { camelCase } from 'lodash';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ItemInfo } from './ItemInfo';\n\nexport interface IItemInfoDisplayProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n isMobile?: boolean;\n}\n\ntype EquipmentSlotTypes =\n | 'head'\n | 'neck'\n | 'leftHand'\n | 'rightHand'\n | 'ring'\n | 'legs'\n | 'boot'\n | 'accessory'\n | 'armor'\n | 'inventory';\n\nconst itemSlotTypes: EquipmentSlotTypes[] = [\n 'head',\n 'neck',\n 'leftHand',\n 'rightHand',\n 'ring',\n 'legs',\n 'boot',\n 'accessory',\n 'armor',\n 'inventory',\n];\n\nconst getSlotType = (\n itemSlotTypes: string[],\n slotType: string,\n subType: string\n): keyof IEquipmentSet => {\n if (!itemSlotTypes.includes(slotType)) {\n return subType as keyof IEquipmentSet;\n }\n return slotType as keyof IEquipmentSet;\n};\n\nexport const ItemInfoDisplay: React.FC<IItemInfoDisplayProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isMobile,\n}) => {\n const itemToCompare = useMemo(() => {\n if (equipmentSet && item.allowedEquipSlotType?.length) {\n const allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);\n const itemSubTypeCamelCase = camelCase(item.subType);\n\n const slotType = getSlotType(\n itemSlotTypes,\n allowedSlotTypeCamelCase,\n itemSubTypeCamelCase\n );\n\n const itemSubTypeFromEquipment = Object.values(equipmentSet).find(\n item => camelCase(item?.subType ?? '') === itemSubTypeCamelCase\n );\n\n const itemFromEquipment = itemSubTypeFromEquipment\n ? itemSubTypeFromEquipment\n : (equipmentSet[slotType] as IItem);\n\n if (\n itemFromEquipment &&\n (!item._id || itemFromEquipment._id !== item._id)\n ) {\n return itemFromEquipment;\n }\n }\n\n return undefined;\n }, [equipmentSet, item]);\n\n return (\n <Flex $isMobile={isMobile}>\n <ItemInfo\n item={item}\n itemToCompare={itemToCompare}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n {itemToCompare && (\n <CompareContainer>\n <Equipped>\n <span>Equipped</span>\n </Equipped>\n <ItemInfo\n item={itemToCompare}\n itemToCompare={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n </CompareContainer>\n )}\n </Flex>\n );\n};\n\nconst Flex = styled.div<{ $isMobile?: boolean }>`\n display: flex;\n gap: 0.5rem;\n flex-direction: ${({ $isMobile }) => ($isMobile ? 'row-reverse' : 'row')};\n align-items: center;\n\n @media (max-width: 640px) {\n flex-direction: column-reverse;\n align-items: center;\n }\n`;\n\nconst Equipped = styled.div`\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n`;\n\nconst CompareContainer = styled.div`\n position: relative;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemInfoDisplay } from './ItemInfoDisplay';\n\nexport interface IItemTooltipProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n}\n\nconst offset = 20;\n\nexport const ItemTooltip: React.FC<IItemTooltipProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const { current } = ref;\n\n if (current) {\n const handleMouseMove = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n // Adjust the position of the tooltip based on the mouse position\n const rect = current.getBoundingClientRect();\n\n const tooltipWidth = rect.width;\n const tooltipHeight = rect.height;\n const isOffScreenRight =\n clientX + tooltipWidth + offset > window.innerWidth;\n const isOffScreenBottom =\n clientY + tooltipHeight + offset > window.innerHeight;\n const x = isOffScreenRight\n ? clientX - tooltipWidth - offset\n : clientX + offset;\n const y = isOffScreenBottom\n ? clientY - tooltipHeight - offset\n : clientY + offset;\n\n current.style.transform = `translate(${x}px, ${y}px)`;\n current.style.opacity = '1';\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return;\n }, []);\n\n return (\n <ModalPortal>\n <Container ref={ref}>\n <ItemInfoDisplay\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n />\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div`\n position: absolute;\n z-index: 100;\n pointer-events: none;\n left: 0;\n top: 0;\n opacity: 0;\n transition: opacity 0.08s;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemInfoDisplay } from './ItemInfoDisplay';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface MobileItemTooltipProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n closeTooltip: () => void;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n options?: IListMenuOption[];\n onSelected?: (selectedOptionId: string) => void;\n}\n\nexport const MobileItemTooltip: React.FC<MobileItemTooltipProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n closeTooltip,\n equipmentSet,\n scale = 1,\n options,\n onSelected,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n const handleFadeOut = () => {\n ref.current?.classList.add('fadeOut');\n };\n\n return (\n <ModalPortal>\n <Container\n ref={ref}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n closeTooltip();\n }, 100);\n }}\n scale={scale}\n >\n <ItemInfoDisplay\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n isMobile\n />\n <OptionsContainer>\n {options?.map(option => (\n <Option\n key={option.id}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n onSelected?.(option.id);\n closeTooltip();\n }, 100);\n }}\n >\n {option.text}\n </Option>\n ))}\n </OptionsContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div<{ scale: number }>`\n position: absolute;\n z-index: 100;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0 0 0 / 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n transition: opacity 0.08s;\n animation: fadeIn 0.1s forwards;\n\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.92;\n }\n }\n\n @keyframes fadeOut {\n 0% {\n opacity: 0.92;\n }\n 100% {\n opacity: 0;\n }\n }\n\n &.fadeOut {\n animation: fadeOut 0.1s forwards;\n }\n\n @media (max-width: 640px) {\n flex-direction: column;\n }\n`;\n\nconst OptionsContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex-wrap: wrap;\n\n @media (max-width: 640px) {\n flex-direction: row;\n justify-content: center;\n }\n`;\n\nconst Option = styled.button`\n padding: 1rem;\n background-color: #333;\n color: white;\n border: none;\n border-radius: 3px;\n width: 8rem;\n transition: background-color 0.1s;\n\n &:hover {\n background-color: #555;\n }\n\n @media (max-width: 640px) {\n padding: 1rem 0.5rem;\n }\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport { ItemTooltip } from './ItemTooltip';\nimport { MobileItemTooltip } from './MobileItemTooltip';\n\ninterface IItemInfoWrapperProps {\n item: IItem;\n children: React.ReactNode;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n}\n\nexport const ItemInfoWrapper: React.FC<IItemInfoWrapperProps> = ({\n children,\n atlasIMG,\n atlasJSON,\n item,\n equipmentSet,\n scale,\n}) => {\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n\n return (\n <div\n onMouseEnter={() => {\n if (!isTooltipMobileVisible) setIsTooltipVisible(true);\n }}\n onMouseLeave={setIsTooltipVisible.bind(null, false)}\n onTouchEnd={() => {\n setIsTooltipMobileVisible(true);\n setIsTooltipVisible(false);\n }}\n >\n {children}\n\n {isTooltipVisible && !isTooltipMobileVisible && (\n <ItemTooltip\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n item={item}\n />\n )}\n {isTooltipMobileVisible && (\n <MobileItemTooltip\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n closeTooltip={() => {\n setIsTooltipMobileVisible(false);\n console.log('close');\n }}\n item={item}\n scale={scale}\n />\n )}\n </div>\n );\n};\n","import { IItem, IItemContainer } from \"@rpg-engine/shared\";\n\nexport const countItemFromInventory = (itemKey: string, inventory: IItemContainer) => {\n let itemsFromInventory: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === itemKey) {\n itemsFromInventory.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty = itemsFromInventory.reduce(\n (acc, item) => acc + (item?.stackQty || 1),\n 0\n );\n\n return totalQty;\n};","export const modifyString = (str: string): string => {\n let parts = str.split('/');\n let fileName = parts[parts.length - 1];\n parts = fileName.split('.');\n let name = parts[0];\n name = name.replace(/-/g, ' ');\n let words = name.split(' ');\n let firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);\n let modifiedWords = [firstWord].concat(words.slice(1));\n return modifiedWords.join(' ');\n};\n","import { ICraftableItem, IItemContainer, ISkill } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { modifyString } from './utils/modifyString';\n\ninterface ICraftingTooltipProps {\n x: number;\n y: number;\n recipe: ICraftableItem;\n inventory?: IItemContainer | null;\n skills?: ISkill | null;\n atlasIMG: any;\n atlasJSON: any;\n}\n\nconst TooltipContainer = styled.div<{ x: number; y: number }>`\n position: fixed;\n left: ${props => props.x}px;\n top: ${props => props.y}px;\n background-color: rgba(0, 0, 0, 0.95);\n color: white;\n text-align: left;\n border-radius: 4px;\n padding: 10px;\n z-index: 1000;\n font-family: 'Press Start 2P', cursive;\n font-size: 0.6rem;\n width: max-content;\n max-width: 250px;\n white-space: normal;\n border: 1px solid ${uiColors.darkGray};\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n line-height: 1.4;\n\n /* Arrow */\n &:before {\n content: '';\n position: absolute;\n top: 12px;\n left: -6px;\n border-width: 6px 6px 6px 0;\n border-style: solid;\n border-color: transparent rgba(0, 0, 0, 0.95) transparent transparent;\n }\n`;\n\nconst MinCraftingRequirementsText = styled.div<{ levelIsOk: boolean }>`\n font-size: 0.55rem;\n margin: 0;\n margin-bottom: 12px;\n color: ${({ levelIsOk }) =>\n levelIsOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nconst IngredientsTitle = styled.div`\n color: ${uiColors.yellow};\n font-size: 0.6rem;\n margin-bottom: 12px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n`;\n\nconst Recipe = styled.div`\n display: flex;\n align-items: center;\n font-size: 0.55rem;\n margin-bottom: 8px;\n margin-left: 4px;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\n }\n`;\n\nconst Ingredient = styled.div<{ isQuantityOk: boolean }>`\n margin: 0;\n margin-left: 14px;\n color: ${({ isQuantityOk }) =>\n isQuantityOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nexport const CraftingTooltip: React.FC<ICraftingTooltipProps> = ({\n x,\n y,\n recipe,\n inventory,\n skills,\n atlasIMG,\n atlasJSON,\n}) => {\n const levelInSkill =\n (skills?.[\n (recipe?.minCraftingRequirements?.[0] ?? '') as keyof ISkill\n ] as any)?.level ?? 1;\n\n const levelIsOk = recipe?.levelIsOk ?? false;\n\n return (\n <TooltipContainer x={x} y={y}>\n <MinCraftingRequirementsText levelIsOk={levelIsOk}>\n {modifyString(`${recipe?.minCraftingRequirements?.[0] ?? ''}`)} lvl{' '}\n {recipe?.minCraftingRequirements?.[1] ?? 0} ({levelInSkill})\n </MinCraftingRequirementsText>\n\n <IngredientsTitle>Ingredients</IngredientsTitle>\n {recipe.ingredients.map((ingredient, index) => {\n const itemQtyInInventory = !inventory\n ? 0\n : countItemFromInventory(ingredient.key, inventory);\n const isQuantityOk = ingredient.qty <= itemQtyInInventory;\n\n return (\n <Recipe key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={ingredient.texturePath}\n imgScale={1.2}\n />\n <Ingredient isQuantityOk={isQuantityOk}>\n {modifyString(ingredient.key)} x{ingredient.qty} (\n {itemQtyInInventory})\n </Ingredient>\n </Recipe>\n );\n })}\n </TooltipContainer>\n );\n};\n","import {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled from 'styled-components';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { CraftingTooltip } from './CraftingTooltip';\nimport { modifyString } from './utils/modifyString';\n\ninterface ICraftingRecipeProps {\n atlasJSON: any;\n atlasIMG: any;\n equipmentSet?: IEquipmentSet | null;\n recipe: ICraftableItem;\n scale?: number;\n handleRecipeSelect: () => void;\n selectedCraftItemKey?: string;\n inventory?: IItemContainer | null;\n skills?: ISkill | null;\n}\n\nconst RadioOptionsWrapper = styled.div`\n display: flex;\n align-items: stretch;\n margin-bottom: 0.5rem;\n padding: 8px;\n position: relative;\n cursor: pointer;\n`;\n\nconst SpriteAtlasWrapper = styled.div`\n margin-right: 40px;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst MainContent = styled.div`\n flex: 1;\n min-width: 0;\n`;\n\nconst ItemHeader = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 4px;\n\n label {\n font-size: 0.9rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n }\n`;\n\nexport const CraftingRecipe: React.FC<ICraftingRecipeProps> = ({\n atlasIMG,\n atlasJSON,\n equipmentSet,\n recipe,\n scale,\n handleRecipeSelect,\n selectedCraftItemKey,\n inventory,\n skills,\n}) => {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipPosition, setTooltipPosition] = useState({ x: 0, y: 0 });\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const isSelected = selectedCraftItemKey === recipe.key;\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n wrapperRef.current &&\n !wrapperRef.current.contains(event.target as Node)\n ) {\n setShowTooltip(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n\n const handleClick = () => {\n if (wrapperRef.current) {\n const rect = wrapperRef.current.getBoundingClientRect();\n setTooltipPosition({\n x: rect.right + 10,\n y: rect.top,\n });\n setShowTooltip(true);\n }\n };\n\n return (\n <RadioOptionsWrapper ref={wrapperRef} onClick={handleClick}>\n <SpriteAtlasWrapper>\n <ItemInfoWrapper\n item={recipe}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n scale={scale}\n >\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={recipe.texturePath}\n imgScale={3}\n grayScale={!recipe.canCraft}\n />\n </ItemInfoWrapper>\n </SpriteAtlasWrapper>\n\n <MainContent>\n <ItemHeader\n onPointerUp={recipe.canCraft ? handleRecipeSelect : undefined}\n >\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={recipe.name}\n name=\"test\"\n disabled={!recipe.canCraft}\n checked={isSelected}\n onChange={handleRecipeSelect}\n />\n <label>{modifyString(recipe.name)}</label>\n </ItemHeader>\n </MainContent>\n\n {showTooltip &&\n createPortal(\n <CraftingTooltip\n x={tooltipPosition.x}\n y={tooltipPosition.y}\n recipe={recipe}\n inventory={inventory}\n skills={skills}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />,\n document.body\n )}\n </RadioOptionsWrapper>\n );\n};\n","import { ICraftableItem, IItem, IItemContainer } from '@rpg-engine/shared';\n\nexport function calculateMaxCraftable(\n recipe: ICraftableItem | undefined,\n inventory: IItemContainer | null | undefined\n): number {\n if (!inventory || !recipe?.ingredients) {\n return 0;\n }\n\n return recipe.ingredients.reduce((maxPossible, ingredient) => {\n const inventoryItem = Object.values(inventory.slots).find(\n (item): item is IItem => item?.key === ingredient.key\n );\n\n if (!inventoryItem) {\n return 0;\n }\n\n const possibleWithThisIngredient = Math.floor(\n inventoryItem.stackQty ?? 0 / ingredient.qty\n );\n\n if (maxPossible === -1) {\n return possibleWithThisIngredient;\n }\n\n return Math.min(maxPossible, possibleWithThisIngredient);\n }, -1);\n}\n","import {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n ItemSubType,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useState } from 'react';\nimport {\n FaChevronLeft,\n FaChevronRight,\n FaSearch,\n FaThumbtack,\n} from 'react-icons/fa';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { useLocalStorage } from '../../hooks/useLocalStorage';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { CraftingRecipe } from './CraftingRecipe';\nimport { calculateMaxCraftable } from './utils/calculateMaxCraftable';\n\nexport interface IItemCraftSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onSelect: (value: string) => void;\n onCraftItem: (value: string | undefined, maxCraftable: number) => void;\n craftablesItems: ICraftableItem[];\n equipmentSet?: IEquipmentSet | null;\n inventory?: IItemContainer | null;\n scale?: number;\n skills?: ISkill | null;\n savedSelectedType?: string;\n}\n\nexport interface ShowMessage {\n show: boolean;\n index: number;\n}\n\nconst desktop = {\n width: 'min(900px, 80%)',\n height: 'min(700px, 80%)',\n};\n\nconst mobileLanscape = {\n width: '800px',\n height: '500px',\n};\n\nconst mobilePortrait = {\n width: '500px',\n height: '700px',\n};\n\nconst ITEMS_PER_PAGE = 8;\n\nexport const CraftBook: React.FC<IItemCraftSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n onClose,\n onSelect,\n onCraftItem,\n craftablesItems,\n equipmentSet,\n scale,\n inventory,\n skills,\n savedSelectedType,\n}) => {\n const [craftItemKey, setCraftItemKey] = useState<string>();\n const [selectedType, setSelectedType] = useState<string>(\n savedSelectedType ?? Object.keys(ItemSubType)[0]\n );\n const [size, setSize] = useState<{ width: string; height: string }>();\n const [searchTerm, setSearchTerm] = useState('');\n const [isSearchVisible, setIsSearchVisible] = useState(false);\n const [isCraftingDisabled, setIsCraftingDisabled] = useState(false);\n const [pinnedItems, setPinnedItems] = useLocalStorage<string[]>(\n 'pinnedCraftItems',\n []\n );\n const [currentPage, setCurrentPage] = useState(1);\n const [items, setItems] = useState<ICraftableItem[]>(craftablesItems);\n\n useEffect(() => {\n setItems(craftablesItems);\n }, [craftablesItems]);\n\n useEffect(() => {\n const handleResize = (): void => {\n if (\n window.innerWidth < 500 &&\n size?.width !== mobilePortrait.width &&\n (!scale || scale < 1)\n ) {\n setSize(mobilePortrait);\n } else if (\n (!scale || scale < 1) &&\n size?.width !== mobileLanscape.width\n ) {\n setSize(mobileLanscape);\n } else if (size?.width !== desktop.width) {\n setSize(desktop);\n }\n };\n handleResize();\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, [scale]);\n\n const togglePinItem = (itemKey: string) => {\n setPinnedItems(current =>\n current.includes(itemKey)\n ? current.filter(key => key !== itemKey)\n : [...current, itemKey]\n );\n };\n\n const categoryOptions: IOptionsProps[] = [\n 'Suggested',\n ...(pinnedItems.length > 0 ? ['Pinned'] : []),\n ...Object.keys(ItemSubType),\n ]\n .filter(type => type !== 'DeadBody')\n .sort((a, b) => {\n if (a === 'Suggested') return -1;\n if (b === 'Suggested') return 1;\n if (a === 'Pinned') return -1;\n if (b === 'Pinned') return 1;\n return a.localeCompare(b);\n })\n .map((type, index) => ({\n id: index,\n value: type,\n option: type,\n }));\n\n const filteredCraftableItems = items?.filter(item => {\n const matchesSearch = item.name\n .toLowerCase()\n .includes(searchTerm.toLowerCase());\n const matchesCategory =\n selectedType === 'Suggested' ||\n (selectedType === 'Pinned' && pinnedItems.includes(item.key)) ||\n item.subType === selectedType;\n return matchesSearch && matchesCategory;\n });\n\n const sortedItems = [...(filteredCraftableItems || [])].sort((a, b) => {\n const aIsPinned = pinnedItems.includes(a.key);\n const bIsPinned = pinnedItems.includes(b.key);\n if (aIsPinned && !bIsPinned) return -1;\n if (!aIsPinned && bIsPinned) return 1;\n return 0;\n });\n\n const totalPages = Math.ceil(sortedItems.length / ITEMS_PER_PAGE);\n const paginatedItems = sortedItems.slice(\n (currentPage - 1) * ITEMS_PER_PAGE,\n currentPage * ITEMS_PER_PAGE\n );\n\n useEffect(() => {\n setCurrentPage(1);\n }, [selectedType, searchTerm]);\n\n if (!size) return null;\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n width={size.width}\n height={size.height}\n cancelDrag=\".inputRadioCraftBook\"\n onCloseButton={onClose}\n scale={scale}\n >\n <Wrapper>\n <HeaderContainer>\n <Title>Craftbook</Title>\n <HeaderControls>\n <DropdownWrapper>\n <Dropdown\n options={categoryOptions}\n onChange={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n width=\"200px\"\n />\n </DropdownWrapper>\n <SearchButton onClick={() => setIsSearchVisible(!isSearchVisible)}>\n <FaSearch size={16} />\n </SearchButton>\n </HeaderControls>\n </HeaderContainer>\n\n {isSearchVisible && (\n <SearchContainer>\n <input\n type=\"text\"\n className=\"rpgui-input\"\n placeholder=\"Search items...\"\n value={searchTerm}\n onChange={e => setSearchTerm(e.target.value)}\n autoFocus\n />\n </SearchContainer>\n )}\n\n <ContentContainer>\n <RadioInputScroller className=\"inputRadioCraftBook\">\n {paginatedItems?.map(item => (\n <CraftingRecipeWrapper\n key={item.key}\n isSelected={pinnedItems.includes(item.key)}\n >\n <PinButton\n onClick={e => {\n e.stopPropagation();\n togglePinItem(item.key);\n }}\n isPinned={pinnedItems.includes(item.key)}\n >\n <FaThumbtack size={14} />\n </PinButton>\n <CraftingRecipe\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n recipe={item}\n scale={scale}\n handleRecipeSelect={setCraftItemKey.bind(null, item.key)}\n selectedCraftItemKey={craftItemKey}\n inventory={inventory}\n skills={skills}\n />\n </CraftingRecipeWrapper>\n ))}\n </RadioInputScroller>\n </ContentContainer>\n\n <PaginationContainer>\n <PaginationButton\n onClick={() => setCurrentPage(prev => Math.max(1, prev - 1))}\n disabled={currentPage === 1}\n >\n <FaChevronLeft size={12} />\n </PaginationButton>\n <PageInfo>\n Page {currentPage} of {totalPages}\n </PageInfo>\n <PaginationButton\n onClick={() =>\n setCurrentPage(prev => Math.min(totalPages, prev + 1))\n }\n disabled={currentPage === totalPages}\n >\n <FaChevronRight size={12} />\n </PaginationButton>\n </PaginationContainer>\n\n <Footer>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n <Button\n disabled={!craftItemKey || isCraftingDisabled}\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n if (!craftItemKey || isCraftingDisabled) return;\n\n const selectedItem = craftablesItems.find(\n item => item.key === craftItemKey\n );\n const maxCraftable = calculateMaxCraftable(\n selectedItem,\n inventory\n );\n\n onCraftItem(craftItemKey, maxCraftable);\n setIsCraftingDisabled(true);\n\n setTimeout(() => {\n setIsCraftingDisabled(false);\n }, 2000);\n }}\n >\n Craft\n </Button>\n </Footer>\n </Wrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n\n & > * {\n box-sizing: border-box;\n }\n`;\n\nconst HeaderContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: 16px 16px 0;\n`;\n\nconst Title = styled.h1`\n font-size: 1.2rem;\n color: ${uiColors.yellow} !important;\n margin: 0;\n text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);\n`;\n\nconst HeaderControls = styled.div`\n display: flex;\n align-items: center;\n gap: 16px;\n position: relative;\n left: -2rem;\n`;\n\nconst DropdownWrapper = styled.div`\n width: 200px;\n`;\n\nconst SearchButton = styled.button`\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n width: 32px;\n height: 32px;\n color: ${uiColors.yellow};\n opacity: 0.8;\n transition: opacity 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n opacity: 1;\n }\n`;\n\nconst SearchContainer = styled.div`\n padding: 0 16px;\n margin-top: 16px;\n\n input {\n width: 100%;\n font-size: 0.8rem;\n padding: 8px 12px;\n background-color: rgba(0, 0, 0, 0.3);\n border: none;\n color: white;\n border-radius: 4px;\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.5);\n }\n\n &:focus {\n outline: none;\n background-color: rgba(0, 0, 0, 0.4);\n }\n }\n`;\n\nconst ContentContainer = styled.div`\n flex: 1;\n min-height: 0;\n padding: 16px;\n padding-right: 0;\n padding-bottom: 0;\n overflow: hidden;\n width: 100%;\n`;\n\nconst RadioInputScroller = styled.div`\n height: 100%;\n overflow-y: scroll;\n overflow-x: hidden;\n padding: 8px 16px;\n padding-right: 24px;\n width: 100%;\n box-sizing: border-box;\n\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n align-items: start;\n\n @media (max-width: ${mobilePortrait.width}) {\n grid-template-columns: 1fr;\n }\n`;\n\nconst CraftingRecipeWrapper = styled.div<{ isSelected: boolean }>`\n position: relative;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n transition: background-color 0.2s;\n\n &:hover {\n background: rgba(0, 0, 0, 0.4);\n }\n\n ${props =>\n props.isSelected &&\n `\n background: rgba(255, 215, 0, 0.1);\n `}\n`;\n\nconst PinButton = styled.button<{ isPinned: boolean }>`\n position: absolute;\n top: 8px;\n right: 8px;\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n color: ${props => (props.isPinned ? uiColors.yellow : uiColors.lightGray)};\n opacity: ${props => (props.isPinned ? 1 : 0.6)};\n transition: all 0.2s;\n z-index: 2;\n\n &:hover {\n opacity: 1;\n color: ${uiColors.yellow};\n }\n`;\n\nconst Footer = styled.div`\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 8px;\n\n button {\n min-width: 100px;\n }\n\n @media (max-width: ${mobilePortrait.width}) {\n justify-content: center;\n }\n`;\n\nconst PaginationContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n padding: 8px;\n margin-top: 8px;\n border-top: 1px solid ${uiColors.darkGray};\n`;\n\nconst PaginationButton = styled.button<{ disabled?: boolean }>`\n background: none;\n border: none;\n color: ${props => (props.disabled ? uiColors.darkGray : uiColors.yellow)};\n cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${props => (props.disabled ? 0.5 : 0.8)};\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n &:hover:not(:disabled) {\n opacity: 1;\n }\n`;\n\nconst PageInfo = styled.div`\n color: ${uiColors.lightGray};\n font-size: 0.8rem;\n font-family: 'Press Start 2P', cursive;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { Dropdown } from './Dropdown';\n\ninterface IDropdownSelectorOption {\n id: string;\n name: string;\n}\n\nexport interface IDropdownSelectorContainer {\n onChange: (id: string) => void;\n options: IDropdownSelectorOption[];\n details?: string;\n title: string;\n}\n\nexport const DropdownSelectorContainer: React.FC<IDropdownSelectorContainer> = ({\n title,\n onChange,\n options,\n details,\n}) => {\n return (\n <div>\n <p>{title}</p>\n <Dropdown\n options={options.map((option, index) => ({\n option: option.name,\n value: option.id,\n id: index,\n }))}\n onChange={onChange}\n />\n <Details>{details}</Details>\n </div>\n );\n};\n\nconst Details = styled.p`\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n","import { GRID_HEIGHT, GRID_WIDTH } from '@rpg-engine/shared';\nimport { useCallback, useEffect, useState } from 'react';\nimport { IPosition } from '../types/eventTypes';\n\ninterface ICursorPositionProps {\n scale?: number;\n}\n\nexport const useCursorPosition = ({ scale = 1 }: ICursorPositionProps): IPosition => {\n const [position, setPosition] = useState<IPosition>({ x: 0, y: 0 });\n\n const scalePosition = useCallback((x: number, y: number): IPosition => {\n return {\n x: ((x - GRID_WIDTH / 2) / scale) + GRID_WIDTH / 2,\n y: ((y - GRID_HEIGHT / 2) / scale) + GRID_HEIGHT / 2,\n };\n }, [scale]);\n\n const setFromEvent = useCallback((e: MouseEvent | TouchEvent) => {\n let x, y;\n\n if ('touches' in e) {\n x = e.touches[0].clientX;\n y = e.touches[0].clientY;\n } else {\n x = e.clientX;\n y = e.clientY;\n }\n\n const scaledPosition = scalePosition(x, y);\n setPosition(scaledPosition);\n }, [scale, scalePosition]);\n\n const cleanup = useCallback(() => {\n setPosition({ x: 0, y: 0 });\n }, []);\n\n useEffect(() => {\n const handleEvent = (e: Event) => setFromEvent(e as MouseEvent | TouchEvent);\n\n window.addEventListener('mousemove', handleEvent);\n window.addEventListener('touchmove', handleEvent);\n window.addEventListener('mouseup', cleanup);\n window.addEventListener('touchend', cleanup);\n\n return () => {\n window.removeEventListener('mousemove', handleEvent);\n window.removeEventListener('touchmove', handleEvent);\n window.removeEventListener('mouseup', cleanup);\n window.removeEventListener('touchend', cleanup);\n };\n }, [setFromEvent, cleanup]);\n\n return position;\n};\n","import { getItemTextureKeyPath } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useCursorPosition } from '../../../hooks/useCursorPosition';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { onRenderStackInfo } from './ItemSlotQty/ItemSlotQty';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\nconst CONTAINER_SIZE = 32;\nconst OFFSET = CONTAINER_SIZE / 2;\n\ninterface IProps {\n atlasJSON: any;\n atlasIMG: any;\n scale?: number;\n}\n\nexport const DraggedItem = ({\n atlasJSON,\n atlasIMG,\n scale,\n}: IProps): JSX.Element | null => {\n const { draggingState } = useItemSlotDragging();\n\n const { item } = draggingState;\n\n const { x, y } = useCursorPosition({\n scale,\n });\n\n if (!item) {\n return null;\n }\n\n if (x === 0 && y === 0) {\n return null;\n }\n\n const centeredX = x - OFFSET;\n const centeredY = y - OFFSET;\n\n const stackInfo = onRenderStackInfo(item?._id ?? '', item?.stackQty ?? 0);\n\n return (\n <Container>\n <SpriteContainer x={centeredX} y={centeredY}>\n <SpriteFromAtlas\n key={item._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.texturePath,\n texturePath: item.texturePath,\n stackQty: item.stackQty || 1,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={3}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n {stackInfo}\n </SpriteContainer>\n </Container>\n );\n};\n\ninterface IContainer {\n x: number;\n y: number;\n}\n\nconst pulse = `\n @keyframes pulse {\n 0%, 100% {\n transform: scale(1) rotate(-3deg);\n }\n 50% {\n transform: scale(0.95) rotate(-3deg);\n }\n }\n`;\n\nconst Container = styled.div`\n position: relative;\n`;\n\nconst SpriteContainer = styled.div.attrs<IContainer>(props => ({\n style: {\n left: `${props.x}px`,\n top: `${props.y}px`,\n },\n}))<IContainer>`\n ${pulse}\n\n position: absolute;\n z-index: 100;\n pointer-events: none;\n\n width: ${CONTAINER_SIZE}px;\n height: ${CONTAINER_SIZE}px;\n\n transform: rotate(-3deg);\n\n filter: grayscale(100%);\n opacity: 0.35;\n\n animation: pulse 2s infinite;\n\n .item-slot-qty {\n position: absolute;\n bottom: 0;\n margin-left: 0.8rem;\n }\n`;\n\nexport default DraggedItem;\n","import React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport ModalPortal from './Abstractions/ModalPortal';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface IRelativeMenuProps {\n options: IListMenuOption[];\n onSelected: (selectedOptionId: string) => void;\n fontSize?: number;\n onOutsideClick?: () => void;\n pos: { x: number; y: number };\n}\n\nexport const RelativeListMenu: React.FC<IRelativeMenuProps> = ({\n options,\n onSelected,\n onOutsideClick,\n fontSize = 0.8,\n pos,\n}) => {\n const ref = useRef(null);\n\n useOutsideClick(ref, 'relative-context-menu');\n\n useEffect(() => {\n document.addEventListener('clickOutside', event => {\n const e = event as CustomEvent;\n\n if (e.detail.id === 'relative-context-menu') {\n if (onOutsideClick) {\n onOutsideClick();\n }\n }\n });\n\n return () => {\n document.removeEventListener('clickOutside', _e => {});\n };\n }, []);\n\n return (\n <ModalPortal>\n <Container fontSize={fontSize} ref={ref} {...pos}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onPointerDown={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n </ModalPortal>\n );\n};\n\ninterface IContainerProps {\n fontSize?: number;\n x: number;\n y: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: absolute;\n top: ${props => props.y}px;\n left: ${props => props.x}px;\n\n display: flex;\n flex-direction: column;\n width: max-content;\n justify-content: start;\n align-items: flex-start;\n\n li {\n font-size: ${props => props.fontSize}em;\n }\n`;\n\nconst ListElement = styled.li`\n margin-right: 0.5rem;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { MobileItemTooltip } from '../Cards/MobileItemTooltip';\nimport { useItemSlotDetails } from './context/ItemSlotDetailsContext';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\ninterface IProps {\n dragScale: number | undefined;\n onSelected?: (optionId: string, item: IItem) => void;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n isContextMenuDisabled?: boolean;\n}\n\nexport const ItemSlotToolTips = ({\n dragScale,\n onSelected,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isContextMenuDisabled,\n}: IProps): JSX.Element => {\n const { detailsState, updateDetailsState } = useItemSlotDetails();\n\n const {\n isTooltipVisible,\n isTooltipMobileVisible,\n isContextMenuVisible,\n contextMenuPosition,\n contextActions,\n item,\n } = detailsState;\n\n const { draggingState } = useItemSlotDragging();\n\n const { isFocused } = draggingState;\n\n return (\n <>\n {isTooltipVisible && item && !isFocused && (\n <ItemTooltip\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n />\n )}\n\n {isTooltipMobileVisible && item && (\n <MobileItemTooltip\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n closeTooltip={() => {\n updateDetailsState({ isTooltipMobileVisible: false });\n }}\n scale={dragScale}\n options={contextActions}\n onSelected={(optionId: string) => {\n updateDetailsState({\n isContextMenuVisible: false,\n });\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n />\n )}\n\n {!isContextMenuDisabled &&\n isContextMenuVisible &&\n contextActions &&\n contextActions.length > 0 && (\n <RelativeListMenu\n options={contextActions}\n onSelected={(optionId: string) => {\n updateDetailsState({ isContextMenuVisible: false });\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n onOutsideClick={() => {\n updateDetailsState({ isContextMenuVisible: false });\n }}\n pos={contextMenuPosition}\n />\n )}\n </>\n );\n};\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n isMobile,\n ItemContainerType,\n ItemSlotType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { ItemSlotDetailsProvider } from '../Item/Inventory/context/ItemSlotDetailsContext';\nimport { ItemSlotDraggingProvider } from '../Item/Inventory/context/ItemSlotDraggingContext';\nimport DraggedItem from '../Item/Inventory/DraggedItem';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { ItemSlotToolTips } from '../Item/Inventory/ItemSlotTooltips';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\n\nexport interface IEquipmentSetProps {\n equipmentSet: IEquipmentSet;\n onClose?: () => void;\n onItemClick?: (\n ItemType: ItemType,\n item: IItem,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragEnd?: (quantity?: number) => void;\n onItemPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemOutsideDrop?: (item: IItem, position: IPosition) => void;\n scale?: number;\n checkIfItemCanBeMoved: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;\n onSelected?: (optionId: string) => void;\n initialPosition?: { x: number; y: number };\n type: ItemContainerType | null;\n atlasIMG: any;\n atlasJSON: any;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n}\n\nexport const EquipmentSet: React.FC<IEquipmentSetProps> = ({\n equipmentSet,\n onClose,\n onMouseOver,\n onSelected,\n onItemClick,\n atlasIMG,\n atlasJSON,\n onItemDragEnd,\n onItemDragStart,\n onItemPlaceDrop,\n onItemOutsideDrop,\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n scale,\n initialPosition,\n onPositionChangeEnd,\n onPositionChangeStart,\n}) => {\n const {\n neck,\n leftHand,\n ring,\n head,\n armor,\n legs,\n boot,\n inventory,\n rightHand,\n accessory,\n } = equipmentSet;\n\n const equipmentData = [\n neck,\n leftHand,\n ring,\n head,\n armor,\n legs,\n boot,\n inventory,\n rightHand,\n accessory,\n ];\n\n const equipmentMaskSlots = [\n ItemSlotType.Neck,\n ItemSlotType.LeftHand,\n ItemSlotType.Ring,\n ItemSlotType.Head,\n ItemSlotType.Torso,\n ItemSlotType.Legs,\n ItemSlotType.Feet,\n ItemSlotType.Inventory,\n ItemSlotType.RightHand,\n ItemSlotType.Accessory,\n ];\n\n const onRenderEquipmentSlotRange = (start: number, end: number) => {\n const equipmentRange = equipmentData.slice(start, end);\n const slotMaksRange = equipmentMaskSlots.slice(start, end);\n\n return equipmentRange.map((data, i) => {\n const item = data as IItem;\n const itemContainer =\n (item && (item.itemContainer as IItemContainer)) ?? null;\n\n return (\n <ItemSlot\n key={i}\n slotIndex={i}\n item={item}\n itemContainer={itemContainer}\n itemContainerType={ItemContainerType.Equipment}\n slotSpriteMask={slotMaksRange[i]}\n onMouseOver={(event, slotIndex, item) => {\n if (onMouseOver) onMouseOver(event, slotIndex, item);\n }}\n onPointerDown={(itemType, ContainerType) => {\n if (onItemClick) onItemClick(itemType, item, ContainerType);\n }}\n onDragStart={(item, slotIndex, itemContainerType) => {\n if (!item) {\n return;\n }\n\n if (onItemDragStart)\n onItemDragStart(item, slotIndex, itemContainerType);\n }}\n onDragEnd={quantity => {\n if (onItemDragEnd) onItemDragEnd(quantity);\n }}\n dragScale={scale}\n checkIfItemCanBeMoved={checkIfItemCanBeMoved}\n checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}\n onPlaceDrop={(item, slotIndex, itemContainerType) => {\n if (onItemPlaceDrop)\n onItemPlaceDrop(item, slotIndex, itemContainerType);\n }}\n onOutsideDrop={(item, position) => {\n if (onItemOutsideDrop) onItemOutsideDrop(item, position);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n });\n };\n\n return (\n <ItemSlotDraggingProvider>\n <ItemSlotDetailsProvider>\n <DraggedItem atlasIMG={atlasIMG} atlasJSON={atlasJSON} scale={scale} />\n <DraggableContainer\n title={'Equipments'}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"330px\"\n cancelDrag=\".equipment-container-body\"\n scale={scale}\n initialPosition={initialPosition}\n onPositionChangeEnd={onPositionChangeEnd}\n onPositionChangeStart={onPositionChangeStart}\n >\n <EquipmentSetContainer className=\"equipment-container-body\">\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(0, 3)}\n </EquipmentColumn>\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(3, 7)}\n </EquipmentColumn>\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(7, 10)}\n </EquipmentColumn>\n </EquipmentSetContainer>\n </DraggableContainer>\n\n <ItemSlotToolTips\n dragScale={scale}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n onSelected={onSelected}\n isContextMenuDisabled={isMobile()}\n />\n </ItemSlotDetailsProvider>\n </ItemSlotDraggingProvider>\n );\n};\n\nconst EquipmentSetContainer = styled.div`\n width: inherit;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n flex-direction: row;\n touch-action: none;\n overflow: hidden;\n`;\n\nconst EquipmentColumn = styled.div`\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n flex-direction: column;\n touch-action: none;\n`;\n","import styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport const Table = styled.table`\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n`;\n\nexport const TableRow = styled.tr`\n &:nth-child(even) {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n &:hover {\n background-color: rgba(255, 255, 255, 0.1) !important;\n }\n`;\n\nexport const TableHeader = styled.th`\n text-align: left;\n padding: 0.5rem;\n color: ${uiColors.yellow} !important;\n border-bottom: 1px solid ${uiColors.lightGray};\n text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;\n`;\n\nexport const TableCell = styled.td`\n padding: 0.5rem;\n color: ${uiColors.white};\n border-bottom: 1px solid ${uiColors.lightGray};\n text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;\n`;\n\nexport const ActionButtons = styled.div`\n display: flex;\n gap: 10px;\n align-items: center;\n`;\n\ninterface IUserActionProps {\n color: string;\n}\n\nexport const UserActionLink = styled.span<IUserActionProps>`\n color: ${({ color }) => color} !important;\n cursor: pointer;\n margin-right: 0.5rem;\n\n &:hover {\n text-decoration: underline;\n }\n`;\n","import { debounce } from 'lodash';\nimport React, { useCallback, useState } from 'react';\nimport styled from 'styled-components';\nimport { InternalTabs, UserActionLink } from '../..';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { IFriend } from './FriendList';\n\ninterface ISearchFriendProps {\n searchedCharacters: IFriend[];\n friendRequests: IFriend[];\n onFocus?: () => void;\n onBlur?: () => void;\n onSearch: (characterName: string) => void;\n onSendFriendRequest: (character: IFriend) => void;\n onAcceptRequest: (character: IFriend) => void;\n onRejectRequest: (character: IFriend) => void;\n}\n\nexport const SearchFriend: React.FC<ISearchFriendProps> = ({\n searchedCharacters,\n friendRequests,\n onBlur,\n onFocus,\n onSearch,\n onSendFriendRequest,\n onAcceptRequest,\n onRejectRequest,\n}) => {\n const [characterName, setCharacterName] = useState('');\n\n const debouncedSearch = useCallback(\n debounce((name: string) => {\n onSearch(name);\n }, 300),\n []\n );\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const name = e.target.value;\n setCharacterName(name);\n debouncedSearch(name);\n };\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (characterName.trim()) {\n onSearch(characterName);\n }\n };\n\n const searchTabContent = (\n <ListContainer>\n <SearchForm onSubmit={handleSubmit}>\n <SearchInput\n value={characterName}\n id=\"characterName\"\n name=\"characterName\"\n onChange={handleInputChange}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n autoFocus\n placeholder=\"Search for a character...\"\n />\n </SearchForm>\n <CharacterList\n characters={searchedCharacters}\n onAction={onSendFriendRequest}\n actionLabel=\"Add Friend\"\n />\n </ListContainer>\n );\n\n const requestsTabContent = (\n <ListContainer>\n <FriendRequestSection\n friendRequests={friendRequests}\n onAccept={onAcceptRequest}\n onReject={onRejectRequest}\n />\n </ListContainer>\n );\n\n const tabs = [\n { id: 'search', title: 'Search', content: searchTabContent },\n {\n id: 'requests',\n title: `Requests (${friendRequests.length})`,\n content: requestsTabContent,\n },\n ];\n\n return (\n <Container>\n <InternalTabs\n tabs={tabs}\n activeTextColor=\"#000\"\n inactiveColor=\"#777\"\n borderColor=\"#f59e0b\"\n />\n </Container>\n );\n};\n\nconst CharacterList: React.FC<{\n characters: IFriend[];\n onAction: (character: IFriend) => void;\n actionLabel: string;\n}> = ({ characters, onAction, actionLabel }) => (\n <ListContainer>\n {characters.map(character => (\n <ListItem key={character._id}>\n <CharacterName>{character.name}</CharacterName>\n <UserActionLink\n color={uiColors.lightGreen}\n onClick={() => onAction(character)}\n >\n {actionLabel}\n </UserActionLink>\n </ListItem>\n ))}\n </ListContainer>\n);\n\nconst FriendRequestSection: React.FC<{\n friendRequests: IFriend[];\n onAccept: (character: IFriend) => void;\n onReject: (character: IFriend) => void;\n}> = ({ friendRequests, onAccept, onReject }) => (\n <>\n {friendRequests.length > 0 && (\n <ListContainer>\n {friendRequests.map(character => (\n <ListItem key={character._id}>\n <CharacterName>{character.name}</CharacterName>\n <AcceptRejectActions>\n <UserActionLink\n color={uiColors.lightGreen}\n onClick={() => onAccept(character)}\n >\n Accept\n </UserActionLink>\n <UserActionLink\n color={uiColors.red}\n onClick={() => onReject(character)}\n >\n Reject\n </UserActionLink>\n </AcceptRejectActions>\n </ListItem>\n ))}\n </ListContainer>\n )}\n </>\n);\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n gap: 1rem;\n`;\n\nconst SearchForm = styled.form`\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 1rem;\n`;\n\nconst SearchInput = styled.input`\n width: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n border: none;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n`;\n\nconst ListContainer = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 50vh;\n overflow-y: auto;\n\n @media (max-width: 768px) {\n max-height: 90vh;\n }\n`;\n\nconst ListItem = styled.li`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n`;\n\nconst CharacterName = styled.p`\n font-size: ${uiFonts.size.small};\n margin: 0;\n`;\n\nconst AcceptRejectActions = styled.div`\n display: flex;\n gap: 0.5rem;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Button, ButtonTypes } from '../Button';\n\nimport { ICharacter } from '@rpg-engine/shared';\nimport {\n ActionButtons,\n Table,\n TableCell,\n TableHeader,\n TableRow,\n UserActionLink,\n} from '../Table/Table';\nimport { SearchFriend } from './SearchFriend';\nexport type IFriend = Pick<ICharacter, 'name' | '_id' | 'isOnline'>;\ninterface IFriendListProps {\n scale?: number;\n friends: IFriend[];\n friendRequests: IFriend[];\n searchedCharacters: IFriend[];\n onFocus?: () => void;\n onBlur?: () => void;\n onClose: () => void;\n onOpenPrivateMessage: (character: IFriend) => void;\n onRemoveFriend: (character: IFriend) => void;\n onSendFriendRequest: (character: IFriend) => void;\n onSearch: (characterName: string) => void;\n onAcceptRequest: (character: IFriend) => void;\n onRejectRequest: (character: IFriend) => void;\n onAddFriend?: () => void;\n onBackFriendList?: () => void;\n}\n\nexport const FriendList: React.FC<IFriendListProps> = ({\n friends,\n friendRequests,\n searchedCharacters,\n onFocus,\n onBlur,\n onSearch,\n onAcceptRequest,\n onSendFriendRequest,\n onRemoveFriend,\n onOpenPrivateMessage,\n onRejectRequest,\n onAddFriend,\n onBackFriendList,\n}) => {\n const [isAddFriendUI, setIsAddFriendUI] = useState(false);\n\n useEffect(() => {\n if (isAddFriendUI) {\n onAddFriend?.();\n } else {\n onBackFriendList?.();\n }\n }, [isAddFriendUI]);\n\n return (\n <ListWrapper>\n {isAddFriendUI ? (\n <SearchFriend\n searchedCharacters={searchedCharacters}\n onSendFriendRequest={onSendFriendRequest}\n onAcceptRequest={onAcceptRequest}\n onRejectRequest={onRejectRequest}\n friendRequests={friendRequests}\n onSearch={onSearch}\n onBlur={onBlur}\n onFocus={onFocus}\n />\n ) : (\n <>\n <ScrollableArea>\n <Table>\n <thead>\n <TableRow>\n <TableHeader>Online</TableHeader>\n <TableHeader>Name</TableHeader>\n <TableHeader>Actions</TableHeader>\n </TableRow>\n </thead>\n <tbody>\n {friends.map(friend => (\n <TableRow key={friend._id}>\n <TableCell>\n <IsOnlineBadge $isOnline={friend.isOnline} />\n </TableCell>\n <TableCell>{friend.name}</TableCell>\n <TableCell>\n <ActionButtons>\n <UserActionLink\n color={uiColors.white}\n onClick={() => onOpenPrivateMessage(friend)}\n >\n Chat\n </UserActionLink>\n <UserActionLink\n color={uiColors.red}\n onClick={() => onRemoveFriend(friend)}\n >\n Remove\n </UserActionLink>\n </ActionButtons>\n </TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </ScrollableArea>\n </>\n )}\n\n <ButtonContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => setIsAddFriendUI(prev => !prev)}\n >\n {isAddFriendUI ? 'Back' : 'Add New Friend'}\n </Button>\n </ButtonContainer>\n </ListWrapper>\n );\n};\n\n// Styled components for FriendList UI\nconst ListWrapper = styled.div`\n margin-top: 1rem;\n max-height: 350px;\n display: flex;\n flex-direction: column;\n`;\n\nconst ScrollableArea = styled.div`\n overflow-y: auto;\n max-height: 300px; /* Adjust this value based on your layout */\n`;\n\nconst IsOnlineBadge = styled.div<{ $isOnline: boolean }>`\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: ${({ $isOnline }) =>\n $isOnline ? uiColors.lightGreen : uiColors.red};\n margin-right: 1rem;\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 1rem;\n`;\n","import { isMobileOrTablet } from '@rpg-engine/shared';\n\nexport const IS_MOBILE_OR_TABLET = isMobileOrTablet();\n","export const chunkString = (str: string, length: number) => {\n return str.match(new RegExp('.{1,' + length + '}', 'g'));\n};\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n text: string;\n onFinish?: () => void;\n onStart?: () => void;\n}\n\nexport const DynamicText: React.FC<IProps> = ({ text, onFinish, onStart }) => {\n const [textState, setTextState] = useState<string>('');\n\n useEffect(() => {\n let i = 0;\n const interval = setInterval(() => {\n // on every interval, show one more character\n\n if (i === 0) {\n if (onStart) {\n onStart();\n }\n }\n\n if (i < text.length) {\n setTextState(text.substring(0, i + 1));\n i++;\n } else {\n clearInterval(interval);\n if (onFinish) {\n onFinish();\n }\n }\n }, 25);\n\n return () => {\n clearInterval(interval);\n };\n }, [text]);\n\n return <TextContainer>{textState}</TextContainer>;\n};\n\nconst TextContainer = styled.p`\n font-size: 0.7rem !important;\n color: white;\n text-shadow: 1px 1px 0px #000000;\n letter-spacing: 1.2px;\n word-break: normal;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { NPCDialogType } from '../..';\nimport { IS_MOBILE_OR_TABLET } from '../../constants/uiDevices';\nimport { chunkString } from '../../libs/StringHelpers';\nimport { DynamicText } from '../typography/DynamicText';\nimport pressButtonGif from './img/press-button.gif';\nimport pressSpaceGif from './img/space.gif';\n\ninterface IProps {\n text: string;\n onClose: () => void;\n onEndStep?: () => void;\n onStartStep?: () => void;\n type?: NPCDialogType;\n}\n\nexport const NPCDialogText: React.FC<IProps> = ({\n text,\n onClose,\n onEndStep,\n onStartStep,\n type,\n}) => {\n const windowSize = useRef([window.innerWidth, window.innerHeight]);\n function maxCharacters(width: number) {\n // Set the font size to 16 pixels\n var fontSize = 11.2;\n\n // Calculate the number of characters that can fit in one line\n var charactersPerLine = Math.floor(width / 2 / fontSize);\n\n // Calculate the number of lines that can fit in the div\n var linesPerDiv = Math.floor(180 / fontSize);\n\n // Calculate the maximum number of characters that can fit in the div\n var maxCharacters = charactersPerLine * linesPerDiv;\n\n // Return the maximum number of characters\n return Math.round(maxCharacters / 5);\n }\n\n const textChunks = chunkString(text, maxCharacters(windowSize.current[0]));\n\n const [chunkIndex, setChunkIndex] = useState<number>(0);\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n goToNextStep();\n }\n };\n\n const goToNextStep = () => {\n const hasNextChunk = textChunks?.[chunkIndex + 1] || false;\n\n if (hasNextChunk) {\n setChunkIndex(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [chunkIndex]);\n\n const [showGoNextIndicator, setShowGoNextIndicator] = useState<boolean>(\n false\n );\n\n return (\n <Container>\n <DynamicText\n text={textChunks?.[chunkIndex] || ''}\n onFinish={() => {\n setShowGoNextIndicator(true);\n\n onEndStep && onEndStep();\n }}\n onStart={() => {\n setShowGoNextIndicator(false);\n\n onStartStep && onStartStep();\n }}\n />\n {showGoNextIndicator && (\n <PressSpaceIndicator\n right={type === NPCDialogType.TextOnly ? '1rem' : '10.5rem'}\n src={IS_MOBILE_OR_TABLET ? pressButtonGif : pressSpaceGif}\n onPointerDown={() => {\n goToNextStep();\n }}\n />\n )}\n </Container>\n );\n};\n\nconst Container = styled.div``;\n\ninterface IPressSpaceIndicatorProps {\n right: string;\n}\n\nconst PressSpaceIndicator = styled.img<IPressSpaceIndicatorProps>`\n position: absolute;\n right: ${({ right }) => right};\n bottom: 1rem;\n height: 20.7px;\n image-rendering: -webkit-optimize-contrast;\n`;\n","import React from 'react';\n\n//@ts-ignore\nexport const useEventListener = (type, handler, el = window) => {\n const savedHandler = React.useRef();\n\n React.useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n React.useEffect(() => {\n //@ts-ignore\n const listener = e => savedHandler.current(e);\n\n el.addEventListener(type, listener);\n\n return () => {\n el.removeEventListener(type, listener);\n };\n }, [type, el]);\n};\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { useEventListener } from '../../../hooks/useEventListener';\nimport { DynamicText } from '../../typography/DynamicText';\n\nexport interface IQuestionDialogAnswer {\n id: number;\n text: string;\n nextQuestionId?: number;\n}\n\nexport interface IQuestionDialog {\n id: number;\n text: string;\n answerIds?: number[];\n}\n\nexport interface IProps {\n questions: IQuestionDialog[];\n answers: IQuestionDialogAnswer[];\n onClose: () => void;\n}\n\nexport const QuestionDialog: React.FC<IProps> = ({\n questions,\n answers,\n onClose,\n}) => {\n const [currentQuestion, setCurrentQuestion] = useState(questions[0]);\n\n const [canShowAnswers, setCanShowAnswers] = useState<boolean>(false);\n\n const onGetFirstAnswer = () => {\n if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {\n return null;\n }\n\n const firstAnswerId = currentQuestion.answerIds![0];\n\n return answers.find(answer => answer.id === firstAnswerId);\n };\n\n const [\n currentAnswer,\n setCurrentAnswer,\n ] = useState<IQuestionDialogAnswer | null>(onGetFirstAnswer()!);\n\n useEffect(() => {\n setCurrentAnswer(onGetFirstAnswer()!);\n }, [currentQuestion]);\n\n const onGetAnswers = (answerIds: number[]) => {\n return answerIds.map((answerId: number) =>\n answers.find(answer => answer.id === answerId)\n );\n };\n\n const onKeyPress = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowDown':\n // select next answer, if any.\n // if no next answer, select first answer\n // const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n // (answer) => answer?.id === currentAnswer!.id + 1\n // );\n\n const nextAnswerIndex = onGetAnswers(\n currentQuestion.answerIds!\n ).findIndex(answer => answer?.id === currentAnswer!.id + 1);\n\n const nextAnswerID = currentQuestion.answerIds![nextAnswerIndex];\n\n const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n answer => answer?.id === nextAnswerID\n );\n\n setCurrentAnswer(nextAnswer || onGetFirstAnswer()!);\n\n break;\n case 'ArrowUp':\n // select previous answer, if any.\n // if no previous answer, select last answer\n\n const previousAnswerIndex = onGetAnswers(\n currentQuestion.answerIds!\n ).findIndex(answer => answer?.id === currentAnswer!.id - 1);\n\n const previousAnswerID =\n currentQuestion.answerIds &&\n currentQuestion.answerIds[previousAnswerIndex];\n\n const previousAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n answer => answer?.id === previousAnswerID\n );\n\n if (previousAnswer) {\n setCurrentAnswer(previousAnswer);\n } else {\n setCurrentAnswer(onGetAnswers(currentQuestion.answerIds!).pop()!);\n }\n\n break;\n case 'Enter':\n setCanShowAnswers(false);\n\n if (!currentAnswer?.nextQuestionId) {\n onClose();\n return;\n } else {\n setCurrentQuestion(\n questions.find(\n question => question.id === currentAnswer!.nextQuestionId\n )!\n );\n }\n\n break;\n }\n };\n useEventListener('keydown', onKeyPress);\n\n const onAnswerClick = (answer: IQuestionDialogAnswer) => {\n setCanShowAnswers(false);\n if (answer.nextQuestionId) {\n // if there is a next question, go to it\n setCurrentQuestion(\n questions.find(question => question.id === answer.nextQuestionId)!\n );\n } else {\n // else, finish dialog!\n onClose();\n }\n };\n\n const onRenderCurrentAnswers = () => {\n const answerIds = currentQuestion.answerIds;\n if (!answerIds) {\n return null;\n }\n\n const answers = onGetAnswers(answerIds);\n\n if (!answers) {\n return null;\n }\n\n return answers.map(answer => {\n const isSelected = currentAnswer?.id === answer?.id;\n const selectedColor = isSelected ? 'yellow' : 'white';\n\n if (answer) {\n return (\n <AnswerRow key={`answer_${answer.id}`}>\n <AnswerSelectedIcon color={selectedColor}>\n {isSelected ? 'X' : null}\n </AnswerSelectedIcon>\n\n <Answer\n key={answer.id}\n onPointerDown={() => onAnswerClick(answer)}\n color={selectedColor}\n >\n {answer.text}\n </Answer>\n </AnswerRow>\n );\n }\n\n return null;\n });\n };\n\n return (\n <Container>\n <QuestionContainer>\n <DynamicText\n text={currentQuestion.text}\n onStart={() => setCanShowAnswers(false)}\n onFinish={() => setCanShowAnswers(true)}\n />\n </QuestionContainer>\n\n {canShowAnswers && (\n <AnswersContainer>{onRenderCurrentAnswers()}</AnswersContainer>\n )}\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n word-break: break-all;\n box-sizing: border-box;\n justify-content: flex-start;\n align-items: flex-start;\n flex-wrap: wrap;\n`;\n\nconst QuestionContainer = styled.div`\n flex: 100%;\n width: 100%;\n`;\n\nconst AnswersContainer = styled.div`\n flex: 100%;\n`;\n\ninterface IAnswerProps {\n color: string;\n}\n\nconst Answer = styled.p<IAnswerProps>`\n flex: auto;\n color: ${props => props.color} !important;\n font-size: 0.65rem !important;\n background: inherit;\n border: none;\n`;\n\nconst AnswerSelectedIcon = styled.span<IAnswerProps>`\n flex: 5% 0 0;\n color: ${props => props.color} !important;\n`;\n\nconst AnswerRow = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n height: 22px;\n p {\n line-height: unset;\n margin-top: 0;\n margin-bottom: 0rem;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { NPCDialogText } from './NPCDialogText';\nimport {\n IQuestionDialog,\n IQuestionDialogAnswer,\n QuestionDialog,\n} from './QuestionDialog/QuestionDialog';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\n\nexport enum NPCDialogType {\n TextOnly = 'TextOnly',\n TextAndThumbnail = 'TextAndThumbnail',\n}\n\nexport interface INPCDialogProps {\n text?: string;\n type: NPCDialogType;\n imagePath?: string;\n onClose?: () => void;\n isQuestionDialog?: boolean;\n answers?: IQuestionDialogAnswer[];\n questions?: IQuestionDialog[];\n}\n\nexport const NPCDialog: React.FC<INPCDialogProps> = ({\n text,\n type,\n onClose,\n imagePath,\n isQuestionDialog = false,\n questions,\n answers,\n}) => {\n return (\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGold}\n width={isQuestionDialog ? '600px' : '80%'}\n height={'180px'}\n >\n {isQuestionDialog && questions && answers ? (\n <>\n <TextContainer\n flex={type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'}\n >\n <QuestionDialog\n questions={questions}\n answers={answers}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {type === NPCDialogType.TextAndThumbnail && (\n <ThumbnailContainer>\n <NPCThumbnail src={imagePath || aliceDefaultThumbnail} />\n </ThumbnailContainer>\n )}\n </>\n ) : (\n <>\n <Container>\n <CloseIcon onPointerDown={onClose}>X</CloseIcon>\n <TextContainer\n flex={type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'}\n >\n <NPCDialogText\n type={type}\n text={text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {type === NPCDialogType.TextAndThumbnail && (\n <ThumbnailContainer>\n <NPCThumbnail src={imagePath || aliceDefaultThumbnail} />\n </ThumbnailContainer>\n )}\n </Container>\n </>\n )}\n </RPGUIContainer>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n\n box-sizing: border-box;\n justify-content: center;\n align-items: flex-start;\n position: relative;\n`;\n\nconst CloseIcon = styled.p`\n position: absolute;\n top: -1.5rem;\n right: -0.4rem;\n cursor: pointer;\n color: white;\n font-size: 1.1rem !important;\n`;\n\ninterface ITextContainerProps {\n flex: string;\n}\n\nconst TextContainer = styled.div<ITextContainerProps>`\n flex: ${({ flex }) => flex} 0 0;\n width: 355px;\n`;\n\nconst ThumbnailContainer = styled.div`\n flex: 30% 0 0;\n display: flex;\n justify-content: flex-end;\n`;\n\nconst NPCThumbnail = styled.img`\n image-rendering: pixelated;\n height: 128px;\n width: 128px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { NPCDialogText } from './NPCDialogText';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\nimport pressSpaceGif from './img/space.gif';\n\nexport enum ImgSide {\n right = 'right',\n left = 'left',\n}\n\nexport interface NPCMultiDialogType {\n text: string;\n imagePath?: string;\n imageSide: ImgSide;\n}\n\nexport interface INPCMultiDialogProps {\n onClose: () => void;\n textAndTypeArray: NPCMultiDialogType[];\n}\n\nexport const NPCMultiDialog: React.FC<INPCMultiDialogProps> = ({\n onClose,\n textAndTypeArray,\n}) => {\n const [showGoNextIndicator, setShowGoNextIndicator] = useState<boolean>(\n false\n );\n const [slide, setSlide] = useState<number>(0);\n\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n if (slide < textAndTypeArray?.length - 1) {\n setSlide(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [slide]);\n\n return (\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGold}\n width={'50%'}\n height={'180px'}\n >\n <>\n <Container>\n {textAndTypeArray[slide]?.imageSide === 'right' && (\n <>\n <TextContainer flex={'70%'}>\n <NPCDialogText\n onStartStep={() => setShowGoNextIndicator(false)}\n onEndStep={() => setShowGoNextIndicator(true)}\n text={textAndTypeArray[slide].text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n <ThumbnailContainer>\n <NPCThumbnail\n src={\n textAndTypeArray[slide].imagePath || aliceDefaultThumbnail\n }\n />\n </ThumbnailContainer>\n {showGoNextIndicator && (\n <PressSpaceIndicator right={'10.5rem'} src={pressSpaceGif} />\n )}\n </>\n )}\n {textAndTypeArray[slide].imageSide === 'left' && (\n <>\n <ThumbnailContainer>\n <NPCThumbnail\n src={\n textAndTypeArray[slide].imagePath || aliceDefaultThumbnail\n }\n />\n </ThumbnailContainer>\n <TextContainer flex={'70%'}>\n <NPCDialogText\n onStartStep={() => setShowGoNextIndicator(false)}\n onEndStep={() => setShowGoNextIndicator(true)}\n text={textAndTypeArray[slide].text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {showGoNextIndicator && (\n <PressSpaceIndicator right={'1rem'} src={pressSpaceGif} />\n )}\n </>\n )}\n </Container>\n )\n </>\n </RPGUIContainer>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n\n box-sizing: border-box;\n justify-content: center;\n align-items: flex-start;\n position: relative;\n`;\n\ninterface ITextContainerProps {\n flex: string;\n}\n\nconst TextContainer = styled.div<ITextContainerProps>`\n flex: ${({ flex }) => flex} 0 0;\n width: 355px;\n`;\n\nconst ThumbnailContainer = styled.div`\n flex: 30% 0 0;\n display: flex;\n justify-content: flex-end;\n`;\n\nconst NPCThumbnail = styled.img`\n image-rendering: pixelated;\n height: 128px;\n width: 128px;\n`;\n\ninterface IPressSpaceIndicatorProps {\n right: string;\n}\n\nconst PressSpaceIndicator = styled.img<IPressSpaceIndicatorProps>`\n position: absolute;\n right: ${({ right }) => right};\n bottom: 1rem;\n height: 20.7px;\n image-rendering: -webkit-optimize-contrast;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { NPCDialog, NPCDialogType } from './NPCDialog/NPCDialog';\nimport { NPCMultiDialog, NPCMultiDialogType } from './NPCDialog/NPCMultiDialog';\nimport {\n IQuestionDialog,\n IQuestionDialogAnswer,\n QuestionDialog,\n} from './NPCDialog/QuestionDialog/QuestionDialog';\n\nexport interface IHistoryDialogProps {\n backgroundImgPath: string[];\n fullCoverBackground: boolean;\n questions?: IQuestionDialog[];\n answers?: IQuestionDialogAnswer[];\n text?: string;\n imagePath?: string;\n textAndTypeArray?: NPCMultiDialogType[];\n onClose: () => void;\n}\n\nexport const HistoryDialog: React.FC<IHistoryDialogProps> = ({\n backgroundImgPath,\n fullCoverBackground,\n questions,\n answers,\n text,\n imagePath,\n textAndTypeArray,\n onClose,\n}) => {\n const [img, setImage] = useState<number>(0);\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n if (img < backgroundImgPath?.length - 1) {\n setImage(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [backgroundImgPath]);\n return (\n <BackgroundContainer\n imgPath={backgroundImgPath[img]}\n fullImg={fullCoverBackground}\n >\n <DialogContainer>\n {textAndTypeArray ? (\n <NPCMultiDialog\n textAndTypeArray={textAndTypeArray}\n onClose={onClose}\n />\n ) : questions && answers ? (\n <QuestionDialog\n questions={questions}\n answers={answers}\n onClose={onClose}\n />\n ) : text && imagePath ? (\n <NPCDialog\n text={text}\n imagePath={imagePath}\n onClose={onClose}\n type={NPCDialogType.TextAndThumbnail}\n />\n ) : (\n <NPCDialog\n text={text}\n onClose={onClose}\n type={NPCDialogType.TextOnly}\n />\n )}\n </DialogContainer>\n </BackgroundContainer>\n );\n};\n\ninterface IImgContainerProps {\n imgPath: string;\n fullImg: boolean;\n}\n\nconst BackgroundContainer = styled.div<IImgContainerProps>`\n width: 100%;\n height: 100%;\n background-image: url(${props => props.imgPath});\n background-size: ${props => (props.imgPath ? 'cover' : 'auto')};\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n`;\n\nconst DialogContainer = styled.div`\n display: flex;\n justify-content: center;\n padding-top: 200px;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { DynamicText } from '../typography/DynamicText';\n\nexport interface ITextImageProps {\n image: string;\n textPosition?: 'flex-start' | 'flex-end';\n text: string;\n}\n\nexport interface IImageCarouselProps {\n textImage: ITextImageProps[];\n isTextFixed: boolean;\n onCloseButton?: () => void;\n}\n\nexport const ImageCarousel: React.FC<IImageCarouselProps> = ({\n textImage,\n isTextFixed,\n onCloseButton,\n}) => {\n const [textImageSelected, setTextImageSelected] = useState(textImage[0]);\n\n const goToPreviousImage = () => {\n const currentIndex = textImage.indexOf(textImageSelected);\n if (currentIndex > 0) {\n setTextImageSelected(textImage[currentIndex - 1]);\n }\n };\n\n const goToNextImage = () => {\n const currentIndex = textImage.indexOf(textImageSelected);\n if (currentIndex < textImage.length - 1) {\n setTextImageSelected(textImage[currentIndex + 1]);\n }\n };\n\n return (\n <CarouselWrapper type={RPGUIContainerTypes.Framed}>\n {isTextFixed ? (\n <>\n <BackgroundImage\n imagePath={textImageSelected.image}\n isTextFixed={isTextFixed}\n >\n <ArrowContainer>\n {textImageSelected !== textImage[0] && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => goToPreviousImage()}\n ></SelectArrow>\n )}\n\n {textImageSelected !== textImage[textImage.length - 1] && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() => goToNextImage()}\n ></SelectArrow>\n )}\n </ArrowContainer>\n </BackgroundImage>\n <Description\n textPosition={textImageSelected.textPosition ?? 'flex-start'}\n isTextFixed={isTextFixed}\n >\n <DynamicText text={textImageSelected.text} />\n </Description>\n </>\n ) : (\n <BackgroundImage\n imagePath={textImageSelected.image}\n isTextFixed={isTextFixed}\n >\n <ArrowContainer>\n {textImageSelected !== textImage[0] && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => goToPreviousImage()}\n ></SelectArrow>\n )}\n <Description\n textPosition={textImageSelected.textPosition ?? 'flex-start'}\n isTextFixed={isTextFixed}\n >\n <DynamicText text={textImageSelected.text} />\n </Description>\n {textImageSelected !== textImage[textImage.length - 1] && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() => goToNextImage()}\n ></SelectArrow>\n )}\n </ArrowContainer>\n </BackgroundImage>\n )}\n {onCloseButton && (\n <CloseButton className=\"container-close\" onPointerDown={onCloseButton}>\n X\n </CloseButton>\n )}\n </CarouselWrapper>\n );\n};\n\ninterface IBackgroundImage {\n imagePath: string;\n isTextFixed: boolean;\n}\n\ninterface ITextDescription {\n textPosition: 'flex-start' | 'flex-end';\n isTextFixed: boolean;\n}\n\nconst CarouselWrapper = styled(DraggableContainer)`\n width: 100%;\n height: 100%;\n`;\n\nconst ArrowContainer = styled.span`\n display: flex;\n height: 100%;\n align-items: center;\n`;\n\nconst BackgroundImage = styled.div<IBackgroundImage>`\n background-image: url(${props => props.imagePath});\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-size: contain;\n background-position: center;\n width: 100%;\n height: ${props => (props.isTextFixed ? '80%' : '100%')};\n`;\n\nconst Description = styled.div<ITextDescription>`\n width: 100%;\n height: ${props => (props.isTextFixed ? 'auto' : '100%')};\n display: flex;\n align-items: ${props => props.textPosition};\n p {\n background-color: ${props =>\n props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)'};\n border-radius: 5px;\n text-align: justify;\n height: auto;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n @media (max-width: 950px) {\n font-size: 1.7rem;\n padding: 12px;\n }\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled, { keyframes } from 'styled-components';\nimport SelectArrow from '../Arrow/SelectArrow';\n\nexport interface ISimpleImageCarousel {\n images: string[];\n styles?: React.CSSProperties;\n autoCycle?: boolean;\n autoCycleDelay?: number;\n stopAutoCyclingOnInteraction?: boolean;\n}\n\nexport const SimpleImageCarousel: React.FC<ISimpleImageCarousel> = ({\n images,\n styles,\n autoCycle = false,\n autoCycleDelay = 3000,\n stopAutoCyclingOnInteraction = false,\n}) => {\n const [currentImage, setCurrentImage] = useState(0);\n const autoCycleId = useRef<NodeJS.Timeout | null>(null);\n\n const handleLeftClick = () => {\n setCurrentImage(\n prevImage => (prevImage - 1 + images?.length) % images?.length\n );\n if (stopAutoCyclingOnInteraction && autoCycleId.current) {\n clearInterval(autoCycleId.current);\n autoCycleId.current = null;\n }\n };\n\n const handleRightClick = () => {\n setCurrentImage(prevImage => (prevImage + 1) % images?.length);\n if (stopAutoCyclingOnInteraction && autoCycleId.current) {\n clearInterval(autoCycleId.current);\n autoCycleId.current = null;\n }\n };\n\n useEffect(() => {\n if (autoCycle) {\n autoCycleId.current = setInterval(() => {\n setCurrentImage(prevImage => (prevImage + 1) % images?.length);\n }, autoCycleDelay);\n }\n\n return () => {\n if (autoCycleId.current) {\n clearInterval(autoCycleId.current);\n }\n };\n }, [autoCycle, autoCycleDelay, images?.length]);\n\n const hasMoreThanOneImage = images?.length > 1;\n\n return (\n <ImageContainer style={styles}>\n {hasMoreThanOneImage && (\n <CustomLeftArrow direction=\"left\" onPointerDown={handleLeftClick} />\n )}\n {hasMoreThanOneImage && (\n <CustomRightArrow direction=\"right\" onPointerDown={handleRightClick} />\n )}\n <Carousel>\n <FadeInCarouselImg\n key={currentImage}\n src={images?.[currentImage]}\n alt={`Image ${currentImage}`}\n />\n </Carousel>\n </ImageContainer>\n );\n};\n\nconst ImageContainer = styled.div`\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n margin-right: 0.5rem;\n max-width: 400px;\n position: relative;\n width: 400px;\n`;\n\nconst CustomLeftArrow = styled(SelectArrow)`\n position: absolute;\n left: -0.5rem;\n top: 50%;\n transform: translateY(-50%);\n`;\n\nconst CustomRightArrow = styled(SelectArrow)`\n position: absolute;\n right: -2.5rem;\n top: 50%;\n transform: translateY(-50%);\n`;\n\nconst Carousel = styled.div`\n display: flex;\n`;\n\nconst CarouselImg = styled.img`\n flex: 0 0 auto;\n width: 100%;\n height: auto;\n margin: 0 1rem;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);\n scroll-snap-align: start;\n margin-right: 3rem;\n`;\n\nconst fadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\n\nconst FadeInCarouselImg = styled(CarouselImg)`\n animation: ${fadeIn} 0.5s;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\n\ninterface TabItem {\n id: string;\n title: string;\n content: React.ReactNode;\n}\n\nexport interface TableTabProps {\n tabs: TabItem[];\n activeColor?: string;\n activeTextColor: string;\n inactiveColor?: string;\n borderColor?: string;\n hoverColor?: string;\n}\n\nexport const InternalTabs: React.FC<TableTabProps> = ({\n tabs,\n activeColor = '#fef08a',\n activeTextColor = '#000000',\n inactiveColor = '#6b7280',\n borderColor = '#f59e0b',\n hoverColor = '#fef3c7',\n}) => {\n const [activeTab, setActiveTab] = useState(tabs[0].id);\n\n return (\n <TableWrapper>\n <TabHeader borderColor={borderColor}>\n {tabs.map(tab => (\n <TabButton\n key={tab.id}\n active={activeTab === tab.id}\n activeColor={activeColor}\n activeTextColor={activeTextColor}\n inactiveColor={inactiveColor}\n borderColor={borderColor}\n hoverColor={hoverColor}\n onClick={() => setActiveTab(tab.id)}\n >\n {tab.title}\n </TabButton>\n ))}\n </TabHeader>\n <ContentWrapper>\n {tabs.find(tab => tab.id === activeTab)?.content}\n </ContentWrapper>\n </TableWrapper>\n );\n};\n\nconst TableWrapper = styled.div`\n width: 100%;\n`;\n\nconst TabHeader = styled.div<{ borderColor: string }>`\n display: flex;\n border-bottom: 1px solid ${props => props.borderColor};\n`;\n\nconst TabButton = styled.button<{\n active: boolean;\n activeColor: string;\n activeTextColor: string;\n inactiveColor: string;\n borderColor: string;\n hoverColor: string;\n}>`\n flex: 1;\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n font-weight: 500;\n border-right: 1px solid ${props => props.borderColor};\n background-color: ${props =>\n props.active ? props.activeColor : 'transparent'};\n color: ${props =>\n props.active ? props.activeTextColor : props.inactiveColor};\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ${props =>\n props.active ? props.activeColor : props.hoverColor};\n }\n`;\n\nconst ContentWrapper = styled.div`\n padding: 1rem;\n`;\n","import React from 'react';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\n\ninterface IProps {\n children: React.ReactNode;\n title: string;\n onClose?: () => void;\n onPositionChange?: (position: IPosition) => void;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n scale?: number;\n width?: string;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nexport const SlotsContainer: React.FC<IProps> = ({\n children,\n title,\n onClose,\n onPositionChange,\n onPositionChangeEnd,\n onPositionChangeStart,\n onOutsideClick,\n initialPosition,\n scale,\n width,\n isFullScreen,\n opacity,\n}) => {\n return (\n <DraggableContainer\n isFullScreen={isFullScreen}\n opacity={opacity}\n title={title}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n width={width ?? '415px'}\n cancelDrag=\".item-container-body, #shortcuts_list\"\n onPositionChange={({ x, y }) => {\n if (onPositionChange) {\n onPositionChange({ x, y });\n }\n }}\n onPositionChangeEnd={({ x, y }) => {\n if (onPositionChangeEnd) {\n onPositionChangeEnd({ x, y });\n }\n }}\n onPositionChangeStart={({ x, y }) => {\n if (onPositionChangeStart) {\n onPositionChangeStart({ x, y });\n }\n }}\n onOutsideClick={onOutsideClick}\n initialPosition={initialPosition}\n scale={scale}\n >\n {children}\n </DraggableContainer>\n );\n};\n","import { useCallback, useRef } from 'react';\n\ninterface IUseScrollOnDragProps {\n containerRef: React.RefObject<HTMLDivElement>;\n threshold: number;\n scrollStep: number;\n}\n\nexport const useScrollOnDrag = ({\n containerRef,\n threshold,\n scrollStep,\n}: IUseScrollOnDragProps) => {\n const animationFrameId = useRef<number | null>(null);\n\n const startScrolling = useCallback(\n (clientY: number) => {\n const scroll = () => {\n if (containerRef.current) {\n const { top, bottom } = containerRef.current.getBoundingClientRect();\n\n const maxScrollTop =\n containerRef.current.scrollHeight -\n containerRef.current.clientHeight;\n const distanceFromTop = clientY - top;\n const distanceFromBottom = bottom - clientY;\n\n if (\n distanceFromTop < threshold &&\n containerRef.current.scrollTop > 0\n ) {\n containerRef.current.scrollTop -= scrollStep;\n animationFrameId.current = requestAnimationFrame(scroll);\n } else if (\n distanceFromBottom < threshold &&\n containerRef.current.scrollTop < maxScrollTop\n ) {\n containerRef.current.scrollTop += scrollStep;\n animationFrameId.current = requestAnimationFrame(scroll);\n } else {\n // Check if we are near the bottom of the container\n if (containerRef.current.scrollTop >= maxScrollTop) {\n // You can perform any action here when the scroll hits the bottom.\n } else {\n // Check if we are near the top of the container\n if (containerRef.current.scrollTop <= 0) {\n // You can perform any action here when the scroll hits the top.\n }\n }\n // Stop scrolling if neither condition is met\n stopScrolling();\n }\n }\n };\n\n const stopScrolling = () => {\n if (animationFrameId.current !== null) {\n cancelAnimationFrame(animationFrameId.current);\n animationFrameId.current = null;\n }\n };\n\n //@ts-ignore\n cancelAnimationFrame(animationFrameId.current); // Cancel any existing animation frame\n animationFrameId.current = requestAnimationFrame(scroll);\n },\n [containerRef, threshold, scrollStep]\n );\n\n const stopScrolling = useCallback(() => {\n if (animationFrameId.current !== null) {\n cancelAnimationFrame(animationFrameId.current);\n animationFrameId.current = null;\n }\n }, []);\n\n return { startScrolling, stopScrolling };\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\ntype ShortcutsSetterProps = {\n setSettingShortcutIndex: (index: number) => void;\n settingShortcutIndex: number;\n shortcuts: IShortcut[];\n removeShortcut: (index: number) => void;\n atlasJSON: any;\n atlasIMG: any;\n};\n\nexport const ShortcutsSetter: React.FC<ShortcutsSetterProps> = ({\n setSettingShortcutIndex,\n settingShortcutIndex,\n shortcuts,\n removeShortcut,\n atlasJSON,\n atlasIMG,\n}) => {\n const getContent = (index: number) => {\n if (shortcuts[index]?.type === ShortcutType.Item) {\n const payload = shortcuts[index]?.payload as IItem | undefined;\n\n if (!payload) return null;\n\n return (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n imgScale={1.2}\n imgStyle={{ left: '3px' }}\n />\n );\n }\n const IMAGE_SIZE = 32;\n const IMAGE_SCALE = 1;\n\n const shortcut = shortcuts[index];\n\n if (shortcut?.type === ShortcutType.Spell && shortcut.payload) {\n const payload = shortcut.payload as IRawSpell; // TypeScript type assertion\n\n return (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath ?? ''}\n width={IMAGE_SIZE}\n height={IMAGE_SIZE}\n imgScale={IMAGE_SCALE}\n centered\n borderRadius=\"50%\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <Container>\n <p>Shortcuts:</p>\n <List id=\"shortcuts_list\">\n {Array.from({ length: 12 }).map((_, i) => (\n <Shortcut\n key={i}\n onPointerDown={() => {\n if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);\n\n removeShortcut(i);\n if (\n settingShortcutIndex === -1 &&\n (!shortcuts[i] || shortcuts[i].type === ShortcutType.None)\n )\n setSettingShortcutIndex(i);\n }}\n disabled={settingShortcutIndex !== -1 && settingShortcutIndex !== i}\n isBeingSet={settingShortcutIndex === i}\n id={`shortcutSetter_${i}`}\n >\n {getContent(i)}\n </Shortcut>\n ))}\n </List>\n </Container>\n );\n};\n\nconst Container = styled.div`\n p {\n margin: 0;\n margin-left: 0.5rem;\n font-size: 10px;\n }\n\n width: 100%;\n`;\n\nconst Shortcut = styled.button<{ isBeingSet?: boolean }>`\n width: 2.4rem;\n height: 2.4rem;\n\n background-color: ${uiColors.lightGray};\n border: 2px solid\n ${({ isBeingSet }) => (isBeingSet ? uiColors.yellow : uiColors.darkGray)};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n\n span {\n margin-top: 4px;\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background-color: ${uiColors.gray};\n }\n\n &:disabled {\n opacity: 0.5;\n }\n`;\n\nconst List = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.4rem;\n box-sizing: border-box;\n margin: 0 !important;\n\n flex-wrap: wrap;\n\n padding: 0.3rem;\n\n padding-bottom: 1rem;\n`;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport enum RangeSliderType {\n Slider = 'rpgui-slider',\n GoldSlider = 'rpgui-slider golden',\n}\n\nexport interface IRangeSliderProps {\n type: RangeSliderType;\n valueMin: number;\n valueMax: number;\n width: string;\n onChange: (value: number) => void;\n value: number;\n step?: number;\n}\n\nexport const RangeSlider: React.FC<IRangeSliderProps> = React.memo(\n ({ type, valueMin, valueMax, width, onChange, value, step = 1 }) => {\n const sliderId = uuidv4();\n\n const containerRef = useRef<HTMLDivElement>(null);\n const [left, setLeft] = useState(0);\n\n useEffect(() => {\n const calculatedWidth = containerRef.current?.clientWidth || 0;\n setLeft(\n Math.max(\n ((value - valueMin) / (valueMax - valueMin)) *\n (calculatedWidth - 35) +\n 10\n )\n );\n }, [value, valueMin, valueMax]);\n\n const typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';\n\n const handleChange = useCallback(\n (e: { target: { value: any } }) => {\n onChange(Number(e.target.value));\n },\n [onChange]\n );\n\n return (\n <div\n style={{ width: width, position: 'relative' }}\n className={`rpgui-slider-container ${typeClass}`}\n id={`rpgui-slider-${sliderId}`}\n ref={containerRef}\n >\n <div style={{ pointerEvents: 'none' }}>\n <div className={`rpgui-slider-track ${typeClass}`} />\n <div className={`rpgui-slider-left-edge ${typeClass}`} />\n <div className={`rpgui-slider-right-edge ${typeClass}`} />\n <div className={`rpgui-slider-thumb ${typeClass}`} style={{ left }} />\n </div>\n <Input\n type=\"range\"\n style={{ width: width }}\n min={valueMin}\n max={valueMax}\n step={step}\n onChange={handleChange}\n value={value}\n className=\"rpgui-cursor-point\"\n />\n </div>\n );\n }\n);\n\nconst Input = styled.input`\n opacity: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n margin-top: -5px;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { RangeSlider, RangeSliderType } from '../RangeSlider';\n\nexport interface IQuantitySelectorProps {\n maxQuantity: number;\n initialQuantity?: number;\n title?: string;\n onConfirm: (quantity: number) => void;\n onClose: () => void;\n}\n\nexport const QuantitySelector: React.FC<IQuantitySelectorProps> = ({\n maxQuantity,\n initialQuantity,\n title = 'Select quantity',\n onConfirm,\n onClose,\n}) => {\n const [value, setValue] = useState(initialQuantity ?? maxQuantity);\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const closeSelector = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose();\n }\n };\n\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n }\n\n document.addEventListener('keydown', closeSelector);\n return () => document.removeEventListener('keydown', closeSelector);\n }, [onClose]);\n\n return (\n <StyledContainer type={RPGUIContainerTypes.Framed} width=\"25rem\">\n <CloseButton className=\"container-close\" onPointerDown={onClose}>\n X\n </CloseButton>\n <h2>{title}</h2>\n <StyledForm\n onSubmit={e => {\n e.preventDefault();\n const numberValue = Number(value);\n if (!Number.isNaN(numberValue)) {\n onConfirm(Math.max(1, Math.min(maxQuantity, numberValue)));\n }\n }}\n noValidate\n >\n <StyledInput\n ref={inputRef}\n placeholder=\"Enter quantity\"\n type=\"number\"\n min={1}\n max={maxQuantity}\n value={value}\n onChange={e => {\n if (Number(e.target.value) >= maxQuantity) {\n setValue(maxQuantity);\n return;\n }\n setValue(Number(e.target.value));\n }}\n onBlur={e => {\n setValue(\n Math.max(1, Math.min(maxQuantity, Number(e.target.value)))\n );\n }}\n />\n <RangeSlider\n type={RangeSliderType.Slider}\n valueMin={1}\n valueMax={maxQuantity}\n width=\"100%\"\n onChange={setValue}\n value={value}\n />\n <Button buttonType={ButtonTypes.RPGUIButton} type=\"submit\">\n Confirm\n </Button>\n </StyledForm>\n </StyledContainer>\n );\n};\n\nconst StyledContainer = styled(RPGUIContainer)`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 1rem;\n\n h2 {\n margin: 0;\n margin-bottom: 1rem;\n font-size: 1rem;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n cursor: pointer;\n`;\n\nconst StyledForm = styled.form`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n`;\n\nconst StyledInput = styled.input`\n width: 100%;\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.25);\n border: none;\n color: white;\n font-size: 1rem;\n text-align: center;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n -moz-appearance: textfield;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../Abstractions/ModalPortal';\nimport { QuantitySelector } from './QuantitySelector';\n\nexport interface IQuantitySelect {\n isOpen: boolean;\n maxQuantity: number;\n callback: (quantity: number) => void;\n title?: string;\n initialQuantity?: number;\n}\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nconst validateQuantitySelect = (\n quantitySelect: IQuantitySelect\n): IQuantitySelect => ({\n ...quantitySelect,\n maxQuantity: Math.max(1, quantitySelect.maxQuantity),\n initialQuantity: quantitySelect.initialQuantity\n ? Math.max(\n 1,\n Math.min(quantitySelect.maxQuantity, quantitySelect.initialQuantity)\n )\n : undefined,\n});\n\nexport const QuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps): JSX.Element => {\n const resetQuantitySelect = () => {\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\n };\n\n // Validate the input values\n const validatedQuantitySelect = validateQuantitySelect(quantitySelect);\n\n return (\n <ModalPortal>\n <QuantitySelectorContainer>\n <QuantitySelector\n maxQuantity={validatedQuantitySelect.maxQuantity}\n initialQuantity={validatedQuantitySelect.initialQuantity}\n title={validatedQuantitySelect.title}\n onConfirm={quantity => {\n validatedQuantitySelect.callback(quantity);\n resetQuantitySelect();\n }}\n onClose={() => {\n validatedQuantitySelect.callback(-1);\n resetQuantitySelect();\n }}\n />\n </QuantitySelectorContainer>\n </ModalPortal>\n );\n};\n\nconst QuantitySelectorContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n`;\n","import React from 'react';\nimport { IQuantitySelect, QuantitySelectorModal } from '../../QuantitySelector/QuantitySelectorModal';\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nexport const ItemQuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps): JSX.Element => {\n return (\n <QuantitySelectorModal\n quantitySelect={quantitySelect}\n setQuantitySelect={setQuantitySelect}\n />\n );\n};\n\nexport type { IQuantitySelect };\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n IShortcut,\n ItemContainerType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { SlotsContainer } from '../../Abstractions/SlotsContainer';\n\nimport { useScrollOnDrag } from '../../../hooks/useScrollOnDrag';\nimport { IPosition } from '../../../types/eventTypes';\nimport { ShortcutsSetter } from '../../Shortcuts/ShortcutsSetter';\nimport { ItemSlotDetailsProvider } from './context/ItemSlotDetailsContext';\nimport { ItemSlotDraggingProvider } from './context/ItemSlotDraggingContext';\nimport { DraggedItem } from './DraggedItem';\nimport { ItemQuantitySelectorModal } from './ItemQuantitySelectorModal';\nimport { ItemSlot } from './ItemSlot';\nimport { ItemSlotToolTips } from './ItemSlotTooltips';\n\nexport interface IItemContainerProps {\n itemContainer: IItemContainer;\n onClose?: () => void;\n onItemClick?: (\n item: IItem,\n ItemType: IItem['type'],\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n onItemPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n scale?: number;\n checkIfItemCanBeMoved: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;\n onSelected?: (optionId: string, item: IItem) => void;\n type: ItemContainerType;\n atlasJSON: any;\n atlasIMG: any;\n disableContextMenu?: boolean;\n initialPosition?: { x: number; y: number };\n shortcuts?: IShortcut[];\n setItemShortcut?: (key: string, index: number) => void;\n removeShortcut?: (index: number) => void;\n equipmentSet?: IEquipmentSet | null;\n isDepotSystem?: boolean;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\ntype onDragStart =\n | ((\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void)\n | undefined;\ntype onDragEnd = ((quantity?: number) => void) | undefined;\n\nconst MIN_SLOTS_FOR_SCROLL = 20;\n\nexport const ItemContainer: React.FC<IItemContainerProps> = React.memo(\n ({\n itemContainer,\n onClose,\n onMouseOver,\n onSelected,\n onItemClick,\n type,\n atlasJSON,\n atlasIMG,\n disableContextMenu = false,\n onItemDragEnd,\n onItemDragStart,\n onItemPlaceDrop,\n onOutsideDrop,\n checkIfItemCanBeMoved,\n initialPosition,\n checkIfItemShouldDragEnd,\n scale,\n shortcuts,\n setItemShortcut,\n removeShortcut,\n equipmentSet,\n isDepotSystem,\n onPositionChangeEnd,\n onPositionChangeStart,\n isFullScreen,\n opacity,\n }) => {\n const [quantitySelect, setQuantitySelect] = useState({\n isOpen: false,\n maxQuantity: 1,\n callback: (_quantity: number) => {},\n });\n const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { startScrolling, stopScrolling } = useScrollOnDrag({\n containerRef,\n threshold: 50,\n scrollStep: 4,\n });\n\n const handleSetShortcut = useCallback(\n (item: IItem, index: number) => {\n if (\n item.type === ItemType.Consumable ||\n item.type === ItemType.Tool ||\n item.subType === ItemSubType.Seed\n ) {\n setItemShortcut?.(item.key, index);\n }\n },\n [setItemShortcut]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n startScrolling(e.clientY);\n },\n [startScrolling]\n );\n\n const onDragStartScrollingEvents = useCallback(() => {\n document.addEventListener('pointermove', handleMouseMove);\n document.addEventListener(\n 'pointerup',\n () => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n },\n { once: true }\n );\n }, [handleMouseMove, stopScrolling]);\n\n const onDragEndScrollingEvents = useCallback(() => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n }, [handleMouseMove, stopScrolling]);\n\n const onDragStartHandler: onDragStart = useCallback(\n (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => {\n if (onItemDragStart) {\n onItemDragStart(item, slotIndex, itemContainerType);\n }\n\n onDragStartScrollingEvents();\n },\n [onItemDragStart, onDragStartScrollingEvents]\n );\n\n const onDragEndHandler: onDragEnd = useCallback(\n (quantity: number | undefined) => {\n if (onItemDragEnd) {\n onItemDragEnd(quantity);\n }\n onDragEndScrollingEvents();\n },\n [onItemDragEnd, onDragEndScrollingEvents]\n );\n\n // Memoize handleSetShortcut to prevent unnecessary re-renders\n const memoizedHandleSetShortcut = useCallback(\n (item: IItem, index: number) => {\n handleSetShortcut(item, index);\n },\n [handleSetShortcut]\n );\n\n // Memoize onRenderSlots to prevent re-creating the slots array on every render\n const onRenderSlots = useMemo(() => {\n const slots = [];\n\n for (let i = 0; i < itemContainer.slotQty; i++) {\n const currentItem = itemContainer.slots?.[i] || null;\n\n slots.push(\n <ItemSlot\n key={i}\n slotIndex={i}\n item={currentItem}\n itemContainerType={type}\n onMouseOver={\n onMouseOver\n ? (event, slotIndex, item) =>\n onMouseOver(event, slotIndex, item)\n : undefined\n }\n onMouseOut={undefined} // Assuming you don't need onMouseOut here\n onPointerDown={(itemType, containerType, item) => {\n if (settingShortcutIndex !== -1) {\n setSettingShortcutIndex(-1);\n memoizedHandleSetShortcut(item, settingShortcutIndex);\n } else if (onItemClick) {\n onItemClick(item, itemType, containerType);\n }\n }}\n onDragStart={onDragStartHandler}\n onDragEnd={onDragEndHandler}\n dragScale={scale}\n checkIfItemCanBeMoved={checkIfItemCanBeMoved}\n checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}\n openQuantitySelector={(maxQuantity, callback) => {\n setQuantitySelect({\n isOpen: true,\n maxQuantity,\n callback,\n });\n }}\n onPlaceDrop={(item, slotIndex, itemContainerType) => {\n if (onItemPlaceDrop) {\n onItemPlaceDrop(item, slotIndex, itemContainerType);\n }\n\n console.log('PLACE DROP');\n\n onDragEndScrollingEvents();\n }}\n onOutsideDrop={(item, position) => {\n if (onOutsideDrop) {\n onOutsideDrop(item, position);\n }\n\n console.log('OUTSIDE DROP');\n\n onDragEndScrollingEvents();\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n isSelectingShortcut={settingShortcutIndex !== -1}\n equipmentSet={equipmentSet}\n setItemShortcut={\n type === ItemContainerType.Inventory\n ? memoizedHandleSetShortcut\n : undefined\n }\n isDepotSystem={isDepotSystem}\n />\n );\n }\n return slots;\n }, [\n itemContainer.slotQty,\n itemContainer.slots,\n type,\n onMouseOver,\n settingShortcutIndex,\n memoizedHandleSetShortcut,\n onItemClick,\n onDragStartHandler,\n onDragEndHandler,\n scale,\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n onItemPlaceDrop,\n onOutsideDrop,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isDepotSystem,\n onDragEndScrollingEvents,\n ]);\n\n return (\n <ItemSlotDraggingProvider>\n <ItemSlotDetailsProvider>\n <DraggedItem\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n scale={scale}\n />\n <SlotsContainer\n title={itemContainer.name || 'Container'}\n onClose={onClose}\n initialPosition={initialPosition}\n scale={scale}\n onPositionChangeEnd={onPositionChangeEnd}\n onPositionChangeStart={onPositionChangeStart}\n isFullScreen={isFullScreen}\n opacity={opacity}\n >\n {type === ItemContainerType.Inventory &&\n shortcuts &&\n removeShortcut && (\n <ShortcutsSetter\n setSettingShortcutIndex={setSettingShortcutIndex}\n settingShortcutIndex={settingShortcutIndex}\n shortcuts={shortcuts}\n removeShortcut={removeShortcut}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n )}\n <ItemsContainer\n className=\"item-container-body\"\n ref={containerRef}\n isScrollable={itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL}\n isFullScreen={isFullScreen}\n >\n {onRenderSlots}\n </ItemsContainer>\n </SlotsContainer>\n {quantitySelect.isOpen && (\n <ItemQuantitySelectorModal\n quantitySelect={quantitySelect}\n setQuantitySelect={setQuantitySelect}\n />\n )}\n <ItemSlotToolTips\n dragScale={scale}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n isContextMenuDisabled={disableContextMenu}\n onSelected={onSelected}\n />\n </ItemSlotDetailsProvider>\n </ItemSlotDraggingProvider>\n );\n }\n);\n\ninterface IItemsContainerProps {\n isScrollable: boolean;\n isFullScreen?: boolean;\n}\n\nconst ItemsContainer = styled.div<IItemsContainerProps>`\n display: flex;\n justify-content: ${({ isFullScreen }) =>\n isFullScreen ? 'flex-start' : 'center'};\n flex-wrap: wrap;\n max-height: ${({ isFullScreen }) =>\n isFullScreen\n ? undefined\n : '270px'}; // Adjust the max-height based on the prop\n overflow-y: ${({ isScrollable }) => (isScrollable ? 'auto' : 'hidden')};\n overflow-x: hidden;\n width: ${({ isFullScreen }) =>\n isFullScreen ? '100vw' : '415px'}; // Adjust the width based on the prop\n\n max-height: ${({ isFullScreen }) => isFullScreen && '60%'};\n\n @media screen and (max-height: 350px) {\n max-height: ${({ isFullScreen }) => isFullScreen && '50%'};\n }\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nexport interface IOptionsItemSelectorProps {\n name: string;\n description?: string;\n imageKey: string;\n}\n\nexport interface IItemSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n options: IOptionsItemSelectorProps[];\n onClose: () => void;\n onSelect: (value: string) => void;\n}\n\nexport const ItemSelector: React.FC<IItemSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n options,\n onClose,\n onSelect,\n}) => {\n const [selectedValue, setSelectedValue] = useState<string>();\n\n const handleClick = () => {\n let element = document.querySelector(\n `input[name='test']:checked`\n ) as HTMLInputElement;\n const elementValue = element.value;\n setSelectedValue(elementValue);\n };\n\n useEffect(() => {\n if (selectedValue) {\n onSelect(selectedValue);\n }\n }, [selectedValue]);\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n width=\"500px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n >\n <div style={{ width: '100%' }}>\n <Title>{'Harvesting instruments'}</Title>\n <Subtitle>{'Use the tool, you need it'}</Subtitle>\n <hr className=\"golden\" />\n </div>\n\n <RadioInputScroller>\n {options?.map((option, index) => (\n <RadioOptionsWrapper key={index}>\n <SpriteAtlasWrapper>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.imageKey}\n imgScale={3}\n />\n </SpriteAtlasWrapper>\n <div>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={option.name}\n name=\"test\"\n />\n <label\n onPointerDown={handleClick}\n style={{ display: 'flex', alignItems: 'center' }}\n >\n {option.name} <br />\n {option.description}\n </label>\n </div>\n </RadioOptionsWrapper>\n ))}\n </RadioInputScroller>\n <ButtonWrapper>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n <Button buttonType={ButtonTypes.RPGUIButton}>Select</Button>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: yellow !important;\n`;\nconst Subtitle = styled.h1`\n font-size: 0.4rem;\n color: yellow !important;\n`;\n\nconst RadioInputScroller = styled.div`\n padding-left: 15px;\n padding-top: 10px;\n width: 100%;\n margin-top: 1rem;\n align-items: center;\n margin-left: 20px;\n align-items: flex-start;\n overflow-y: scroll;\n height: 360px;\n`;\n\nconst SpriteAtlasWrapper = styled.div`\n margin-right: 40px;\n`;\n\nconst RadioOptionsWrapper = styled.div`\n display: flex;\n align-items: stretch;\n margin-bottom: 40px;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n padding-top: 20px;\n width: 100%;\n`;\n","import {\n IRankingTopCharacterEntry,\n IRankingTopSkillEntry,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Ellipsis } from '../shared/Ellipsis';\n\nexport interface ILeaderboardLevelProps {\n items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;\n rankType: string;\n}\n\nexport const LeaderboardTable: React.FC<ILeaderboardLevelProps> = props => {\n const { items, rankType } = props;\n if (!items) return null;\n\n function isTopSkillEntry(entry: any): entry is IRankingTopSkillEntry {\n return 'skill' in entry;\n }\n\n return (\n <>\n <thead>\n <TableRowWrapper>\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Name\n </Ellipsis>\n </p>\n </TableRowValue>\n {rankType === 'Skill' ? (\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Skill\n </Ellipsis>\n </p>\n </TableRowValue>\n ) : null}\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Level\n </Ellipsis>\n </p>\n </TableRowValue>\n </TableRowWrapper>\n </thead>\n <tbody>\n {Array.from(items).map(entry => (\n <TableRowWrapper key={entry.name}>\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.name}\n </Ellipsis>\n </p>\n </TableRowValue>\n {isTopSkillEntry(entry) ? (\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.skill}\n </Ellipsis>\n </p>\n </TableRowValue>\n ) : null}\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.level}\n </Ellipsis>\n </p>\n </TableRowValue>\n </TableRowWrapper>\n ))}\n </tbody>\n </>\n );\n};\n\nconst TableRowWrapper = styled.tr`\n margin: auto;\n padding: 0.5rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n\n p {\n font-size: 0.8rem;\n }\n`;\n\nconst TableRowValue = styled.td`\n padding: 0 20px;\n`;\n","import {\n IRankingTopCharacterEntry,\n IRankingTopSkillEntry,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { LeaderboardTable } from './LeaderboardTable';\n\nexport interface ILeaderboardProps {\n items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;\n onChangeClassType: (value: string) => void;\n onChangeRankType: (value: string) => void;\n onChangeSkillType: (value: string) => void;\n skillOptions: string[];\n rankOptions: string[];\n classOptions: string[];\n rankType: string;\n}\n\nexport const Leaderboard = (props: ILeaderboardProps) => {\n const {\n items,\n onChangeRankType,\n onChangeClassType,\n rankType,\n skillOptions,\n onChangeSkillType,\n classOptions,\n rankOptions,\n } = props;\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, []);\n\n const rankTypeOptions: IOptionsProps[] = rankOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n const skillTypeOptions: IOptionsProps[] = skillOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n const classTypeOptions: IOptionsProps[] = classOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n return (\n <>\n <WrapperContainer>\n <StyledDropdown\n options={rankTypeOptions}\n onChange={onChangeRankType}\n width=\"80%\"\n />\n {rankType === 'Class' ? (\n <StyledDropdown\n options={classTypeOptions}\n onChange={onChangeClassType}\n width=\"100%\"\n />\n ) : null}\n {rankType === 'Skill' ? (\n <StyledDropdown\n options={skillTypeOptions}\n onChange={onChangeSkillType}\n width=\"100%\"\n />\n ) : null}\n </WrapperContainer>\n <ItemComponentScrollWrapper\n id=\"LeaderboardContainer\"\n ref={itemsContainer}\n >\n <TableWrapper>\n <LeaderboardTable items={items} rankType={rankType} />\n </TableWrapper>\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst WrapperContainer = styled.div`\n display: grid;\n grid-template-columns: 50% 50%;\n justify-content: space-between;\n width: calc(100% - 40px);\n margin-left: 10px;\n\n .rpgui-content .rpgui-dropdown-imp-header {\n padding: 0px 10px 0 !important;\n }\n`;\n\nconst StyledDropdown = styled(Dropdown)`\n margin: 3px !important;\n width: 170px !important;\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: auto;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst TableWrapper = styled.table`\n margin: auto;\n width: 100%;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface IListMenuProps {\n x: number;\n y: number;\n options: IListMenuOption[];\n onSelected: (selectedOptionId: string) => void;\n}\n\nexport const ListMenu: React.FC<IListMenuProps> = ({\n options,\n onSelected,\n x,\n y,\n}) => {\n return (\n <Container x={x} y={y}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onPointerDown={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n );\n};\n\ninterface IContainerProps {\n x?: number;\n y?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: start;\n align-items: flex-start;\n position: absolute;\n top: ${props => props.y || 0}px;\n left: ${props => props.x || 0}px;\n\n li {\n font-size: ${uiFonts.size.xsmall};\n }\n`;\n\nconst ListElement = styled.li`\n margin-right: 0.5rem;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { uiFonts } from '../constants/uiFonts';\n\ninterface PagerProps {\n totalItems: number;\n currentPage: number;\n itemsPerPage: number;\n onPageChange: (page: number) => void;\n}\n\nexport const Pager: React.FC<PagerProps> = ({\n totalItems,\n currentPage,\n itemsPerPage,\n onPageChange,\n}) => {\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n\n return (\n <Container>\n <p>Total items: {totalItems}</p>\n <PagerContainer>\n <button\n disabled={currentPage === 1}\n onPointerDown={() => onPageChange(Math.max(currentPage - 1, 1))}\n >\n {'<'}\n </button>\n\n <div className=\"rpgui-container framed-grey\">{currentPage}</div>\n\n <button\n disabled={currentPage === totalPages}\n onPointerDown={() =>\n onPageChange(Math.min(currentPage + 1, totalPages))\n }\n >\n {'>'}\n </button>\n </PagerContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n\n p {\n margin: 0;\n font-size: ${uiFonts.size.xsmall};\n }\n`;\n\nconst PagerContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n p {\n margin: 0;\n }\n\n div {\n color: white;\n }\n\n button {\n width: 40px;\n height: 40px;\n background-color: ${uiColors.darkGray};\n border: none;\n border-radius: 5px;\n color: white;\n\n :hover {\n background-color: ${uiColors.lightGray};\n }\n\n :disabled {\n opacity: 0.5;\n }\n\n &.active {\n background-color: ${uiColors.orange};\n font-weight: bold;\n color: black;\n }\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from './Abstractions/ModalPortal';\nimport { Button, ButtonTypes } from './Button';\nimport { DraggableContainer } from './DraggableContainer';\n\nexport interface IConfirmModalProps {\n onConfirm: () => void;\n onClose: () => void;\n message?: string;\n}\n\nexport const ConfirmModal: React.FC<IConfirmModalProps> = ({\n onConfirm,\n onClose,\n message,\n}) => {\n return (\n <ModalPortal>\n <Background />\n <Container onPointerDown={onClose}>\n <DraggableContainer width=\"auto\" dragDisabled>\n <Wrapper onPointerDown={e => e.stopPropagation()}>\n <p>{message ?? 'Are you sure?'}</p>\n\n <ButtonsWrapper>\n <div className=\"cancel-button\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={onClose}\n >\n No\n </Button>\n </div>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={onConfirm}\n >\n Yes\n </Button>\n </ButtonsWrapper>\n </Wrapper>\n </DraggableContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Background = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: #000000;\n opacity: 0.5;\n left: 0;\n top: 0;\n z-index: 1000;\n`;\n\nconst Container = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1001;\n`;\n\nconst Wrapper = styled.div`\n p {\n margin: 0;\n }\n`;\n\nconst ButtonsWrapper = styled.div`\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n margin-top: 5px;\n\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n","import {\n getItemTextureKeyPath,\n IEquipmentSet,\n IItem,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { onRenderGems } from '../Item/Inventory/ItemGem';\nimport { rarityColor } from '../Item/Inventory/ItemSlotRarity';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nexport interface IMarketPlaceRowsPropos {\n atlasJSON: any;\n atlasIMG: any;\n item: IItem;\n itemPrice: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n onMarketPlaceItemBuy?: () => void;\n onMarketPlaceItemRemove?: () => void;\n disabled?: boolean;\n}\n\nexport const MarketplaceRows: React.FC<IMarketPlaceRowsPropos> = ({\n atlasJSON,\n atlasIMG,\n item,\n itemPrice,\n equipmentSet,\n scale,\n onMarketPlaceItemBuy,\n onMarketPlaceItemRemove,\n disabled,\n}) => {\n const renderGems = (item: IItem) => {\n return item.attachedGems && onRenderGems(item);\n };\n\n return (\n <MarketplaceWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <ItemInfoWrapper\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n scale={scale}\n >\n <GemContainer>{renderGems(item)}</GemContainer>\n <RarityContainer item={item}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.key,\n stackQty: item.stackQty || 1,\n texturePath: item.texturePath,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={2}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n </RarityContainer>\n\n <QuantityContainer>\n {item.stackQty &&\n item.stackQty > 1 &&\n `x${Math.round(item.stackQty * 10) / 10}`}\n </QuantityContainer>\n </ItemInfoWrapper>\n </SpriteContainer>\n <PriceValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {item.name}\n </Ellipsis>\n </p>\n </PriceValue>\n </ItemIconContainer>\n\n <Flex>\n <ItemIconContainer>\n <GoldContainer>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey=\"others/gold-coin-qty-5.png\"\n imgScale={2}\n />\n </GoldContainer>\n <PriceValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n ${itemPrice}\n </Ellipsis>\n </p>\n </PriceValue>\n </ItemIconContainer>\n <ButtonContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={disabled}\n onPointerDown={() => {\n if (disabled) return;\n\n onMarketPlaceItemBuy?.();\n onMarketPlaceItemRemove?.();\n }}\n >\n {onMarketPlaceItemBuy ? 'Buy' : 'Remove'}\n </Button>\n </ButtonContainer>\n </Flex>\n </MarketplaceWrapper>\n );\n};\n\nconst MarketplaceWrapper = styled.div`\n margin: auto;\n display: flex;\n justify-content: space-between;\n padding: 0.5rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n\n p {\n font-size: 0.8rem;\n }\n`;\n\nconst QuantityContainer = styled.p`\n position: absolute;\n display: block;\n top: 15px;\n left: 25px;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst GemContainer = styled.p`\n position: absolute;\n display: block;\n top: -5px;\n left: -10px;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst Flex = styled.div`\n display: flex;\n gap: 24px;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n`;\n\nconst GoldContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0.5rem;\n`;\nconst SpriteContainer = styled.div`\n position: relative;\n left: 0.5rem;\n`;\n\nconst PriceValue = styled.div`\n margin-left: 40px;\n`;\n\nconst ButtonContainer = styled.div`\n margin: auto;\n`;\n\nconst RarityContainer = styled.div<{ item: IItem }>`\n border-color: ${({ item }) => rarityColor(item)};\n box-shadow: ${({ item }) => `0 0 5px 8px ${rarityColor(item)}`} inset,\n ${({ item }) => `0 0 8px 6px ${rarityColor(item)}`};\n width: 32px;\n height: 32px;\n`;\n","import { ItemRarities, ItemSubType } from '@rpg-engine/shared';\nimport React from 'react';\nimport { IOptionsProps } from '../../Dropdown';\n\nexport enum OrderByType {\n Name = 'Name',\n Price = 'Price',\n}\n\nexport const itemTypeOptions: IOptionsProps[] = [\n 'Type',\n ...Object.keys(ItemSubType),\n]\n .filter(type => type !== 'DeadBody')\n .map((itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n }));\n\nexport const itemRarityOptions: IOptionsProps[] = [\n 'Rarity',\n ...Object.values(ItemRarities),\n].map((itemRarity, index) => ({\n id: index + 1,\n value: itemRarity,\n option: itemRarity,\n}));\n\nexport const orderByOptions: IOptionsProps[] = Object.values(\n OrderByType\n).flatMap((orderBy, index) => [\n {\n id: index * 2 + 1,\n value: orderBy.toLowerCase(),\n option: (\n <>\n {orderBy}{' '}\n <span\n style={{\n transform: 'translateY(-2px)',\n display: 'inline-block',\n }}\n >\n ↑\n </span>\n </>\n ),\n },\n {\n id: index * 2 + 2,\n value: '-' + orderBy.toLowerCase(),\n option: (\n <>\n {orderBy}{' '}\n <span\n style={{\n transform: 'translateY(-2px)',\n display: 'inline-block',\n }}\n >\n ↓\n </span>\n </>\n ),\n },\n]);\n","import { IEquipmentSet, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { AiFillCaretRight } from 'react-icons/ai';\nimport styled from 'styled-components';\nimport { ConfirmModal } from '../ConfirmModal';\nimport { Dropdown } from '../Dropdown';\nimport { Input } from '../Input';\nimport { MarketplaceRows } from './MarketplaceRows';\nimport { itemRarityOptions, itemTypeOptions, orderByOptions } from './filters';\n\nexport interface IBuyPanelProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onChangeType: (value: string) => void;\n onChangeRarity: (value: string) => void;\n onChangeOrder: (value: string) => void;\n onChangeNameInput: (value: string) => void;\n onChangeMainLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangeSecondaryLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangePriceInput: (value: [number | undefined, number | undefined]) => void;\n scale?: number;\n equipmentSet?: IEquipmentSet | null;\n onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;\n characterId: string;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n currentPage: number;\n}\n\nexport const BuyPanel: React.FC<IBuyPanelProps> = ({\n items,\n atlasIMG,\n atlasJSON,\n onChangeType,\n onChangeRarity,\n onChangeOrder,\n onChangeNameInput,\n onChangeMainLevelInput,\n onChangeSecondaryLevelInput,\n onChangePriceInput,\n equipmentSet,\n onMarketPlaceItemBuy,\n characterId,\n enableHotkeys,\n disableHotkeys,\n currentPage,\n}) => {\n const [name, setName] = useState('');\n const [mainLevel, setMainLevel] = useState<\n [number | undefined, number | undefined]\n >([undefined, undefined]);\n const [secondaryLevel, setSecondaryLevel] = useState<\n [number | undefined, number | undefined]\n >([undefined, undefined]);\n const [price, setPrice] = useState<[number | undefined, number | undefined]>([\n undefined,\n undefined,\n ]);\n const [buyingItemId, setBuyingItemId] = useState<string | null>(null);\n\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, [currentPage]);\n\n return (\n <>\n {buyingItemId && (\n <ConfirmModal\n onClose={setBuyingItemId.bind(null, null)}\n onConfirm={() => {\n onMarketPlaceItemBuy?.(buyingItemId);\n setBuyingItemId(null);\n enableHotkeys?.();\n }}\n message=\"Are you sure to buy this item?\"\n />\n )}\n <InputWrapper>\n <p>Search By Name</p>\n <Input\n onChange={e => {\n setName(e.target.value);\n onChangeNameInput(e.target.value);\n }}\n value={name}\n placeholder=\"Enter name...\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </InputWrapper>\n\n <OptionsWrapper>\n <FilterInputsWrapper>\n <div>\n <p>Main level</p>\n <Input\n onChange={e => {\n setMainLevel([Number(e.target.value), mainLevel[1]]);\n onChangeMainLevelInput([Number(e.target.value), mainLevel[1]]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setMainLevel([mainLevel[0], Number(e.target.value)]);\n onChangeMainLevelInput([mainLevel[0], Number(e.target.value)]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n\n <div>\n <p>Secondary level</p>\n <Input\n onChange={e => {\n setSecondaryLevel([Number(e.target.value), secondaryLevel[1]]);\n onChangeSecondaryLevelInput([\n Number(e.target.value),\n secondaryLevel[1],\n ]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setSecondaryLevel([secondaryLevel[0], Number(e.target.value)]);\n onChangeSecondaryLevelInput([\n secondaryLevel[0],\n Number(e.target.value),\n ]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n\n <div>\n <p>Price</p>\n <Input\n onChange={e => {\n setPrice([Number(e.target.value), price[1]]);\n onChangePriceInput([Number(e.target.value), price[1]]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n className=\"big-input\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setPrice([price[0], Number(e.target.value)]);\n onChangePriceInput([price[0], Number(e.target.value)]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n className=\"big-input\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n </FilterInputsWrapper>\n\n <WrapperContainer>\n <StyledDropdown\n options={itemTypeOptions}\n onChange={onChangeType}\n width=\"95%\"\n />\n <StyledDropdown\n options={itemRarityOptions}\n onChange={onChangeRarity}\n width=\"95%\"\n />\n <StyledDropdown\n options={orderByOptions}\n onChange={onChangeOrder}\n width=\"100%\"\n />\n </WrapperContainer>\n </OptionsWrapper>\n\n <ItemComponentScrollWrapper id=\"MarketContainer\" ref={itemsContainer}>\n {items?.map(({ item, price, _id, owner }, index) => (\n <MarketplaceRows\n key={`${item.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n item={item}\n itemPrice={price}\n equipmentSet={equipmentSet}\n onMarketPlaceItemBuy={setBuyingItemId.bind(null, _id)}\n disabled={owner === characterId}\n />\n ))}\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst InputWrapper = styled.div`\n width: 95%;\n display: flex !important;\n justify-content: flex-start;\n align-items: center;\n margin: auto;\n\n p {\n width: auto;\n margin-right: 20px;\n }\n\n input {\n width: 68%;\n height: 10px;\n }\n`;\n\nconst OptionsWrapper = styled.div`\n width: 100%;\n height: 100px;\n`;\n\nconst FilterInputsWrapper = styled.div`\n width: 95%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n margin-left: 10px;\n gap: 5px;\n color: white;\n flex-wrap: wrap;\n\n p {\n width: auto;\n margin: 0;\n }\n\n input {\n width: 75px;\n height: 10px;\n }\n\n .big-input {\n width: 130px;\n }\n`;\n\nconst WrapperContainer = styled.div`\n display: grid;\n grid-template-columns: 40% 30% 30%;\n justify-content: space-between;\n width: calc(100% - 40px);\n margin-left: 10px;\n\n .rpgui-content .rpgui-dropdown-imp-header {\n padding: 0px 10px 0 !important;\n }\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst StyledDropdown = styled(Dropdown)`\n margin: 3px !important;\n width: 170px !important;\n`;\n","import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { ConfirmModal } from '../ConfirmModal';\nimport { Input } from '../Input';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { MarketplaceRows } from './MarketplaceRows';\n\nexport interface IManagmentPanelProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onChangeNameInput: (value: string) => void;\n equipmentSet?: IEquipmentSet | null;\n availableGold: number;\n onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;\n selectedItemToSell: IItem | null;\n onSelectedItemToSellRemove: (item: IItem) => void;\n onAddItemToMarketplace: (item: IItem, price: number) => void;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n onMoneyWithdraw: () => void;\n currentPage: number;\n}\n\nexport const ManagmentPanel: React.FC<IManagmentPanelProps> = ({\n items,\n atlasIMG,\n atlasJSON,\n onChangeNameInput,\n equipmentSet,\n availableGold,\n onMarketPlaceItemRemove,\n selectedItemToSell,\n onSelectedItemToSellRemove,\n onAddItemToMarketplace,\n enableHotkeys,\n disableHotkeys,\n onMoneyWithdraw,\n currentPage,\n}) => {\n const [name, setName] = useState('');\n const [price, setPrice] = useState('');\n const [isCreatingOffer, setIsCreatingOffer] = useState(false);\n const [removingItemId, setRemovingItemId] = useState<string | null>(null);\n\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, [currentPage]);\n\n return (\n <>\n {isCreatingOffer && (\n <ConfirmModal\n onClose={setIsCreatingOffer.bind(null, false)}\n onConfirm={() => {\n if (selectedItemToSell && price && Number(price)) {\n onAddItemToMarketplace(selectedItemToSell, Number(price));\n setPrice('');\n onSelectedItemToSellRemove(selectedItemToSell);\n setIsCreatingOffer(false);\n enableHotkeys?.();\n }\n }}\n message=\"Are you sure to create this offer?\"\n />\n )}\n {removingItemId && (\n <ConfirmModal\n onClose={setRemovingItemId.bind(null, null)}\n onConfirm={() => {\n onMarketPlaceItemRemove?.(removingItemId);\n setRemovingItemId(null);\n enableHotkeys?.();\n }}\n message=\"Are you sure to remove this item?\"\n />\n )}\n <InputWrapper>\n <p>Search By Name</p>\n <Input\n onChange={e => {\n setName(e.target.value);\n onChangeNameInput(e.target.value);\n }}\n value={name}\n placeholder=\"Enter name...\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </InputWrapper>\n\n <OptionsWrapper>\n <InnerOptionsWrapper>\n <SellDescription>\n Click on item in inventory to sell it\n </SellDescription>\n <Flex>\n <ItemSlot\n slotIndex={0}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onPointerDown={(_, __, item) => onSelectedItemToSellRemove(item)}\n item={selectedItemToSell}\n />\n <PriceInputWrapper>\n <p>Enter price</p>\n <Flex>\n <Input\n onChange={e => {\n setPrice(e.target.value);\n }}\n value={price}\n placeholder=\"Enter price...\"\n type=\"number\"\n disabled={!selectedItemToSell}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!selectedItemToSell || !price}\n onPointerDown={() => {\n if (selectedItemToSell && price && Number(price)) {\n setIsCreatingOffer(true);\n }\n }}\n >\n Create offer\n </Button>\n </Flex>\n </PriceInputWrapper>\n </Flex>\n </InnerOptionsWrapper>\n <InnerOptionsWrapper>\n <AvailableGold $disabled={availableGold === 0}>\n <p>Available gold</p>\n <p className=\"center\">${availableGold}</p>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={availableGold === 0}\n onPointerDown={() => availableGold > 0 && onMoneyWithdraw()}\n >\n Withdraw\n </Button>\n </AvailableGold>\n </InnerOptionsWrapper>\n </OptionsWrapper>\n\n <ItemComponentScrollWrapper id=\"MarketContainer\" ref={itemsContainer}>\n {items?.map(({ item, price, _id }, index) => (\n <MarketplaceRows\n key={`${item.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n item={item}\n itemPrice={price}\n equipmentSet={equipmentSet}\n onMarketPlaceItemRemove={setRemovingItemId.bind(null, _id)}\n />\n ))}\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst Flex = styled.div`\n display: flex;\n gap: 5px;\n align-items: center;\n`;\n\nconst InputWrapper = styled.div`\n width: 95%;\n display: flex !important;\n justify-content: flex-start;\n align-items: center;\n margin: auto;\n\n p {\n width: auto;\n margin-right: 20px;\n }\n\n input {\n width: 68%;\n height: 10px;\n }\n`;\n\nconst OptionsWrapper = styled.div`\n width: 100%;\n height: 100px;\n display: flex;\n align-items: center;\n justify-content: space-around;\n`;\n\nconst InnerOptionsWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n height: 100%;\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst PriceInputWrapper = styled.div`\n p {\n margin: 0;\n }\n\n input {\n width: 200px;\n }\n`;\n\nconst SellDescription = styled.p`\n margin: 0;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst AvailableGold = styled.div<{ $disabled: boolean }>`\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n p {\n margin: 0;\n color: ${props =>\n props.$disabled ? uiColors.lightGray : 'white'} !important;\n }\n\n .center {\n text-align: center;\n font-size: ${uiFonts.size.large} !important;\n color: ${props =>\n props.$disabled ? uiColors.lightGray : uiColors.lightGreen} !important;\n }\n`;\n","import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Pager } from '../Pager';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { BuyPanel } from './BuyPanel';\nimport { ManagmentPanel } from './ManagmentPanel';\n\nexport interface IMarketPlaceProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onChangeType: (value: string) => void;\n onChangeRarity: (value: string) => void;\n onChangeOrder: (value: string) => void;\n onChangeNameInput: (value: string) => void;\n onChangeMainLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangeSecondaryLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangePriceInput: (value: [number | undefined, number | undefined]) => void;\n scale?: number;\n equipmentSet?: IEquipmentSet | null;\n onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;\n onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;\n availableGold: number;\n selectedItemToSell: IItem | null;\n onSelectedItemToSellRemove: (item: IItem) => void;\n onYourPanelToggle: (yourPanel: boolean) => void;\n onAddItemToMarketplace: (item: IItem, price: number) => void;\n characterId: string;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n onMoneyWithdraw: () => void;\n totalItems: number;\n currentPage: number;\n itemsPerPage: number;\n onPageChange: (page: number) => void;\n}\n\nexport const Marketplace: React.FC<IMarketPlaceProps> = props => {\n const { onClose, scale, onYourPanelToggle } = props;\n\n const [isYourPanel, setIsYourPanel] = useState(false);\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"800px\"\n cancelDrag=\"#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button\"\n scale={scale}\n >\n {isYourPanel && (\n <>\n <ManagmentPanel {...props} />\n\n <PagerContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onYourPanelToggle(false);\n setIsYourPanel(false);\n }}\n >\n Go to marketplace\n </Button>\n <Pager {...props} />\n </PagerContainer>\n </>\n )}\n {!isYourPanel && (\n <>\n <BuyPanel {...props} />\n\n <PagerContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onYourPanelToggle(true);\n setIsYourPanel(true);\n }}\n >\n Go to your panel\n </Button>\n <Pager {...props} />\n </PagerContainer>\n </>\n )}\n </DraggableContainer>\n );\n};\n\nconst PagerContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: calc(100% - 30px);\n`;\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IContainerStyles {\n height?: string;\n width?: string;\n}\n\ninterface IProps {\n id: string;\n children: React.ReactNode;\n styles?: IContainerStyles;\n centerContent?: boolean;\n}\n\nexport const TabBody: React.FC<IProps> = ({\n id,\n children,\n styles,\n centerContent,\n}) => {\n return (\n <Container styles={styles} data-tab-id={id} centerContent={centerContent}>\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n styles?: IContainerStyles;\n centerContent?: boolean;\n}\n\nconst Container = styled.div<IContainerProps>`\n width: ${props => props.styles?.width || '100%'};\n height: ${props => props.styles?.height || 'auto'};\n overflow-y: auto;\n display: ${props => (props.centerContent ? 'flex' : 'block')};\n justify-content: ${props => (props.centerContent ? 'center' : 'initial')};\n align-items: ${props => (props.centerContent ? 'center' : 'initial')};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { MultitabType } from './TabsContainer';\n\nexport interface ISingleTab {\n active: boolean;\n label: string;\n onPointerDown: () => void;\n type: MultitabType;\n}\n\nexport const Tab: React.FC<ISingleTab> = ({\n active,\n label,\n onPointerDown,\n type,\n}) => {\n return (\n <CustomTab\n activeTab={active}\n onPointerDown={onPointerDown}\n className={type}\n >\n <p>{label}</p>\n </CustomTab>\n );\n};\n\ninterface ICustomTab {\n activeTab: boolean;\n}\n\nconst CustomTab = styled.div<ICustomTab>`\n width: 120px;\n color: white;\n font-size: 0.8rem;\n\n &.gray {\n border-left: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-right: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-top: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-bottom: ${props =>\n props.activeTab ? '' : '0.25rem solid rgba(0, 0, 0, 0.25)'};\n background: ${props => (props.activeTab ? '#4E4A4E' : '#2b292b')};\n }\n\n &.brown {\n border-left: 0.25rem solid #996d55;\n border-right: 0.25rem solid #996d55;\n border-top: 0.25rem solid #996d55;\n border-bottom: ${props => (props.activeTab ? '' : '0.25rem solid #996d55')};\n background: ${props => (props.activeTab ? '#BF886A' : '#B67051')};\n }\n\n margin-right: 10px;\n p {\n text-align: center;\n font-size: 0.6rem;\n\n opacity: ${props => (props.activeTab ? '1' : '0.5')};\n }\n\n border-radius: 5px 5px 0 0;\n\n position: relative;\n top: 0.3rem;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { Tab } from './Tab';\n\ninterface ITab {\n label: string;\n id: string;\n}\n\nexport enum MultitabType {\n Brown = 'brown',\n Gray = 'gray',\n}\n\nexport interface ITabsContainer {\n children: React.ReactNode;\n onCloseButton?: () => void;\n tabs: ITab[];\n type: MultitabType;\n styles?: {\n width?: string;\n minWidth?: string;\n minHeight?: string;\n height?: string;\n className?: string;\n title?: string;\n imgSrc?: string;\n imgWidth?: string;\n };\n isDraggableModal?: boolean;\n}\n\nexport const TabsContainer: React.FC<ITabsContainer> = ({\n children,\n onCloseButton,\n tabs,\n type = MultitabType.Brown,\n styles = {},\n isDraggableModal = false,\n}) => {\n const [selectedTab, setSelectedTab] = useState(tabs[0].id);\n\n const onRenderTabs = () =>\n tabs.map((tab, index) => (\n <Tab\n type={type}\n active={selectedTab === tab.id}\n label={tab.label}\n key={`${tab.label}_${index}`}\n onPointerDown={() => setSelectedTab(tab.id)}\n />\n ));\n\n const onGetContainerType = () => {\n switch (type) {\n case MultitabType.Brown:\n return RPGUIContainerTypes.FramedGold;\n case MultitabType.Gray:\n return RPGUIContainerTypes.Framed;\n default:\n return RPGUIContainerTypes.Framed;\n }\n };\n\n const TabsCore = () => (\n <>\n {onRenderTabs()}\n <BodyContainer\n selectedTab={selectedTab}\n className={`${type} tabs-container`}\n >\n {children}\n </BodyContainer>\n </>\n );\n\n if (isDraggableModal) {\n return (\n <DraggableContainer\n onCloseButton={onCloseButton}\n type={onGetContainerType()}\n cancelDrag=\".tabs-container *\"\n width={styles?.width}\n height={styles?.height}\n minWidth={styles?.minWidth}\n minHeight={styles?.minHeight}\n className={styles?.className}\n title={styles?.title}\n imgSrc={styles?.imgSrc}\n imgWidth={styles?.imgWidth}\n >\n {TabsCore()}\n </DraggableContainer>\n );\n }\n\n return (\n <NonDraggableWrapper\n width={styles?.width}\n height={styles?.height}\n minWidth={styles?.minWidth}\n minHeight={styles?.minHeight}\n >\n {TabsCore()}\n </NonDraggableWrapper>\n );\n};\n\ninterface IBodyContainer {\n selectedTab: string;\n}\n\nconst BodyContainer = styled.div<IBodyContainer>`\n\n display: flex; \n width: 100%;\n height: 100%;\n justify-content: space-between;\n\n /* hide everything that is not data-tab-id selectedTab */\n & > *:not([data-tab-id=${props => props.selectedTab}]) {\n display: none;\n }\n\n &.brown {\n border: 0.25rem solid #996D55;\n background-color: #BF886A;\n }\n \n &.gray {\n border: 0.25rem solid rgba(0, 0, 0, 0.25);\n background-color: #4E4A4E;\n }\n \n border-radius: 5px; \n padding: 0.5rem; \n`;\n\ninterface INonDraggableWrapperProps {\n width?: string;\n height?: string;\n minWidth?: string;\n minHeight?: string;\n}\n\nconst NonDraggableWrapper = styled.div<INonDraggableWrapperProps>`\n height: ${props => props.height || 'auto'};\n width: ${props => props.width || '50%'};\n min-width: ${props => props.minWidth || 'auto'};\n min-height: ${props => props.minHeight || 'auto'};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n overflow-y: hidden;\n padding-top: 1.5rem;\n position: relative;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { Input } from '../../Input';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\n\nexport interface IPartyCreateProps {\n onClose: () => void;\n onCreate: () => void;\n}\n\nexport const PartyCreate: React.FC<IPartyCreateProps> = ({\n onClose,\n onCreate,\n}) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"500px\"\n height=\"300px\"\n cancelDrag=\".partyRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Create Party</Title>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <h1>Type your party name</h1>\n <Input placeholder=\"Type party name\" type=\"text\" />\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onCreate();\n }}\n >\n Confirm\n </Button>\n <div className=\"cancel-button\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n close();\n }}\n >\n Cancel\n </Button>\n </div>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst ButtonWrapper = styled.div`\n margin-top: 10px;\n width: 100%;\n display: flex;\n justify-content: space-around;\n align-items: center;\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\n\nexport interface IPartyRowProps {\n id: string;\n charName: string;\n charClass: string;\n charLevel: number;\n playerQty: number;\n isInvited: boolean;\n partyName: string;\n}\n\nexport const PartyRow: React.FC<IPartyRowProps> = ({\n charName,\n charClass,\n charLevel,\n playerQty,\n isInvited,\n partyName,\n}) => {\n return (\n <PartyWrapper>\n <TextContainer>{partyName}</TextContainer>\n <TextContainer>{charName}</TextContainer>\n <TextContainer>{charClass}</TextContainer>\n <TextContainer>{charLevel}</TextContainer>\n <TextContainer>{playerQty}/5</TextContainer>\n {isInvited ? (\n <>\n <Button buttonType={ButtonTypes.RPGUIButton}>Accept</Button>\n <div className=\"cancel-button\">\n <Button buttonType={ButtonTypes.RPGUIButton}>Decline</Button>\n </div>\n </>\n ) : (\n <Button buttonType={ButtonTypes.RPGUIButton}>Join</Button>\n )}\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { IPartyRowProps, PartyRow } from './PartyRows';\n\nexport interface IPartyDashboardProps {\n partyRows: IPartyRowProps[];\n}\n\nexport const PartyDashboard: React.FC<IPartyDashboardProps> = ({\n partyRows,\n}) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n console.log('Close');\n }}\n width=\"800px\"\n height=\"400px\"\n cancelDrag=\".partyRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Party Dashboard</Title>\n <Button buttonType={ButtonTypes.RPGUIButton}>Create</Button>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <RowsWrapper className=\"partyRows\">\n {partyRows.map(partyRows => (\n <PartyRow\n key={partyRows.id}\n charName={partyRows.charName}\n charClass={partyRows.charClass}\n charLevel={partyRows.charLevel}\n playerQty={partyRows.playerQty}\n id={partyRows.id}\n isInvited={partyRows.isInvited}\n partyName={partyRows.partyName}\n />\n ))}\n </RowsWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst RowsWrapper = styled.div`\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n width: 100%;\n height: 200px;\n`;\n\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\n\nexport interface IPlayersRowProps {\n id: string;\n charName: string;\n charClass: string;\n charLevel: number;\n isNotInvited: boolean;\n}\n\nexport const PlayersRow: React.FC<IPlayersRowProps> = ({\n charName,\n charClass,\n charLevel,\n isNotInvited,\n}) => {\n return (\n <PartyWrapper>\n <TextContainer>{charName}</TextContainer>\n <TextContainer>{charClass}</TextContainer>\n <TextContainer>{charLevel}</TextContainer>\n {isNotInvited ? (\n <>\n <Button buttonType={ButtonTypes.RPGUIButton}>Invite</Button>\n </>\n ) : (\n <TextContainer>Invited</TextContainer>\n )}\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: row;\n flex: auto;\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n flex: auto;\n margin: auto;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { IPlayersRowProps, PlayersRow } from './PlayersRows';\n\nexport interface IPartyInviteProps {\n playersRows: IPlayersRowProps[];\n}\n\nexport const PartyInvite: React.FC<IPartyInviteProps> = ({ playersRows }) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n console.log('Close');\n }}\n width=\"600px\"\n height=\"400px\"\n cancelDrag=\".playersRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Invite for Party</Title>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <RowsWrapper className=\"playersRows\">\n {playersRows.map(playersRows => (\n <PlayersRow\n key={playersRows.id}\n charName={playersRows.charName}\n charClass={playersRows.charClass}\n charLevel={playersRows.charLevel}\n id={playersRows.id}\n isNotInvited={playersRows.isNotInvited}\n />\n ))}\n </RowsWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst RowsWrapper = styled.div`\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n width: 100%;\n height: 200px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface IProps extends React.HTMLAttributes<HTMLParagraphElement> {\n children: string;\n}\n\nexport const HighlightedText = ({ children, ...rest }: IProps) => {\n return <Text {...rest}>{children}</Text>;\n};\n\nconst Text = styled.p`\n color: ${uiColors.yellow} !important;\n\n font-weight: bold;\n font-size: 1.2rem;\n\n // show the cursor as a pointer when hovering over the text\n\n &:hover {\n text-decoration: underline;\n cursor: pointer;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { HighlightedText } from '../../Text/HighlightedText';\nimport { Ellipsis } from '../../shared/Ellipsis';\n\nexport interface IPartyManagerRowProps {\n id: string;\n charName: string;\n charClass: string;\n isLeader: boolean;\n leaderId: string;\n userId: string;\n onRemovePlayer: (id: string) => void;\n onChangeLeader: (id: string) => void;\n}\n\nexport const PartyManagerRow: React.FC<IPartyManagerRowProps> = ({\n charName,\n charClass,\n isLeader,\n id,\n leaderId,\n userId,\n onRemovePlayer,\n onChangeLeader,\n}) => {\n const isCurrentUser = id === userId;\n const canRemove = leaderId === userId || isCurrentUser;\n\n return (\n <PartyWrapper>\n <TextContainer>\n <Ellipsis maxLines={1} maxWidth=\"300px\">\n {charName} {isCurrentUser ? '(You)' : ''} {isLeader ? '(Leader)' : ''}\n </Ellipsis>\n </TextContainer>\n <TextContainer>\n <Ellipsis maxLines={1} maxWidth=\"300px\">\n {charClass}\n </Ellipsis>\n </TextContainer>\n <ButtonContainer>\n {canRemove && (\n <HighlightedText onPointerDown={() => onRemovePlayer(id)}>\n {isCurrentUser ? 'Leave' : 'Remove'}\n </HighlightedText>\n )}\n {leaderId === userId && leaderId !== id && (\n <HighlightedText onPointerDown={() => onChangeLeader(id)}>\n New Leader\n </HighlightedText>\n )}\n </ButtonContainer>\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n display: grid;\n grid-template-columns: 2fr 1fr 1fr;\n align-items: center;\n padding: 0.5rem;\n min-height: 50px;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid ${uiColors.darkGray};\n\n &:hover {\n background-color: ${uiColors.darkGray};\n cursor: pointer;\n }\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n align-items: center;\n gap: 1rem;\n justify-content: flex-start;\n`;\n","import { ICharacterPartyShared, isMobileOrTablet } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { PartyManagerRow } from './PartyManagerRows';\n\nexport interface IPartyManagerProps {\n partyRows: ICharacterPartyShared | null;\n\n userId: string;\n onRemovePlayer: (id: string) => void;\n onChangeLeader: (id: string) => void;\n}\n\nexport const PartyManager: React.FC<IPartyManagerProps> = ({\n partyRows,\n userId,\n onRemovePlayer,\n onChangeLeader,\n}) => {\n const invitationActionText = isMobileOrTablet() ? 'Tap' : 'Right click';\n\n const sortedMembers =\n partyRows?.leader && partyRows?.members\n ? [partyRows.leader, ...partyRows.members].sort((a, b) =>\n a._id === partyRows.leader._id\n ? -1\n : b._id === partyRows.leader._id\n ? 1\n : 0\n )\n : [];\n\n return (\n <>\n <RowsWrapper className=\"partyRows\">\n {partyRows && sortedMembers.length ? (\n sortedMembers.map(partyRow => (\n <PartyManagerRow\n userId={userId}\n key={partyRow._id}\n charName={partyRow.name}\n charClass={partyRow.class}\n id={partyRow._id}\n isLeader={partyRow._id === partyRows.leader._id}\n leaderId={partyRows.leader._id}\n onRemovePlayer={() => onRemovePlayer(partyRow._id)}\n onChangeLeader={() => onChangeLeader(partyRow._id)}\n />\n ))\n ) : (\n <NotInParty>\n <p>You're not in a party.</p>\n <p>\n Tip: <YellowText>{invitationActionText}</YellowText> on a player\n to invite them.\n </p>\n </NotInParty>\n )}\n </RowsWrapper>\n </>\n );\n};\n\nconst RowsWrapper = styled.div`\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst YellowText = styled.span`\n color: ${uiColors.yellow} !important;\n`;\n\nconst NotInParty = styled.h1`\n font-size: 0.6rem;\n margin: auto;\n`;\n","import { CharacterClass, ICharacterPartyShared } from '@rpg-engine/shared';\nimport { v4 as uuidv4 } from 'uuid';\nimport { IPartyRowProps } from '../PartyDashboard/PartyRows';\nimport { IPlayersRowProps } from '../PartyInvite';\n\nexport const mockedPartyRows: IPartyRowProps[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n];\n\nexport const mockedPlayersRows2: ICharacterPartyShared = {\n id: uuidv4(),\n leader: {\n _id: uuidv4(),\n class: CharacterClass.Druid,\n name: 'leader',\n },\n members: [\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n ],\n maxSize: 5,\n size: 4,\n};\n\nexport const mockedPlayersRows: IPlayersRowProps[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n];\n\nexport const mockedPartyManager: any[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n];\n\n// Function to generate mock data for when you are the leader\nexport const getMockedPlayersRowsLeader = (\n userId: string\n): ICharacterPartyShared => ({\n id: uuidv4(),\n leader: {\n _id: userId, // You are the leader\n class: CharacterClass.Warrior,\n name: 'YourName',\n },\n members: [\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'Member1' },\n { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },\n { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },\n ],\n maxSize: 5,\n size: 4,\n});\n\n// Function to generate mock data for when you are not the leader\nexport const getMockedPlayersRowsNotLeader = (\n userId: string\n): ICharacterPartyShared => ({\n id: uuidv4(),\n leader: {\n _id: uuidv4(), // Someone else is the leader\n class: CharacterClass.Druid,\n name: 'LeaderName',\n },\n members: [\n { _id: userId, class: CharacterClass.Warrior, name: 'YourName' }, // You are a member\n { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },\n { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },\n ],\n maxSize: 5,\n size: 4,\n});\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\nexport interface IBarProps {\n max: number;\n value: number;\n color: 'red' | 'blue' | 'green';\n style?: Record<string, any>;\n displayText?: boolean;\n percentageWidth?: number;\n minWidth?: number;\n mobileScale?: number;\n}\n\nexport const ProgressBar: React.FC<IBarProps> = ({\n max,\n value,\n color,\n displayText = true,\n percentageWidth = 40,\n minWidth = 100,\n style,\n mobileScale,\n}) => {\n value = Math.round(value);\n max = Math.round(max);\n\n const calculatePercentageValue = function(max: number, value: number) {\n if (value > max) {\n value = max;\n }\n return (value * 100) / max;\n };\n\n return (\n <Container\n className=\"rpgui-progress\"\n data-value={calculatePercentageValue(max, value) / 100}\n data-rpguitype=\"progress\"\n percentageWidth={percentageWidth}\n minWidth={minWidth}\n style={style}\n mobileScale={mobileScale}\n >\n {displayText && (\n <TextOverlay>\n <ProgressBarText>\n {value}/{max}\n </ProgressBarText>\n </TextOverlay>\n )}\n <div className=\" rpgui-progress-track\">\n <div\n className={`rpgui-progress-fill ${color} `}\n style={{\n left: '0px',\n width: calculatePercentageValue(max, value) + '%',\n }}\n ></div>\n </div>\n <div className=\" rpgui-progress-left-edge\"></div>\n <div className=\" rpgui-progress-right-edge\"></div>\n </Container>\n );\n};\n\nconst ProgressBarText = styled.span`\n font-size: ${uiFonts.size.small} !important;\n color: white;\n text-align: center;\n z-index: 1;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n top: 12px;\n`;\n\nconst TextOverlay = styled.div`\n width: 100%;\n position: relative;\n`;\n\ninterface IContainerProps {\n percentageWidth?: number;\n minWidth?: number;\n style?: Record<string, any>;\n mobileScale?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: flex;\n flex-direction: column;\n min-width: ${props => props.minWidth}px;\n width: ${props => props.percentageWidth}%;\n justify-content: start;\n align-items: flex-start;\n ${props => props.style}\n @media (max-width: 950px) {\n transform: scale(${props => props.mobileScale});\n }\n`;\n","import { IQuest } from '@rpg-engine/shared';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport SelectArrow from '../../Arrow/SelectArrow';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\n\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { Column } from '../../shared/Column';\nimport thumbnailDefault from './img/default.png';\n\nexport interface IQuestsButtonProps {\n disabled: boolean;\n title: string;\n onClick: (questId: string, npcId: string) => void;\n}\n\nexport interface IQuestInfoProps {\n onClose?: () => void;\n buttons?: IQuestsButtonProps[];\n quests: IQuest[];\n onChangeQuest: (currentQuestIndex: number, currentQuestId: string) => void;\n scale?: number;\n}\n\nexport const QuestInfo: React.FC<IQuestInfoProps> = ({\n quests,\n onClose,\n buttons,\n onChangeQuest,\n scale,\n}) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const questsLength = quests.length - 1;\n\n useEffect(() => {\n if (onChangeQuest) {\n onChangeQuest(currentIndex, quests[currentIndex]._id);\n }\n }, [currentIndex]);\n\n const onLeftClick = () => {\n if (currentIndex === 0) setCurrentIndex(questsLength);\n else setCurrentIndex(index => index - 1);\n };\n const onRightClick = () => {\n if (currentIndex === questsLength) setCurrentIndex(0);\n else setCurrentIndex(index => index + 1);\n };\n\n return (\n <QuestDraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"730px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n scale={scale}\n >\n {quests.length >= 2 ? (\n <QuestsContainer>\n {currentIndex !== 0 && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={onLeftClick}\n ></SelectArrow>\n )}\n {currentIndex !== quests.length - 1 && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={onRightClick}\n ></SelectArrow>\n )}\n\n <QuestContainer>\n <TitleContainer className=\"drag-handler\">\n <Title>\n <Thumbnail\n src={quests[currentIndex].thumbnail || thumbnailDefault}\n />\n {quests[currentIndex].title}\n </Title>\n <QuestSplitDiv>\n <hr className=\"golden\" />\n </QuestSplitDiv>\n </TitleContainer>\n <Content>\n <p>{quests[currentIndex].description}</p>\n </Content>\n <QuestColumn className=\"dark-background\" justifyContent=\"flex-end\">\n {buttons &&\n buttons.map((button, index) => (\n <Button\n key={index}\n onPointerDown={() =>\n button.onClick(\n quests[currentIndex]._id,\n quests[currentIndex].npcId\n )\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n ) : (\n <QuestsContainer>\n <QuestContainer>\n <TitleContainer className=\"drag-handler\">\n <Title>\n <Thumbnail src={quests[0].thumbnail || thumbnailDefault} />\n {quests[0].title}\n </Title>\n <QuestSplitDiv>\n <hr className=\"golden\" />\n </QuestSplitDiv>\n </TitleContainer>\n <Content>\n <p>{quests[0].description}</p>\n </Content>\n <QuestColumn className=\"dark-background\" justifyContent=\"flex-end\">\n {buttons &&\n buttons.map((button, index) => (\n <Button\n key={index}\n onPointerDown={() =>\n button.onClick(quests[0]._id, quests[0].npcId)\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n )}\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 600px;\n padding: 0 0 0 0 !important;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n height: auto;\n }\n .container-close {\n position: absolute;\n margin-left: auto;\n top: 20px;\n padding-right: 5px;\n }\n img {\n display: inline-block;\n vertical-align: middle;\n line-height: normal;\n }\n`;\n\nconst QuestContainer = styled.div`\n margin-right: 40px;\n margin-left: 40px;\n`;\n\nconst QuestsContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Content = styled.div`\n padding: 18px;\n h1 {\n text-align: left;\n margin: 14px 0px;\n }\n`;\n\nconst QuestSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n margin-bottom: 10px;\n hr {\n margin: 0px;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst QuestColumn = styled(Column)`\n padding-top: 5px;\n margin-bottom: 20px;\n display: flex;\n justify-content: space-evenly;\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 1rem;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Thumbnail = styled.img`\n color: white;\n z-index: 22;\n width: 32px * 1.5;\n margin-right: 0.5rem;\n position: relative;\n top: -4px;\n`;\n","import { IQuest, QuestStatus } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled, { CSSProperties } from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n styles?: {\n container?: CSSProperties;\n card?: CSSProperties;\n label?: CSSProperties;\n value?: CSSProperties;\n };\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests, styles }) => {\n return (\n <QuestListContainer style={styles?.container}>\n {quests && quests.length > 0 ? (\n quests.map((quest, i) => (\n <QuestCard key={i} style={styles?.card}>\n <QuestItem>\n <Label style={styles?.label}>Title:</Label>\n <Value style={styles?.value}>\n {formatQuestText(quest.title)}\n </Value>\n </QuestItem>\n <QuestItem>\n <Label style={styles?.label}>Status:</Label>\n <Value\n style={{\n ...styles?.value,\n color: getQuestStatusColor(quest.status),\n }}\n >\n {formatQuestStatus(quest.status) ?? 'Unknown'}\n </Value>\n </QuestItem>\n <QuestItem>\n <Label style={styles?.label}>Description:</Label>\n <Value style={styles?.value}>{quest.description}</Value>\n </QuestItem>\n </QuestCard>\n ))\n ) : (\n <NoQuestContainer>\n <p>There are no ongoing quests</p>\n </NoQuestContainer>\n )}\n </QuestListContainer>\n );\n};\n\nconst QuestListContainer = styled.div`\n max-height: 400px;\n padding: 10px;\n border-radius: 10px;\n font-size: 0.7rem;\n`;\n\nconst QuestCard = styled.div`\n background-color: ${uiColors.darkGray};\n padding: 15px;\n margin-bottom: 10px;\n border-radius: 10px;\n border: 1px solid ${uiColors.gray};\n display: flex;\n flex-direction: column;\n`;\n\nconst QuestItem = styled.div`\n display: flex;\n margin-bottom: 5px;\n flex-wrap: wrap;\n\n &:last-child {\n margin-bottom: 0;\n }\n`;\n\nconst Label = styled.span`\n font-weight: bold;\n color: ${uiColors.yellow} !important;\n margin-right: 10px;\n`;\n\nconst Value = styled.span`\n flex-grow: 1;\n color: ${uiColors.white};\n word-wrap: break-word;\n`;\n\nconst NoQuestContainer = styled.div`\n text-align: center;\n p {\n margin-top: 5px;\n color: ${uiColors.lightGray};\n }\n`;\n\nexport const formatQuestText = (text: string) => {\n if (!text) return '';\n return text\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n};\n\nexport const getQuestStatusColor = (status?: QuestStatus) => {\n switch (status) {\n case QuestStatus.Pending:\n return uiColors.orange;\n case QuestStatus.InProgress:\n return uiColors.blue;\n case QuestStatus.Completed:\n return uiColors.lightGreen;\n default:\n return uiColors.white;\n }\n};\n\nexport const formatQuestStatus = (status?: QuestStatus) => {\n if (!status) return '';\n return status\n .split(/(?=[A-Z])/)\n .join(' ')\n .replace(/^\\w/, c => c.toUpperCase());\n};\n","import React, { useEffect, useState } from 'react';\n\nexport interface IRadioItems {\n label: string;\n value: string;\n}\n\nexport interface IRadioProps {\n name: string;\n items: IRadioItems[];\n onChange: (value: string) => void;\n}\n\nexport const InputRadio: React.FC<IRadioProps> = ({\n name,\n items,\n onChange,\n}) => {\n const [selectedValue, setSelectedValue] = useState<string>();\n const handleClick = () => {\n let element = document.querySelector(\n `input[name=${name}]:checked`\n ) as HTMLInputElement;\n const elementValue = element.value;\n setSelectedValue(elementValue);\n };\n\n useEffect(() => {\n if (selectedValue) {\n onChange(selectedValue);\n }\n }, [selectedValue]);\n\n return (\n <div id=\"elemento-radio\">\n {items.map(element => {\n return (\n <>\n <input\n key={element.value}\n className=\"rpgui-radio\"\n value={element.value}\n name={name}\n type=\"radio\"\n />\n <label onPointerDown={handleClick}>{element.label}</label>\n <br />\n </>\n );\n })}\n </div>\n );\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const RPGUIScrollbar = ({ children }: IProps) => {\n return <Container>{children}</Container>;\n};\n\nconst Container = styled.div`\n /* Override RPGUI CSS */\n\n .rpgui-content ::-webkit-scrollbar,\n .rpgui-content::-webkit-scrollbar {\n width: 25px !important;\n }\n\n .rpgui-content ::-webkit-scrollbar-track,\n .rpgui-content::-webkit-scrollbar-track {\n background-size: 25px 60px !important;\n }\n`;\n","import React from 'react';\nimport { RPGUIScrollbar } from './RPGUIScrollbar';\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const RPGUIOverrides = ({ children }: IProps) => {\n return <RPGUIScrollbar>{children}</RPGUIScrollbar>;\n};\n","import React from 'react';\nimport 'rpgui/rpgui.css';\nimport 'rpgui/rpgui.min.js';\nimport { RPGUIOverrides } from './RPGUIOverrides';\n\ninterface IProps {\n children: React.ReactNode;\n}\n\n//@ts-ignore\nexport const _RPGUI = RPGUI;\n\nexport const RPGUIRoot: React.FC<IProps> = ({ children }) => {\n return (\n <RPGUIOverrides>\n <div className=\"rpgui-content\">{children}</div>\n </RPGUIOverrides>\n );\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SingleShortcut } from './SingleShortcut';\nimport { useShortcutCooldown } from './useShortcutCooldown';\n\nexport type ShortcutsProps = {\n shortcuts: IShortcut[];\n onShortcutCast: (index: number) => void;\n mana: number;\n isBlockedCastingByKeyboard?: boolean;\n inventory?: IItemContainer | null;\n atlasJSON: any;\n atlasIMG: any;\n spellCooldowns?: Record<string, number>;\n};\n\nexport const Shortcuts: React.FC<ShortcutsProps> = ({\n shortcuts,\n onShortcutCast,\n mana,\n isBlockedCastingByKeyboard = false,\n atlasJSON,\n atlasIMG,\n inventory,\n spellCooldowns,\n}) => {\n const shortcutsRefs = useRef<HTMLButtonElement[]>([]);\n\n const { handleShortcutCast, shortcutCooldown } = useShortcutCooldown(\n onShortcutCast\n );\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (isBlockedCastingByKeyboard) return;\n\n const shortcutIndex = Number(e.key) - 1;\n if (shortcutIndex >= 0 && shortcutIndex <= 11) {\n handleShortcutCast(shortcutIndex);\n shortcutsRefs.current[shortcutIndex]?.classList.add('active');\n const timeoutId = setTimeout(() => {\n shortcutsRefs.current[shortcutIndex]?.classList.remove('active');\n }, 150);\n // Store timeoutId for later cleanup\n timeoutIds.current.push((timeoutId as unknown) as number);\n }\n },\n [isBlockedCastingByKeyboard, handleShortcutCast]\n );\n\n // Initialize a ref to store the timeout ids\n const timeoutIds = useRef<number[]>([]);\n\n useEffect(() => {\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n // Clear all timeouts when the component unmounts\n timeoutIds.current.forEach(id => clearTimeout(id));\n };\n }, [handleKeyDown]);\n\n return (\n <List>\n {Array.from({ length: 12 }).map((_, i) => {\n const buildClassName = (classBase: string, isOnCooldown: boolean) => {\n return `${classBase} ${isOnCooldown ? 'onCooldown' : ''}`;\n };\n\n const isOnShortcutCooldown = shortcutCooldown > 0;\n\n if (shortcuts && shortcuts[i]?.type === ShortcutType.Item) {\n const payload = shortcuts[i]?.payload as IItem | undefined;\n\n let itemsFromEquipment: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === payload?.key) {\n itemsFromEquipment.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty =\n payload && inventory\n ? countItemFromInventory(payload.key, inventory)\n : 0;\n\n return (\n <StyledShortcut\n key={i}\n onPointerDown={handleShortcutCast.bind(null, i)}\n disabled={false}\n ref={el => {\n if (el) shortcutsRefs.current[i] = el;\n }}\n >\n {isOnShortcutCooldown && (\n <span className=\"cooldown\">{shortcutCooldown.toFixed(1)}</span>\n )}\n {payload && (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n />\n )}\n <span className={buildClassName('qty', isOnShortcutCooldown)}>\n {totalQty}\n </span>\n <span\n className={buildClassName('keyboard', isOnShortcutCooldown)}\n >\n {i + 1}\n </span>\n </StyledShortcut>\n );\n }\n\n const payload =\n shortcuts && (shortcuts[i]?.payload as IRawSpell | undefined); //check if shortcuts exists before using the ? operator.\n\n const spellCooldown = !payload\n ? 0\n : spellCooldowns?.[payload.magicWords.replaceAll(' ', '_')] ??\n shortcutCooldown;\n const cooldown =\n spellCooldown > shortcutCooldown ? spellCooldown : shortcutCooldown;\n const isOnCooldown = cooldown > 0 && !!payload;\n\n const IMAGE_SCALE = 1.5;\n const IMAGE_SIZE = 32;\n\n return (\n <StyledShortcut\n key={i}\n onPointerDown={handleShortcutCast.bind(null, i)}\n disabled={mana < (payload?.manaCost ?? 0)}\n ref={el => {\n if (el) shortcutsRefs.current[i] = el;\n }}\n >\n {isOnCooldown && (\n <span className=\"cooldown\">\n {cooldown.toFixed(cooldown < 10 ? 1 : 0)}\n </span>\n )}\n <span>\n {payload?.atlasIMG && (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath ?? ''}\n width={IMAGE_SIZE}\n height={IMAGE_SIZE}\n imgScale={IMAGE_SCALE}\n centered\n borderRadius=\"50%\"\n />\n )}\n </span>\n <span className={buildClassName('mana', isOnCooldown)}>\n {payload && payload.manaCost}\n </span>\n <span className={buildClassName('keyboard', isOnCooldown)}>\n {i + 1}\n </span>\n </StyledShortcut>\n );\n })}\n </List>\n );\n};\n\nconst StyledShortcut = styled(SingleShortcut)`\n transition: all 0.15s;\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n`;\n\nconst List = styled.p`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n box-sizing: border-box;\n margin: 0 !important;\n\n scale: 0.9;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\n\nexport interface ISimpleProgressBarProps {\n value: number;\n bgColor?: string;\n margin?: number;\n}\n\nexport const SimpleProgressBar: React.FC<ISimpleProgressBarProps> = ({\n value,\n bgColor = 'red',\n margin = 20,\n}) => {\n // Ensure the width is at least 1% if value is greater than 0\n const width = value > 0 ? Math.max(1, Math.min(100, value)) : 0;\n\n return (\n <Container className=\"simple-progress-bar\">\n <ProgressBarContainer margin={margin}>\n <BackgroundBar>\n <Progress width={width} bgColor={bgColor} />\n </BackgroundBar>\n </ProgressBarContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n`;\n\nconst BackgroundBar = styled.span`\n background-color: rgba(0, 0, 0, 0.075);\n`;\n\ninterface IProgressProps {\n width: number;\n bgColor: string;\n}\n\nconst Progress = styled.span<IProgressProps>`\n background-color: ${props => props.bgColor};\n width: ${props => props.width.toFixed(2)}%;\n transition: width 0.5s ease-in-out;\n`;\n\ninterface IProgressBarContainerProps {\n margin: number;\n}\n\nconst ProgressBarContainer = styled.div<IProgressBarContainerProps>`\n border-radius: 60px;\n border: 1px solid #282424;\n overflow: hidden;\n width: 100%;\n span {\n display: block;\n height: 100%;\n }\n height: 8px;\n margin-left: ${props => props.margin}px;\n`;\n","import styled from 'styled-components';\n\nexport const Tooltip = styled.div`\n visibility: hidden;\n position: absolute;\n background-color: black;\n color: white;\n text-align: center;\n border-radius: 4px;\n padding: 5px;\n z-index: 1;\n font-size: 0.5rem;\n white-space: nowrap;\n\n /* Positioning */\n top: -20px; /* Adjust based on where you want the tooltip to appear */\n left: 50%;\n transform: translateX(-50%);\n`;\n","import { getSPForLevel } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { ErrorBoundary } from './Item/Inventory/ErrorBoundary';\nimport { SpriteFromAtlas } from './shared/SpriteFromAtlas';\nimport { SimpleProgressBar } from './SimpleProgressBar';\nimport { Tooltip } from './Tooltip/Tooltip';\n\nexport interface ISkillProgressBarProps {\n skillName: string;\n bgColor: string;\n level: number;\n skillPoints: number;\n texturePath: string;\n showSkillPoints?: boolean;\n skillPointsToNextLevel: number;\n atlasJSON: any;\n atlasIMG: any;\n buffAndDebuff?: number;\n}\n\nexport const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({\n bgColor,\n skillName,\n level,\n skillPoints: currentSkillPoints,\n skillPointsToNextLevel,\n texturePath,\n showSkillPoints = true,\n atlasIMG,\n atlasJSON,\n\n buffAndDebuff,\n}) => {\n // Skill points needed to start the current level\n const baseSkillPoints = getSPForLevel(level);\n const calculateProgress = (): number => {\n const totalPointsForLevelUp = Math.max(\n 1,\n skillPointsToNextLevel - baseSkillPoints\n );\n const excessSkillPoints = Math.max(0, currentSkillPoints - baseSkillPoints);\n\n return Math.min(\n 100,\n Math.max(0, (excessSkillPoints / totalPointsForLevelUp) * 100)\n );\n };\n\n const progress = calculateProgress();\n\n const formatBuffAndDebuff = (value?: number): string =>\n value !== undefined ? value.toFixed(2) : '0';\n\n const skillsBuffsCalc = (level: number, buffAndDebuff: number): string => {\n if (buffAndDebuff === 0) return '0';\n const result = level * (buffAndDebuff / 100);\n return result > 0 ? `+${result.toFixed(2)}` : `${result.toFixed(2)}`;\n };\n\n return (\n <>\n <ProgressTitle>\n {buffAndDebuff !== undefined && (\n <>\n {buffAndDebuff > 0 ? (\n <BuffAndDebuffContainer>\n <TitleNameContainer>\n <TitleNameBuff>{skillName}</TitleNameBuff>\n <TitleNameBuff>\n lv {level} ({skillsBuffsCalc(level, buffAndDebuff)})\n </TitleNameBuff>\n </TitleNameContainer>\n <TitleNameBuffContainer>\n <TitleNameBuff>\n (+{formatBuffAndDebuff(buffAndDebuff)}%)\n </TitleNameBuff>\n </TitleNameBuffContainer>\n </BuffAndDebuffContainer>\n ) : buffAndDebuff < 0 ? (\n <>\n <TitleNameContainer>\n <TitleNameDebuff>{skillName}</TitleNameDebuff>\n <TitleNameDebuff>\n lv {level} ({skillsBuffsCalc(level, buffAndDebuff)})\n </TitleNameDebuff>\n </TitleNameContainer>\n <div>\n <TitleNameDebuff>\n ({formatBuffAndDebuff(buffAndDebuff)}%)\n </TitleNameDebuff>\n </div>\n </>\n ) : (\n <TitleName>{skillName}</TitleName>\n )}\n </>\n )}\n {!buffAndDebuff && (\n <TitleNameContainer>\n <TitleName>{skillName}</TitleName>\n <ValueDisplay>lv {level}</ValueDisplay>\n </TitleNameContainer>\n )}\n </ProgressTitle>\n\n <ProgressBody>\n <ProgressIconContainer>\n {atlasIMG && atlasJSON ? (\n <SpriteContainer>\n <ErrorBoundary>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={texturePath}\n imgScale={1}\n grayScale\n opacity={0.5}\n />\n </ErrorBoundary>\n </SpriteContainer>\n ) : (\n <></>\n )}\n </ProgressIconContainer>\n\n <ProgressBarWrapper>\n <SimpleProgressBar value={progress} bgColor={bgColor} />\n <Tooltip>SP: {currentSkillPoints}</Tooltip>\n </ProgressBarWrapper>\n </ProgressBody>\n {showSkillPoints && (\n <SkillDisplayContainer>\n <SkillPointsDisplay>{progress.toFixed(2)}%</SkillPointsDisplay>\n </SkillDisplayContainer>\n )}\n </>\n );\n};\n\nconst ProgressBarWrapper = styled.div`\n position: relative;\n\n &:hover ${Tooltip}, &:active ${Tooltip} {\n visibility: visible;\n }\n width: 100%;\n height: auto;\n top: 8px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -3px;\n left: 0;\n`;\n\nconst SkillDisplayContainer = styled.div`\n margin: 0 auto;\n\n p {\n margin: 0;\n }\n`;\n\nconst SkillPointsDisplay = styled.p`\n font-size: 0.55rem !important;\n font-weight: bold;\n text-align: center;\n`;\n\nconst TitleName = styled.span`\n margin-left: 5px;\n`;\n\nconst TitleNameBuff = styled.span`\n margin-left: 5px;\n color: ${uiColors.lightGreen} !important;\n`;\n\nconst TitleNameDebuff = styled.span`\n margin-left: 5px;\n color: ${uiColors.red} !important;\n`;\n\nconst ValueDisplay = styled.span``;\n\nconst ProgressIconContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst ProgressBody = styled.div`\n display: flex;\n flex-direction: row;\n width: 100%;\n`;\n\nconst ProgressTitle = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n span {\n font-size: 0.6rem;\n }\n`;\n\nconst BuffAndDebuffContainer = styled.div``;\n\nconst TitleNameBuffContainer = styled.div``;\n\nconst TitleNameContainer = styled.div`\n display: flex;\n justify-content: space-between;\n`;\n","import {\n ISkill,\n ISkillDetails,\n getSPForLevel,\n getXPForLevel,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { DraggableContainer } from './DraggableContainer';\nimport { SkillProgressBar } from './SkillProgressBar';\n\nexport interface ISkillContainerProps {\n skill: ISkill;\n onCloseButton: () => void;\n atlasJSON: any;\n atlasIMG: any;\n scale?: number;\n}\n\nconst skillProps = {\n attributes: {\n color: uiColors.purple,\n values: {\n stamina: 'staffs/doom-staff.png',\n magic: 'helmets/yellow-enchanter-hat.png',\n magicResistance: 'gems/amethyst-gem.png',\n strength: 'crafting-resources/dragon-tooth.png',\n resistance: 'books/magic-orb.png',\n dexterity: 'boots/gaias-soleplate.png',\n },\n },\n combat: {\n color: uiColors.cardinal,\n values: {\n first: 'gloves/leather-gloves.png',\n club: 'maces/club.png',\n sword: 'swords/double-edged-sword.png',\n axe: 'axes/double-axe.png',\n distance: 'ranged-weapons/horse-bow.png',\n shielding: 'shields/studded-shield.png',\n dagger: 'daggers/dagger.png',\n },\n },\n crafting: {\n color: uiColors.blue,\n values: {\n fishing: 'foods/fish.png',\n farming: 'tools/watering-can.png',\n mining: 'crafting-resources/iron-ingot.png',\n lumberjacking: 'crafting-resources/greater-wooden-log.png',\n blacksmithing: 'hammers/hammer.png',\n cooking: 'foods/chickens-meat.png',\n alchemy: 'potions/greater-mana-potion.png',\n },\n },\n};\n\ninterface SkillMap {\n [key: string]: string;\n}\n\nconst skillNameMap: SkillMap = {\n stamina: 'Stamina',\n magic: 'Magic',\n magicResistance: 'Magic Resistance',\n strength: 'Strength',\n resistance: 'Resistance',\n dexterity: 'Dexterity',\n first: 'Fist',\n club: 'Club',\n sword: 'Sword',\n axe: 'Axe',\n distance: 'Distance',\n shielding: 'Shielding',\n dagger: 'Dagger',\n fishing: 'Fishing',\n farming: 'Farming',\n mining: 'Mining',\n lumberjacking: 'Lumberjacking',\n blacksmithing: 'Blacksmithing',\n cooking: 'Cooking',\n alchemy: 'Alchemy',\n};\n\nexport const SkillsContainer: React.FC<ISkillContainerProps> = ({\n onCloseButton,\n skill,\n atlasIMG,\n atlasJSON,\n scale,\n}) => {\n const onRenderSkillCategory = (\n category: 'attributes' | 'combat' | 'crafting'\n ) => {\n const skillCategory = skillProps[category];\n\n const skillCategoryColor = skillCategory.color;\n\n const output = [];\n\n for (const [key, value] of Object.entries(skillCategory.values)) {\n if (key === 'stamina') {\n continue;\n }\n //@ts-ignore\n const skillDetails = (skill[key] as unknown) as ISkillDetails;\n\n if (!skillDetails) {\n continue;\n }\n\n output.push(\n <SkillProgressBar\n key={key}\n skillName={skillNameMap[key]}\n bgColor={skillCategoryColor}\n level={skillDetails.level || 0}\n skillPoints={Math.round(skillDetails.skillPoints) || 0}\n skillPointsToNextLevel={\n Math.round(getSPForLevel(skillDetails.level + 1)) || 0\n }\n texturePath={value}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n buffAndDebuff={skillDetails.buffAndDebuff}\n />\n );\n }\n\n return output;\n };\n\n return (\n <SkillsDraggableContainer\n title=\"Skills\"\n cancelDrag=\"#skillsDiv\"\n scale={scale}\n width=\"100%\"\n >\n {onCloseButton && (\n <CloseButton onPointerDown={onCloseButton}>X</CloseButton>\n )}\n <SkillsContainerDiv id=\"skillsDiv\">\n <SkillSplitDiv>\n <p>General</p>\n <hr className=\"golden\" />\n\n <SkillProgressBar\n skillName={'Level'}\n bgColor={uiColors.navyBlue}\n level={Math.round(skill.level) || 0}\n skillPoints={Math.round(skill.experience) || 0}\n skillPointsToNextLevel={\n Math.round(getXPForLevel(skill.level + 1)) || 0\n }\n texturePath={'swords/broad-sword.png'}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n <p>Combat Skills</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('combat')}\n\n <SkillSplitDiv>\n <p>Crafting Skills</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('crafting')}\n\n <SkillSplitDiv>\n <p>Basic Attributes</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('attributes')}\n </SkillsContainerDiv>\n </SkillsDraggableContainer>\n );\n};\n\nconst SkillsDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n\n max-width: 450px;\n\n height: 90%;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n width: auto;\n height: auto;\n }\n`;\n\nconst SkillsContainerDiv = styled.div`\n width: 100%;\n -webkit-overflow-y: scroll;\n overflow-y: scroll;\n height: 90%;\n padding-right: 10px;\n`;\n\nconst SkillSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n hr {\n margin: 0;\n margin-bottom: 1rem;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 2px;\n right: 2px;\n color: white;\n z-index: 22;\n font-size: 1.1rem;\n`;\n","export const formatSpellCastingType = (castingType: string): string => {\n const formattedCastingType = castingType\n .split(\"-\")\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n \n return formattedCastingType;\n };","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { formatSpellCastingType } from '../../../libs/CastingTypeHelper';\n\ninterface ISpellInfoProps {\n spell: ISpell;\n}\n\nexport const SpellInfo: React.FC<ISpellInfoProps> = ({ spell }) => {\n const {\n magicWords,\n name,\n manaCost,\n requiredItem,\n description,\n castingType,\n cooldown,\n maxDistanceGrid,\n } = spell;\n return (\n <Container>\n <Header>\n <div>\n <Title>{name}</Title>\n <Type>{magicWords}</Type>\n </div>\n </Header>\n <Statistic>\n <div className=\"label\">Casting Type:</div>\n <div className=\"value\">{formatSpellCastingType(castingType)}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Magic words:</div>\n <div className=\"value\">{magicWords}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Mana cost:</div>\n <div className=\"value\">{manaCost}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Cooldown:</div>\n <div className=\"value\">{cooldown}</div>\n </Statistic>\n {maxDistanceGrid && (\n <Statistic>\n <div className=\"label\">Max Distance Grid:</div>\n <div className=\"value\">{maxDistanceGrid}</div>\n </Statistic>\n )}\n <Statistic>\n {requiredItem && (\n <>\n <div className=\"label\">Required Item:</div>\n <div className=\"value\">{requiredItem}</div>\n </>\n )}\n </Statistic>\n <Description>{description}</Description>\n </Container>\n );\n};\n\nconst Container = styled.div`\n color: white;\n background-color: #222;\n border-radius: 5px;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n border: 3px solid ${uiColors.lightGray};\n height: max-content;\n width: 30rem;\n\n @media (max-width: 580px) {\n width: 80vw;\n }\n`;\n\nconst Title = styled.div`\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n margin-bottom: 0.5rem;\n display: flex;\n align-items: center;\n margin: 0;\n`;\n\nconst Type = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n color: ${uiColors.lightGray};\n`;\n\nconst Description = styled.div`\n margin-top: 1.5rem;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.lightGray};\n font-style: italic;\n`;\n\nconst Header = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n`;\n\nconst Statistic = styled.div`\n margin-bottom: 0.4rem;\n width: max-content;\n\n .label {\n display: inline-block;\n margin-right: 0.5rem;\n color: inherit;\n }\n\n .value {\n display: inline-block;\n color: inherit;\n }\n\n &.better,\n .better {\n color: ${uiColors.lightGreen};\n }\n\n &.worse,\n .worse {\n color: ${uiColors.cardinal};\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { SpellInfo } from './SpellInfo';\n\nexport interface ISpellInfoDisplayProps {\n spell: ISpell;\n isMobile?: boolean;\n}\n\nexport const SpellInfoDisplay: React.FC<ISpellInfoDisplayProps> = ({\n spell,\n isMobile,\n}) => {\n return (\n <Flex $isMobile={isMobile}>\n <SpellInfo spell={spell} />\n </Flex>\n );\n};\n\nconst Flex = styled.div<{ $isMobile?: boolean }>`\n display: flex;\n gap: 0.5rem;\n flex-direction: ${({ $isMobile }) => ($isMobile ? 'row-reverse' : 'row')};\n\n @media (max-width: 580px) {\n flex-direction: column-reverse;\n align-items: center;\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { SpellInfoDisplay } from './SpellInfoDisplay';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface MobileSpellTooltipProps {\n spell: ISpell;\n closeTooltip: () => void;\n scale?: number;\n options?: IListMenuOption[];\n onSelected?: (selectedOptionId: string) => void;\n}\n\nexport const MobileSpellTooltip: React.FC<MobileSpellTooltipProps> = ({\n spell,\n closeTooltip,\n scale = 1,\n options,\n onSelected,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n const handleFadeOut = () => {\n ref.current?.classList.add('fadeOut');\n };\n\n return (\n <ModalPortal>\n <Container\n ref={ref}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n closeTooltip();\n }, 100);\n }}\n scale={scale}\n >\n <SpellInfoDisplay spell={spell} isMobile />\n <OptionsContainer>\n {options?.map(option => (\n <Option\n key={option.id}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n onSelected?.(option.id);\n closeTooltip();\n }, 100);\n }}\n >\n {option.text}\n </Option>\n ))}\n </OptionsContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div<{ scale: number }>`\n position: absolute;\n z-index: 100;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0 0 0 / 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n transition: opacity 0.08s;\n animation: fadeIn 0.1s forwards;\n\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.92;\n }\n }\n\n @keyframes fadeOut {\n 0% {\n opacity: 0.92;\n }\n 100% {\n opacity: 0;\n }\n }\n\n &.fadeOut {\n animation: fadeOut 0.1s forwards;\n }\n\n @media (max-width: 580px) {\n flex-direction: column;\n }\n`;\n\nconst OptionsContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex-wrap: wrap;\n\n @media (max-width: 580px) {\n flex-direction: row;\n justify-content: center;\n }\n`;\n\nconst Option = styled.button`\n padding: 1rem;\n background-color: #333;\n color: white;\n border: none;\n border-radius: 3px;\n width: 8rem;\n transition: background-color 0.1s;\n\n &:hover {\n background-color: #555;\n }\n\n @media (max-width: 580px) {\n padding: 1rem 0.5rem;\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { SpellInfoDisplay } from './SpellInfoDisplay';\n\nexport interface IMagicTooltipProps {\n spell: ISpell;\n}\n\nconst offset = 20;\n\nexport const MagicTooltip: React.FC<IMagicTooltipProps> = ({ spell }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const { current } = ref;\n\n if (current) {\n const handleMouseMove = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n // Adjust the position of the tooltip based on the mouse position\n const rect = current.getBoundingClientRect();\n\n const tooltipWidth = rect.width;\n const tooltipHeight = rect.height;\n const isOffScreenRight =\n clientX + tooltipWidth + offset > window.innerWidth;\n const isOffScreenBottom =\n clientY + tooltipHeight + offset > window.innerHeight;\n const x = isOffScreenRight\n ? clientX - tooltipWidth - offset\n : clientX + offset;\n const y = isOffScreenBottom\n ? clientY - tooltipHeight - offset\n : clientY + offset;\n\n current.style.transform = `translate(${x}px, ${y}px)`;\n current.style.opacity = '1';\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return;\n }, []);\n\n return (\n <ModalPortal>\n <Container ref={ref}>\n <SpellInfoDisplay spell={spell} />\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div`\n position: absolute;\n z-index: 100;\n pointer-events: none;\n left: 0;\n top: 0;\n opacity: 0;\n transition: opacity 0.08s;\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useRef, useState } from 'react';\nimport { MobileSpellTooltip } from './MobileSpellTooltip';\nimport { MagicTooltip } from './SpellTooltip';\n\ninterface ISpellInfoWrapperProps {\n spell: ISpell;\n children: React.ReactNode;\n scale?: number;\n holdTouchDuration?: number; // New prop for hold touch duration\n}\n\nexport const SpellInfoWrapper: React.FC<ISpellInfoWrapperProps> = ({\n children,\n spell,\n scale,\n holdTouchDuration = 500, // Default hold duration to 500ms\n}) => {\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n const touchTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const handleTouchStart = () => {\n touchTimeoutRef.current = setTimeout(() => {\n setIsTooltipMobileVisible(true);\n setIsTooltipVisible(false);\n }, holdTouchDuration);\n };\n\n const handleTouchEnd = () => {\n if (touchTimeoutRef.current) {\n clearTimeout(touchTimeoutRef.current);\n touchTimeoutRef.current = null;\n }\n };\n\n return (\n <div\n onMouseEnter={() => {\n if (!isTooltipMobileVisible) setIsTooltipVisible(true);\n }}\n onMouseLeave={setIsTooltipVisible.bind(null, false)}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {children}\n\n {isTooltipVisible && !isTooltipMobileVisible && (\n <MagicTooltip spell={spell} />\n )}\n {isTooltipMobileVisible && (\n <MobileSpellTooltip\n closeTooltip={() => {\n setIsTooltipMobileVisible(false);\n console.log('close');\n }}\n spell={spell}\n scale={scale}\n />\n )}\n </div>\n );\n};","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SpellInfoWrapper } from './cards/SpellInfoWrapper';\n\nexport interface ISpellProps {\n atlasJSON: any;\n atlasIMG: any;\n charMana: number;\n charMagicLevel: number;\n onPointerUp?: (spellKey: string) => void;\n isSettingShortcut?: boolean;\n spellKey: string;\n spell: ISpell;\n activeCooldown?: number;\n}\n\nexport const Spell: React.FC<ISpellProps> = ({\n atlasIMG,\n atlasJSON,\n spellKey,\n charMana,\n charMagicLevel,\n onPointerUp,\n isSettingShortcut,\n spell,\n activeCooldown,\n}) => {\n const {\n manaCost,\n minMagicLevelRequired,\n magicWords,\n name,\n description,\n } = spell;\n const disabled = isSettingShortcut\n ? charMagicLevel < minMagicLevelRequired\n : manaCost > charMana || charMagicLevel < minMagicLevelRequired;\n\n const CONTAINER_STYLE = { width: '32px', height: '32px' };\n const IMAGE_SCALE = 2;\n\n return (\n <SpellInfoWrapper spell={spell}>\n <Container\n onPointerUp={onPointerUp?.bind(null, spellKey)}\n isSettingShortcut={isSettingShortcut && !disabled}\n className=\"spell\"\n >\n {disabled && (\n <Overlay>\n {charMagicLevel < minMagicLevelRequired\n ? 'Low magic level'\n : manaCost > charMana && 'No mana'}\n </Overlay>\n )}\n <SpellImage>\n {activeCooldown && activeCooldown > 0 ? (\n <span className=\"cooldown\">\n {activeCooldown.toFixed(activeCooldown > 10 ? 0 : 1)}\n </span>\n ) : null}\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={spell.texturePath ?? ''}\n imgScale={IMAGE_SCALE}\n containerStyle={CONTAINER_STYLE}\n centered\n />\n </SpellImage>\n <Info>\n <Title>\n <span>{name}</span>\n <span className=\"spell\">({magicWords})</span>\n </Title>\n <Description>{description}</Description>\n </Info>\n\n <Divider />\n <Cost>\n <span>Mana cost:</span>\n <span className=\"mana\">{manaCost}</span>\n </Cost>\n </Container>\n </SpellInfoWrapper>\n );\n};\n\nconst Container = styled.button<{ isSettingShortcut?: boolean }>`\n display: block;\n background: none;\n border: 2px solid transparent;\n border-radius: 1rem;\n width: 100%;\n display: flex;\n\n gap: 1rem;\n align-items: center;\n padding: 0 1rem;\n text-align: left;\n position: relative;\n\n animation: ${({ isSettingShortcut }) =>\n isSettingShortcut ? 'border-color-change 1s infinite' : 'none'};\n\n @keyframes border-color-change {\n 0% {\n border-color: ${uiColors.yellow};\n }\n 50% {\n border-color: transparent;\n }\n 100% {\n border-color: ${uiColors.yellow};\n }\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background: none;\n }\n`;\n\nconst SpellImage = styled.div`\n width: 4rem;\n height: 4rem;\n font-size: ${uiFonts.size.xLarge};\n font-weight: bold;\n background-color: ${uiColors.darkGray};\n color: ${uiColors.lightGray};\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: uppercase;\n position: relative;\n overflow: hidden;\n\n .cooldown {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0 0 0 / 20%);\n color: ${uiColors.darkYellow};\n font-weight: bold;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n`;\n\nconst Info = styled.span`\n width: 0;\n flex: 1;\n\n @media (orientation: portrait) {\n display: none;\n }\n`;\nconst Title = styled.p`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin-bottom: 5px;\n margin: 0;\n\n span {\n font-size: ${uiFonts.size.medium} !important;\n font-weight: bold !important;\n color: ${uiColors.yellow} !important;\n margin-right: 0.5rem;\n }\n\n .spell {\n font-size: ${uiFonts.size.small} !important;\n font-weight: normal !important;\n color: ${uiColors.lightGray} !important;\n }\n`;\n\nconst Description = styled.div`\n font-size: ${uiFonts.size.small} !important;\n line-height: 1.1 !important;\n`;\n\nconst Divider = styled.div`\n width: 1px;\n height: 100%;\n margin: 0 1rem;\n background-color: ${uiColors.lightGray};\n`;\n\nconst Cost = styled.p`\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 0.5rem;\n\n div {\n z-index: 1;\n }\n\n .mana {\n position: relative;\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n z-index: 1;\n\n &::after {\n position: absolute;\n content: '';\n top: 0;\n left: 0;\n background-color: ${uiColors.blue};\n width: 100%;\n height: 100%;\n border-radius: 50%;\n transform: scale(1.8);\n filter: blur(10px);\n z-index: -1;\n }\n }\n`;\n\nconst Overlay = styled.p`\n margin: 0 !important;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${uiColors.yellow};\n font-size: ${uiFonts.size.large} !important;\n font-weight: bold;\n z-index: 10;\n background-color: rgba(0 0 0 / 0.2);\n`;\n","import { IShortcut, ISpell } from '@rpg-engine/shared';\nimport React, { Fragment, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Input } from '../Input';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { ShortcutsSetter } from '../Shortcuts/ShortcutsSetter';\nimport { Spell } from './Spell';\n\nexport interface ISpellbookProps {\n onClose?: () => void;\n onInputFocus?: () => void;\n onInputBlur?: () => void;\n spells: ISpell[];\n magicLevel: number;\n mana: number;\n onSpellClick: (spellKey: string) => void;\n setSpellShortcut: (key: string, index: number) => void;\n shortcuts: IShortcut[];\n removeShortcut: (index: number) => void;\n atlasIMG: any;\n atlasJSON: any;\n iconAtlasIMG?: any;\n iconAtlasJSON?: any;\n scale?: number;\n spellCooldowns?: Record<string, number>;\n}\n\nexport const Spellbook: React.FC<ISpellbookProps> = ({\n onClose,\n onInputFocus,\n onInputBlur,\n spells,\n magicLevel,\n mana,\n onSpellClick,\n setSpellShortcut,\n shortcuts,\n removeShortcut,\n atlasIMG,\n atlasJSON,\n iconAtlasIMG,\n iconAtlasJSON,\n scale,\n spellCooldowns,\n}) => {\n const [search, setSearch] = useState('');\n const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);\n\n const spellsToDisplay = useMemo(() => {\n return spells\n .sort((a, b) => {\n if (a.minMagicLevelRequired > b.minMagicLevelRequired) return 1;\n if (a.minMagicLevelRequired < b.minMagicLevelRequired) return -1;\n return 0;\n })\n .filter(\n spell =>\n spell.name.toLocaleLowerCase().includes(search.toLocaleLowerCase()) ||\n spell.magicWords\n .toLocaleLowerCase()\n .includes(search.toLocaleLowerCase())\n );\n }, [search, spells]);\n\n const setShortcut = (spellKey: string) => {\n setSpellShortcut?.(spellKey, settingShortcutIndex);\n setSettingShortcutIndex(-1);\n };\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={onClose}\n width=\"inherit\"\n height=\"inherit\"\n cancelDrag=\"#spellbook-search, #shortcuts_list, .spell\"\n scale={scale}\n >\n <Container>\n <Title>Learned Spells</Title>\n\n <ShortcutsSetter\n setSettingShortcutIndex={setSettingShortcutIndex}\n settingShortcutIndex={settingShortcutIndex}\n shortcuts={shortcuts}\n removeShortcut={removeShortcut}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n <Input\n placeholder=\"Search for spell\"\n value={search}\n onChange={e => setSearch(e.target.value)}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n id=\"spellbook-search\"\n />\n\n <SpellList>\n {spellsToDisplay.map(spell => (\n <Fragment key={spell.key}>\n <Spell\n atlasIMG={iconAtlasIMG}\n atlasJSON={iconAtlasJSON}\n charMana={mana}\n charMagicLevel={magicLevel}\n onPointerUp={\n settingShortcutIndex !== -1 ? setShortcut : onSpellClick\n }\n spellKey={spell.key}\n isSettingShortcut={settingShortcutIndex !== -1}\n spell={spell}\n activeCooldown={\n spellCooldowns?.[spell.magicWords.replaceAll(' ', '_')]\n }\n {...spell}\n />\n </Fragment>\n ))}\n </SpellList>\n </Container>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n font-size: ${uiFonts.size.large} !important;\n margin-bottom: 0 !important;\n`;\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n color: white;\n display: flex;\n flex-direction: column;\n`;\n\nconst SpellList = styled.div`\n width: 100%;\n min-height: 0;\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n margin-top: 1rem;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport SelectArrow from './Arrow/SelectArrow';\nimport { Button, ButtonTypes } from './Button';\n\ninterface IStep {\n component: React.ReactNode;\n id: number;\n validate?: () => boolean | Promise<boolean>;\n errorMessage?: string;\n}\n\ninterface IStepperProps {\n steps: IStep[];\n finalCTAButton?: {\n label: string;\n onClick: (() => void) | (() => Promise<void>) | ((e: any) => Promise<void>);\n };\n onError?: (message: string) => void;\n useSideArrows?: boolean; // New prop to control arrow position\n styles?: {\n stepperProgressColor?: string;\n };\n}\n\nexport const Stepper: React.FC<IStepperProps> = ({\n steps,\n finalCTAButton,\n onError,\n useSideArrows = false, // Default to false for backwards compatibility\n styles,\n}) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const currentComponent = steps[currentStep]?.component;\n\n const totalSteps = steps.length;\n\n const onStepChange = async (step: number) => {\n if (steps[currentStep]?.validate) {\n try {\n const isValid = await steps[currentStep].validate!();\n if (!isValid) {\n if (onError) {\n onError(\n steps[currentStep].errorMessage ||\n `Validation failed on step ${currentStep + 1}`\n );\n }\n return;\n }\n } catch (error) {\n if (onError) {\n onError(\n `An error occurred during validation on step ${currentStep + 1}`\n );\n }\n return;\n }\n }\n setCurrentStep(step);\n };\n\n const renderArrows = () => {\n const leftArrow = (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => onStepChange(Math.max(0, currentStep - 1))}\n />\n );\n\n const rightArrow = (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() =>\n onStepChange(Math.min(totalSteps - 1, currentStep + 1))\n }\n />\n );\n\n if (useSideArrows) {\n return (\n <>\n {currentStep > 0 && <ArrowContainer left>{leftArrow}</ArrowContainer>}\n {currentStep < totalSteps - 1 && (\n <ArrowContainer right>{rightArrow}</ArrowContainer>\n )}\n </>\n );\n } else {\n return (\n <>\n {currentStep > 0 && leftArrow}\n {currentStep < totalSteps - 1 && rightArrow}\n </>\n );\n }\n };\n\n return (\n <StepperContainer className=\"stepper-container\">\n <StepperTop>\n {Array.from({ length: totalSteps }, (_, i) => (\n <ProgressIndicator\n key={i}\n isActive={i <= currentStep}\n stepperProgressColor={styles?.stepperProgressColor}\n onClick={() => onStepChange(i)}\n />\n ))}\n </StepperTop>\n\n <StepperBodyContainer>\n {useSideArrows && renderArrows()}\n <StepperBody>{currentComponent}</StepperBody>\n </StepperBodyContainer>\n\n {(!useSideArrows ||\n (currentStep === totalSteps - 1 && finalCTAButton)) && (\n <StepperFooter>\n {!useSideArrows && renderArrows()}\n {currentStep === totalSteps - 1 && finalCTAButton && (\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={finalCTAButton.onClick}\n >\n {finalCTAButton.label}\n </Button>\n )}\n </StepperFooter>\n )}\n </StepperContainer>\n );\n};\n\nconst StepperContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\nconst StepperTop = styled.div`\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n margin-bottom: 1rem;\n`;\n\nconst StepperBodyContainer = styled.div`\n flex: 8;\n display: flex;\n align-items: center;\n position: relative;\n height: 100%; /* Ensure full height */\n`;\n\nconst StepperBody = styled.div`\n flex: 1;\n min-height: 200px; /* Set an appropriate minimum height */\n transition: height 0.3s ease-in-out; /* Smooth height transition */\n`;\n\nconst ArrowContainer = styled.div<{ left?: boolean; right?: boolean }>`\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n ${props => props.left && 'left: -30px;'}\n ${props => props.right && 'right: -30px;'}\n`;\n\nconst StepperFooter = styled.div`\n margin-top: 1rem;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst ProgressIndicator = styled.div<{\n isActive: boolean;\n stepperProgressColor?: string;\n}>`\n width: 20px;\n height: 20px;\n background-color: ${({ isActive, stepperProgressColor }) =>\n isActive ? stepperProgressColor || uiColors.orange : uiColors.lightGray};\n margin: 0 5px;\n transition: background-color 0.3s;\n opacity: ${({ isActive }) => (isActive ? 1 : 0.25)};\n border: 1px solid ${uiColors.raisinBlack};\n cursor: pointer;\n clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);\n /* Create a diamond shape */\n box-shadow: ${({ isActive }) =>\n isActive\n ? '0 0 0 1px black, 1px 1px 0 1px black, 2px 2px 0 1px black, -1px -1px 0 1px black'\n : '0 0 0 1px black, 1px 1px 0 1px gray, 2px 2px 0 1px gray, -1px -1px 0 1px gray'};\n /* Add pixel art border effect */\n border-radius: 0;\n /* Remove border-radius to make it square */\n`;\n","import React from 'react';\n\nexport interface ITextArea\n extends React.DetailedHTMLProps<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n > {}\n\nexport const TextArea: React.FC<ITextArea> = ({ ...props }) => {\n return <textarea {...props} />;\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport { PeriodOfDay } from '@rpg-engine/shared';\nimport AfternoonGif from './gif/afternoon.gif';\nimport MorningGif from './gif/morning.gif';\nimport NightGif from './gif/night.gif';\n\nexport interface IPeriodOfDayDisplayProps {\n periodOfDay: PeriodOfDay;\n}\n\nexport const DayNightPeriod: React.FC<IPeriodOfDayDisplayProps> = ({\n periodOfDay,\n}) => {\n const periodOfDaySrcFiles = {\n [PeriodOfDay.Morning]: MorningGif,\n [PeriodOfDay.Afternoon]: AfternoonGif,\n [PeriodOfDay.Night]: NightGif,\n };\n\n return (\n <GifContainer>\n <img src={periodOfDaySrcFiles[periodOfDay]} />\n </GifContainer>\n );\n};\n\nconst GifContainer = styled.div`\n width: 100%;\n\n img {\n width: 67%;\n }\n`;\n","import { PeriodOfDay } from '@rpg-engine/shared';\nimport React from 'react';\nimport Draggable from 'react-draggable';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { DayNightPeriod } from './DayNightPeriod/DayNightPeriod';\n\nimport ClockWidgetImg from './img/clockwidget.png';\n\nexport interface IClockWidgetProps {\n onClose?: () => void;\n TimeClock: string;\n periodOfDay: PeriodOfDay;\n scale?: number;\n}\n\nexport const TimeWidget: React.FC<IClockWidgetProps> = ({\n onClose,\n TimeClock,\n periodOfDay,\n scale,\n}) => {\n return (\n <Draggable\n scale={scale}\n cancel=\".time-widget-close,.time-widget-container,.time-widget-container *\"\n >\n <WidgetContainer>\n <CloseButton onPointerDown={onClose} className=\"time-widget-close\">\n X\n </CloseButton>\n <DayNightContainer className=\"time-widget-container\">\n <DayNightPeriod periodOfDay={periodOfDay} />\n </DayNightContainer>\n <Time>{TimeClock}</Time>\n </WidgetContainer>\n </Draggable>\n );\n};\n\nconst WidgetContainer = styled.div`\n background-image: url(${ClockWidgetImg});\n background-size: 10rem;\n background-repeat: no-repeat;\n width: 10rem;\n position: absolute;\n height: 100px;\n`;\n\nconst Time = styled.div`\n top: 0.75rem;\n right: 0.5rem;\n position: absolute;\n font-size: ${uiFonts.size.small};\n color: white;\n`;\n\nconst CloseButton = styled.p`\n position: absolute;\n top: -0.5rem;\n margin: 0;\n right: -0.2rem;\n font-size: ${uiFonts.size.small} !important;\n z-index: 1;\n`;\n\nconst DayNightContainer = styled.div`\n margin-top: -0.3rem;\n margin-left: -0.3rem;\n`;\n","import { UserAccountTypes } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IPremiumLabelProps {\n accountType: UserAccountTypes;\n}\n\nconst PremiumLabel: React.FC<IPremiumLabelProps> = ({ accountType }) => {\n if (accountType === UserAccountTypes.Free) return null;\n\n const getBackgroundColor = () => {\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n return '#CD7F32';\n case UserAccountTypes.PremiumSilver:\n return '#C0C0C0';\n case UserAccountTypes.PremiumGold:\n return '#FFD700';\n case UserAccountTypes.PremiumUltimate:\n return '#002E99';\n default:\n return 'transparent';\n }\n };\n\n const getShortLabel = () => {\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n return 'Bronze PA';\n case UserAccountTypes.PremiumSilver:\n return 'Silver PA';\n case UserAccountTypes.PremiumGold:\n return 'Gold PA';\n case UserAccountTypes.PremiumUltimate:\n return 'Ultimate PA';\n default:\n return '';\n }\n };\n\n return (\n <StyledLabel backgroundColor={getBackgroundColor()}>\n {getShortLabel()}\n </StyledLabel>\n );\n};\n\nconst StyledLabel = styled.span<{ backgroundColor: string }>`\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${({ backgroundColor }) =>\n backgroundColor === '#002E99' ? 'white' : 'black'};\n font-weight: bold;\n padding: 0 0.4rem;\n border-radius: 3px;\n margin-right: 3px;\n margin-bottom: 2px;\n display: inline-block;\n font-size: 0.5rem !important;\n`;\n\nexport default PremiumLabel;\n","import {\n getItemTextureKeyPath,\n IEquipmentSet,\n ITradeResponseItem,\n} from '@rpg-engine/shared';\nimport capitalize from 'lodash/capitalize';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport PremiumLabel from './PremiumLabel';\n\nexport interface ITradeComponentProps {\n traderItem: ITradeResponseItem;\n onQuantityChange: (\n traderItem: ITradeResponseItem,\n selectedQty: number\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n selectedQty: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n isBuy?: boolean;\n}\n\nconst outerQty = 10;\n\nexport const TradingItemRow: React.FC<ITradeComponentProps> = ({\n atlasIMG,\n atlasJSON,\n onQuantityChange,\n traderItem,\n selectedQty,\n equipmentSet,\n scale,\n isBuy,\n}) => {\n const [inputQty, setInputQty] = useState(selectedQty.toString());\n\n useEffect(() => {\n setInputQty(selectedQty.toString());\n }, [selectedQty]);\n\n const handleQuantityChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newQty = parseInt(e.target.value, 10);\n if (!isNaN(newQty)) {\n setInputQty(e.target.value);\n onQuantityChange(\n traderItem,\n Math.max(0, Math.min(newQty, traderItem.stackQty ?? 999))\n );\n }\n };\n\n const handleBlur = () => {\n const newQty = parseInt(inputQty, 10);\n if (isNaN(newQty)) {\n setInputQty(selectedQty.toString());\n }\n };\n\n const onLeftClick = (qty = 1) => {\n onQuantityChange(traderItem, Math.max(0, selectedQty - qty));\n };\n\n const onRightClick = (qty = 1) => {\n onQuantityChange(\n traderItem,\n Math.min(traderItem.stackQty ?? 999, selectedQty + qty)\n );\n };\n\n const renderAccountTypeIndicator = () => {\n if (isBuy && traderItem.canBePurchasedOnlyByPremiumPlans) {\n return traderItem.canBePurchasedOnlyByPremiumPlans.map(accountType => (\n <PremiumLabel key={accountType} accountType={accountType} />\n ));\n }\n return null;\n };\n\n return (\n <ItemWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <ItemInfoWrapper\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n item={traderItem}\n scale={scale}\n >\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: traderItem.key,\n stackQty: traderItem.stackQty || 1,\n texturePath: traderItem.texturePath,\n isStackable: traderItem.isStackable,\n },\n atlasJSON\n )}\n imgScale={2}\n />\n </ItemInfoWrapper>\n </SpriteContainer>\n </ItemIconContainer>\n\n <ItemNameContainer>\n <NameValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"180px\">\n {capitalize(traderItem.name)}\n </Ellipsis>\n </p>\n <p>${traderItem.price}</p>\n <p>{renderAccountTypeIndicator()}</p>\n </NameValue>\n </ItemNameContainer>\n <QuantityContainer>\n <SelectArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={() => onLeftClick(outerQty)}\n scale={0.7}\n />\n <StyledArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={() => onLeftClick()}\n />\n <QuantityInput\n type=\"text\"\n value={inputQty}\n onChange={handleQuantityChange}\n onBlur={handleBlur}\n />\n <StyledArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={() => onRightClick()}\n />\n <SelectArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={() => onRightClick(outerQty)}\n scale={0.7}\n />\n </QuantityContainer>\n </ItemWrapper>\n );\n};\n\nconst StyledArrow = styled(SelectArrow)`\n margin: 0 1.5rem;\n`;\n\nconst ItemWrapper = styled.div`\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n padding: 0.25rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n`;\n\nconst ItemNameContainer = styled.div`\n flex: 60%;\n display: flex;\n align-items: center;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 0 0 40px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0;\n`;\n\nconst NameValue = styled.div`\n p {\n font-size: 0.6rem;\n margin: 0;\n line-height: 1.2;\n }\n`;\n\nconst QuantityContainer = styled.div`\n display: flex;\n min-width: 90px;\n width: 40%;\n justify-content: flex-end;\n align-items: center;\n flex: 30%;\n gap: 2px;\n position: relative;\n`;\n\nconst QuantityInput = styled.input`\n width: 30px;\n text-align: center;\n background-color: ${uiColors.darkGray};\n color: white;\n border: none;\n padding: 1px;\n font-size: ${uiFonts.size.small};\n position: relative;\n right: 4px;\n`;\n","import {\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport { useState } from 'react';\n\ninterface ITradingGoldHook {\n characterAvailableGold: number;\n type: TradeTransactionType;\n traderItems: ITradeResponseItem[];\n}\n\nexport const useTradingGold = ({\n characterAvailableGold,\n type,\n traderItems,\n}: ITradingGoldHook) => {\n const [sum, setSum] = useState(0);\n const [qtyMap, setQtyMap] = useState(new Map<string, number>());\n\n const isBuy = () => type === 'buy';\n\n const hasGoldForSale = () =>\n isBuy() ? !(sum > characterAvailableGold) : true;\n\n const getFinalGold = () =>\n isBuy() ? characterAvailableGold - sum : characterAvailableGold + sum;\n\n const getTradeItems = (): ITradeRequestItem[] => {\n const items: ITradeRequestItem[] = [];\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) {\n items.push({\n ...item,\n qty,\n });\n }\n });\n return items;\n };\n\n const updateQuantity = (item: ITradeResponseItem, selectedQty: number) => {\n setQtyMap(new Map(qtyMap.set(item.key, selectedQty)));\n\n let newSum = 0;\n qtyMap.forEach((qty, key) => {\n const item = traderItems.find(i => i.key === key);\n if (item) newSum += qty * item.price;\n });\n setSum(newSum);\n };\n\n return {\n sum,\n qtyMap,\n isBuy,\n hasGoldForSale,\n getFinalGold,\n getTradeItems,\n updateQuantity,\n };\n};\n","import {\n IEquipmentSet,\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { TradingItemRow } from './TradingItemRow';\nimport { useTradingGold } from './useTradingGold';\n\nexport interface ITradingMenu {\n traderItems: ITradeResponseItem[];\n onClose: () => void;\n onConfirm: (items: ITradeRequestItem[]) => void;\n type: TradeTransactionType;\n atlasJSON: any;\n atlasIMG: any;\n characterAvailableGold: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n}\n\nexport const TradingMenu: React.FC<ITradingMenu> = ({\n traderItems,\n onClose,\n type,\n atlasJSON,\n atlasIMG,\n characterAvailableGold,\n onConfirm,\n equipmentSet,\n scale,\n}) => {\n const {\n sum,\n qtyMap,\n isBuy,\n hasGoldForSale,\n getFinalGold,\n getTradeItems,\n updateQuantity,\n } = useTradingGold({ characterAvailableGold, type, traderItems });\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={onClose}\n width=\"500px\"\n cancelDrag=\"#TraderContainer\"\n scale={scale}\n >\n <Container>\n <Title>{type.charAt(0).toUpperCase() + type.slice(1)} Menu</Title>\n <hr className=\"golden\" />\n\n <ScrollWrapper id=\"TraderContainer\">\n {traderItems.map((tradeItem, index) => (\n <TradingItemRow\n key={`${tradeItem.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onQuantityChange={updateQuantity}\n traderItem={tradeItem}\n selectedQty={qtyMap.get(tradeItem.key) ?? 0}\n equipmentSet={equipmentSet}\n scale={scale}\n isBuy={isBuy()}\n />\n ))}\n </ScrollWrapper>\n\n <InfoSection>\n <GoldInfo>\n <p>Available Gold:</p>\n <p>${characterAvailableGold.toFixed(2)}</p>\n </GoldInfo>\n <GoldInfo>\n <p>Total:</p>\n <p>${sum}</p>\n </GoldInfo>\n {!hasGoldForSale() ? (\n <AlertText>Sorry, not enough money.</AlertText>\n ) : (\n <GoldInfo>\n <p>Final Gold:</p>\n <p>${getFinalGold().toFixed(2)}</p>\n </GoldInfo>\n )}\n </InfoSection>\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onPointerDown={() => onConfirm(getTradeItems())}\n >\n Confirm\n </Button>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n </ButtonWrapper>\n </Container>\n </DraggableContainer>\n );\n};\n\nconst Container = styled.div`\n width: 100%;\n`;\n\nconst Title = styled.h1`\n font-size: 0.7rem !important;\n color: yellow !important;\n text-align: center;\n`;\n\nconst ScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 250px;\n width: 100%;\n margin-top: 0.3rem;\n overflow-x: hidden;\n padding: 0 0.3rem;\n`;\n\nconst InfoSection = styled.div`\n margin-top: 0.3rem;\n padding: 0 0.5rem;\n`;\n\nconst GoldInfo = styled.div`\n display: flex;\n justify-content: space-between;\n height: 16px;\n width: 100%;\n margin: 0.5rem 0;\n p {\n color: yellow !important;\n margin: 0;\n font-size: 0.6rem;\n }\n`;\n\nconst AlertText = styled.p`\n color: red !important;\n text-align: center;\n margin: 0.3rem 0;\n font-size: 0.5rem;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n width: 100%;\n margin-top: 1rem;\n`;\n","/* eslint-disable react/require-default-props */\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n maxLines?: number;\n children: React.ReactNode;\n}\n\nexport const Truncate: React.FC<IProps> = ({ maxLines = 1, children }) => {\n return <Container maxLines={maxLines}>{children}</Container>;\n};\n\ninterface IContainerProps {\n maxLines: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: -webkit-box;\n max-width: 100%;\n max-height: 100%;\n -webkit-line-clamp: ${props => props.maxLines};\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n","import React, { useState } from 'react';\n\nexport const ZoomableImage: React.FC<{ src: string; alt: string }> = ({\n src,\n alt,\n}) => {\n const [isZoomed, setIsZoomed] = useState(false);\n const [zoomPosition, setZoomPosition] = useState({ x: 50, y: 50 });\n\n const handleMouseMove = (\n e: React.MouseEvent<HTMLImageElement, MouseEvent>\n ) => {\n const {\n left,\n top,\n width,\n height,\n } = e.currentTarget.getBoundingClientRect();\n const x = ((e.clientX - left) / width) * 100;\n const y = ((e.clientY - top) / height) * 100;\n setZoomPosition({ x, y });\n };\n\n const handleTouchMove = (e: React.TouchEvent<HTMLImageElement>) => {\n const {\n left,\n top,\n width,\n height,\n } = e.currentTarget.getBoundingClientRect();\n const touch = e.touches[0];\n const x = ((touch.clientX - left) / width) * 100;\n const y = ((touch.clientY - top) / height) * 100;\n setZoomPosition({ x, y });\n };\n\n const handleZoomToggle = () => {\n setIsZoomed(!isZoomed);\n };\n\n return (\n <img\n src={src}\n alt={alt}\n onMouseMove={handleMouseMove}\n onTouchMove={handleTouchMove}\n onClick={handleZoomToggle} // Toggle zoom on click/tap\n style={{\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n transform: isZoomed ? 'scale(1.5)' : 'scale(1)',\n transformOrigin: `${zoomPosition.x}% ${zoomPosition.y}%`,\n transition: 'transform 0.3s ease',\n cursor: 'pointer', // Indicate interactivity\n }}\n />\n );\n};\n","import React, { useMemo } from 'react';\nimport styled, { CSSProperties } from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { ZoomableImage } from '../Image/ZoomableImage';\nimport { Stepper } from '../Stepper';\nimport { DynamicText } from '../typography/DynamicText';\n\nexport interface ITutorialLesson {\n title: string;\n body?: React.ReactNode | string;\n text?: string;\n image: string;\n imageUrl?: string;\n}\n\nexport interface ITutorialStepperProps {\n lessons: ITutorialLesson[];\n onLessonFinish: () => void;\n imageStyle?: CSSProperties;\n}\n\nexport const TutorialStepper = React.memo(\n ({ lessons, onLessonFinish, imageStyle }: ITutorialStepperProps) => {\n const generateLessons = useMemo(\n () =>\n lessons.map((lesson, index) => ({\n component: (\n <LessonContainer key={index} className=\"lesson-container\">\n <LessonTitle className=\"lesson-title\">{lesson.title}</LessonTitle>\n {lesson.image && (\n <LessonImageWrapper className=\"lesson-image-wrapper\">\n <LessonImage className=\"lesson-image\" style={imageStyle}>\n {lesson.imageUrl ? (\n <a\n href={lesson.imageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <ZoomableImage\n src={lesson.image}\n alt={lesson.title || 'Tutorial image'}\n />\n </a>\n ) : (\n <ZoomableImage\n src={lesson.image}\n alt={lesson.title || 'Tutorial image'}\n />\n )}\n </LessonImage>\n </LessonImageWrapper>\n )}\n <LessonFooter className=\"lesson-footer\">\n {lesson.body && (\n <LessonBody\n className=\"lesson-body\"\n dangerouslySetInnerHTML={{ __html: lesson.body as string }}\n ></LessonBody>\n )}\n {lesson.text && <DynamicText text={lesson.text} />}\n </LessonFooter>\n </LessonContainer>\n ),\n id: index,\n })),\n [lessons, imageStyle]\n );\n\n return (\n <Container>\n <Stepper\n steps={generateLessons}\n finalCTAButton={{\n label: 'Close',\n onClick: onLessonFinish,\n }}\n useSideArrows\n />\n </Container>\n );\n }\n);\n\nconst LessonImageWrapper = styled.div`\n width: 100%;\n max-width: 500px;\n margin: 1rem auto;\n aspect-ratio: auto; /* Allow the image to define its own aspect ratio */\n border-radius: 10px;\n`;\n\nconst LessonBody = styled.div``;\n\nconst Container = styled.div`\n width: 80%;\n max-width: 600px;\n\n @media (max-width: 600px) {\n width: 95%;\n }\n`;\n\nconst LessonFooter = styled.div`\n margin-top: 1rem;\n`;\n\nconst LessonImage = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n\n img {\n width: 100%;\n height: auto;\n object-fit: contain; /* Ensures the entire image is visible */\n border-radius: 10px;\n }\n`;\n\nconst LessonTitle = styled.h1`\n color: ${uiColors.yellow} !important;\n font-size: 0.8rem !important;\n`;\n\nconst LessonContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 200px; /* Match with StepperBody for consistent height */\n\n p {\n // make font size consistent with rest\n font-size: 0.7rem !important;\n }\n`;\n"],"names":["SelectArrow","_ref","direction","_ref$direction","size","_ref$scale","scale","onPointerDown","props","_objectWithoutPropertiesLoose","_excluded","React","LeftArrow","RightArrow","styled","span","withConfig","displayName","componentId","LeftArrowIcon","LeftArrowClickIcon","RightArrowIcon","RightArrowClickIcon","uiColors","lightGray","gray","darkGray","darkYellow","yellow","orange","cardinal","red","darkRed","raisinBlack","navyBlue","purple","darkPurple","blue","darkBlue","brown","lightGreen","brownGreen","white","AsyncDropdown","options","width","onChange","defaultValue","_ref$opensUp","opensUp","dropdownId","uuidv4","_useState","useState","_options$","value","selectedValue","setSelectedValue","_useState2","_options$find","find","option","_options$2","selectedOption","setSelectedOption","_useState3","opened","setOpened","useEffect","_options$find2","length","handleSelection","Container","onMouseLeave","DropdownSelect","id","className","onPointerUp","prev","DropdownDisplay","DropdownLabel","BeatLoader","color","DropdownOptions","map","key","label","div","p","ul","uiFonts","xxsmall","xsmall","small","medium","large","xLarge","xxLarge","xxxLarge","ButtonTypes","Button","disabled","_ref$disabled","children","buttonType","ButtonContainer","button","SpriteFromAtlas","atlasJSON","atlasIMG","spriteKey","_ref$width","GRID_WIDTH","_ref$height","height","GRID_HEIGHT","_ref$imgScale","imgScale","imgStyle","containerStyle","_ref$grayScale","grayScale","_ref$opacity","opacity","imgClassname","centered","borderRadius","spriteData","_atlasJSON$frames","frames","_atlasJSON$frames2","console","error","hasHover","style","ImgSprite","frame","w","h","x","y","ErrorBoundary","_Component","_this","_len","arguments","args","Array","_key","call","apply","concat","state","hasError","_inheritsLoose","getDerivedStateFromError","_","_proto","prototype","componentDidCatch","errorInfo","render","Component","Ellipsis","_ref$maxLines","maxLines","maxWidth","fontSize","center","PropertySelect","availableProperties","currentIndex","setCurrentIndex","propertiesLength","onLeftClick","index","onRightClick","JSON","stringify","getCurrentSelectionName","item","name","TextOverlay","Item","CharacterSelection","availableCharacters","propertySelectValues","textureKey","selectedSpriteKey","setSelectedSpriteKey","onSelectedValueChange","display","alignItems","paddingBottom","left","Chat","chatMessages","onSendChatMessage","onCloseButton","onFocus","onBlur","_ref$styles","styles","textColor","buttonColor","buttonBackgroundColor","isExpanded","message","setMessage","inputRef","useRef","scrollChatToBottom","_inputRef$current","current","focus","scrollingElement","document","querySelector","scrollTop","scrollHeight","handleSubmit","event","preventDefault","trim","truncateName","maxLength","slice","formatMessage","chatMessage","timestamp","dayjs","createdAt","format","truncatedName","emitter","ChatContainer","fallback","CloseButton","onClick","FaTimes","MessagesContainer","Message","_id","Form","onSubmit","TextField","ref","e","target","type","autoComplete","placeholder","SendButton","_ref2","form","input","Input","_extends","_objectDestructuringEmpty","rest","innerRef","RPGUIContainerTypes","RPGUIContainer","Column","flex","flexWrap","justifyContent","ChatDeprecated","getInputValue","onRenderMessageLines","Date","onRenderChatMessages","MessageText","CustomContainer","FramedGrey","CustomInput","RPGUIButton","useChat","minimizedByDefault","isPrivate","onChangeTab","onPreviousChatCharacterClick","hideSearchCharacterUI","unseenMessageCharacterIds","showRecentChats","setShowRecentChats","setIsExpanded","toggleExpand","toggleRecentChats","handleTabChange","tabId","handlePreviousChatCharacterClick","character","hasUnseenMessages","SearchCharacter","onChangeCharacterName","recentCharacters","onCharacterClick","characterName","setCharacterName","searchCharacterRef","timer","setTimeout","clearTimeout","handleCharacterClick","SearchContainer","SearchButton","RxMagnifyingGlass","ListContainer","ListElement","_ref3","li","ChatContent","isTrade","isGlobal","searchCharacterUI","onSendLocalChatMessage","onSendGlobalChatMessage","onSendPrivateChatMessage","onSendTradeMessage","autoCloseOnSend","privateChatCharacters","isGuild","onSendGuildChatMessage","handleSendMessage","ChatWrapper","sendMessage","ChatTabs","tabs","activeTab","TabContainer","tab","Tab","active","ExpandButton","StyledExpandButton","IoMdContract","IoMdExpand","RecentChats","showSearchCharacterUI","recentChatCharacters","recentSelectedChatCharacterId","onRemoveRecentChatCharacter","RecentChatTabContainer","isOpen","RecentChatTopBar","BurgerIconContainer","BurgerLineIcon","RecentChatLogContainer","_unseenMessageCharact","ListElementContainer","StatusDot","isUnseen","includes","RxCross2","ChatRevamp","_ref$activeTab","_ref$minimizedByDefau","chatHook","ChatRevampContainer","TopBar","AllChatsContainer","ExpandedChatContent","ChatContentWrapper","CollapsedChatInput","_ref4","CheckButton","items","generateSelectedValuesList","selectedValues","forEach","setSelectedValues","handleClick","_extends2","element","checked","CheckItem","_ref$defaultValue","setChecked","newCheckedState","readOnly","SingleShortcut","useShortcutCooldown","onShortcutCast","shortcutCooldown","setShortcutCooldown","cooldownTimeout","handleShortcutCast","CircularController","onActionClick","onCancelClick","onShortcutClick","mana","shortcuts","inventory","spellCooldowns","_useShortcutCooldown","onTouchStart","classList","add","onTouchEnd","action","remove","renderShortcut","i","buildClassName","classBase","isOnCooldown","variant","onShortcutClickBinded","_shortcuts$i","ShortcutType","None","bind","isOnShortcutCooldown","_shortcuts$i2","_shortcuts$i3","payload","itemsFromEquipment","Object","keys","slots","parseInt","_inventory$slots$inde","push","totalQty","reduce","acc","stackQty","StyledShortcut","toFixed","getItemTextureKeyPath","texturePath","isStackable","pointerEvents","_shortcuts$i4","spellCooldown","_spellCooldowns$paylo","magicWords","replaceAll","cooldown","CONTAINER_STYLE","IMAGE_SCALE","_payload$manaCost","manaCost","split","word","ButtonsContainer","ShortcutsContainer","from","CancelButton","useLocalStorage","initialValue","window","localStorage","getItem","parse","log","storedValue","setStoredValue","setValue","valueToStore","Function","setItem","useOutsideClick","handleClickOutside","contains","CustomEvent","detail","dispatchEvent","addEventListener","removeEventListener","DraggableContainer","minHeight","minWidth","_ref$type","FramedGold","title","imgSrc","_ref$imgWidth","imgWidth","cancelDrag","onPositionChange","onPositionChangeEnd","onPositionChangeStart","onOutsideClick","_ref$initialPosition","initialPosition","_ref$dragDisabled","dragDisabled","isFullScreen","draggableRef","_e","Draggable","cancel","onDrag","data","onStop","onStart","defaultPosition","TitleContainer","Title","Icon","src","_ref5","css","_ref6","h1","img","_ref7","Dropdown","firstOption","change","filter","o","modalRoot","getElementById","ModalPortal","ReactDOM","createPortal","useTouchTarget","getTouchTarget","useCallback","_touchEvent$changedTo","_touchEvent$touches","touchEvent","touch","changedTouches","touches","elementFromPoint","clientX","clientY","body","rarityColor","rarity","ItemRarities","Uncommon","Rare","Epic","Legendary","gemColors","defaultColor","onRenderGems","gemQty","_item$attachedGems","attachedGems","ItemSlotQty","undefined","itemId","ItemQtyContainer","_item$attachedGems2","gem","Gem","onRenderStackInfo","isFractionalStackQty","isLargerThan999","qtyClassName","ItemQty","Math","round","ItemSlotRenderer","containerType","slotSpriteMask","renderStackInfo","renderGems","renderItem","renderEquipment","itemToRender","_itemToRender$allowed","allowedEquipSlotType","EquipmentSlotSpriteByType","onRenderSlot","ItemContainerType","Equipment","generateContextMenuListOptions","actionsByTypeList","contextMenu","text","ItemSocketEventsDisplayLabels","generateContextMenu","itemContainerType","isDepotSystem","contextActionMenu","Inventory","ItemType","Weapon","Armor","Accessory","Jewelry","ActionsForInventory","Consumable","CraftingResource","Tool","Other","DepotSocketEvents","Deposit","contextActionMenuDontHaveUseWith","toLowerCase","hasUseWith","ItemSocketEvents","UseWith","ActionsForEquipmentSet","Loot","ActionsForLoot","MapContainer","ActionsForMapContainer","Depot","GetItemInfo","Withdraw","initialDetailsState","isTooltipVisible","isTooltipMobileVisible","isContextMenuVisible","contextMenuPosition","contextActions","clearContextActions","clearDetailsState","ItemSlotDetailsContext","createContext","detailsState","updateDetailsState","setContextActions","useItemSlotDetails","useContext","ItemSlotDetailsProvider","setDetailsState","newState","prevState","isContextMenuDisabled","newContextActions","contextValue","useMemo","Provider","initialDraggingState","isDragging","position","dropPosition","isFocused","draggingDistance","ItemSlotDraggingContext","draggingState","updateDraggingState","clearDraggingState","useItemSlotDragging","ItemSlotDraggingProvider","setDraggingState","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","RightHand","ItemSlot","observer","slotIndex","onMouseOver","onMouseOut","_ref$isContextMenuDis","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","dragScale","isSelectingShortcut","setItemShortcut","_useItemSlotDetails","dragContainer","_useItemSlotDragging","resetItem","onSuccessfulDrag","quantity","refreshContextActions","onDraggableStop","requestAnimationFrame","isMobile","handleShortcutSetter","removeDraggingClass","shouldHandleDraggedItemResult","shouldHandleDraggedItem","handleDraggedItem","handleContextMenuOrTooltip","isNaN","targetClasses","isOutsideDrop","some","elm","targetElement","_getElementTransform","getElementTransform","processDragEnd","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","isTouchEvent","shouldShowMobileTooltip","shouldToggleContextMenu","mouseEvent","onDraggableStart","onDraggableProgress","_data","isDraggingItem","onMouseUp","_e$changedTouches$","simulatedEvent","MouseEvent","bubbles","_document$elementFrom","subType","ItemSubType","Seed","axis","defaultClassName","bounds","ItemContainer","onMouseEnter","statisticsToDisplay","higherIsWorse","ItemInfo","itemToCompare","renderStatistics","statistics","_i","_statisticsToDisplay","stat","itemStatistic","_itemToCompare$stat$k","_itemToCompare$stat$k2","toUpperCase","isItemToCompare","isOnlyInOneItem","statDiff","toString","isDifference","isBetter","Statistic","renderMissingStatistic","_i2","_statisticsToDisplay2","itemToCompareStatistic","renderEntityEffects","entityEffects","entityEffectChance","effect","renderAvaibleSlots","slotType","skillName","_item$minRequirements","minRequirements","_item$minRequirements2","skill","Header","Rarity","Type","AllowedSlots","LevelRequirement","_item$minRequirements3","level","charAt","_item$minRequirements4","_item$minRequirements5","usableEffectDescription","equippedBuffDescription","isTwoHanded","Description","description","maxStackSize","StackInfo","_item$stackQty","MissingStatistics","_rarityColor","$isSpecial","itemSlotTypes","getSlotType","ItemInfoDisplay","equipmentSet","_item$allowedEquipSlo","allowedSlotTypeCamelCase","camelCase","itemSubTypeCamelCase","itemSubTypeFromEquipment","values","_item$subType","itemFromEquipment","Flex","CompareContainer","Equipped","$isMobile","offset","ItemTooltip","handleMouseMove","rect","getBoundingClientRect","tooltipWidth","tooltipHeight","isOffScreenRight","innerWidth","isOffScreenBottom","innerHeight","MobileItemTooltip","closeTooltip","onSelected","handleFadeOut","_ref$current","OptionsContainer","Option","ItemInfoWrapper","setIsTooltipVisible","setIsTooltipMobileVisible","countItemFromInventory","itemKey","itemsFromInventory","modifyString","str","parts","fileName","replace","words","firstWord","modifiedWords","join","TooltipContainer","MinCraftingRequirementsText","levelIsOk","IngredientsTitle","Recipe","Ingredient","isQuantityOk","CraftingTooltip","recipe","skills","levelInSkill","_skills$level","_skills","_recipe$minCraftingRe","_recipe$minCraftingRe2","minCraftingRequirements","_recipe$levelIsOk","_recipe$minCraftingRe3","_recipe$minCraftingRe4","_recipe$minCraftingRe5","_recipe$minCraftingRe6","ingredients","ingredient","itemQtyInInventory","qty","RadioOptionsWrapper","SpriteAtlasWrapper","MainContent","ItemHeader","CraftingRecipe","handleRecipeSelect","selectedCraftItemKey","showTooltip","setShowTooltip","tooltipPosition","setTooltipPosition","wrapperRef","isSelected","right","top","canCraft","calculateMaxCraftable","maxPossible","inventoryItem","possibleWithThisIngredient","floor","_inventoryItem$stackQ","min","desktop","mobileLanscape","mobilePortrait","ITEMS_PER_PAGE","CraftBook","onClose","onSelect","onCraftItem","craftablesItems","savedSelectedType","craftItemKey","setCraftItemKey","selectedType","setSelectedType","setSize","_useState4","searchTerm","setSearchTerm","_useState5","isSearchVisible","setIsSearchVisible","_useState6","isCraftingDisabled","setIsCraftingDisabled","_useLocalStorage","pinnedItems","setPinnedItems","_useState7","currentPage","setCurrentPage","_useState8","setItems","handleResize","togglePinItem","categoryOptions","sort","a","b","localeCompare","filteredCraftableItems","matchesSearch","matchesCategory","sortedItems","aIsPinned","bIsPinned","totalPages","ceil","paginatedItems","Framed","Wrapper","HeaderContainer","HeaderControls","DropdownWrapper","FaSearch","autoFocus","ContentContainer","RadioInputScroller","CraftingRecipeWrapper","PinButton","stopPropagation","isPinned","FaThumbtack","PaginationContainer","PaginationButton","max","FaChevronLeft","PageInfo","FaChevronRight","Footer","selectedItem","maxCraftable","DropdownSelectorContainer","details","Details","useCursorPosition","setPosition","scalePosition","setFromEvent","scaledPosition","cleanup","handleEvent","CONTAINER_SIZE","OFFSET","DraggedItem","_useCursorPosition","centeredX","centeredY","stackInfo","_item$_id","SpriteContainer","pulse","attrs","RelativeListMenu","_ref$fontSize","pos","overflow","params","ItemSlotToolTips","optionId","EquipmentSet","onItemClick","onItemDragEnd","onItemDragStart","onItemPlaceDrop","onItemOutsideDrop","neck","leftHand","ring","head","armor","legs","boot","rightHand","accessory","equipmentData","equipmentMaskSlots","ItemSlotType","onRenderEquipmentSlotRange","start","end","equipmentRange","slotMaksRange","itemContainer","itemType","ContainerType","EquipmentSetContainer","EquipmentColumn","Table","table","TableRow","tr","TableHeader","th","TableCell","td","ActionButtons","UserActionLink","SearchFriend","searchedCharacters","friendRequests","onSearch","onSendFriendRequest","onAcceptRequest","onRejectRequest","debouncedSearch","debounce","handleInputChange","searchTabContent","SearchForm","SearchInput","CharacterList","characters","onAction","actionLabel","requestsTabContent","FriendRequestSection","onAccept","onReject","content","InternalTabs","activeTextColor","inactiveColor","borderColor","ListItem","CharacterName","AcceptRejectActions","FriendList","friends","onRemoveFriend","onOpenPrivateMessage","onAddFriend","onBackFriendList","isAddFriendUI","setIsAddFriendUI","ListWrapper","ScrollableArea","friend","IsOnlineBadge","isOnline","$isOnline","IS_MOBILE_OR_TABLET","isMobileOrTablet","chunkString","match","RegExp","DynamicText","onFinish","textState","setTextState","interval","setInterval","substring","clearInterval","TextContainer","NPCDialogText","onEndStep","onStartStep","windowSize","maxCharacters","charactersPerLine","linesPerDiv","textChunks","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","hasNextChunk","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","NPCDialogType","TextOnly","pressButtonGif","pressSpaceGif","useEventListener","handler","el","savedHandler","listener","QuestionDialog","questions","answers","currentQuestion","setCurrentQuestion","canShowAnswers","setCanShowAnswers","onGetFirstAnswer","answerIds","firstAnswerId","answer","currentAnswer","setCurrentAnswer","onGetAnswers","answerId","onKeyPress","nextAnswerIndex","findIndex","nextAnswerID","nextAnswer","previousAnswerIndex","previousAnswerID","previousAnswer","pop","nextQuestionId","question","onAnswerClick","onRenderCurrentAnswers","selectedColor","AnswerRow","AnswerSelectedIcon","Answer","QuestionContainer","AnswersContainer","NPCDialog","imagePath","_ref$isQuestionDialog","isQuestionDialog","TextAndThumbnail","ThumbnailContainer","NPCThumbnail","aliceDefaultThumbnail","CloseIcon","ImgSide","NPCMultiDialog","textAndTypeArray","slide","setSlide","_textAndTypeArray$sli","imageSide","HistoryDialog","backgroundImgPath","fullCoverBackground","setImage","BackgroundContainer","imgPath","fullImg","DialogContainer","ImageCarousel","textImage","isTextFixed","textImageSelected","setTextImageSelected","goToPreviousImage","indexOf","goToNextImage","CarouselWrapper","BackgroundImage","image","ArrowContainer","textPosition","_textImageSelected$te","_textImageSelected$te2","SimpleImageCarousel","images","_ref$autoCycle","autoCycle","_ref$autoCycleDelay","autoCycleDelay","_ref$stopAutoCyclingO","stopAutoCyclingOnInteraction","currentImage","setCurrentImage","autoCycleId","handleLeftClick","prevImage","handleRightClick","hasMoreThanOneImage","ImageContainer","CustomLeftArrow","CustomRightArrow","Carousel","FadeInCarouselImg","alt","CarouselImg","fadeIn","keyframes","_ref$activeColor","activeColor","_ref$activeTextColor","_ref$inactiveColor","_ref$borderColor","_ref$hoverColor","hoverColor","setActiveTab","TableWrapper","TabHeader","TabButton","ContentWrapper","_tabs$find","SlotsContainer","useScrollOnDrag","containerRef","threshold","scrollStep","animationFrameId","startScrolling","scroll","_containerRef$current","bottom","maxScrollTop","clientHeight","distanceFromTop","distanceFromBottom","stopScrolling","cancelAnimationFrame","ShortcutsSetter","setSettingShortcutIndex","settingShortcutIndex","removeShortcut","getContent","_shortcuts$index","_shortcuts$index2","IMAGE_SIZE","shortcut","Spell","_payload$texturePath","List","Shortcut","isBeingSet","RangeSliderType","RangeSlider","memo","valueMin","valueMax","_ref$step","step","sliderId","setLeft","calculatedWidth","clientWidth","typeClass","GoldSlider","handleChange","Number","QuantitySelector","maxQuantity","initialQuantity","_ref$title","onConfirm","closeSelector","select","StyledContainer","StyledForm","numberValue","noValidate","StyledInput","Slider","validateQuantitySelect","quantitySelect","QuantitySelectorModal","setQuantitySelect","resetQuantitySelect","callback","validatedQuantitySelect","QuantitySelectorContainer","ItemQuantitySelectorModal","MIN_SLOTS_FOR_SCROLL","_ref$disableContextMe","disableContextMenu","_quantity","_useScrollOnDrag","handleSetShortcut","onDragStartScrollingEvents","once","onDragEndScrollingEvents","onDragStartHandler","onDragEndHandler","memoizedHandleSetShortcut","onRenderSlots","slotQty","_itemContainer$slots","currentItem","ItemsContainer","isScrollable","ItemSelector","elementValue","Subtitle","imageKey","ButtonWrapper","LeaderboardTable","rankType","isTopSkillEntry","entry","TableRowWrapper","TableRowValue","Leaderboard","onChangeRankType","onChangeClassType","skillOptions","onChangeSkillType","classOptions","rankOptions","itemsContainer","_itemsContainer$curre","scrollTo","rankTypeOptions","skillTypeOptions","classTypeOptions","WrapperContainer","StyledDropdown","ItemComponentScrollWrapper","ListMenu","Pager","totalItems","itemsPerPage","onPageChange","PagerContainer","ConfirmModal","Background","ButtonsWrapper","MarketplaceRows","itemPrice","onMarketPlaceItemBuy","onMarketPlaceItemRemove","MarketplaceWrapper","ItemIconContainer","GemContainer","RarityContainer","QuantityContainer","PriceValue","GoldContainer","OrderByType","itemTypeOptions","itemRarityOptions","itemRarity","orderByOptions","flatMap","orderBy","BuyPanel","onChangeType","onChangeRarity","onChangeOrder","onChangeNameInput","onChangeMainLevelInput","onChangeSecondaryLevelInput","onChangePriceInput","characterId","enableHotkeys","disableHotkeys","setName","mainLevel","setMainLevel","secondaryLevel","setSecondaryLevel","price","setPrice","buyingItemId","setBuyingItemId","InputWrapper","OptionsWrapper","FilterInputsWrapper","AiFillCaretRight","owner","ManagmentPanel","availableGold","selectedItemToSell","onSelectedItemToSellRemove","onAddItemToMarketplace","onMoneyWithdraw","isCreatingOffer","setIsCreatingOffer","removingItemId","setRemovingItemId","InnerOptionsWrapper","SellDescription","__","PriceInputWrapper","AvailableGold","$disabled","Marketplace","onYourPanelToggle","isYourPanel","setIsYourPanel","TabBody","centerContent","_props$styles","_props$styles2","CustomTab","MultitabType","TabsContainer","Brown","_ref$isDraggableModal","isDraggableModal","selectedTab","setSelectedTab","onRenderTabs","onGetContainerType","Gray","TabsCore","BodyContainer","NonDraggableWrapper","PartyCreate","onCreate","close","PartyRow","charName","charClass","charLevel","playerQty","isInvited","partyName","PartyWrapper","PartyDashboard","partyRows","RowsWrapper","PlayersRow","isNotInvited","PartyInvite","playersRows","HighlightedText","Text","PartyManagerRow","isLeader","leaderId","userId","onRemovePlayer","onChangeLeader","isCurrentUser","canRemove","PartyManager","invitationActionText","sortedMembers","leader","members","partyRow","NotInParty","YellowText","mockedPartyRows","mockedPlayersRows2","CharacterClass","Druid","maxSize","mockedPlayersRows","mockedPartyManager","getMockedPlayersRowsLeader","Warrior","Sorcerer","Rogue","getMockedPlayersRowsNotLeader","ProgressBar","_ref$displayText","displayText","_ref$percentageWidth","percentageWidth","_ref$minWidth","mobileScale","calculatePercentageValue","ProgressBarText","QuestInfo","quests","buttons","onChangeQuest","questsLength","QuestDraggableContainer","QuestsContainer","QuestContainer","Thumbnail","thumbnail","thumbnailDefault","QuestSplitDiv","Content","QuestColumn","npcId","QuestList","QuestListContainer","container","quest","_formatQuestStatus","QuestCard","card","QuestItem","Label","Value","formatQuestText","getQuestStatusColor","status","formatQuestStatus","NoQuestContainer","QuestStatus","Pending","InProgress","Completed","c","InputRadio","RPGUIScrollbar","RPGUIOverrides","_RPGUI","RPGUI","RPGUIRoot","Shortcuts","_ref$isBlockedCasting","isBlockedCastingByKeyboard","shortcutsRefs","handleKeyDown","shortcutIndex","_shortcutsRefs$curren","timeoutId","_shortcutsRefs$curren2","timeoutIds","SimpleProgressBar","_ref$bgColor","bgColor","_ref$margin","margin","ProgressBarContainer","BackgroundBar","Progress","Tooltip","SkillProgressBar","currentSkillPoints","skillPoints","skillPointsToNextLevel","_ref$showSkillPoints","showSkillPoints","buffAndDebuff","baseSkillPoints","getSPForLevel","calculateProgress","totalPointsForLevelUp","excessSkillPoints","progress","formatBuffAndDebuff","skillsBuffsCalc","result","ProgressTitle","BuffAndDebuffContainer","TitleNameContainer","TitleNameBuff","TitleNameBuffContainer","TitleNameDebuff","TitleName","ValueDisplay","ProgressBody","ProgressIconContainer","ProgressBarWrapper","SkillDisplayContainer","SkillPointsDisplay","skillProps","attributes","stamina","magic","magicResistance","strength","resistance","dexterity","combat","first","club","sword","axe","distance","shielding","dagger","crafting","fishing","farming","mining","lumberjacking","blacksmithing","cooking","alchemy","skillNameMap","SkillsContainer","onRenderSkillCategory","category","skillCategory","skillCategoryColor","output","_Object$entries","entries","_Object$entries$_i","skillDetails","SkillsDraggableContainer","SkillsContainerDiv","SkillSplitDiv","experience","getXPForLevel","formatSpellCastingType","castingType","formattedCastingType","SpellInfo","spell","requiredItem","maxDistanceGrid","SpellInfoDisplay","MobileSpellTooltip","MagicTooltip","SpellInfoWrapper","_ref$holdTouchDuratio","holdTouchDuration","touchTimeoutRef","handleTouchStart","handleTouchEnd","spellKey","charMana","charMagicLevel","isSettingShortcut","activeCooldown","minMagicLevelRequired","Overlay","SpellImage","_spell$texturePath","Info","Divider","Cost","Spellbook","onInputFocus","onInputBlur","spells","magicLevel","onSpellClick","setSpellShortcut","iconAtlasIMG","iconAtlasJSON","search","setSearch","spellsToDisplay","toLocaleLowerCase","setShortcut","SpellList","Fragment","Stepper","steps","finalCTAButton","onError","_ref$useSideArrows","useSideArrows","currentStep","setCurrentStep","currentComponent","_steps$currentStep","component","totalSteps","onStepChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_steps$currentStep2","isValid","wrap","_callee$","_context","next","validate","sent","errorMessage","abrupt","t0","stop","_x","renderArrows","leftArrow","rightArrow","StepperContainer","StepperTop","ProgressIndicator","isActive","stepperProgressColor","StepperBodyContainer","StepperBody","StepperFooter","TextArea","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","_periodOfDaySrcFiles","PeriodOfDay","Morning","MorningGif","Afternoon","AfternoonGif","Night","NightGif","GifContainer","TimeWidget","TimeClock","WidgetContainer","DayNightContainer","Time","ClockWidgetImg","PremiumLabel","accountType","UserAccountTypes","Free","getBackgroundColor","PremiumBronze","PremiumSilver","PremiumGold","PremiumUltimate","getShortLabel","StyledLabel","backgroundColor","outerQty","TradingItemRow","onQuantityChange","traderItem","selectedQty","isBuy","inputQty","setInputQty","handleQuantityChange","newQty","_traderItem$stackQty","handleBlur","_traderItem$stackQty2","renderAccountTypeIndicator","canBePurchasedOnlyByPremiumPlans","ItemWrapper","ItemNameContainer","NameValue","capitalize","StyledArrow","QuantityInput","useTradingGold","characterAvailableGold","traderItems","sum","setSum","Map","qtyMap","setQtyMap","hasGoldForSale","getFinalGold","getTradeItems","get","updateQuantity","set","newSum","TradingMenu","_useTradingGold","ScrollWrapper","tradeItem","_qtyMap$get","InfoSection","GoldInfo","AlertText","Truncate","ZoomableImage","isZoomed","setIsZoomed","zoomPosition","setZoomPosition","_e$currentTarget$getB","currentTarget","handleTouchMove","_e$currentTarget$getB2","handleZoomToggle","onMouseMove","onTouchMove","objectFit","transformOrigin","transition","cursor","TutorialStepper","lessons","onLessonFinish","imageStyle","generateLessons","lesson","LessonContainer","LessonTitle","LessonImageWrapper","LessonImage","imageUrl","href","rel","LessonFooter","LessonBody","dangerouslySetInnerHTML","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,I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D,WAAW,gBAAGruD,MAAM,CAAC6e,EAAE,CAAA3e,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,2DAClBK,QAAQ,CAACK,MAAM,CAEzB;AAED,IAAMstD,eAAe,gBAAGpuD,MAAM,CAACyE,GAAG,CAAAvE,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yHAUjC;;;;"}
1
+ {"version":3,"file":"long-bow.esm.js","sources":["../src/components/Arrow/SelectArrow.tsx","../src/constants/uiColors.ts","../src/components/AsyncDropdown.tsx","../src/constants/uiFonts.ts","../src/components/Button.tsx","../src/components/shared/SpriteFromAtlas.tsx","../src/components/Item/Inventory/ErrorBoundary.tsx","../src/components/shared/Ellipsis.tsx","../src/components/PropertySelect/PropertySelect.tsx","../src/components/Character/CharacterSelection.tsx","../src/components/Chat/Chat.tsx","../src/components/Input.tsx","../src/components/RPGUI/RPGUIContainer.tsx","../src/components/shared/Column.tsx","../src/components/Chatdeprecated/ChatDeprecated.tsx","../src/hooks/useChat.ts","../src/components/ChatRevamp/SearchCharacter.tsx","../src/components/ChatRevamp/ChatContent.tsx","../src/components/ChatRevamp/ChatTabs.tsx","../src/components/ChatRevamp/ExpandButton.tsx","../src/components/ChatRevamp/RecentChats.tsx","../src/components/ChatRevamp/ChatRevamp.tsx","../src/components/CheckButton.tsx","../src/components/CheckItem.tsx","../src/components/Shortcuts/SingleShortcut.ts","../src/components/Shortcuts/useShortcutCooldown.ts","../src/components/CircularController/CircularController.tsx","../src/hooks/useLocalStorage.ts","../src/hooks/useOutsideAlerter.ts","../src/components/DraggableContainer.tsx","../src/components/Dropdown.tsx","../src/components/Abstractions/ModalPortal.tsx","../src/hooks/useTouchTarget.ts","../src/components/Item/Inventory/ItemSlotRarity.ts","../src/components/Item/Inventory/ItemGem.tsx","../src/components/Item/Inventory/ItemSlotQty/ItemSlotQty.tsx","../src/components/Item/Inventory/ItemSlotRenderer.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../src/components/Item/Inventory/context/ItemSlotDetailsContext.tsx","../src/components/Item/Inventory/context/ItemSlotDraggingContext.tsx","../src/components/Item/Inventory/ItemSlot.tsx","../src/components/Item/Cards/ItemInfo.tsx","../src/components/Item/Cards/ItemInfoDisplay.tsx","../src/components/Item/Cards/ItemTooltip.tsx","../src/components/Item/Cards/MobileItemTooltip.tsx","../src/components/Item/Cards/ItemInfoWrapper.tsx","../src/libs/itemCounter.ts","../src/components/CraftBook/utils/modifyString.ts","../src/components/CraftBook/CraftingTooltip.tsx","../src/components/CraftBook/CraftingRecipe.tsx","../src/components/CraftBook/utils/calculateMaxCraftable.ts","../src/components/CraftBook/CraftBook.tsx","../src/components/DropdownSelectorContainer.tsx","../src/hooks/useCursorPosition.ts","../src/components/Item/Inventory/DraggedItem.tsx","../src/components/RelativeListMenu.tsx","../src/components/Item/Inventory/ItemSlotTooltips.tsx","../src/components/Equipment/EquipmentSet.tsx","../src/components/Table/Table.tsx","../src/components/Friends/SearchFriend.tsx","../src/components/Friends/FriendList.tsx","../src/constants/uiDevices.ts","../src/libs/StringHelpers.ts","../src/components/typography/DynamicText.tsx","../src/components/NPCDialog/NPCDialogText.tsx","../src/hooks/useEventListener.ts","../src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx","../src/components/NPCDialog/NPCDialog.tsx","../src/components/NPCDialog/NPCMultiDialog.tsx","../src/components/HistoryDialog.tsx","../src/components/ImageCarousel/ImageCarousel.tsx","../src/components/ImageCarousel/SimpleImageCarousel.tsx","../src/components/InternalTabs/InternalTabs.tsx","../src/components/Abstractions/SlotsContainer.tsx","../src/hooks/useScrollOnDrag.ts","../src/components/Shortcuts/ShortcutsSetter.tsx","../src/components/RangeSlider.tsx","../src/components/QuantitySelector/QuantitySelector.tsx","../src/components/QuantitySelector/QuantitySelectorModal.tsx","../src/components/Item/Inventory/ItemQuantitySelectorModal.tsx","../src/components/Item/Inventory/ItemContainer.tsx","../src/components/itemSelector/ItemSelector.tsx","../src/components/Leaderboard/LeaderboardTable.tsx","../src/components/Leaderboard/Leaderboard.tsx","../src/components/ListMenu.tsx","../src/components/Pager.tsx","../src/components/ConfirmModal.tsx","../src/components/Marketplace/MarketplaceRows.tsx","../src/components/Marketplace/filters/index.tsx","../src/components/Marketplace/BuyPanel.tsx","../src/components/Marketplace/ManagmentPanel.tsx","../src/components/Marketplace/Marketplace.tsx","../src/components/Multitab/TabBody.tsx","../src/components/Multitab/Tab.tsx","../src/components/Multitab/TabsContainer.tsx","../src/components/PartySystem/PartyCreate/PartyCreate.tsx","../src/components/PartySystem/PartyDashboard/PartyRows.tsx","../src/components/PartySystem/PartyDashboard/PartyDashboard.tsx","../src/components/PartySystem/PartyInvite/PlayersRows.tsx","../src/components/PartySystem/PartyInvite/PartyInvite.tsx","../src/components/Text/HighlightedText.tsx","../src/components/PartySystem/PartyManager/PartyManagerRows.tsx","../src/components/PartySystem/PartyManager/PartyManager.tsx","../src/components/PartySystem/mockedConstantes/mockedValues.tsx","../src/components/ProgressBar.tsx","../src/components/Quests/QuestInfo/QuestInfo.tsx","../src/components/Quests/QuestList.tsx","../src/components/RadioButton.tsx","../src/components/RPGUI/RPGUIScrollbar.tsx","../src/components/RPGUI/RPGUIOverrides.tsx","../src/components/RPGUI/RPGUIRoot.tsx","../src/components/Shortcuts/Shortcuts.tsx","../src/components/SimpleProgressBar.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/SkillProgressBar.tsx","../src/components/SkillsContainer.tsx","../src/libs/CastingTypeHelper.ts","../src/components/Spellbook/cards/SpellInfo.tsx","../src/components/Spellbook/cards/SpellInfoDisplay.tsx","../src/components/Spellbook/cards/MobileSpellTooltip.tsx","../src/components/Spellbook/cards/SpellTooltip.tsx","../src/components/Spellbook/cards/SpellInfoWrapper.tsx","../src/components/Spellbook/Spell.tsx","../src/components/Spellbook/Spellbook.tsx","../src/components/Stepper.tsx","../src/components/TextArea.tsx","../src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx","../src/components/TimeWidget/TimeWidget.tsx","../src/components/TradingMenu/PremiumLabel.tsx","../src/components/TradingMenu/TradingItemRow.tsx","../src/components/TradingMenu/useTradingGold.ts","../src/components/TradingMenu/TradingMenu.tsx","../src/components/Truncate.tsx","../src/components/Image/ZoomableImage.tsx","../src/components/Tutorial/TutorialStepper.tsx"],"sourcesContent":["import React from 'react';\nimport styled from 'styled-components';\nimport LeftArrowClickIcon from './img/arrow01-left-clicked.png';\nimport LeftArrowIcon from './img/arrow01-left.png';\nimport RightArrowClickIcon from './img/arrow01-right-clicked.png';\nimport RightArrowIcon from './img/arrow01-right.png';\n\nexport interface ArrowBarProps extends React.HTMLAttributes<HTMLDivElement> {\n direction: 'right' | 'left';\n onPointerDown: () => void;\n size?: number;\n scale?: number;\n}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n scale = 1,\n onPointerDown,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow\n size={size}\n scale={scale}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n scale={scale}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></RightArrow>\n )}\n </>\n );\n};\n\ninterface IArrowProps {\n size?: number;\n scale?: number;\n}\n\nconst LeftArrow = styled.span<IArrowProps>`\n background-image: url(${LeftArrowIcon});\n background-size: 100% 100%;\n left: 0;\n position: absolute;\n width: ${props => props.size || 40}px;\n height: ${props => props.size || 42}px;\n transform: scale(${props => props.scale || 1});\n :active {\n background-image: url(${LeftArrowClickIcon});\n }\n z-index: 2;\n`;\n\nconst RightArrow = styled.span<IArrowProps>`\n background-image: url(${RightArrowIcon});\n right: 0;\n position: absolute;\n width: ${props => props.size || 40}px;\n height: ${props => props.size || 42}px;\n background-size: 100% 100%;\n transform: scale(${props => props.scale || 1});\n :active {\n background-image: url(${RightArrowClickIcon});\n }\n z-index: 2;\n`;\n\nexport default SelectArrow;\n","export const uiColors = {\n lightGray: '#888',\n gray: '#4E4A4E',\n darkGray: '#3e3e3e',\n darkYellow: '#FFC857',\n yellow: '#FFFF00',\n orange: '#D27D2C',\n cardinal: '#C5283D',\n red: '#D04648',\n darkRed: '#442434',\n raisinBlack: '#191923',\n navyBlue: '#0E79B2',\n purple: '#6833A3',\n darkPurple: '#522761',\n blue: '#597DCE',\n darkBlue: '#30346D',\n brown: '#854C30',\n lightGreen: '#66cd1c',\n brownGreen: '#346524',\n white: '#fff'\n};\n","import React, { useEffect, useState } from 'react';\nimport { BeatLoader } from 'react-spinners';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\nimport { uiColors } from '../constants/uiColors';\n\nexport interface IAsyncDropdownOptionsProps {\n id: number;\n value: string;\n option: string | JSX.Element;\n}\n\nexport interface IAsyncDropdownProps {\n options: IAsyncDropdownOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n defaultValue?: string;\n opensUp?: boolean;\n}\n\nexport const AsyncDropdown: React.FC<IAsyncDropdownProps> = ({\n options,\n width,\n onChange,\n defaultValue,\n opensUp = false,\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>(\n defaultValue || options?.[0]?.value\n );\n const [selectedOption, setSelectedOption] = useState<string | JSX.Element>(\n options?.find(option => option.value === defaultValue)?.option ||\n options?.[0]?.option\n );\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n if (defaultValue) {\n setSelectedValue(defaultValue);\n setSelectedOption(\n //@ts-ignore\n options?.find(option => option.value === defaultValue)?.option\n );\n } else if (options?.length > 0) {\n setSelectedValue(options[0].value);\n setSelectedOption(options[0].option);\n }\n }, [options, defaultValue]);\n\n const handleSelection = (value: string, option: string | JSX.Element) => {\n if (value !== selectedValue) {\n setSelectedValue(value);\n setSelectedOption(option);\n onChange(value);\n }\n };\n\n return (\n <Container onMouseLeave={() => setOpened(false)} width={width}>\n <DropdownSelect\n id={`dropdown-${dropdownId}`}\n className=\"rpgui-dropdown-imp rpgui-dropdown-imp-header\"\n onPointerUp={() => setOpened(prev => !prev)}\n >\n <DropdownDisplay>\n <DropdownLabel>▼</DropdownLabel> {selectedOption}\n {!options.length && <BeatLoader size={4} color={uiColors.white} />}\n </DropdownDisplay>\n </DropdownSelect>\n\n <DropdownOptions\n className=\"rpgui-dropdown-imp\"\n opened={opened}\n opensUp={opensUp}\n >\n {options?.map(option => (\n <li\n key={option.id}\n onPointerUp={() => {\n handleSelection(option.value, option.option);\n setOpened(false);\n }}\n >\n {option.option}\n </li>\n ))}\n </DropdownOptions>\n </Container>\n );\n};\n\nconst DropdownDisplay = styled.span`\n display: flex;\n flex-wrap: wrap;\n justify-content: start;\n align-items: center;\n`;\n\nconst DropdownLabel = styled.label`\n margin-right: 0.5rem;\n`;\n\nconst Container = styled.div<{ width: string | undefined }>`\n position: relative;\n width: ${props => props.width || '100%'};\n`;\n\nconst DropdownSelect = styled.p`\n width: 100%;\n box-sizing: border-box;\n\n label {\n display: inline-block;\n transform: translateY(-2px);\n }\n`;\n\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n opensUp: boolean;\n}>`\n position: absolute;\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n bottom: ${props => (props.opensUp ? '100%' : 'auto')};\n top: ${props => (props.opensUp ? 'auto' : '100%')};\n margin: 0;\n padding: 0;\n\n @media (max-width: 768px) {\n padding: 8px 0;\n }\n`;\n","export const uiFonts = {\n size: {\n xxsmall: '8px',\n xsmall: '9px',\n small: '12px',\n medium: '14px',\n large: '16px',\n xLarge: '18px',\n xxLarge: '20px',\n xxxLarge: '24px',\n },\n};\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\nexport enum ButtonTypes {\n RPGUIButton = 'rpgui-button',\n RPGUIGoldButton = 'rpgui-button golden',\n}\n\nexport interface IButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n disabled?: boolean;\n children: React.ReactNode;\n buttonType: ButtonTypes;\n onPointerDown?: (e: any) => void;\n}\n\nexport const Button = ({\n disabled = false,\n children,\n buttonType,\n onPointerDown,\n ...props\n}: IButtonProps) => {\n return (\n <ButtonContainer\n className={`${buttonType}`}\n disabled={disabled}\n {...props}\n onPointerDown={onPointerDown}\n >\n <p>{children}</p>\n </ButtonContainer>\n );\n};\n\nconst ButtonContainer = styled.button`\n height: 45px;\n font-size: ${uiFonts.size.small};\n`;\n","import { GRID_HEIGHT, GRID_WIDTH } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n atlasJSON: any;\n atlasIMG: any;\n spriteKey: string;\n width?: number;\n height?: number;\n grayScale?: boolean;\n opacity?: number;\n onPointerDown?: () => void;\n containerStyle?: any;\n imgStyle?: any;\n imgScale?: number;\n imgClassname?: string;\n centered?: boolean;\n borderRadius?: string;\n}\n\nexport const SpriteFromAtlas: React.FC<IProps> = ({\n atlasJSON,\n atlasIMG,\n spriteKey,\n width = GRID_WIDTH,\n height = GRID_HEIGHT,\n imgScale = 2,\n imgStyle,\n onPointerDown,\n containerStyle,\n grayScale = false,\n opacity = 1,\n imgClassname,\n centered,\n borderRadius,\n}) => {\n //! If an item is not showing, remember that you MUST run yarn atlas:copy everytime you add a new item to the atlas (it will sync our public folder atlas with src/atlas).\n //!Due to React's limitations, we cannot import it from the public folder directly!\n\n const spriteData =\n atlasJSON?.frames?.[spriteKey] ||\n atlasJSON?.frames?.['others/no-image.png'];\n\n if (!spriteData) {\n console.error(\n `SpriteFromAtlas: Could not find sprite with key ${spriteKey} in atlasJSON.`\n );\n return null;\n }\n\n return (\n <Container\n width={width}\n height={height}\n hasHover={grayScale}\n onPointerDown={onPointerDown}\n style={containerStyle}\n >\n <ImgSprite\n className={`sprite-from-atlas-img ${imgClassname || ''}`}\n atlasIMG={atlasIMG}\n frame={spriteData.frame}\n scale={imgScale}\n grayScale={grayScale}\n opacity={opacity}\n style={imgStyle}\n centered={centered}\n borderRadius={borderRadius}\n />\n </Container>\n );\n};\n\ninterface IImgSpriteProps {\n atlasIMG: any;\n frame: {\n x: number;\n y: number;\n w: number;\n h: number;\n };\n scale: number;\n grayScale: boolean;\n opacity: number;\n centered?: boolean;\n borderRadius?: string;\n}\n\ninterface IContainerProps {\n width: number;\n height: number;\n hasHover: boolean;\n}\n\nconst Container = styled.div`\n width: ${(props: IContainerProps) => props.width}px;\n height: ${(props: IContainerProps) => props.height}px;\n ${(props: IContainerProps) =>\n !props.hasHover\n ? `&:hover {\n filter: sepia(100%) saturate(300%) brightness(70%) hue-rotate(180deg);\n }`\n : ``}\n`;\n\nconst ImgSprite = styled.div<IImgSpriteProps>`\n width: ${props => props.frame.w}px;\n height: ${props => props.frame.h}px;\n background-image: url(${props => props.atlasIMG});\n background-position: -${props => props.frame.x}px -${props => props.frame.y}px;\n transform: scale(${props => props.scale});\n position: relative;\n top: ${props => (props.centered ? '0' : '8px')};\n left: ${props => (props.centered ? '0' : '8px')};\n filter: ${props => (props.grayScale ? 'grayscale(100%)' : 'none')};\n opacity: ${props => props.opacity};\n border-radius: ${props => (props.borderRadius ? props.borderRadius : '0')};\n`;\n","import React, { Component, ErrorInfo, ReactNode } from 'react';\nimport atlasJSON from '../../../mocks/atlas/items/items.json';\nimport atlasIMG from '../../../mocks/atlas/items/items.png';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\n\ninterface Props {\n children?: ReactNode;\n}\n\ninterface State {\n hasError: boolean;\n}\n\nexport class ErrorBoundary extends Component<Props, State> {\n public state: State = {\n hasError: false,\n };\n\n public static getDerivedStateFromError(_: Error): State {\n // Update state so the next render will show the fallback UI.\n return { hasError: true };\n }\n\n public componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error('Uncaught error:', error, errorInfo);\n }\n\n public render() {\n if (this.state.hasError) {\n return (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={'others/no-image.png'}\n imgScale={3}\n />\n );\n }\n\n return this.props.children;\n }\n}\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n children: React.ReactNode;\n maxLines?: 1 | 2 | 3;\n maxWidth: string;\n fontSize?: string;\n center?: boolean;\n}\n\nexport const Ellipsis = ({\n children,\n maxLines = 1,\n maxWidth,\n fontSize,\n center,\n}: IProps) => {\n return (\n <Container maxWidth={maxWidth} fontSize={fontSize} center={center}>\n <span className={`ellipsis-${maxLines}-lines`}>{children}</span>\n </Container>\n );\n};\n\ninterface IContainerProps {\n maxWidth?: string;\n fontSize?: string;\n center?: boolean;\n}\n\nconst Container = styled.span<IContainerProps>`\n display: block;\n margin: 0;\n\n .ellipsis-1-lines {\n display: block;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n max-width: ${props => props.maxWidth};\n font-size: ${props => props.fontSize};\n\n ${props => props.center && `margin: 0 auto;`}\n }\n\n .ellipsis-2-lines {\n display: block;\n display: -webkit-box;\n max-width: ${props => props.maxWidth}px;\n\n height: 25px;\n margin: 0 auto;\n line-height: 1;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: ${props => props.fontSize};\n }\n\n .ellipsis-3-lines {\n display: block;\n display: -webkit-box;\n max-width: ${props => props.maxWidth}px;\n\n height: 43px;\n margin: 0 auto;\n line-height: 1;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n text-overflow: ellipsis;\n overflow: hidden;\n font-size: ${props => props.fontSize};\n }\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { Ellipsis } from '../shared/Ellipsis';\n\nexport interface IPropertySelectProps {\n availableProperties: Array<IPropertiesProps>;\n selectedProperty?: IPropertiesProps;\n children?: React.ReactNode;\n onChange: (selectedProperty: IPropertiesProps) => void;\n}\n\nexport interface IPropertiesProps {\n id: string;\n name: string;\n}\n\nexport const PropertySelect: React.FC<IPropertySelectProps> = ({\n availableProperties,\n onChange,\n}) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const propertiesLength = availableProperties.length - 1;\n\n const onLeftClick = () => {\n if (currentIndex === 0) setCurrentIndex(propertiesLength);\n else setCurrentIndex(index => index - 1);\n };\n const onRightClick = () => {\n if (currentIndex === propertiesLength) setCurrentIndex(0);\n else setCurrentIndex(index => index + 1);\n };\n\n useEffect(() => {\n onChange(availableProperties[currentIndex]);\n }, [currentIndex]);\n\n useEffect(() => {\n setCurrentIndex(0);\n }, [JSON.stringify(availableProperties)]);\n\n const getCurrentSelectionName = () => {\n const item = availableProperties[currentIndex];\n if (item) {\n return item.name;\n }\n return '';\n };\n\n return (\n <Container>\n <TextOverlay>\n <p>\n <Item>\n <Ellipsis maxLines={1} maxWidth=\"60%\" center>\n {getCurrentSelectionName()}\n </Ellipsis>\n </Item>\n </p>\n </TextOverlay>\n <div className=\"rpgui-progress-track\"></div>\n\n <SelectArrow direction=\"left\" onPointerDown={onLeftClick}></SelectArrow>\n <SelectArrow direction=\"right\" onPointerDown={onRightClick}></SelectArrow>\n </Container>\n );\n};\n\nconst Item = styled.span`\n font-size: 1rem;\n color: white;\n text-align: center;\n z-index: 1;\n position: absolute;\n top: 12px;\n width: 100%;\n\n p {\n margin: 0 auto;\n font-size: ${uiFonts.size.small};\n }\n`;\n\nconst TextOverlay = styled.div`\n width: 100%;\n position: relative;\n`;\n\ninterface IContainerProps {\n percentageWidth?: number;\n minWidth?: number;\n style?: Record<string, any>;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: start;\n align-items: flex-start;\n min-width: 100px;\n width: 40%;\n`;\n\nexport default PropertySelect;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\n\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nimport { ErrorBoundary } from '../Item/Inventory/ErrorBoundary';\nimport PropertySelect, {\n IPropertiesProps,\n} from '../PropertySelect/PropertySelect';\n\nexport interface ICharacterProps {\n name: string;\n textureKey: string;\n}\n\nexport interface ICharacterSelectionProps {\n availableCharacters: ICharacterProps[];\n atlasJSON: any;\n atlasIMG: any;\n onChange: (textureKey: string) => void;\n}\n\nexport const CharacterSelection: React.FC<ICharacterSelectionProps> = ({\n availableCharacters,\n atlasJSON,\n atlasIMG,\n onChange,\n}) => {\n const propertySelectValues = availableCharacters.map((item) => {\n return {\n id: item.textureKey,\n name: item.name,\n };\n });\n\n const [selectedValue, setSelectedValue] = useState<IPropertiesProps>();\n const [selectedSpriteKey, setSelectedSpriteKey] = useState('');\n\n const onSelectedValueChange = () => {\n const textureKey = selectedValue ? selectedValue.id : '';\n const spriteKey = textureKey ? textureKey + '/down/standing/0.png' : '';\n\n if (spriteKey === selectedSpriteKey) {\n return;\n }\n\n setSelectedSpriteKey(spriteKey);\n onChange(textureKey);\n };\n\n useEffect(() => {\n onSelectedValueChange();\n }, [selectedValue]);\n\n useEffect(() => {\n setSelectedValue(propertySelectValues[0]);\n }, [availableCharacters]);\n\n return (\n <Container>\n {selectedSpriteKey && atlasIMG && atlasJSON && (\n <ErrorBoundary>\n <SpriteFromAtlas\n spriteKey={selectedSpriteKey}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n imgScale={4}\n height={80}\n width={64}\n containerStyle={{\n display: 'flex',\n alignItems: 'center',\n paddingBottom: '15px',\n }}\n imgStyle={{\n left: '22px',\n }}\n />\n </ErrorBoundary>\n )}\n <PropertySelect\n availableProperties={propertySelectValues}\n onChange={(value) => {\n setSelectedValue(value);\n }}\n />\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n image-rendering: pixelated;\n`;\n\nexport default CharacterSelection;\n","import dayjs from 'dayjs';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { FaTimes } from 'react-icons/fa';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { ChatMessage } from '../ChatRevamp/types';\n\nexport interface IStyles {\n textColor?: string;\n buttonColor?: string;\n buttonBackgroundColor?: string;\n width?: string;\n height?: string;\n}\n\nexport interface IEmitter {\n _id: string;\n name: string;\n}\n\nexport interface IChatProps {\n chatMessages: ChatMessage[];\n onSendChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n opacity?: number;\n sendMessage: boolean;\n styles?: IStyles;\n isExpanded: boolean;\n}\n\nexport const Chat: React.FC<IChatProps> = ({\n chatMessages,\n onSendChatMessage,\n onCloseButton,\n onFocus,\n onBlur,\n styles = {\n textColor: '#ff6600',\n buttonColor: '#ff6600',\n buttonBackgroundColor: '#333',\n width: '100%',\n height: '100%',\n },\n isExpanded,\n}) => {\n const [message, setMessage] = useState('');\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (isExpanded) {\n scrollChatToBottom();\n }\n inputRef.current?.focus();\n }, [chatMessages, isExpanded]);\n\n const scrollChatToBottom = () => {\n const scrollingElement = document.querySelector('.chat-body');\n if (scrollingElement) {\n scrollingElement.scrollTop = scrollingElement.scrollHeight;\n }\n };\n\n const handleSubmit = (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!message.trim()) return;\n onSendChatMessage(message);\n setMessage('');\n };\n\n const truncateName = (name: string, maxLength: number = 10) => {\n return name.length > maxLength ? name.slice(0, maxLength) + '...' : name;\n };\n\n const formatMessage = (chatMessage: ChatMessage) => {\n const timestamp = dayjs(chatMessage.createdAt).format('HH:mm');\n const truncatedName = truncateName(chatMessage.emitter.name);\n return `${timestamp} ${truncatedName}: ${chatMessage.message}`;\n };\n\n return (\n <ChatContainer\n width={styles.width || 'auto'}\n height={styles.height || 'auto'}\n isExpanded={isExpanded}\n >\n {isExpanded && (\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n <CloseButton onClick={onCloseButton}>\n <FaTimes />\n </CloseButton>\n <MessagesContainer className=\"chat-body\">\n {chatMessages.map((chatMessage, index) => (\n <Message\n color={styles.textColor || uiColors.yellow}\n key={`${chatMessage._id}_${index}`}\n >\n {formatMessage(chatMessage)}\n </Message>\n ))}\n </MessagesContainer>\n </ErrorBoundary>\n )}\n <Form onSubmit={handleSubmit} isExpanded={isExpanded}>\n <TextField\n ref={inputRef}\n value={message}\n onChange={e => setMessage(e.target.value)}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n placeholder=\"Type your message...\"\n />\n <SendButton type=\"submit\" disabled={!message.trim()}>\n ▶\n </SendButton>\n </Form>\n </ChatContainer>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\ninterface IMessageProps {\n color: string;\n}\n\nconst ChatContainer = styled.div<IContainerProps & { isExpanded: boolean }>`\n width: ${props => props.width};\n height: ${props => (props.isExpanded ? props.height : 'auto')};\n background-color: rgba(30, 30, 30, 0.3);\n display: flex;\n flex-direction: column;\n position: relative;\n border-radius: 8px;\n border: 1px solid rgba(0, 0, 0, 0.1);\n overflow: hidden;\n`;\n\nconst CloseButton = styled.button`\n position: absolute;\n top: 8px;\n right: 8px;\n background-color: transparent;\n border: none;\n color: white;\n font-size: 16px;\n cursor: pointer;\n z-index: 1;\n`;\n\nconst MessagesContainer = styled.div`\n flex-grow: 1;\n overflow-y: auto;\n padding: 12px;\n margin-bottom: 8px;\n\n scrollbar-width: thin;\n scrollbar-color: rgba(51, 51, 51, 0.4) rgba(30, 30, 30, 0.4);\n\n &::-webkit-scrollbar {\n width: 6px;\n }\n\n &::-webkit-scrollbar-track {\n background: rgba(30, 30, 30, 0.4);\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(51, 51, 51, 0.4);\n border-radius: 3px;\n }\n`;\n\nconst Message = styled.div<IMessageProps>`\n margin-bottom: 6px;\n color: ${({ color }) => color};\n font-family: 'Press Start 2P', cursive;\n font-size: 0.7rem;\n line-height: 1.4;\n word-break: break-word;\n`;\n\nconst Form = styled.form<{ isExpanded: boolean }>`\n display: flex;\n padding: 8px;\n background-color: rgba(42, 42, 42, 0.4);\n border-radius: ${props => (props.isExpanded ? '0' : '8px')};\n`;\n\nconst TextField = styled.input`\n flex-grow: 1;\n background-color: rgba(26, 26, 26, 0.6);\n color: #ff6600;\n border: 1px solid rgba(51, 51, 51, 0.6);\n border-radius: 4px;\n padding: 8px;\n margin-right: 8px;\n font-family: 'Press Start 2P', cursive;\n font-size: 0.7rem;\n height: 32px;\n transition: border-color 0.3s, background-color 0.3s;\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.5);\n font-size: 0.6rem;\n }\n\n &:focus {\n outline: none;\n border-color: #ff6600;\n background-color: rgba(42, 42, 42, 0.9);\n }\n`;\n\nconst SendButton = styled.button`\n background-color: transparent;\n color: #ff6600;\n border: none;\n padding: 8px 12px;\n font-size: 14px;\n cursor: pointer;\n transition: opacity 0.3s ease;\n\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n`;\n","import React from 'react';\n\nexport interface IInputProps\n extends React.DetailedHTMLProps<\n React.InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n > {\n innerRef?: React.Ref<HTMLInputElement>;\n}\n\nexport const Input: React.FC<IInputProps> = ({ ...props }) => {\n const { innerRef, ...rest } = props;\n\n return <input {...rest} ref={props.innerRef} />;\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\nexport enum RPGUIContainerTypes {\n Framed = 'framed',\n FramedGold = 'framed-golden',\n FramedGold2 = 'framed-golden-2',\n FramedGrey = 'framed-grey',\n}\nexport interface IRPGUIContainerProps {\n type: RPGUIContainerTypes;\n children: React.ReactNode;\n width?: string;\n height?: string;\n className?: string;\n}\n\nexport const RPGUIContainer: React.FC<IRPGUIContainerProps> = ({\n children,\n type,\n width = '50%',\n height,\n className,\n}) => {\n return (\n <Container\n width={width}\n height={height || 'auto'}\n className={`rpgui-container ${type} ${className}`}\n >\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\nconst Container = styled.div<IContainerProps>`\n height: ${props => props.height};\n width: ${({ width }) => width};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n`;\n","import styled from 'styled-components';\n\ninterface IColumn {\n flex?: number;\n alignItems?: string;\n justifyContent?: string;\n flexWrap?: string;\n}\n\nexport const Column = styled.div<IColumn>`\n flex: ${props => props.flex || 'auto'};\n display: flex;\n flex-wrap: ${props => props.flexWrap || 'nowrap'};\n align-items: ${props => props.alignItems || 'flex-start'};\n justify-content: ${props => props.justifyContent || 'flex-start'};\n`;\n","import { ILocalChatMessage } from '@rpg-engine/shared';\nimport dayjs from 'dayjs';\nimport React, { useEffect, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { Input } from '../Input';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { Column } from '../shared/Column';\n\ninterface IEmitter {\n _id: string;\n name: string;\n}\nexport interface IChatDeprecatedProps {\n chatMessages: ILocalChatMessage[];\n onSendChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n opacity?: number;\n width?: string;\n height?: string;\n}\n\nexport const ChatDeprecated: React.FC<IChatDeprecatedProps> = ({\n chatMessages,\n onSendChatMessage,\n opacity = 1,\n width = '100%',\n height = '250px',\n onCloseButton,\n onFocus,\n onBlur,\n}) => {\n const [message, setMessage] = useState('');\n\n useEffect(() => {\n scrollChatToBottom();\n }, []);\n\n useEffect(() => {\n scrollChatToBottom();\n }, [chatMessages]);\n\n const scrollChatToBottom = () => {\n const scrollingElement = document.querySelector('.chat-body');\n if (scrollingElement) {\n scrollingElement.scrollTop = scrollingElement.scrollHeight;\n }\n };\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n onSendChatMessage(message);\n setMessage('');\n };\n const getInputValue = (value: string) => {\n setMessage(value);\n };\n\n const onRenderMessageLines = (\n emitter: IEmitter,\n createdAt: string | undefined,\n message: string\n ) => {\n return `${dayjs(createdAt || new Date()).format('HH:mm')} ${\n emitter?.name ? `${emitter.name}: ` : 'Unknown: '\n } ${message}`;\n };\n\n const onRenderChatMessages = (chatMessages: ILocalChatMessage[]) => {\n return chatMessages?.length ? (\n chatMessages?.map(({ _id, createdAt, emitter, message }, index) => (\n <MessageText key={`${_id}_${index}`}>\n {onRenderMessageLines(emitter, createdAt as string, message)}\n </MessageText>\n ))\n ) : (\n <MessageText>No messages available.</MessageText>\n );\n };\n\n return (\n <Container>\n <CustomContainer\n type={RPGUIContainerTypes.FramedGrey}\n width={width}\n height={height}\n className=\"chat-container\"\n opacity={opacity}\n >\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n {onCloseButton && (\n <CloseButton onPointerDown={onCloseButton}>X</CloseButton>\n )}\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGrey}\n width={'100%'}\n height={'80%'}\n className=\"chat-body dark-background\"\n >\n {onRenderChatMessages(chatMessages)}\n </RPGUIContainer>\n\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <CustomInput\n value={message}\n id=\"inputMessage\"\n onChange={e => getInputValue(e.target.value)}\n height={20}\n className=\"chat-input dark-background\"\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n id=\"chat-send-button\"\n >\n Send\n </Button>\n </Column>\n </Form>\n </ErrorBoundary>\n </CustomContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n position: relative;\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 2px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 0.7rem;\n`;\n\nconst CustomInput = styled(Input)`\n height: 30px;\n width: 100%;\n\n .rpgui-content .input {\n min-height: 39px;\n }\n`;\n\ninterface ICustomContainerProps {\n opacity: number;\n}\n\nconst CustomContainer = styled(RPGUIContainer)`\n display: block;\n\n opacity: ${(props: ICustomContainerProps) => props.opacity};\n\n &:hover {\n opacity: 1;\n }\n\n .dark-background {\n background-color: ${uiColors.darkGray} !important;\n }\n\n .chat-body {\n &.rpgui-container.framed-grey {\n background: unset;\n }\n max-height: 170px;\n overflow-y: auto;\n }\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst MessageText = styled.p`\n display: block !important;\n width: 100%;\n font-size: ${uiFonts.size.xsmall} !important;\n overflow-y: auto;\n margin: 0;\n`;\n","import { useEffect, useState } from 'react';\nimport { PrivateChatCharacter } from '../components/ChatRevamp/types';\n\ninterface IUseChat {\n minimizedByDefault: boolean;\n isPrivate: boolean;\n onChangeTab: (tabId: string) => void;\n onPreviousChatCharacterClick?: (character: PrivateChatCharacter) => void;\n hideSearchCharacterUI?: () => void;\n unseenMessageCharacterIds?: string[];\n}\n\nexport const useChat = ({\n minimizedByDefault,\n isPrivate,\n onChangeTab,\n onPreviousChatCharacterClick,\n hideSearchCharacterUI,\n unseenMessageCharacterIds,\n}: IUseChat) => {\n const [showRecentChats, setShowRecentChats] = useState(false);\n const [isExpanded, setIsExpanded] = useState(!minimizedByDefault);\n\n useEffect(() => {\n if (isPrivate) {\n setIsExpanded(true);\n }\n }, [isPrivate]);\n\n const toggleExpand = () => setIsExpanded(prev => !prev);\n\n const toggleRecentChats = () => setShowRecentChats(prev => !prev);\n\n const handleTabChange = (tabId: string) => {\n if (tabId === 'private') {\n setIsExpanded(true);\n }\n onChangeTab(tabId);\n };\n\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n if (onPreviousChatCharacterClick) {\n onPreviousChatCharacterClick(character);\n }\n if (hideSearchCharacterUI) {\n hideSearchCharacterUI();\n }\n };\n\n return {\n showRecentChats,\n isExpanded,\n toggleExpand,\n toggleRecentChats,\n handleTabChange,\n handlePreviousChatCharacterClick,\n hasUnseenMessages:\n unseenMessageCharacterIds && unseenMessageCharacterIds?.length > 0,\n };\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport { RxMagnifyingGlass } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { IStyles } from '../Chat/Chat';\nimport { Column } from '../shared/Column';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { PrivateChatCharacter } from './types';\n\ninterface ISearchCharacterProps {\n onFocus?: () => void;\n onBlur?: () => void;\n onChangeCharacterName: (characterName: string) => void;\n styles?: IStyles;\n recentCharacters?: PrivateChatCharacter[];\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n hideSearchCharacterUI: () => void;\n}\n\nexport const SearchCharacter = ({\n onChangeCharacterName,\n onBlur,\n onFocus,\n recentCharacters,\n hideSearchCharacterUI,\n onCharacterClick,\n styles = {\n textColor: '#c65102',\n buttonColor: '#005b96',\n buttonBackgroundColor: 'rgba(0,0,0,.2)',\n width: '80%',\n height: 'auto',\n },\n}: ISearchCharacterProps) => {\n const [characterName, setCharacterName] = useState('');\n const searchCharacterRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n if (searchCharacterRef.current) {\n searchCharacterRef.current.focus();\n }\n }, 100);\n\n return () => clearTimeout(timer);\n }, []);\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (!characterName || characterName.trim() === '') return;\n onChangeCharacterName(characterName);\n };\n\n const handleCharacterClick = (character: PrivateChatCharacter) => {\n if (!onCharacterClick) return;\n setCharacterName('');\n onCharacterClick(character);\n hideSearchCharacterUI();\n };\n\n return (\n <SearchContainer>\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <TextField\n value={characterName}\n ref={searchCharacterRef}\n id=\"characterName\"\n name=\"characterName\"\n onChange={e => {\n setCharacterName(e.target.value);\n onChangeCharacterName(e.target.value);\n }}\n placeholder=\"Search for a character...\"\n height={20}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <SearchButton\n type=\"submit\"\n buttonColor={styles?.buttonColor || '#005b96'}\n buttonBackgroundColor={\n styles?.buttonBackgroundColor || 'rgba(0,0,0,.5)'\n }\n id=\"chat-send-button\"\n style={{ borderRadius: '20%' }}\n >\n <RxMagnifyingGlass size={15} />\n </SearchButton>\n </Column>\n </Form>\n\n {recentCharacters && recentCharacters.length > 0 && (\n <ListContainer>\n {recentCharacters.map(character => (\n <ListElement\n onPointerDown={() => handleCharacterClick(character)}\n key={character._id}\n >\n <Ellipsis maxWidth=\"150px\" maxLines={1}>\n {character.name}\n </Ellipsis>\n </ListElement>\n ))}\n </ListContainer>\n )}\n </SearchContainer>\n );\n};\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst SearchContainer = styled.div`\n width: 100%;\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst TextField = styled.input`\n width: 100%;\n background-color: rgba(0, 0, 0, 0.25) !important;\n border: none !important;\n max-height: 28px !important;\n`;\n\nconst SearchButton = styled.button<IButtonProps>`\n color: ${({ buttonColor }) => buttonColor};\n background-color: ${({ buttonBackgroundColor }) => buttonBackgroundColor};\n width: 28px;\n height: 28px;\n border: none !important;\n`;\n\nconst ListContainer = styled.ul`\n border: none;\n overflow-y: scroll;\n list-style: none;\n padding: 0;\n`;\n\nconst ListElement = styled.li`\n margin: 0.5rem 0 !important;\n font-size: ${uiFonts.size.small};\n padding: 0.5rem 2px;\n\n &:hover {\n color: #ff0;\n background-color: ${uiColors.darkGray};\n }\n\n button {\n all: unset;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { Chat, IStyles } from '../Chat/Chat';\nimport { SearchCharacter } from './SearchCharacter';\nimport { ChatMessage, PrivateChatCharacter } from './types';\n\ninterface ChatContentProps {\n isPrivate: boolean;\n isTrade: boolean;\n isGlobal: boolean;\n searchCharacterUI: boolean;\n chatMessages: ChatMessage[];\n onSendGlobalChatMessage: (message: string) => void;\n onSendLocalChatMessage: (message: string) => void;\n onSendPrivateChatMessage: (message: string) => void;\n onSendTradeMessage: (message: string) => void;\n onCloseButton: () => void;\n styles?: IStyles;\n onFocus?: () => void;\n onBlur?: () => void;\n isExpanded: boolean;\n autoCloseOnSend: boolean;\n onChangeCharacterName: (characterName: string) => void;\n privateChatCharacters?: PrivateChatCharacter[];\n hideSearchCharacterUI: () => void;\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n isGuild: boolean;\n onSendGuildChatMessage: (message: string) => void;\n}\n\nexport const ChatContent: React.FC<ChatContentProps> = ({\n isPrivate,\n isTrade,\n isGlobal,\n searchCharacterUI,\n chatMessages,\n onSendLocalChatMessage,\n onSendGlobalChatMessage,\n onSendPrivateChatMessage,\n onSendTradeMessage,\n onCloseButton,\n styles,\n onFocus,\n onBlur,\n isExpanded,\n autoCloseOnSend,\n onChangeCharacterName,\n privateChatCharacters,\n hideSearchCharacterUI,\n onCharacterClick,\n isGuild,\n onSendGuildChatMessage,\n}) => {\n const handleSendMessage = (message: string) => {\n if (autoCloseOnSend) {\n onCloseButton();\n }\n\n if (isPrivate) {\n onSendPrivateChatMessage(message);\n } else if (isTrade) {\n onSendTradeMessage(message);\n } else if (isGuild) {\n onSendGuildChatMessage(message);\n } else if (isGlobal) {\n onSendGlobalChatMessage(message);\n } else {\n onSendLocalChatMessage(message);\n }\n };\n\n if (isPrivate && searchCharacterUI) {\n return (\n <SearchCharacter\n onFocus={onFocus}\n onBlur={onBlur}\n onChangeCharacterName={onChangeCharacterName}\n styles={styles}\n recentCharacters={privateChatCharacters}\n hideSearchCharacterUI={hideSearchCharacterUI}\n onCharacterClick={onCharacterClick}\n />\n );\n }\n\n return (\n <ChatWrapper>\n <Chat\n chatMessages={chatMessages}\n onSendChatMessage={handleSendMessage}\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={isExpanded}\n />\n </ChatWrapper>\n );\n};\n\nconst ChatWrapper = styled.div`\n flex-grow: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface ChatTabsProps {\n tabs: { label: string; id: string }[];\n activeTab: string;\n onChangeTab: (tabId: string) => void;\n}\n\nexport const ChatTabs: React.FC<ChatTabsProps> = ({\n tabs,\n activeTab,\n onChangeTab,\n}) => (\n <TabContainer>\n {tabs.map((tab, index) => (\n <Tab\n key={`${tab.label}_${index}`}\n active={tab.id === activeTab}\n onPointerDown={() => onChangeTab(tab.id)}\n >\n {tab.label}\n </Tab>\n ))}\n </TabContainer>\n);\n\nconst TabContainer = styled.div`\n display: flex;\n gap: 10px;\n align-items: center;\n flex-grow: 1;\n`;\n\nconst Tab = styled.button<{ active: boolean }>`\n width: 120px;\n color: white;\n font-size: 0.8rem;\n all: unset;\n padding: 0.6rem;\n font-size: 0.8rem;\n border-radius: 5px 5px 0 0;\n border-width: 0.25rem 0.25rem 0 0.25rem;\n border-style: solid;\n border-color: ${props =>\n props.active ? 'rgba(198, 81, 2, 0.5)' : 'rgba(128, 128, 128, 0.5)'};\n background-color: ${props =>\n props.active ? uiColors.orange : 'rgba(0, 0, 0, 0.2)'};\n color: ${props => (props.active ? 'white' : uiColors.darkGray)};\n`;\n","import React from 'react';\nimport { IoMdContract, IoMdExpand } from 'react-icons/io';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface ExpandButtonProps {\n isExpanded: boolean;\n onClick: () => void;\n}\n\nexport const ExpandButton: React.FC<ExpandButtonProps> = ({\n isExpanded,\n onClick,\n}) => (\n <StyledExpandButton isExpanded={isExpanded} onClick={onClick}>\n {isExpanded ? <IoMdContract size={20} /> : <IoMdExpand size={20} />}\n </StyledExpandButton>\n);\n\nconst StyledExpandButton = styled.button<{ isExpanded: boolean }>`\n position: absolute;\n top: 0;\n ${({ isExpanded }) => (isExpanded ? 'right: 0' : 'left: 0.5rem')};\n width: 30px;\n height: 30px;\n background-color: ${uiColors.orange};\n color: white;\n border: none;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n transition: all 0.3s ease;\n z-index: 10;\n\n &:hover {\n background-color: ${uiColors.orange};\n }\n`;\n","import React from 'react';\nimport { RxCross2, RxMagnifyingGlass } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { PrivateChatCharacter } from './types';\n\ninterface IRecentChatsProps {\n showRecentChats: boolean;\n toggleRecentChats: () => void;\n hasUnseenMessages: boolean;\n showSearchCharacterUI: () => void;\n recentChatCharacters?: PrivateChatCharacter[];\n recentSelectedChatCharacterId?: string;\n unseenMessageCharacterIds?: string[];\n onPreviousChatCharacterClick: (character: PrivateChatCharacter) => void;\n onRemoveRecentChatCharacter?: (character: PrivateChatCharacter) => void;\n isPrivate: boolean;\n hideSearchCharacterUI: () => void; // Add this line\n}\n\nexport const RecentChats: React.FC<IRecentChatsProps> = ({\n showRecentChats,\n toggleRecentChats,\n hasUnseenMessages,\n showSearchCharacterUI,\n recentChatCharacters,\n recentSelectedChatCharacterId,\n unseenMessageCharacterIds,\n onPreviousChatCharacterClick,\n onRemoveRecentChatCharacter,\n isPrivate,\n hideSearchCharacterUI, // Add this line\n}) => {\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n onPreviousChatCharacterClick(character);\n hideSearchCharacterUI(); // Call hideSearchCharacterUI here\n };\n\n return (\n <RecentChatTabContainer isOpen={showRecentChats} isPrivate={isPrivate}>\n <RecentChatTopBar>\n <BurgerIconContainer\n onPointerDown={toggleRecentChats}\n hasUnseenMessages={hasUnseenMessages}\n >\n <BurgerLineIcon />\n <BurgerLineIcon />\n <BurgerLineIcon />\n </BurgerIconContainer>\n {showRecentChats && (\n <SearchButton onPointerDown={showSearchCharacterUI}>\n <RxMagnifyingGlass size={16} color={uiColors.white} />\n </SearchButton>\n )}\n </RecentChatTopBar>\n <RecentChatLogContainer isOpen={showRecentChats}>\n {recentChatCharacters?.map(character => (\n <ListElementContainer key={character._id}>\n <ListElement\n active={character._id === recentSelectedChatCharacterId}\n onPointerDown={() => handlePreviousChatCharacterClick(character)}\n >\n <StatusDot\n isUnseen={\n unseenMessageCharacterIds?.includes(character._id) ?? false\n }\n />\n <Ellipsis maxWidth=\"140px\" maxLines={1}>\n {character.name}\n </Ellipsis>\n </ListElement>\n <CloseButton\n className=\"close-button\"\n onPointerDown={() => onRemoveRecentChatCharacter?.(character)}\n >\n <RxCross2 size={16} />\n </CloseButton>\n </ListElementContainer>\n ))}\n </RecentChatLogContainer>\n </RecentChatTabContainer>\n );\n};\n\nconst RecentChatTabContainer = styled.div<{\n isPrivate: boolean;\n isOpen: boolean;\n}>`\n display: ${props => (props.isPrivate ? 'flex' : 'none')};\n flex-direction: column;\n border-right: 1px solid ${uiColors.gray};\n outline: none;\n width: ${props => (props.isOpen ? '25%' : '30px')};\n max-width: 200px;\n min-width: ${props => (props.isOpen ? '180px' : '30px')};\n transition: all 0.3s ease-in-out;\n overflow: hidden;\n height: 100%;\n @media (max-width: 768px) {\n width: ${props => (props.isOpen ? '50%' : '30px')};\n min-width: ${props => (props.isOpen ? '150px' : '30px')};\n }\n`;\n\nconst RecentChatTopBar = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 30px;\n flex-shrink: 0;\n`;\n\nconst SearchButton = styled.button`\n border: none;\n background-color: transparent;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n gap: 2px;\n padding: 4px;\n position: relative;\n`;\n\nconst BurgerIconContainer = styled.button<{ hasUnseenMessages: boolean }>`\n border: none;\n background-color: transparent;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n padding: 4px;\n gap: 2px;\n position: relative;\n\n &:after {\n content: '';\n width: 6px;\n height: 6px;\n position: absolute;\n top: 0;\n right: 2px;\n border-radius: 50%;\n background-color: ${uiColors.lightGreen};\n display: ${props => (props.hasUnseenMessages ? 'block' : 'none')};\n }\n`;\n\nconst BurgerLineIcon = styled.span`\n width: 1rem;\n height: 2px;\n background-color: #ffffff;\n`;\n\nconst RecentChatLogContainer = styled.div<{ isOpen: boolean }>`\n display: ${props => (props.isOpen ? 'flex' : 'none')};\n opacity: ${props => (props.isOpen ? 1 : 0)};\n flex-direction: column;\n gap: 0.25rem; // Reduce this from 0.5rem to 0.25rem\n transition: opacity 0.3s ease-in-out;\n padding: 0;\n margin: 0;\n overflow-y: auto;\n flex-grow: 1;\n height: 0;\n\n /* Firefox */\n scrollbar-width: thin;\n scrollbar-color: rgba(51, 51, 51, 0.4) rgba(30, 30, 30, 0.4);\n\n /* WebKit and Chromium-based browsers */\n &::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: rgba(30, 30, 30, 0.2);\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-thumb {\n background-color: rgba(255, 102, 0, 0.5);\n border-radius: 4px;\n border: 2px solid rgba(30, 30, 30, 0.2);\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 102, 0, 0.7);\n }\n`;\n\nconst ListElementContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 2px 0; // Add small vertical padding\n`;\n\nconst ListElement = styled.button<{ active: boolean }>`\n margin: 0 !important; // Remove vertical margins\n font-size: ${uiFonts.size.small} !important;\n padding: 2px;\n all: unset;\n color: ${props => (props.active ? uiColors.yellow : uiColors.white)};\n width: 100%;\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n\n &:hover {\n color: #ff0;\n }\n max-width: calc(100% - 24px);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n`;\n\nconst StatusDot = styled.span<{ isUnseen: boolean }>`\n width: 6px;\n height: 6px;\n border-radius: 50%;\n background-color: ${props =>\n props.isUnseen ? uiColors.lightGreen : uiColors.gray};\n display: inline-block;\n margin-right: 6px;\n`;\n\nconst CloseButton = styled.button`\n all: unset;\n font-size: ${uiFonts.size.xxsmall};\n margin: 0 0.5rem;\n transition: all 0.2s ease-in-out;\n background-color: ${uiColors.red};\n color: ${uiColors.white};\n width: 16px;\n height: 16px;\n border-radius: 50%;\n display: flex;\n justify-content: center;\n align-items: center;\n &:hover {\n background-color: ${uiColors.white};\n color: ${uiColors.red};\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { useChat } from '../../hooks/useChat';\nimport { Chat } from '../Chat/Chat';\nimport { ChatContent } from './ChatContent';\nimport { ChatTabs } from './ChatTabs';\nimport { ExpandButton } from './ExpandButton';\nimport { RecentChats } from './RecentChats';\nimport { IChatRevampProps } from './types';\n\nexport const ChatRevamp = ({\n chatMessages,\n onSendGlobalChatMessage,\n onSendGuildChatMessage, // Add this new prop\n onChangeCharacterName,\n onFocus,\n onBlur,\n onCloseButton,\n styles,\n tabs,\n onChangeTab,\n activeTab = 'global',\n privateChatCharacters,\n onCharacterClick,\n onSendPrivateChatMessage,\n recentChatCharacters,\n recentSelectedChatCharacterId,\n onPreviousChatCharacterClick,\n onRemoveRecentChatCharacter,\n unseenMessageCharacterIds,\n onSendTradeMessage,\n searchCharacterUI,\n hideSearchCharacterUI,\n showSearchCharacterUI,\n minimizedByDefault = false,\n autoCloseOnSend,\n onSendLocalChatMessage,\n}: IChatRevampProps) => {\n const isPrivate = activeTab === 'private';\n const isTrade = activeTab === 'trade';\n const isGuild = activeTab === 'guild';\n const isGlobal = activeTab === 'global';\n const chatHook = useChat({\n minimizedByDefault,\n isPrivate,\n onChangeTab,\n onPreviousChatCharacterClick,\n unseenMessageCharacterIds,\n });\n\n return (\n <ChatRevampContainer>\n <TopBar isExpanded={chatHook.isExpanded}>\n {chatHook.isExpanded && (\n <ChatTabs\n tabs={tabs}\n activeTab={activeTab}\n onChangeTab={chatHook.handleTabChange}\n />\n )}\n <ExpandButton\n isExpanded={chatHook.isExpanded}\n onClick={chatHook.toggleExpand}\n />\n </TopBar>\n <AllChatsContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n isExpanded={chatHook.isExpanded}\n >\n {chatHook.isExpanded ? (\n <ExpandedChatContent>\n {isPrivate && (\n <RecentChats\n showRecentChats={chatHook.showRecentChats}\n toggleRecentChats={chatHook.toggleRecentChats}\n hasUnseenMessages={chatHook.hasUnseenMessages || false}\n showSearchCharacterUI={showSearchCharacterUI}\n recentChatCharacters={recentChatCharacters}\n recentSelectedChatCharacterId={recentSelectedChatCharacterId}\n unseenMessageCharacterIds={unseenMessageCharacterIds}\n onPreviousChatCharacterClick={\n chatHook.handlePreviousChatCharacterClick\n }\n onRemoveRecentChatCharacter={onRemoveRecentChatCharacter}\n isPrivate={isPrivate}\n hideSearchCharacterUI={hideSearchCharacterUI}\n />\n )}\n <ChatContentWrapper isPrivate={isPrivate}>\n <ChatContent\n isPrivate={isPrivate}\n isTrade={isTrade}\n isGuild={isGuild}\n isGlobal={isGlobal}\n searchCharacterUI={searchCharacterUI}\n chatMessages={chatMessages}\n onSendGlobalChatMessage={onSendGlobalChatMessage}\n onSendPrivateChatMessage={onSendPrivateChatMessage}\n onSendTradeMessage={onSendTradeMessage}\n onSendGuildChatMessage={onSendGuildChatMessage}\n onSendLocalChatMessage={onSendLocalChatMessage}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={chatHook.isExpanded}\n autoCloseOnSend={autoCloseOnSend || false}\n onChangeCharacterName={onChangeCharacterName}\n privateChatCharacters={privateChatCharacters}\n hideSearchCharacterUI={hideSearchCharacterUI}\n onCharacterClick={onCharacterClick}\n />\n </ChatContentWrapper>\n </ExpandedChatContent>\n ) : (\n <CollapsedChatInput>\n <Chat\n chatMessages={[]}\n onSendChatMessage={onSendLocalChatMessage}\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n isExpanded={false}\n />\n </CollapsedChatInput>\n )}\n </AllChatsContainer>\n </ChatRevampContainer>\n );\n};\n\nconst ChatRevampContainer = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n position: relative;\n`;\n\nconst TopBar = styled.div<{ isExpanded: boolean }>`\n display: flex;\n align-items: center;\n justify-content: flex-start;\n min-height: ${({ isExpanded }) => (isExpanded ? 'auto' : '32px')};\n`;\n\nconst AllChatsContainer = styled.div<{\n width: string;\n height: string;\n isExpanded: boolean;\n}>`\n width: ${({ width }) => width};\n height: ${({ height, isExpanded }) => (isExpanded ? height : 'auto')};\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n display: flex;\n gap: 10px;\n flex-wrap: wrap;\n`;\n\nconst ChatContentWrapper = styled.div<{ isPrivate: boolean }>`\n flex-grow: 1;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n position: relative;\n width: ${props => (props.isPrivate ? '75%' : '100%')};\n`;\n\nconst CollapsedChatInput = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n align-items: center;\n`;\n\nconst ExpandedChatContent = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n`;\n","import React, { useEffect, useState } from 'react';\n\nexport interface ICheckItems {\n label: string;\n value: string;\n}\n\nexport interface ICheckProps {\n items: ICheckItems[];\n onChange: (selectedValues: IChecklistSelectedValues) => void;\n}\n\nexport interface IChecklistSelectedValues {\n [label: string]: boolean;\n}\n\nexport const CheckButton: React.FC<ICheckProps> = ({ items, onChange }) => {\n const generateSelectedValuesList = () => {\n const selectedValues: IChecklistSelectedValues = {};\n\n items.forEach(item => {\n selectedValues[item.label] = false;\n });\n\n return selectedValues;\n };\n\n const [selectedValues, setSelectedValues] = useState<\n IChecklistSelectedValues\n >(generateSelectedValuesList());\n\n const handleClick = (label: string) => {\n setSelectedValues({\n ...selectedValues,\n [label]: !selectedValues[label],\n });\n };\n\n useEffect(() => {\n if (selectedValues) {\n onChange(selectedValues);\n }\n }, [selectedValues]);\n\n return (\n <div id=\"elemento-checkbox\">\n {items?.map((element, index) => {\n return (\n <div key={`${element.label}_${index}`}>\n <input\n className=\"rpgui-checkbox\"\n type=\"checkbox\"\n checked={selectedValues[element.label]}\n onChange={() => {}}\n />\n <label onPointerDown={() => handleClick(element.label)}>\n {element.label}\n </label>\n <br />\n </div>\n );\n })}\n </div>\n );\n};\n","import React, { useState } from 'react';\n\nexport interface ICheckItemProps {\n label?: string;\n defaultValue?: boolean;\n onChange: (label: string | undefined, selected: boolean) => void;\n}\n\nexport const CheckItem: React.FC<ICheckItemProps> = ({\n label,\n defaultValue = false,\n onChange,\n}) => {\n const [checked, setChecked] = useState(defaultValue);\n\n const handleClick = () => {\n const newCheckedState = !checked;\n setChecked(newCheckedState);\n onChange(label, newCheckedState);\n };\n\n return (\n <div onPointerDown={handleClick}>\n <input\n className=\"rpgui-checkbox\"\n type=\"checkbox\"\n checked={checked}\n readOnly\n />\n <label>{label}</label>\n <br />\n </div>\n );\n};\n","import styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport const SingleShortcut = styled.button`\n width: 3rem;\n height: 3rem;\n background-color: ${uiColors.lightGray};\n border: 2px solid ${uiColors.darkGray};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n\n span {\n pointer-events: none;\n }\n\n .mana {\n position: absolute;\n top: -5px;\n right: 0;\n font-size: 0.65rem;\n color: ${uiColors.blue};\n }\n\n .qty {\n position: absolute;\n top: -5px;\n right: 0;\n font-size: 0.65rem;\n }\n\n .magicWords {\n margin-top: 4px;\n }\n\n .keyboard {\n position: absolute;\n bottom: -5px;\n left: 0;\n font-size: 0.65rem;\n color: ${uiColors.yellow};\n }\n\n .onCooldown {\n color: ${uiColors.gray};\n }\n\n .cooldown {\n position: absolute;\n z-index: 1;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: inherit;\n background-color: rgba(0 0 0 / 60%);\n font-size: 0.7rem;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${uiColors.darkYellow};\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n\n &:disabled {\n opacity: 0.5;\n }\n`;\n","import { useEffect, useRef, useState } from 'react';\n\nexport const useShortcutCooldown = (\n onShortcutCast: (index: number) => void\n) => {\n const [shortcutCooldown, setShortcutCooldown] = useState(0);\n const cooldownTimeout = useRef<NodeJS.Timeout | null>(null);\n\n const handleShortcutCast = (index: number) => {\n if (shortcutCooldown <= 0) setShortcutCooldown(1.5);\n onShortcutCast(index);\n };\n\n useEffect(() => {\n if (cooldownTimeout.current) clearTimeout(cooldownTimeout.current);\n\n if (shortcutCooldown > 0) {\n cooldownTimeout.current = setTimeout(() => {\n setShortcutCooldown(shortcutCooldown - 0.1);\n }, 100);\n }\n }, [shortcutCooldown]);\n\n return { shortcutCooldown, handleShortcutCast };\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SingleShortcut } from '../Shortcuts/SingleShortcut';\nimport { useShortcutCooldown } from '../Shortcuts/useShortcutCooldown';\n\nexport type CircularControllerProps = {\n onActionClick: () => void;\n onCancelClick: () => void;\n onShortcutClick: (index: number) => void;\n mana: number;\n shortcuts: IShortcut[];\n inventory?: IItemContainer | null;\n atlasIMG: any;\n atlasJSON: any;\n spellCooldowns?: Record<string, number>;\n};\n\nexport const CircularController: React.FC<CircularControllerProps> = ({\n onActionClick,\n onCancelClick,\n onShortcutClick,\n mana,\n shortcuts,\n inventory,\n atlasIMG,\n atlasJSON,\n spellCooldowns,\n}) => {\n const { handleShortcutCast, shortcutCooldown } = useShortcutCooldown(\n onShortcutClick\n );\n\n const onTouchStart = (e: React.TouchEvent<HTMLButtonElement>) => {\n const target = e.target as HTMLButtonElement;\n target?.classList.add('active');\n };\n\n const onTouchEnd = (\n action: () => void,\n e: React.TouchEvent<HTMLButtonElement>\n ) => {\n const target = e.target as HTMLButtonElement;\n setTimeout(() => {\n target?.classList.remove('active');\n }, 100);\n action();\n };\n\n const renderShortcut = (i: number) => {\n const buildClassName = (classBase: string, isOnCooldown: boolean) => {\n return `${classBase} ${isOnCooldown ? 'onCooldown' : ''}`;\n };\n\n let variant = '';\n\n if (i === 0) variant = 'top';\n else if (i >= 3) variant = `bottom-${i - 3}`;\n\n const onShortcutClickBinded =\n shortcuts[i]?.type !== ShortcutType.None\n ? handleShortcutCast.bind(null, i)\n : () => {};\n\n const isOnShortcutCooldown = shortcutCooldown > 0;\n\n if (shortcuts[i]?.type === ShortcutType.Item) {\n const payload = shortcuts[i]?.payload as IItem | undefined;\n\n let itemsFromEquipment: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === payload?.key) {\n itemsFromEquipment.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty = itemsFromEquipment.reduce(\n (acc, item) => acc + (item?.stackQty || 1),\n 0\n );\n\n return (\n <StyledShortcut\n key={i}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onShortcutClickBinded)}\n disabled={false}\n className={variant}\n >\n {isOnShortcutCooldown && (\n <span className=\"cooldown\">{shortcutCooldown.toFixed(1)}</span>\n )}\n {payload && (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n imgScale={1.4}\n imgStyle={{ left: '4px' }}\n containerStyle={{ pointerEvents: 'none' }}\n />\n )}\n <span className={buildClassName('qty', isOnShortcutCooldown)}>\n {totalQty}\n </span>\n </StyledShortcut>\n );\n }\n\n const payload = shortcuts[i]?.payload as IRawSpell | undefined;\n\n const spellCooldown = !payload\n ? 0\n : spellCooldowns?.[payload.magicWords.replaceAll(' ', '_')] ??\n shortcutCooldown;\n const cooldown =\n spellCooldown > shortcutCooldown ? spellCooldown : shortcutCooldown;\n const isOnCooldown = cooldown > 0 && !!payload;\n\n const CONTAINER_STYLE = { width: '32px', height: '32px' };\n const IMAGE_SCALE = 1.5;\n\n return (\n <StyledShortcut\n key={i}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onShortcutClickBinded)}\n disabled={mana < (payload?.manaCost ?? 0)}\n className={variant}\n >\n {isOnCooldown && (\n <span className=\"cooldown\">\n {cooldown.toFixed(cooldown < 10 ? 1 : 0)}\n </span>\n )}\n <span className={buildClassName('mana', isOnCooldown)}>\n {payload && payload.manaCost}\n </span>\n <span className=\"magicWords\">\n {payload?.texturePath ? (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath}\n imgScale={IMAGE_SCALE}\n containerStyle={CONTAINER_STYLE}\n centered={true}\n borderRadius=\"50%\"\n />\n ) : (\n payload?.magicWords.split(' ').map(word => word[0])\n )}\n </span>\n </StyledShortcut>\n );\n };\n\n return (\n <ButtonsContainer>\n <ShortcutsContainer>\n {Array.from({ length: 12 }).map((_, i) => renderShortcut(i))}\n </ShortcutsContainer>\n <Button\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onActionClick)}\n >\n <div className=\"rpgui-icon sword\" />\n </Button>\n\n <CancelButton\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd.bind(null, onCancelClick)}\n >\n <span>X</span>\n </CancelButton>\n </ButtonsContainer>\n );\n};\n\nconst Button = styled.button`\n width: 4.3rem;\n height: 4.3rem;\n background-color: ${uiColors.lightGray};\n border: 2px solid ${uiColors.darkGray};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n position: relative;\n transition: all 0.1s;\n margin-top: -3rem;\n top: -144px;\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n\n .sword {\n transform: rotate(-45deg);\n height: 2.5rem;\n width: 1.9rem;\n pointer-events: none;\n }\n`;\n\nconst CancelButton = styled(Button)`\n width: 3rem;\n height: 3rem;\n font-size: 0.8rem;\n position: relative;\n left: 2.6rem;\n\n span {\n margin-top: 4px;\n margin-left: 2px;\n pointer-events: none;\n }\n`;\n\nconst ButtonsContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n\n scale: 0.9;\n`;\n\nconst ShortcutsContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n flex-direction: column;\n margin-top: 3rem;\n\n .top {\n transform: translate(93%, 25%);\n }\n\n .bottom-0 {\n transform: translate(93%, -25%);\n }\n\n .bottom-1 {\n transform: translate(320%, calc(-4.5rem));\n }\n\n .bottom-2 {\n transform: translate(-13.5%, calc(-5.6rem - 25%));\n }\n\n .bottom-3 {\n transform: translate(318%, calc(-15.8rem - 25%));\n }\n\n .bottom-4 {\n transform: translate(-15%, calc(-20.2rem - 25%));\n }\n .bottom-5 {\n transform: translate(210%, calc(-15rem - 25%));\n }\n\n .bottom-6 {\n transform: translate(210%, calc(-25.7rem - 25%));\n }\n\n .bottom-7 {\n transform: translate(304%, calc(-24.9rem - 25%));\n }\n\n .bottom-8 {\n transform: translate(-101%, calc(-27.7rem - 25%));\n }\n`;\n\nconst StyledShortcut = styled(SingleShortcut)`\n width: 2.5rem;\n height: 2.5rem;\n transition: all 0.1s;\n\n .mana,\n .qty {\n font-size: 0.5rem;\n }\n\n &:hover,\n &:focus,\n &:active {\n background-color: ${uiColors.lightGray};\n }\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n`;\n","/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nimport { useState } from 'react';\n\nexport function useLocalStorage<T>(key: string, initialValue: T) {\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T>(() => {\n if (typeof window === 'undefined') {\n return initialValue;\n }\n try {\n // Get from local storage by key\n const item = window.localStorage.getItem(key);\n // Parse stored json or if none return initialValue\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n // If error also return initialValue\n console.log(error);\n return initialValue;\n }\n });\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue = (value: T | ((val: T) => T)) => {\n try {\n // Allow value to be a function so we have same API as useState\n const valueToStore =\n value instanceof Function ? value(storedValue) : value;\n // Save state\n setStoredValue(valueToStore);\n // Save to local storage\n if (typeof window !== 'undefined') {\n window.localStorage.setItem(key, JSON.stringify(valueToStore));\n }\n } catch (error) {\n // A more advanced implementation would handle the error case\n console.log(error);\n }\n };\n\n return [storedValue, setValue] as const;\n}\n","import { useEffect } from 'react';\n\nexport function useOutsideClick(ref: any, id: string) {\n useEffect(() => {\n /**\n * Alert if clicked on outside of element\n */\n function handleClickOutside(event: any) {\n if (ref.current && !ref.current.contains(event.target)) {\n const event = new CustomEvent('clickOutside', {\n detail: {\n id,\n },\n });\n document.dispatchEvent(event);\n }\n }\n // Bind the event listener\n document.addEventListener('pointerdown', handleClickOutside);\n return () => {\n // Unbind the event listener on clean up\n document.removeEventListener('pointerdown', handleClickOutside);\n };\n }, [ref]);\n}\n","import React, { useEffect, useRef } from 'react';\nimport Draggable from 'react-draggable';\nimport styled, { css } from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport { IPosition } from '../types/eventTypes';\nimport { RPGUIContainerTypes } from './RPGUI/RPGUIContainer';\n\nexport interface IDraggableContainerProps {\n children: React.ReactNode;\n width?: string;\n height?: string;\n minWidth?: string;\n minHeight?: string;\n className?: string;\n type?: RPGUIContainerTypes;\n title?: string;\n imgSrc?: string;\n imgWidth?: string;\n onCloseButton?: () => void;\n cancelDrag?: string;\n onPositionChange?: (position: IPosition) => void;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n scale?: number;\n dragDisabled?: boolean;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nexport const DraggableContainer: React.FC<IDraggableContainerProps> = ({\n children,\n width = '50%',\n height,\n minHeight,\n minWidth,\n className,\n type = RPGUIContainerTypes.FramedGold,\n onCloseButton,\n title,\n imgSrc,\n imgWidth = '20px',\n cancelDrag,\n onPositionChange,\n onPositionChangeEnd,\n onPositionChangeStart,\n onOutsideClick,\n initialPosition = { x: 0, y: 0 },\n scale,\n dragDisabled = false,\n isFullScreen,\n opacity,\n}) => {\n const draggableRef = useRef(null);\n\n if (isFullScreen) {\n width = '100%';\n height = '100%';\n }\n\n useOutsideClick(draggableRef, 'item-container');\n\n useEffect(() => {\n document.addEventListener('clickOutside', event => {\n const e = event as CustomEvent;\n\n if (e.detail.id === 'item-container') {\n if (onOutsideClick) {\n onOutsideClick();\n }\n }\n });\n\n return () => {\n document.removeEventListener('clickOutside', _e => {});\n };\n }, []);\n\n return (\n <Draggable\n cancel={`.container-close,input,button,${cancelDrag}`}\n disabled={dragDisabled}\n onDrag={(_e, data) => {\n if (onPositionChange) {\n onPositionChange({\n x: data.x,\n y: data.y,\n });\n }\n }}\n onStop={(_e, data) => {\n if (onPositionChangeEnd) {\n onPositionChangeEnd({\n x: data.x,\n y: data.y,\n });\n }\n }}\n onStart={(_e, data) => {\n if (onPositionChangeStart) {\n onPositionChangeStart({\n x: data.x,\n y: data.y,\n });\n }\n }}\n defaultPosition={initialPosition}\n scale={scale}\n >\n <Container\n ref={draggableRef}\n width={width}\n height={height || 'auto'}\n minWidth={minWidth}\n minHeight={minHeight}\n className={`rpgui-container ${type} ${className}`}\n isFullScreen={isFullScreen}\n opacity={opacity}\n >\n {title && (\n <TitleContainer className=\"drag-handler\">\n <Title>\n {imgSrc && <Icon src={imgSrc} width={imgWidth} />}\n {title}\n </Title>\n </TitleContainer>\n )}\n {onCloseButton && (\n <CloseButton\n className=\"container-close\"\n onPointerDown={onCloseButton}\n >\n X\n </CloseButton>\n )}\n\n {children}\n </Container>\n </Draggable>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n minWidth?: string;\n minHeight?: string;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n height: ${props => props.height};\n width: ${({ width }) => width};\n min-width: ${({ minWidth }) => minWidth || 'auto'};\n min-height: ${({ minHeight }) => minHeight || 'auto'};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n\n overflow-y: hidden;\n\n ${({ opacity }) =>\n opacity &&\n css`\n opacity: ${opacity};\n `}\n\n ${({ isFullScreen }) =>\n isFullScreen &&\n css`\n justify-content: center;\n align-items: flex-start;\n align-content: flex-start;\n `}\n\n &.rpgui-container {\n padding-top: 1.5rem;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n @media (max-width: 950px) {\n font-size: 1.7rem;\n padding: 12px;\n }\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n max-height: 42px;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.large};\n`;\n\ninterface ICustomIconProps {\n width: string;\n}\n\nconst Icon = styled.img<ICustomIconProps>`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.xsmall};\n width: ${({ width }) => width};\n margin-right: 0.5rem;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport interface IOptionsProps {\n id: number;\n value: string;\n option: string | JSX.Element;\n}\n\nexport interface IDropdownProps {\n options: IOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n opensUp?: boolean; // Add a new prop to control the dropdown direction\n}\n\nexport const Dropdown: React.FC<IDropdownProps> = ({\n options,\n width,\n onChange,\n opensUp = false, // Default value is false\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>('');\n const [selectedOption, setSelectedOption] = useState<string | JSX.Element>(\n ''\n );\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n const firstOption = options[0];\n\n if (firstOption) {\n let change = !selectedValue;\n if (!change) {\n change = options.filter(o => o.value === selectedValue).length < 1;\n }\n\n if (change) {\n setSelectedValue(firstOption.value);\n setSelectedOption(firstOption.option);\n }\n }\n }, [options]);\n\n useEffect(() => {\n if (selectedValue) {\n onChange(selectedValue);\n }\n }, [selectedValue]);\n\n return (\n <Container onMouseLeave={() => setOpened(false)} width={width}>\n <DropdownSelect\n id={`dropdown-${dropdownId}`}\n className=\"rpgui-dropdown-imp rpgui-dropdown-imp-header\"\n onPointerUp={() => setOpened(prev => !prev)}\n >\n <label>▼</label> {selectedOption}\n </DropdownSelect>\n\n <DropdownOptions\n className=\"rpgui-dropdown-imp\"\n opened={opened}\n opensUp={opensUp}\n >\n {options.map(option => {\n return (\n <li\n key={option.id}\n onPointerUp={() => {\n setSelectedValue(option.value);\n setSelectedOption(option.option);\n setOpened(false);\n }}\n >\n {option.option}\n </li>\n );\n })}\n </DropdownOptions>\n </Container>\n );\n};\n\nconst Container = styled.div<{ width: string | undefined }>`\n position: relative;\n width: ${props => props.width || '100%'};\n`;\n\nconst DropdownSelect = styled.p`\n width: 100%;\n box-sizing: border-box;\n\n label {\n display: inline-block;\n transform: translateY(-2px);\n }\n`;\n\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n opensUp: boolean;\n}>`\n position: absolute;\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n bottom: ${props => (props.opensUp ? '100%' : 'auto')};\n top: ${props => (props.opensUp ? 'auto' : '100%')};\n margin: 0;\n padding: 0;\n @media (max-width: 768px) {\n padding: 8px 0;\n }\n`;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport styled from 'styled-components';\n\nconst modalRoot = document.getElementById('modal-root')!;\n\ninterface ModalPortalProps {\n children: React.ReactNode;\n}\n\nconst ModalPortal: React.FC<ModalPortalProps> = ({ children }) => {\n return ReactDOM.createPortal(\n <Container className=\"rpgui-content\">{children}</Container>,\n modalRoot\n );\n};\n\nconst Container = styled.div`\n position: static !important;\n`;\n\nexport default ModalPortal;\n","import { useCallback } from 'react';\n\ninterface IEventWithTarget {\n target: EventTarget | null;\n}\n\ninterface ITouchEvent extends IEventWithTarget {\n changedTouches?: TouchList;\n\n touches?: TouchList;\n}\n\nexport function useTouchTarget() {\n const getTouchTarget = useCallback(\n (e: MouseEvent | TouchEvent | IEventWithTarget): HTMLElement => {\n // Check if it's a touch event\n if ('changedTouches' in e || 'touches' in e) {\n const touchEvent = e as ITouchEvent;\n const touch = touchEvent.changedTouches?.[0] || touchEvent.touches?.[0];\n\n if (touch) {\n return document.elementFromPoint(\n touch.clientX,\n touch.clientY\n ) as HTMLElement;\n }\n }\n\n // If it's not a touch event or touch is not available, fallback to target\n return (e.target as HTMLElement) || document.body;\n },\n []\n );\n\n return getTouchTarget;\n}\n\nexport default useTouchTarget;\n","import { IItem, ItemRarities } from '@rpg-engine/shared';\n\n\nexport const rarityColor = (item: IItem | null) => {\n switch (item?.rarity) {\n case ItemRarities.Uncommon:\n return 'rgba(13, 193, 13, 0.6)';\n case ItemRarities.Rare:\n return 'rgba(8, 104, 187, 0.6)';\n case ItemRarities.Epic:\n return 'rgba(191, 0, 255, 0.6)';\n case ItemRarities.Legendary:\n return 'rgba(255, 191, 0,0.6)';\n default:\n return null;\n }\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n item: IItem;\n}\n\nconst gemColors: { [key: string]: string } = {\n 'emerald-gem': '#50C878', // Emerald green\n 'topaz-radiance': '#FFC87C', // Topaz yellow\n 'sapphire-gem': '#0F52BA', // Sapphire blue\n 'ruby-gem': '#E0115F', // Ruby red\n 'misty-quartz-gem': '#D9D9F3', // Misty Quartz purple\n 'coral-reef-gem': '#FF7F50', // Coral reef orange\n 'jasper-gem': '#D73B3E', // Jasper red\n 'earthstone-gem': '#8B4513', // Earthstone brown\n 'obsidian-gem': '#0B0C0E', // Obsidian black\n 'amethyst-gem': '#9966CC', // Amethyst purple\n};\n\nconst defaultColor = '#FFFFFF'; // Default color (white)\n\nexport const onRenderGems = (item: IItem) => {\n const gemQty = item.attachedGems?.length || 0;\n\n if (gemQty > 0) {\n return <ItemSlotQty item={item} />;\n }\n return undefined;\n};\n\nexport const ItemSlotQty = ({ item }: IProps): JSX.Element => {\n const itemId = item._id;\n\n return (\n <ItemQtyContainer key={`qty-${itemId}`} className=\"item-slot-qty\">\n {item.attachedGems?.map((gem, index) => (\n <Gem\n key={`${itemId}-gem-${index}`}\n color={gemColors[gem.key] || defaultColor}\n />\n ))}\n </ItemQtyContainer>\n );\n};\n\nconst ItemQtyContainer = styled.div`\n position: relative;\n width: 85%;\n height: 16px;\n top: 28px;\n left: 0px;\n pointer-events: none;\n transform: scale(0.8);\n display: flex;\n align-items: center;\n justify-content: flex-start; /* Align gems to the left */\n opacity: 0.8;\n`;\n\nconst Gem = styled.div<{ color: string }>`\n width: 8px;\n height: 8px;\n background: ${({ color }) =>\n `radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 30%), \n linear-gradient(45deg, ${color}, ${color} 50%, rgba(255, 255, 255, 0.2))`};\n border: 1px solid black;\n transform: rotate(45deg);\n margin: 0 2px;\n box-shadow: 0 0 5px ${({ color }) => color}; /* Glow effect */\n transition: transform 0.2s, box-shadow 0.2s; /* Smooth transition for hover effect */\n\n &:hover {\n transform: rotate(45deg) scale(1.2);\n box-shadow: 0 0 10px ${({ color }) => color}; /* Enhanced glow on hover */\n }\n`;\n\nexport default ItemSlotQty;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../../../constants/uiFonts';\nimport { Ellipsis } from '../../../shared/Ellipsis';\n\ninterface IProps {\n itemId: string;\n stackQty: number;\n qtyClassName: string;\n}\n\nexport const onRenderStackInfo = (itemId: string, stackQty: number) => {\n const isFractionalStackQty = stackQty % 1 !== 0;\n const isLargerThan999 = stackQty > 999;\n\n let qtyClassName = 'regular';\n if (isLargerThan999) qtyClassName = 'small';\n if (isFractionalStackQty) qtyClassName = 'xsmall';\n\n if (stackQty > 1) {\n return (\n <ItemSlotQty\n itemId={itemId}\n stackQty={stackQty}\n qtyClassName={qtyClassName}\n />\n );\n }\n return undefined;\n};\n\nexport const ItemSlotQty = ({\n itemId,\n stackQty,\n qtyClassName,\n}: IProps): JSX.Element => {\n return (\n <ItemQtyContainer key={`qty-${itemId}`} className=\"item-slot-qty\">\n <Ellipsis maxLines={1} maxWidth=\"48px\">\n <ItemQty className={qtyClassName}>\n {Math.round(stackQty * 100) / 100}{' '}\n </ItemQty>\n </Ellipsis>\n </ItemQtyContainer>\n );\n};\n\nconst ItemQtyContainer = styled.div`\n position: relative;\n width: 85%;\n height: 16px;\n top: 25px;\n left: 2px;\n pointer-events: none;\n\n display: flex;\n justify-content: flex-end;\n`;\n\nconst ItemQty = styled.span`\n &.regular {\n font-size: ${uiFonts.size.small};\n }\n &.small {\n font-size: ${uiFonts.size.xsmall};\n }\n &.xsmall {\n font-size: ${uiFonts.size.xxsmall};\n }\n`;\n","import {\n IItem,\n ItemContainerType,\n ItemSlotType,\n getItemTextureKeyPath,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport { v4 as uuidv4 } from 'uuid';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { onRenderGems } from './ItemGem';\nimport { EquipmentSlotSpriteByType } from './ItemSlot';\nimport { onRenderStackInfo } from './ItemSlotQty/ItemSlotQty';\n\ninterface IProps {\n containerType: ItemContainerType | null | undefined;\n atlasJSON: any;\n atlasIMG: any;\n slotSpriteMask: ItemSlotType | null | undefined;\n item: IItem | null;\n}\n\nexport const ItemSlotRenderer: React.FC<IProps> = ({\n containerType,\n atlasJSON,\n atlasIMG,\n slotSpriteMask,\n item,\n}) => {\n const renderStackInfo = (item: IItem) => {\n return (\n item.stackQty &&\n item.stackQty > 1 &&\n onRenderStackInfo(item._id, item.stackQty)\n );\n };\n\n const renderGems = (item: IItem) => {\n return item.attachedGems && onRenderGems(item);\n };\n\n const renderItem = (item: IItem | null) => {\n if (!item?.texturePath) {\n return null;\n }\n\n return (\n <ErrorBoundary key={item._id}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.texturePath,\n texturePath: item.texturePath,\n stackQty: item.stackQty || 1,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={3}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n {renderStackInfo(item)}\n {renderGems(item)}\n </ErrorBoundary>\n );\n };\n\n const renderEquipment = (itemToRender: IItem | null) => {\n if (\n !itemToRender?.texturePath ||\n !itemToRender.allowedEquipSlotType?.includes(slotSpriteMask!)\n ) {\n return (\n <ErrorBoundary key={uuidv4()}>\n <SpriteFromAtlas\n key={uuidv4()}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={EquipmentSlotSpriteByType[slotSpriteMask!]}\n imgScale={3}\n grayScale={true}\n opacity={0.4}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n </ErrorBoundary>\n );\n }\n\n return renderItem(itemToRender);\n };\n\n const onRenderSlot = (itemToRender: IItem | null) => {\n switch (containerType) {\n case ItemContainerType.Equipment:\n return renderEquipment(itemToRender);\n default:\n return renderItem(itemToRender);\n }\n };\n\n return <>{onRenderSlot(item)}</>;\n};\n","import {\n ActionsForEquipmentSet,\n ActionsForInventory,\n ActionsForLoot,\n ActionsForMapContainer,\n DepotSocketEvents,\n IItem,\n ItemContainerType,\n ItemSocketEvents,\n ItemSocketEventsDisplayLabels,\n ItemType,\n} from '@rpg-engine/shared';\n\nexport interface IContextMenuItem {\n id: string;\n text: string;\n}\n\nconst generateContextMenuListOptions = (actionsByTypeList: any) => {\n const contextMenu: IContextMenuItem[] = actionsByTypeList.map(\n (action: string) => {\n return { id: action, text: ItemSocketEventsDisplayLabels[action] };\n }\n );\n return contextMenu;\n};\n\nexport const generateContextMenu = (\n item: IItem,\n itemContainerType: ItemContainerType | null,\n isDepotSystem?: boolean\n) => {\n let contextActionMenu: IContextMenuItem[] = [];\n\n if (itemContainerType === ItemContainerType.Inventory) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Equipment\n );\n break;\n case ItemType.Container:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Container\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Tool\n );\n break;\n\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForInventory.Other\n );\n break;\n }\n\n if (isDepotSystem) {\n contextActionMenu.push({\n id: DepotSocketEvents.Deposit,\n text: 'Deposit',\n });\n }\n\n const contextActionMenuDontHaveUseWith = !contextActionMenu.find(action =>\n action.text.toLowerCase().includes('use with')\n );\n\n if (item.hasUseWith && contextActionMenuDontHaveUseWith) {\n contextActionMenu.push({\n id: ItemSocketEvents.UseWith,\n text: ItemSocketEvents.UseWith,\n });\n }\n }\n if (itemContainerType === ItemContainerType.Equipment) {\n switch (item.type) {\n case ItemType.Container:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForEquipmentSet.Container\n );\n\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForEquipmentSet.Equipment\n );\n }\n }\n if (itemContainerType === ItemContainerType.Loot) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Equipment\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(ActionsForLoot.Tool);\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForLoot.Other\n );\n break;\n }\n }\n if (itemContainerType === ItemContainerType.MapContainer) {\n switch (item.type) {\n case ItemType.Weapon:\n case ItemType.Armor:\n case ItemType.Accessory:\n case ItemType.Jewelry:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Equipment\n );\n break;\n case ItemType.Consumable:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Consumable\n );\n break;\n case ItemType.CraftingResource:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.CraftingResource\n );\n break;\n case ItemType.Tool:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Tool\n );\n break;\n default:\n contextActionMenu = generateContextMenuListOptions(\n ActionsForMapContainer.Other\n );\n break;\n }\n\n const contextActionMenuDontHaveUseWith = !contextActionMenu.find(action =>\n action.text.toLowerCase().includes('use with')\n );\n\n if (item.hasUseWith && contextActionMenuDontHaveUseWith) {\n contextActionMenu.push({ id: 'use-with', text: 'Use with...' });\n }\n }\n if (itemContainerType === ItemContainerType.Depot) {\n contextActionMenu = [\n {\n id: ItemSocketEvents.GetItemInfo,\n text: ItemSocketEventsDisplayLabels.GetItemInfo,\n },\n { id: DepotSocketEvents.Withdraw, text: 'Withdraw' },\n ];\n }\n\n return contextActionMenu;\n};\n","import { IItem, ItemContainerType } from '@rpg-engine/shared';\nimport React, {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { generateContextMenu, IContextMenuItem } from '../itemContainerHelper';\n\ninterface IPosition {\n x: number;\n y: number;\n}\n\ninterface IItemSlotDetailsState {\n item: IItem | null;\n isTooltipVisible: boolean;\n isTooltipMobileVisible: boolean;\n isContextMenuVisible: boolean;\n contextMenuPosition: IPosition;\n contextActions: IContextMenuItem[];\n clearContextActions: () => void;\n clearDetailsState: () => void;\n}\n\ninterface IItemSlotDetailsContext {\n detailsState: IItemSlotDetailsState;\n updateDetailsState: (newState: Partial<IItemSlotDetailsState>) => void;\n clearDetailsState: () => void;\n setContextActions: (\n item: IItem | null,\n containerType: string | null,\n isDepotSystem: boolean,\n isContextMenuDisabled: boolean\n ) => void;\n clearContextActions: () => void;\n}\n\nconst initialDetailsState: IItemSlotDetailsState = {\n item: null,\n isTooltipVisible: false,\n isTooltipMobileVisible: false,\n isContextMenuVisible: false,\n contextMenuPosition: { x: 0, y: 0 },\n contextActions: [],\n clearContextActions: () => {},\n clearDetailsState: () => {},\n};\n\nconst ItemSlotDetailsContext = createContext<IItemSlotDetailsContext>({\n detailsState: initialDetailsState,\n updateDetailsState: () => {},\n clearDetailsState: () => {},\n setContextActions: () => {},\n clearContextActions: () => {},\n});\n\nexport const useItemSlotDetails = (): IItemSlotDetailsContext =>\n useContext(ItemSlotDetailsContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const ItemSlotDetailsProvider: React.FC<IProps> = ({ children }) => {\n const [detailsState, setDetailsState] = useState<IItemSlotDetailsState>(\n initialDetailsState\n );\n\n const updateDetailsState = useCallback(\n (newState: Partial<IItemSlotDetailsState>): void => {\n setDetailsState(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n []\n );\n\n const clearDetailsState = useCallback(() => {\n setDetailsState(initialDetailsState);\n }, [setDetailsState]);\n\n const setContextActions = useCallback(\n (\n item: IItem | null,\n containerType: string | null,\n isDepotSystem: boolean,\n isContextMenuDisabled: boolean\n ): void => {\n if (item && containerType && !isContextMenuDisabled) {\n const newContextActions = generateContextMenu(\n item,\n containerType as ItemContainerType,\n isDepotSystem\n );\n updateDetailsState({ contextActions: newContextActions });\n } else {\n updateDetailsState({ contextActions: [] });\n }\n },\n []\n );\n\n const clearContextActions = useCallback(() => {\n updateDetailsState({ contextActions: [] });\n }, [updateDetailsState]);\n\n const contextValue = useMemo(\n () => ({\n detailsState,\n updateDetailsState,\n clearDetailsState,\n setContextActions,\n clearContextActions,\n }),\n [\n detailsState,\n updateDetailsState,\n clearDetailsState,\n setContextActions,\n clearContextActions,\n ]\n );\n\n return (\n <ItemSlotDetailsContext.Provider value={contextValue}>\n {children}\n </ItemSlotDetailsContext.Provider>\n );\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React, {\n createContext,\n useCallback,\n useContext,\n useMemo,\n useState,\n} from 'react';\nimport { IPosition } from '../../../../types/eventTypes';\n\ninterface IDraggingState {\n item: IItem | null;\n isDragging: boolean;\n position: IPosition;\n dropPosition: IPosition | null;\n isFocused: boolean;\n draggingDistance: number;\n}\n\ninterface IDraggingContext {\n draggingState: IDraggingState;\n updateDraggingState: (newState: Partial<IDraggingState>) => void;\n clearDraggingState: () => void;\n}\n\nconst initialDraggingState: IDraggingState = {\n item: null,\n isDragging: false,\n position: { x: 0, y: 0 },\n dropPosition: null,\n isFocused: false,\n draggingDistance: 0,\n};\n\nconst ItemSlotDraggingContext = createContext<IDraggingContext>({\n draggingState: initialDraggingState,\n updateDraggingState: () => {},\n clearDraggingState: () => {},\n});\n\nexport const useItemSlotDragging = (): IDraggingContext =>\n useContext(ItemSlotDraggingContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const ItemSlotDraggingProvider: React.FC<IProps> = ({ children }) => {\n const [draggingState, setDraggingState] = useState<IDraggingState>(\n initialDraggingState\n );\n\n const updateDraggingState = useCallback(\n (newState: Partial<IDraggingState>): void => {\n setDraggingState(prevState => ({\n ...prevState,\n ...newState,\n }));\n },\n []\n );\n\n const clearDraggingState = useCallback(() => {\n setDraggingState(initialDraggingState);\n }, []);\n\n const contextValue = useMemo(\n () => ({\n draggingState,\n updateDraggingState,\n clearDraggingState,\n }),\n [draggingState, updateDraggingState, clearDraggingState]\n );\n\n return (\n <ItemSlotDraggingContext.Provider value={contextValue}>\n {children}\n </ItemSlotDraggingContext.Provider>\n );\n};\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n isMobile,\n ItemContainerType,\n ItemSlotType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport styled from 'styled-components';\nimport useTouchTarget from '../../../hooks/useTouchTarget';\nimport { IPosition } from '../../../types/eventTypes';\nimport { rarityColor } from './ItemSlotRarity';\nimport { ItemSlotRenderer } from './ItemSlotRenderer';\nimport { useItemSlotDetails } from './context/ItemSlotDetailsContext';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\nexport const EquipmentSlotSpriteByType: any = {\n Neck: 'accessories/corruption-necklace.png',\n LeftHand: 'swords/broad-sword.png',\n Ring: 'rings/iron-ring.png',\n Head: 'helmets/viking-helmet.png',\n Torso: 'armors/iron-armor.png',\n Legs: 'legs/studded-legs.png',\n Feet: 'boots/iron-boots.png',\n Inventory: 'containers/bag.png',\n RightHand: 'shields/plate-shield.png',\n Accessory: 'ranged-weapons/arrow.png',\n};\n\ninterface IProps {\n slotIndex: number;\n item: IItem | null;\n itemContainer?: IItemContainer | null;\n itemContainerType?: ItemContainerType | null;\n slotSpriteMask?: ItemSlotType | null;\n onMouseOver?: (\n event: any,\n slotIndex: number,\n item: IItem | null,\n x: number,\n y: number\n ) => void;\n onMouseOut?: () => void;\n onPointerDown: (\n ItemType: ItemType,\n itemContainerType: ItemContainerType | null,\n item: IItem\n ) => void;\n onDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n dragScale?: number;\n checkIfItemCanBeMoved?: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;\n onPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n isContextMenuDisabled?: boolean;\n isSelectingShortcut?: boolean;\n equipmentSet?: IEquipmentSet | null;\n setItemShortcut?: (item: IItem, shortcutIndex: number) => void;\n isDepotSystem?: boolean;\n}\n\ninterface IProps {\n slotIndex: number;\n item: IItem | null;\n itemContainer?: IItemContainer | null;\n itemContainerType?: ItemContainerType | null;\n slotSpriteMask?: ItemSlotType | null;\n onMouseOver?: (\n event: any,\n slotIndex: number,\n item: IItem | null,\n x: number,\n y: number\n ) => void;\n onMouseOut?: () => void;\n onPointerDown: (\n ItemType: ItemType,\n itemContainerType: ItemContainerType | null,\n item: IItem\n ) => void;\n onDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n dragScale?: number;\n checkIfItemCanBeMoved?: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n openQuantitySelector?: (maxQuantity: number, callback: () => void) => void;\n onPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n isContextMenuDisabled?: boolean;\n isSelectingShortcut?: boolean;\n equipmentSet?: IEquipmentSet | null;\n setItemShortcut?: (item: IItem, shortcutIndex: number) => void;\n isDepotSystem?: boolean;\n}\n\nexport const ItemSlot: React.FC<IProps> = observer(\n ({\n slotIndex,\n item,\n itemContainerType: containerType,\n slotSpriteMask,\n onMouseOver,\n onMouseOut,\n onPointerDown,\n atlasJSON,\n atlasIMG,\n isContextMenuDisabled = false,\n onDragEnd,\n onDragStart,\n onPlaceDrop,\n onOutsideDrop: onDrop,\n checkIfItemCanBeMoved,\n openQuantitySelector,\n checkIfItemShouldDragEnd,\n dragScale,\n isSelectingShortcut,\n\n setItemShortcut,\n isDepotSystem,\n }) => {\n const {\n detailsState,\n updateDetailsState,\n setContextActions,\n } = useItemSlotDetails();\n\n const getTouchTarget = useTouchTarget();\n\n const {\n isContextMenuVisible,\n clearDetailsState,\n clearContextActions,\n } = detailsState;\n\n const dragContainer = useRef<HTMLDivElement>(null);\n\n const {\n draggingState,\n updateDraggingState,\n clearDraggingState,\n } = useItemSlotDragging();\n\n const { isFocused, isDragging, draggingDistance } = draggingState;\n\n useEffect(() => {\n // Reset drag position and focus when item changes\n updateDraggingState({\n position: { x: 0, y: 0 },\n isFocused: false,\n });\n }, [\n containerType,\n isDepotSystem,\n setContextActions,\n clearContextActions,\n isContextMenuDisabled, // Added missing dependency\n ]);\n\n useEffect(() => {\n // Reset drag position and focus when item changes\n clearDraggingState();\n\n // Clear context actions when component unmounts or dependencies change\n return () => {\n clearContextActions();\n };\n }, [\n containerType,\n isDepotSystem,\n setContextActions,\n clearContextActions,\n isContextMenuDisabled,\n updateDraggingState, // Add this dependency\n ]);\n\n const resetItem = () => {\n clearDraggingState();\n clearDetailsState();\n };\n\n const onSuccessfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) {\n updateDraggingState({\n position: { x: 0, y: 0 },\n isFocused: false,\n });\n } else if (item) {\n onDragEnd?.(quantity);\n }\n };\n\n const refreshContextActions = () => {\n setContextActions(\n item,\n containerType as ItemContainerType,\n isDepotSystem ?? false,\n isContextMenuDisabled\n );\n };\n\n const onDraggableStop: DraggableEventHandler = (e, data) => {\n requestAnimationFrame(() => {\n updateDraggingState({\n item: null,\n });\n\n let target = e.target as HTMLElement;\n\n if (isMobile()) {\n target = getTouchTarget(e as MouseEvent);\n }\n\n handleShortcutSetter(target);\n removeDraggingClass(target);\n\n const shouldHandleDraggedItemResult = shouldHandleDraggedItem();\n\n if (shouldHandleDraggedItemResult) {\n handleDraggedItem(e, data);\n } else if (item && !isDragging) {\n handleContextMenuOrTooltip(e as React.MouseEvent);\n }\n });\n };\n\n /**\n * Handles the shortcut setter logic if the target element is a shortcut setter.\n */\n const handleShortcutSetter = (target: HTMLElement) => {\n if (target?.id.includes('shortcutSetter') && setItemShortcut && item) {\n const index = parseInt(target.id.split('_')[1], 10);\n if (!isNaN(index)) {\n setItemShortcut(item, index);\n }\n }\n };\n\n /**\n * Removes the dragging CSS class from the target element.\n */\n const removeDraggingClass = (target: HTMLElement) => {\n target.classList.remove('react-draggable-dragging');\n };\n\n /**\n * Determines whether the dragged item should be processed.\n */\n const shouldHandleDraggedItem = (): boolean => {\n return !!(isDragging && draggingState.item && !isSelectingShortcut);\n };\n\n /**\n * Handles the logic when an item has been dragged.\n */\n const handleDraggedItem = useCallback(\n (e: any, data: any) => {\n const targetClasses = Array.from((e.target as HTMLElement).classList);\n const isOutsideDrop =\n targetClasses.some(elm => elm.includes('rpgui-content')) ||\n targetClasses.length === 0;\n\n if (isOutsideDrop && draggingState.isDragging && draggingState.item) {\n console.log('ITEM SLOT: Outside drop', draggingState.item.key);\n onDrop?.(draggingState.item, { x: data.x, y: data.y });\n clearDraggingState();\n } else {\n updateDraggingState({\n dropPosition: {\n x: data.x,\n y: data.y,\n },\n isDragging: false,\n });\n\n const targetElement = dragContainer.current;\n if (!targetElement) return;\n\n const { x, y } = getElementTransform(targetElement);\n\n updateDraggingState({\n position: { x, y },\n });\n\n processDragEnd(item!);\n }\n },\n [\n draggingState.isDragging,\n draggingState.item,\n onDrop,\n clearDraggingState,\n updateDraggingState,\n ]\n );\n\n /**\n * Retrieves the current transform position of the dragged element.\n */\n const getElementTransform = (\n element: HTMLElement\n ): { x: number; y: number } => {\n const style = window.getComputedStyle(element);\n const matrix = new DOMMatrixReadOnly(style.transform);\n return { x: matrix.m41, y: matrix.m42 };\n };\n\n const processDragEnd = useCallback(\n (item: IItem) => {\n if (checkIfItemCanBeMoved?.()) {\n if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) {\n resetItem();\n return;\n }\n\n if (item.stackQty && item.stackQty !== 1 && openQuantitySelector) {\n openQuantitySelector(item.stackQty, onSuccessfulDrag);\n } else {\n onSuccessfulDrag(item.stackQty);\n }\n } else {\n resetItem();\n }\n },\n [\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n openQuantitySelector,\n onSuccessfulDrag,\n resetItem,\n ]\n );\n\n /**\n * Handles the context menu or tooltip display after dragging stops without a drop.\n */\n const handleContextMenuOrTooltip = (\n e: React.MouseEvent | React.TouchEvent\n ) => {\n const isTouchEvent = e.type === 'touchend';\n const shouldShowMobileTooltip =\n !isContextMenuDisabled && isTouchEvent && !isSelectingShortcut;\n const shouldToggleContextMenu =\n !isContextMenuDisabled && !isSelectingShortcut && !isTouchEvent;\n\n if (shouldShowMobileTooltip) {\n updateDetailsState({\n item,\n isTooltipMobileVisible: true,\n isContextMenuVisible: false, // Ensure context menu is hidden\n });\n } else if (shouldToggleContextMenu) {\n const mouseEvent = e as React.MouseEvent;\n updateDetailsState({\n item,\n isContextMenuVisible: !isContextMenuVisible && !isMobile(),\n isTooltipMobileVisible: false, // Ensure mobile tooltip is hidden\n contextMenuPosition: {\n x: mouseEvent.clientX - 10,\n y: mouseEvent.clientY - 5,\n },\n });\n }\n\n if (item) {\n onPointerDown(item.type, containerType ?? null, item);\n }\n };\n\n const onDraggableStart: DraggableEventHandler = () => {\n if (!item || isSelectingShortcut) {\n return;\n }\n\n refreshContextActions();\n\n if (onDragStart && containerType) {\n onDragStart(item, slotIndex, containerType);\n }\n };\n\n const onDraggableProgress: DraggableEventHandler = (_e, _data) => {\n // increment draggingDistance by 1\n updateDraggingState({\n draggingDistance: draggingState.draggingDistance + 1,\n });\n\n if (draggingDistance > 10) {\n updateDraggingState({\n isDragging: true,\n isFocused: true,\n });\n }\n\n if (!draggingState.item) {\n updateDraggingState({\n item: item,\n });\n }\n };\n\n return (\n <Container\n isDraggingItem={!!draggingState.item}\n item={item}\n className=\"rpgui-icon empty-slot\"\n onMouseUp={() => {\n const data = item ? item : null;\n if (onPlaceDrop && containerType)\n onPlaceDrop(data, slotIndex, containerType);\n }}\n onTouchEnd={e => {\n const { clientX, clientY } = e.changedTouches[0];\n const simulatedEvent = new MouseEvent('mouseup', {\n clientX,\n clientY,\n bubbles: true,\n });\n\n document\n .elementFromPoint(clientX, clientY)\n ?.dispatchEvent(simulatedEvent);\n }}\n onPointerDown={\n onDragStart !== undefined && onDragEnd !== undefined\n ? undefined\n : () => {\n if (item) onPointerDown(item.type, containerType ?? null, item);\n }\n }\n isSelectingShortcut={\n isSelectingShortcut &&\n (item?.type === ItemType.Consumable ||\n item?.type === ItemType.Tool ||\n item?.subType === ItemSubType.Seed)\n }\n >\n <Draggable\n axis={isSelectingShortcut ? 'none' : 'both'}\n defaultClassName={item ? 'draggable' : 'empty-slot'}\n scale={dragScale}\n disabled={onDragStart === undefined || onDragEnd === undefined}\n onStop={onDraggableStop}\n onStart={onDraggableStart}\n onDrag={onDraggableProgress}\n position={draggingState.position}\n cancel=\".empty-slot\"\n bounds=\".item-container-body, .equipment-container-body\"\n >\n <ItemContainer\n ref={dragContainer}\n isFocused={isFocused}\n onMouseOver={event => {\n onMouseOver?.(\n event,\n slotIndex,\n item,\n event.clientX,\n event.clientY\n );\n }}\n onMouseOut={() => {\n if (onMouseOut) onMouseOut();\n }}\n onMouseEnter={() => {\n updateDetailsState({\n item,\n isTooltipVisible: true,\n });\n }}\n onMouseLeave={() => {\n updateDetailsState({\n item,\n isTooltipVisible: false,\n });\n }}\n >\n <ItemSlotRenderer\n item={item}\n slotSpriteMask={slotSpriteMask}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n containerType={containerType}\n />\n </ItemContainer>\n </Draggable>\n </Container>\n );\n }\n);\n\ninterface ContainerTypes {\n item: IItem | null;\n containerType?: ItemContainerType | null;\n isSelectingShortcut?: boolean;\n isDraggingItem?: boolean;\n}\n\nconst Container = styled.div<ContainerTypes>`\n margin: 0.1rem;\n\n .react-draggable-dragging {\n // If dragging item, set opacity to 0\n opacity: ${({ isDraggingItem }) => (isDraggingItem ? 0 : 1)};\n }\n\n position: relative;\n\n .sprite-from-atlas-img--item {\n position: relative;\n top: 1.5rem;\n left: 1.5rem;\n border-color: ${({ item }) => rarityColor(item)};\n box-shadow: ${({ item }) => `0 0 5px 2px ${rarityColor(item)}`} inset,\n ${({ item }) => `0 0 4px 3px ${rarityColor(item)}`};\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n z-index: 1;\n border-radius: 12px;\n pointer-events: none;\n animation: ${({ isSelectingShortcut }) =>\n isSelectingShortcut ? 'bg-color-change 1s infinite' : 'none'};\n\n @keyframes bg-color-change {\n 0% {\n background-color: rgba(255 255 255 / 0.5);\n }\n 50% {\n background-color: transparent;\n }\n 100% {\n background-color: rgba(255 255 255 / 0.5);\n }\n }\n }\n`;\n\nconst ItemContainer = styled.div<{ isFocused?: boolean }>`\n width: 64px;\n height: 64px;\n\n position: relative;\n ${props => props.isFocused && 'z-index: 100; pointer-events: none;'};\n`;\n","import { IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ErrorBoundary } from '../Inventory/ErrorBoundary';\nimport { EquipmentSlotSpriteByType } from '../Inventory/ItemSlot';\nimport { rarityColor } from '../Inventory/ItemSlotRarity';\n\ninterface IItemInfoProps {\n item: IItem;\n itemToCompare?: IItem;\n atlasIMG: any;\n atlasJSON: any;\n}\n\ninterface IItemStat {\n key: keyof IItem;\n label?: string;\n higherIsWorse?: boolean;\n}\n\nconst statisticsToDisplay: IItemStat[] = [\n { key: 'attack' },\n { key: 'defense' },\n { key: 'maxRange', label: 'Range' },\n { key: 'weight', higherIsWorse: true },\n];\n\nexport const ItemInfo: React.FC<IItemInfoProps> = ({\n item,\n itemToCompare,\n atlasIMG,\n atlasJSON,\n}) => {\n const renderStatistics = () => {\n const statistics: React.ReactNode[] = [];\n\n for (const stat of statisticsToDisplay) {\n const itemStatistic = item[stat.key];\n\n if (itemStatistic) {\n const label =\n stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);\n\n const isItemToCompare = !!itemToCompare;\n\n const isOnlyInOneItem = isItemToCompare && !itemToCompare?.[stat.key];\n const statDiff =\n parseInt(itemStatistic.toString()) -\n parseInt(itemToCompare?.[stat.key]?.toString() ?? '0');\n\n const isDifference = isItemToCompare && statDiff !== 0;\n const isBetter =\n (statDiff > 0 && !stat.higherIsWorse) ||\n (statDiff < 0 && stat.higherIsWorse);\n\n statistics.push(\n <Statistic key={stat.key} className={isOnlyInOneItem ? 'better' : ''}>\n <div className=\"label\">{label}:</div>\n <div\n className={`value ${\n isDifference ? (isBetter ? 'better' : 'worse') : ''\n }`}\n >\n {`${itemStatistic.toString()} ${\n isDifference ? `(${statDiff > 0 ? '+' : ''}${statDiff})` : ''\n }`}\n </div>\n </Statistic>\n );\n }\n }\n\n return statistics;\n };\n\n const renderMissingStatistic = () => {\n const statistics: React.ReactNode[] = [];\n\n for (const stat of statisticsToDisplay) {\n const itemToCompareStatistic = itemToCompare?.[stat.key];\n\n if (itemToCompareStatistic && !item[stat.key]) {\n const label =\n stat.label || stat.key[0].toUpperCase() + stat.key.slice(1);\n\n statistics.push(\n <Statistic key={stat.key} className=\"worse\">\n <div className=\"label\">{label}:</div>\n <div className=\"value worse\">\n {itemToCompareStatistic.toString()}\n </div>\n </Statistic>\n );\n }\n }\n\n return statistics;\n };\n\n const renderEntityEffects = () => {\n if (!item.entityEffects || !item.entityEffectChance) return null;\n\n return item.entityEffects.map((effect, index) => (\n <Statistic key={index} $isSpecial>\n {effect[0].toUpperCase() + effect.slice(1)} ({item.entityEffectChance}%)\n </Statistic>\n ));\n };\n\n const renderAvaibleSlots = () => {\n if (!item.allowedEquipSlotType) return null;\n\n return item.allowedEquipSlotType.map((slotType, index) => (\n <ErrorBoundary key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={EquipmentSlotSpriteByType[slotType]}\n imgScale={2}\n grayScale={true}\n opacity={0.4}\n containerStyle={{ width: '32px', height: '32px' }}\n />\n </ErrorBoundary>\n ));\n };\n\n const skillName = item.minRequirements?.skill?.name;\n\n return (\n <Container item={item}>\n <Header>\n <div>\n <Title>{item.name}</Title>\n {item.rarity !== 'Common' && (\n <Rarity item={item}>{item.rarity}</Rarity>\n )}\n <Type>{item.subType}</Type>\n </div>\n <AllowedSlots>{renderAvaibleSlots()}</AllowedSlots>\n </Header>\n\n {item.minRequirements && (\n <LevelRequirement>\n <div className=\"title\">Requirements:</div>\n <div>- Level: {item.minRequirements?.level}</div>\n {skillName && (\n <div>\n - {skillName.charAt(0).toUpperCase() + skillName.slice(1)}:{' '}\n {item.minRequirements?.skill?.level}\n </div>\n )}\n </LevelRequirement>\n )}\n\n {renderStatistics()}\n {renderEntityEffects()}\n {item.usableEffectDescription && (\n <Statistic $isSpecial>{item.usableEffectDescription}</Statistic>\n )}\n {item.equippedBuffDescription && (\n <Statistic $isSpecial>{item.equippedBuffDescription}</Statistic>\n )}\n {item.isTwoHanded && <Statistic $isSpecial>Two handed</Statistic>}\n\n <Description>{item.description}</Description>\n\n {item.maxStackSize && item.maxStackSize !== 1 && (\n <StackInfo>\n x{Math.round((item.stackQty ?? 1) * 100) / 100}({item.maxStackSize})\n </StackInfo>\n )}\n\n {renderMissingStatistic().length > 0 && (\n <MissingStatistics>\n <Statistic>Equipped Diff</Statistic>\n {itemToCompare && renderMissingStatistic()}\n </MissingStatistics>\n )}\n </Container>\n );\n};\n\nconst Container = styled.div<{ item: IItem }>`\n color: white;\n background-color: #222;\n border-radius: 5px;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n border: 3px solid ${({ item }) => rarityColor(item) ?? uiColors.lightGray};\n height: max-content;\n width: 18rem;\n\n @media (max-width: 640px) {\n width: 80vw;\n }\n`;\n\nconst Title = styled.div`\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n margin-bottom: 0.5rem;\n display: flex;\n align-items: center;\n margin: 0;\n`;\n\nconst Rarity = styled.div<{ item: IItem }>`\n font-size: ${uiFonts.size.small};\n font-weight: normal;\n margin-top: 0.2rem;\n color: ${({ item }) => rarityColor(item)};\n filter: brightness(1.5);\n`;\n\nconst Type = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n color: ${uiColors.lightGray};\n`;\n\nconst LevelRequirement = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n margin-bottom: 1rem;\n color: ${uiColors.orange};\n\n .title {\n margin-bottom: 4px;\n }\n\n div {\n margin-bottom: 2px;\n }\n`;\n\nconst Statistic = styled.div<{ $isSpecial?: boolean }>`\n margin-bottom: 0.4rem;\n width: 100%;\n color: ${({ $isSpecial }) => ($isSpecial ? uiColors.darkYellow : 'inherit')};\n\n .label {\n display: inline-block;\n margin-right: 0.5rem;\n color: inherit;\n }\n\n .value {\n display: inline-block;\n color: inherit;\n }\n\n &.better,\n .better {\n color: ${uiColors.lightGreen};\n }\n\n &.worse,\n .worse {\n color: ${uiColors.cardinal};\n }\n`;\n\nconst Description = styled.div`\n margin-top: 1.5rem;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.lightGray};\n font-style: italic;\n`;\n\nconst Header = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n`;\n\nconst AllowedSlots = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-left: auto;\n align-self: flex-start;\n`;\n\nconst StackInfo = styled.div`\n width: 100%;\n text-align: right;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.orange};\n margin-top: 1rem;\n`;\n\nconst MissingStatistics = styled.div`\n margin-top: 1rem;\n color: ${uiColors.cardinal};\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport { camelCase } from 'lodash';\nimport React, { useMemo } from 'react';\nimport styled from 'styled-components';\nimport { ItemInfo } from './ItemInfo';\n\nexport interface IItemInfoDisplayProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n isMobile?: boolean;\n}\n\ntype EquipmentSlotTypes =\n | 'head'\n | 'neck'\n | 'leftHand'\n | 'rightHand'\n | 'ring'\n | 'legs'\n | 'boot'\n | 'accessory'\n | 'armor'\n | 'inventory';\n\nconst itemSlotTypes: EquipmentSlotTypes[] = [\n 'head',\n 'neck',\n 'leftHand',\n 'rightHand',\n 'ring',\n 'legs',\n 'boot',\n 'accessory',\n 'armor',\n 'inventory',\n];\n\nconst getSlotType = (\n itemSlotTypes: string[],\n slotType: string,\n subType: string\n): keyof IEquipmentSet => {\n if (!itemSlotTypes.includes(slotType)) {\n return subType as keyof IEquipmentSet;\n }\n return slotType as keyof IEquipmentSet;\n};\n\nexport const ItemInfoDisplay: React.FC<IItemInfoDisplayProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isMobile,\n}) => {\n const itemToCompare = useMemo(() => {\n if (equipmentSet && item.allowedEquipSlotType?.length) {\n const allowedSlotTypeCamelCase = camelCase(item.allowedEquipSlotType[0]);\n const itemSubTypeCamelCase = camelCase(item.subType);\n\n const slotType = getSlotType(\n itemSlotTypes,\n allowedSlotTypeCamelCase,\n itemSubTypeCamelCase\n );\n\n const itemSubTypeFromEquipment = Object.values(equipmentSet).find(\n item => camelCase(item?.subType ?? '') === itemSubTypeCamelCase\n );\n\n const itemFromEquipment = itemSubTypeFromEquipment\n ? itemSubTypeFromEquipment\n : (equipmentSet[slotType] as IItem);\n\n if (\n itemFromEquipment &&\n (!item._id || itemFromEquipment._id !== item._id)\n ) {\n return itemFromEquipment;\n }\n }\n\n return undefined;\n }, [equipmentSet, item]);\n\n return (\n <Flex $isMobile={isMobile}>\n <ItemInfo\n item={item}\n itemToCompare={itemToCompare}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n {itemToCompare && (\n <CompareContainer>\n <Equipped>\n <span>Equipped</span>\n </Equipped>\n <ItemInfo\n item={itemToCompare}\n itemToCompare={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n </CompareContainer>\n )}\n </Flex>\n );\n};\n\nconst Flex = styled.div<{ $isMobile?: boolean }>`\n display: flex;\n gap: 0.5rem;\n flex-direction: ${({ $isMobile }) => ($isMobile ? 'row-reverse' : 'row')};\n align-items: center;\n\n @media (max-width: 640px) {\n flex-direction: column-reverse;\n align-items: center;\n }\n`;\n\nconst Equipped = styled.div`\n position: absolute;\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n`;\n\nconst CompareContainer = styled.div`\n position: relative;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemInfoDisplay } from './ItemInfoDisplay';\n\nexport interface IItemTooltipProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n}\n\nconst offset = 20;\n\nexport const ItemTooltip: React.FC<IItemTooltipProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const { current } = ref;\n\n if (current) {\n const handleMouseMove = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n // Adjust the position of the tooltip based on the mouse position\n const rect = current.getBoundingClientRect();\n\n const tooltipWidth = rect.width;\n const tooltipHeight = rect.height;\n const isOffScreenRight =\n clientX + tooltipWidth + offset > window.innerWidth;\n const isOffScreenBottom =\n clientY + tooltipHeight + offset > window.innerHeight;\n const x = isOffScreenRight\n ? clientX - tooltipWidth - offset\n : clientX + offset;\n const y = isOffScreenBottom\n ? clientY - tooltipHeight - offset\n : clientY + offset;\n\n current.style.transform = `translate(${x}px, ${y}px)`;\n current.style.opacity = '1';\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return;\n }, []);\n\n return (\n <ModalPortal>\n <Container ref={ref}>\n <ItemInfoDisplay\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n />\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div`\n position: absolute;\n z-index: 100;\n pointer-events: none;\n left: 0;\n top: 0;\n opacity: 0;\n transition: opacity 0.08s;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemInfoDisplay } from './ItemInfoDisplay';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface MobileItemTooltipProps {\n item: IItem;\n atlasIMG: any;\n atlasJSON: any;\n closeTooltip: () => void;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n options?: IListMenuOption[];\n onSelected?: (selectedOptionId: string) => void;\n}\n\nexport const MobileItemTooltip: React.FC<MobileItemTooltipProps> = ({\n item,\n atlasIMG,\n atlasJSON,\n closeTooltip,\n equipmentSet,\n scale = 1,\n options,\n onSelected,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n const handleFadeOut = () => {\n ref.current?.classList.add('fadeOut');\n };\n\n return (\n <ModalPortal>\n <Container\n ref={ref}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n closeTooltip();\n }, 100);\n }}\n scale={scale}\n >\n <ItemInfoDisplay\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n isMobile\n />\n <OptionsContainer>\n {options?.map(option => (\n <Option\n key={option.id}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n onSelected?.(option.id);\n closeTooltip();\n }, 100);\n }}\n >\n {option.text}\n </Option>\n ))}\n </OptionsContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div<{ scale: number }>`\n position: absolute;\n z-index: 100;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0 0 0 / 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n transition: opacity 0.08s;\n animation: fadeIn 0.1s forwards;\n\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.92;\n }\n }\n\n @keyframes fadeOut {\n 0% {\n opacity: 0.92;\n }\n 100% {\n opacity: 0;\n }\n }\n\n &.fadeOut {\n animation: fadeOut 0.1s forwards;\n }\n\n @media (max-width: 640px) {\n flex-direction: column;\n }\n`;\n\nconst OptionsContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex-wrap: wrap;\n\n @media (max-width: 640px) {\n flex-direction: row;\n justify-content: center;\n }\n`;\n\nconst Option = styled.button`\n padding: 1rem;\n background-color: #333;\n color: white;\n border: none;\n border-radius: 3px;\n width: 8rem;\n transition: background-color 0.1s;\n\n &:hover {\n background-color: #555;\n }\n\n @media (max-width: 640px) {\n padding: 1rem 0.5rem;\n }\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport { ItemTooltip } from './ItemTooltip';\nimport { MobileItemTooltip } from './MobileItemTooltip';\n\ninterface IItemInfoWrapperProps {\n item: IItem;\n children: React.ReactNode;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n}\n\nexport const ItemInfoWrapper: React.FC<IItemInfoWrapperProps> = ({\n children,\n atlasIMG,\n atlasJSON,\n item,\n equipmentSet,\n scale,\n}) => {\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n\n return (\n <div\n onMouseEnter={() => {\n if (!isTooltipMobileVisible) setIsTooltipVisible(true);\n }}\n onMouseLeave={setIsTooltipVisible.bind(null, false)}\n onTouchEnd={() => {\n setIsTooltipMobileVisible(true);\n setIsTooltipVisible(false);\n }}\n >\n {children}\n\n {isTooltipVisible && !isTooltipMobileVisible && (\n <ItemTooltip\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n item={item}\n />\n )}\n {isTooltipMobileVisible && (\n <MobileItemTooltip\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n closeTooltip={() => {\n setIsTooltipMobileVisible(false);\n console.log('close');\n }}\n item={item}\n scale={scale}\n />\n )}\n </div>\n );\n};\n","import { IItem, IItemContainer } from \"@rpg-engine/shared\";\n\nexport const countItemFromInventory = (itemKey: string, inventory: IItemContainer) => {\n let itemsFromInventory: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === itemKey) {\n itemsFromInventory.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty = itemsFromInventory.reduce(\n (acc, item) => acc + (item?.stackQty || 1),\n 0\n );\n\n return totalQty;\n};","export const modifyString = (str: string): string => {\n let parts = str.split('/');\n let fileName = parts[parts.length - 1];\n parts = fileName.split('.');\n let name = parts[0];\n name = name.replace(/-/g, ' ');\n let words = name.split(' ');\n let firstWord = words[0].slice(0, 1).toUpperCase() + words[0].slice(1);\n let modifiedWords = [firstWord].concat(words.slice(1));\n return modifiedWords.join(' ');\n};\n","import { ICraftableItem, IItemContainer, ISkill } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { modifyString } from './utils/modifyString';\n\ninterface ICraftingTooltipProps {\n x: number;\n y: number;\n recipe: ICraftableItem;\n inventory?: IItemContainer | null;\n skills?: ISkill | null;\n atlasIMG: any;\n atlasJSON: any;\n}\n\nconst TooltipContainer = styled.div<{ x: number; y: number }>`\n position: fixed;\n left: ${props => props.x}px;\n top: ${props => props.y}px;\n background-color: rgba(0, 0, 0, 0.95);\n color: white;\n text-align: left;\n border-radius: 4px;\n padding: 10px;\n z-index: 1000;\n font-family: 'Press Start 2P', cursive;\n font-size: 0.6rem;\n width: max-content;\n max-width: 250px;\n white-space: normal;\n border: 1px solid ${uiColors.darkGray};\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);\n line-height: 1.4;\n\n /* Arrow */\n &:before {\n content: '';\n position: absolute;\n top: 12px;\n left: -6px;\n border-width: 6px 6px 6px 0;\n border-style: solid;\n border-color: transparent rgba(0, 0, 0, 0.95) transparent transparent;\n }\n`;\n\nconst MinCraftingRequirementsText = styled.div<{ levelIsOk: boolean }>`\n font-size: 0.55rem;\n margin: 0;\n margin-bottom: 12px;\n color: ${({ levelIsOk }) =>\n levelIsOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nconst IngredientsTitle = styled.div`\n color: ${uiColors.yellow};\n font-size: 0.6rem;\n margin-bottom: 12px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n`;\n\nconst Recipe = styled.div`\n display: flex;\n align-items: center;\n font-size: 0.55rem;\n margin-bottom: 8px;\n margin-left: 4px;\n\n &:last-child {\n margin-bottom: 0;\n }\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\n }\n`;\n\nconst Ingredient = styled.div<{ isQuantityOk: boolean }>`\n margin: 0;\n margin-left: 14px;\n color: ${({ isQuantityOk }) =>\n isQuantityOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nexport const CraftingTooltip: React.FC<ICraftingTooltipProps> = ({\n x,\n y,\n recipe,\n inventory,\n skills,\n atlasIMG,\n atlasJSON,\n}) => {\n const levelInSkill =\n (skills?.[\n (recipe?.minCraftingRequirements?.[0] ?? '') as keyof ISkill\n ] as any)?.level ?? 1;\n\n const levelIsOk = recipe?.levelIsOk ?? false;\n\n return (\n <TooltipContainer x={x} y={y}>\n <MinCraftingRequirementsText levelIsOk={levelIsOk}>\n {modifyString(`${recipe?.minCraftingRequirements?.[0] ?? ''}`)} lvl{' '}\n {recipe?.minCraftingRequirements?.[1] ?? 0} ({levelInSkill})\n </MinCraftingRequirementsText>\n\n <IngredientsTitle>Ingredients</IngredientsTitle>\n {recipe.ingredients.map((ingredient, index) => {\n const itemQtyInInventory = !inventory\n ? 0\n : countItemFromInventory(ingredient.key, inventory);\n const isQuantityOk = ingredient.qty <= itemQtyInInventory;\n\n return (\n <Recipe key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={ingredient.texturePath}\n imgScale={1.2}\n />\n <Ingredient isQuantityOk={isQuantityOk}>\n {modifyString(ingredient.key)} x{ingredient.qty} (\n {itemQtyInInventory})\n </Ingredient>\n </Recipe>\n );\n })}\n </TooltipContainer>\n );\n};\n","import {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport styled from 'styled-components';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { CraftingTooltip } from './CraftingTooltip';\nimport { modifyString } from './utils/modifyString';\n\ninterface ICraftingRecipeProps {\n atlasJSON: any;\n atlasIMG: any;\n equipmentSet?: IEquipmentSet | null;\n recipe: ICraftableItem;\n scale?: number;\n handleRecipeSelect: () => void;\n selectedCraftItemKey?: string;\n inventory?: IItemContainer | null;\n skills?: ISkill | null;\n}\n\nconst RadioOptionsWrapper = styled.div`\n display: flex;\n align-items: stretch;\n margin-bottom: 0.5rem;\n padding: 8px;\n position: relative;\n cursor: pointer;\n`;\n\nconst SpriteAtlasWrapper = styled.div`\n margin-right: 40px;\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nconst MainContent = styled.div`\n flex: 1;\n min-width: 0;\n`;\n\nconst ItemHeader = styled.div`\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 4px;\n\n label {\n font-size: 0.9rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n }\n`;\n\nexport const CraftingRecipe: React.FC<ICraftingRecipeProps> = ({\n atlasIMG,\n atlasJSON,\n equipmentSet,\n recipe,\n scale,\n handleRecipeSelect,\n selectedCraftItemKey,\n inventory,\n skills,\n}) => {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipPosition, setTooltipPosition] = useState({ x: 0, y: 0 });\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n const isSelected = selectedCraftItemKey === recipe.key;\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n wrapperRef.current &&\n !wrapperRef.current.contains(event.target as Node)\n ) {\n setShowTooltip(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n\n const handleClick = () => {\n if (wrapperRef.current) {\n const rect = wrapperRef.current.getBoundingClientRect();\n setTooltipPosition({\n x: rect.right + 10,\n y: rect.top,\n });\n setShowTooltip(true);\n }\n };\n\n return (\n <RadioOptionsWrapper ref={wrapperRef} onClick={handleClick}>\n <SpriteAtlasWrapper>\n <ItemInfoWrapper\n item={recipe}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n scale={scale}\n >\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={recipe.texturePath}\n imgScale={3}\n grayScale={!recipe.canCraft}\n />\n </ItemInfoWrapper>\n </SpriteAtlasWrapper>\n\n <MainContent>\n <ItemHeader\n onPointerUp={recipe.canCraft ? handleRecipeSelect : undefined}\n >\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={recipe.name}\n name=\"test\"\n disabled={!recipe.canCraft}\n checked={isSelected}\n onChange={handleRecipeSelect}\n />\n <label>{modifyString(recipe.name)}</label>\n </ItemHeader>\n </MainContent>\n\n {showTooltip &&\n createPortal(\n <CraftingTooltip\n x={tooltipPosition.x}\n y={tooltipPosition.y}\n recipe={recipe}\n inventory={inventory}\n skills={skills}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />,\n document.body\n )}\n </RadioOptionsWrapper>\n );\n};\n","import { ICraftableItem, IItem, IItemContainer } from '@rpg-engine/shared';\n\nexport function calculateMaxCraftable(\n recipe: ICraftableItem | undefined,\n inventory: IItemContainer | null | undefined\n): number {\n if (!inventory || !recipe?.ingredients) {\n return 0;\n }\n\n return recipe.ingredients.reduce((maxPossible, ingredient) => {\n const inventoryItem = Object.values(inventory.slots).find(\n (item): item is IItem => item?.key === ingredient.key\n );\n\n if (!inventoryItem) {\n return 0;\n }\n\n const possibleWithThisIngredient = Math.floor(\n inventoryItem.stackQty ?? 0 / ingredient.qty\n );\n\n if (maxPossible === -1) {\n return possibleWithThisIngredient;\n }\n\n return Math.min(maxPossible, possibleWithThisIngredient);\n }, -1);\n}\n","import {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n ItemSubType,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useState } from 'react';\nimport {\n FaChevronLeft,\n FaChevronRight,\n FaSearch,\n FaThumbtack,\n} from 'react-icons/fa';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { useLocalStorage } from '../../hooks/useLocalStorage';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { CraftingRecipe } from './CraftingRecipe';\nimport { calculateMaxCraftable } from './utils/calculateMaxCraftable';\n\nexport interface IItemCraftSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onSelect: (value: string) => void;\n onCraftItem: (value: string | undefined, maxCraftable: number) => void;\n craftablesItems: ICraftableItem[];\n equipmentSet?: IEquipmentSet | null;\n inventory?: IItemContainer | null;\n scale?: number;\n skills?: ISkill | null;\n savedSelectedType?: string;\n}\n\nexport interface ShowMessage {\n show: boolean;\n index: number;\n}\n\nconst desktop = {\n width: 'min(900px, 80%)',\n height: 'min(700px, 80%)',\n};\n\nconst mobileLanscape = {\n width: '800px',\n height: '500px',\n};\n\nconst mobilePortrait = {\n width: '500px',\n height: '700px',\n};\n\nconst ITEMS_PER_PAGE = 8;\n\nexport const CraftBook: React.FC<IItemCraftSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n onClose,\n onSelect,\n onCraftItem,\n craftablesItems,\n equipmentSet,\n scale,\n inventory,\n skills,\n savedSelectedType,\n}) => {\n const [craftItemKey, setCraftItemKey] = useState<string>();\n const [selectedType, setSelectedType] = useState<string>(\n savedSelectedType ?? Object.keys(ItemSubType)[0]\n );\n const [size, setSize] = useState<{ width: string; height: string }>();\n const [searchTerm, setSearchTerm] = useState('');\n const [isSearchVisible, setIsSearchVisible] = useState(false);\n const [isCraftingDisabled, setIsCraftingDisabled] = useState(false);\n const [pinnedItems, setPinnedItems] = useLocalStorage<string[]>(\n 'pinnedCraftItems',\n []\n );\n const [currentPage, setCurrentPage] = useState(1);\n const [items, setItems] = useState<ICraftableItem[]>(craftablesItems);\n\n useEffect(() => {\n setItems(craftablesItems);\n }, [craftablesItems]);\n\n useEffect(() => {\n const handleResize = (): void => {\n if (\n window.innerWidth < 500 &&\n size?.width !== mobilePortrait.width &&\n (!scale || scale < 1)\n ) {\n setSize(mobilePortrait);\n } else if (\n (!scale || scale < 1) &&\n size?.width !== mobileLanscape.width\n ) {\n setSize(mobileLanscape);\n } else if (size?.width !== desktop.width) {\n setSize(desktop);\n }\n };\n handleResize();\n\n window.addEventListener('resize', handleResize);\n\n return () => window.removeEventListener('resize', handleResize);\n }, [scale]);\n\n const togglePinItem = (itemKey: string) => {\n setPinnedItems(current =>\n current.includes(itemKey)\n ? current.filter(key => key !== itemKey)\n : [...current, itemKey]\n );\n };\n\n const categoryOptions: IOptionsProps[] = [\n { id: 0, value: 'Suggested', option: 'Suggested' },\n ...(pinnedItems.length > 0\n ? [{ id: 1, value: 'Pinned', option: 'Pinned' }]\n : []),\n ...Object.keys(ItemSubType)\n .filter(type => type !== 'DeadBody')\n .map((type, index) => ({\n id: index + (pinnedItems.length > 0 ? 2 : 1),\n value: type,\n option:\n type === 'CraftingResources' || type === 'CraftingResource'\n ? 'Resources'\n : type,\n })),\n ].sort((a, b) => {\n if (a.value === 'Suggested') return -1;\n if (b.value === 'Suggested') return 1;\n if (a.value === 'Pinned') return -1;\n if (b.value === 'Pinned') return 1;\n return a.value.localeCompare(b.value);\n });\n\n const filteredCraftableItems = items?.filter(item => {\n const matchesSearch = item.name\n .toLowerCase()\n .includes(searchTerm.toLowerCase());\n const matchesCategory =\n selectedType === 'Suggested' ||\n (selectedType === 'Pinned' && pinnedItems.includes(item.key)) ||\n item.subType === selectedType;\n return matchesSearch && matchesCategory;\n });\n\n const sortedItems = [...(filteredCraftableItems || [])].sort((a, b) => {\n const aIsPinned = pinnedItems.includes(a.key);\n const bIsPinned = pinnedItems.includes(b.key);\n if (aIsPinned && !bIsPinned) return -1;\n if (!aIsPinned && bIsPinned) return 1;\n return 0;\n });\n\n const totalPages = Math.ceil(sortedItems.length / ITEMS_PER_PAGE);\n const paginatedItems = sortedItems.slice(\n (currentPage - 1) * ITEMS_PER_PAGE,\n currentPage * ITEMS_PER_PAGE\n );\n\n useEffect(() => {\n setCurrentPage(1);\n }, [selectedType, searchTerm]);\n\n if (!size) return null;\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n width={size.width}\n height={size.height}\n cancelDrag=\".inputRadioCraftBook\"\n onCloseButton={onClose}\n scale={scale}\n >\n <Wrapper>\n <HeaderContainer>\n <Title>Craftbook</Title>\n <HeaderControls>\n <DropdownWrapper>\n <Dropdown\n options={categoryOptions}\n onChange={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n width=\"200px\"\n />\n </DropdownWrapper>\n <SearchButton onClick={() => setIsSearchVisible(!isSearchVisible)}>\n <FaSearch size={16} />\n </SearchButton>\n </HeaderControls>\n </HeaderContainer>\n\n {isSearchVisible && (\n <SearchContainer>\n <input\n type=\"text\"\n className=\"rpgui-input\"\n placeholder=\"Search items...\"\n value={searchTerm}\n onChange={e => setSearchTerm(e.target.value)}\n autoFocus\n />\n </SearchContainer>\n )}\n\n <ContentContainer>\n <RadioInputScroller className=\"inputRadioCraftBook\">\n {paginatedItems?.map(item => (\n <CraftingRecipeWrapper\n key={item.key}\n isSelected={pinnedItems.includes(item.key)}\n >\n <PinButton\n onClick={e => {\n e.stopPropagation();\n togglePinItem(item.key);\n }}\n isPinned={pinnedItems.includes(item.key)}\n >\n <FaThumbtack size={14} />\n </PinButton>\n <CraftingRecipe\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n recipe={item}\n scale={scale}\n handleRecipeSelect={setCraftItemKey.bind(null, item.key)}\n selectedCraftItemKey={craftItemKey}\n inventory={inventory}\n skills={skills}\n />\n </CraftingRecipeWrapper>\n ))}\n </RadioInputScroller>\n </ContentContainer>\n\n {totalPages > 1 && (\n <PaginationContainer>\n <PaginationButton\n onClick={() => setCurrentPage(prev => Math.max(1, prev - 1))}\n disabled={currentPage === 1}\n >\n <FaChevronLeft size={12} />\n </PaginationButton>\n <PageInfo>\n Page {currentPage} of {totalPages}\n </PageInfo>\n <PaginationButton\n onClick={() =>\n setCurrentPage(prev => Math.min(totalPages, prev + 1))\n }\n disabled={currentPage === totalPages}\n >\n <FaChevronRight size={12} />\n </PaginationButton>\n </PaginationContainer>\n )}\n\n <Footer>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n <Button\n disabled={!craftItemKey || isCraftingDisabled}\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n if (!craftItemKey || isCraftingDisabled) return;\n\n const selectedItem = craftablesItems.find(\n item => item.key === craftItemKey\n );\n const maxCraftable = calculateMaxCraftable(\n selectedItem,\n inventory\n );\n\n onCraftItem(craftItemKey, maxCraftable);\n setIsCraftingDisabled(true);\n\n setTimeout(() => {\n setIsCraftingDisabled(false);\n }, 2000);\n }}\n >\n Craft\n </Button>\n </Footer>\n </Wrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n\n & > * {\n box-sizing: border-box;\n }\n`;\n\nconst HeaderContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n padding: 16px 16px 0;\n`;\n\nconst Title = styled.h1`\n font-size: 1.2rem;\n color: ${uiColors.yellow} !important;\n margin: 0;\n text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);\n`;\n\nconst HeaderControls = styled.div`\n display: flex;\n align-items: center;\n gap: 16px;\n position: relative;\n left: -2rem;\n`;\n\nconst DropdownWrapper = styled.div`\n width: 200px;\n`;\n\nconst SearchButton = styled.button`\n background: none;\n border: none;\n cursor: pointer;\n padding: 8px;\n width: 32px;\n height: 32px;\n color: ${uiColors.yellow};\n opacity: 0.8;\n transition: opacity 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n\n &:hover {\n opacity: 1;\n }\n`;\n\nconst SearchContainer = styled.div`\n padding: 0 16px;\n margin-top: 16px;\n\n input {\n width: 100%;\n font-size: 0.8rem;\n padding: 8px 12px;\n background-color: rgba(0, 0, 0, 0.3);\n border: none;\n color: white;\n border-radius: 4px;\n\n &::placeholder {\n color: rgba(255, 255, 255, 0.5);\n }\n\n &:focus {\n outline: none;\n background-color: rgba(0, 0, 0, 0.4);\n }\n }\n`;\n\nconst ContentContainer = styled.div`\n flex: 1;\n min-height: 0;\n padding: 16px;\n padding-right: 0;\n padding-bottom: 0;\n overflow: hidden;\n width: 100%;\n`;\n\nconst RadioInputScroller = styled.div`\n height: 100%;\n overflow-y: scroll;\n overflow-x: hidden;\n padding: 8px 16px;\n padding-right: 24px;\n width: 100%;\n box-sizing: border-box;\n\n display: grid;\n grid-template-columns: repeat(2, minmax(0, 1fr));\n gap: 16px;\n align-content: start;\n\n @media (max-width: ${mobilePortrait.width}) {\n grid-template-columns: 1fr;\n }\n`;\n\nconst CraftingRecipeWrapper = styled.div<{ isSelected: boolean }>`\n position: relative;\n width: 100%;\n min-width: 0;\n box-sizing: border-box;\n transition: background-color 0.2s;\n\n &:hover {\n background: rgba(0, 0, 0, 0.4);\n }\n\n ${props =>\n props.isSelected &&\n `\n background: rgba(255, 215, 0, 0.1);\n `}\n`;\n\nconst PinButton = styled.button<{ isPinned: boolean }>`\n position: absolute;\n top: 8px;\n right: 8px;\n background: none;\n border: none;\n cursor: pointer;\n padding: 4px;\n color: ${props => (props.isPinned ? uiColors.yellow : uiColors.lightGray)};\n opacity: ${props => (props.isPinned ? 1 : 0.6)};\n transition: all 0.2s;\n z-index: 2;\n\n &:hover {\n opacity: 1;\n color: ${uiColors.yellow};\n }\n`;\n\nconst Footer = styled.div`\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 8px;\n\n button {\n min-width: 100px;\n }\n\n @media (max-width: ${mobilePortrait.width}) {\n justify-content: center;\n }\n`;\n\nconst PaginationContainer = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 16px;\n padding: 8px;\n margin-top: 8px;\n border-top: 1px solid ${uiColors.darkGray};\n`;\n\nconst PaginationButton = styled.button<{ disabled?: boolean }>`\n background: none;\n border: none;\n color: ${props => (props.disabled ? uiColors.darkGray : uiColors.yellow)};\n cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};\n opacity: ${props => (props.disabled ? 0.5 : 0.8)};\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.2s;\n\n &:hover:not(:disabled) {\n opacity: 1;\n }\n`;\n\nconst PageInfo = styled.div`\n color: ${uiColors.lightGray};\n font-size: 0.8rem;\n font-family: 'Press Start 2P', cursive;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { Dropdown } from './Dropdown';\n\ninterface IDropdownSelectorOption {\n id: string;\n name: string;\n}\n\nexport interface IDropdownSelectorContainer {\n onChange: (id: string) => void;\n options: IDropdownSelectorOption[];\n details?: string;\n title: string;\n}\n\nexport const DropdownSelectorContainer: React.FC<IDropdownSelectorContainer> = ({\n title,\n onChange,\n options,\n details,\n}) => {\n return (\n <div>\n <p>{title}</p>\n <Dropdown\n options={options.map((option, index) => ({\n option: option.name,\n value: option.id,\n id: index,\n }))}\n onChange={onChange}\n />\n <Details>{details}</Details>\n </div>\n );\n};\n\nconst Details = styled.p`\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n","import { GRID_HEIGHT, GRID_WIDTH } from '@rpg-engine/shared';\nimport { useCallback, useEffect, useState } from 'react';\nimport { IPosition } from '../types/eventTypes';\n\ninterface ICursorPositionProps {\n scale?: number;\n}\n\nexport const useCursorPosition = ({ scale = 1 }: ICursorPositionProps): IPosition => {\n const [position, setPosition] = useState<IPosition>({ x: 0, y: 0 });\n\n const scalePosition = useCallback((x: number, y: number): IPosition => {\n return {\n x: ((x - GRID_WIDTH / 2) / scale) + GRID_WIDTH / 2,\n y: ((y - GRID_HEIGHT / 2) / scale) + GRID_HEIGHT / 2,\n };\n }, [scale]);\n\n const setFromEvent = useCallback((e: MouseEvent | TouchEvent) => {\n let x, y;\n\n if ('touches' in e) {\n x = e.touches[0].clientX;\n y = e.touches[0].clientY;\n } else {\n x = e.clientX;\n y = e.clientY;\n }\n\n const scaledPosition = scalePosition(x, y);\n setPosition(scaledPosition);\n }, [scale, scalePosition]);\n\n const cleanup = useCallback(() => {\n setPosition({ x: 0, y: 0 });\n }, []);\n\n useEffect(() => {\n const handleEvent = (e: Event) => setFromEvent(e as MouseEvent | TouchEvent);\n\n window.addEventListener('mousemove', handleEvent);\n window.addEventListener('touchmove', handleEvent);\n window.addEventListener('mouseup', cleanup);\n window.addEventListener('touchend', cleanup);\n\n return () => {\n window.removeEventListener('mousemove', handleEvent);\n window.removeEventListener('touchmove', handleEvent);\n window.removeEventListener('mouseup', cleanup);\n window.removeEventListener('touchend', cleanup);\n };\n }, [setFromEvent, cleanup]);\n\n return position;\n};\n","import { getItemTextureKeyPath } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { useCursorPosition } from '../../../hooks/useCursorPosition';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { onRenderStackInfo } from './ItemSlotQty/ItemSlotQty';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\nconst CONTAINER_SIZE = 32;\nconst OFFSET = CONTAINER_SIZE / 2;\n\ninterface IProps {\n atlasJSON: any;\n atlasIMG: any;\n scale?: number;\n}\n\nexport const DraggedItem = ({\n atlasJSON,\n atlasIMG,\n scale,\n}: IProps): JSX.Element | null => {\n const { draggingState } = useItemSlotDragging();\n\n const { item } = draggingState;\n\n const { x, y } = useCursorPosition({\n scale,\n });\n\n if (!item) {\n return null;\n }\n\n if (x === 0 && y === 0) {\n return null;\n }\n\n const centeredX = x - OFFSET;\n const centeredY = y - OFFSET;\n\n const stackInfo = onRenderStackInfo(item?._id ?? '', item?.stackQty ?? 0);\n\n return (\n <Container>\n <SpriteContainer x={centeredX} y={centeredY}>\n <SpriteFromAtlas\n key={item._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.texturePath,\n texturePath: item.texturePath,\n stackQty: item.stackQty || 1,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={3}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n {stackInfo}\n </SpriteContainer>\n </Container>\n );\n};\n\ninterface IContainer {\n x: number;\n y: number;\n}\n\nconst pulse = `\n @keyframes pulse {\n 0%, 100% {\n transform: scale(1) rotate(-3deg);\n }\n 50% {\n transform: scale(0.95) rotate(-3deg);\n }\n }\n`;\n\nconst Container = styled.div`\n position: relative;\n`;\n\nconst SpriteContainer = styled.div.attrs<IContainer>(props => ({\n style: {\n left: `${props.x}px`,\n top: `${props.y}px`,\n },\n}))<IContainer>`\n ${pulse}\n\n position: absolute;\n z-index: 100;\n pointer-events: none;\n\n width: ${CONTAINER_SIZE}px;\n height: ${CONTAINER_SIZE}px;\n\n transform: rotate(-3deg);\n\n filter: grayscale(100%);\n opacity: 0.35;\n\n animation: pulse 2s infinite;\n\n .item-slot-qty {\n position: absolute;\n bottom: 0;\n margin-left: 0.8rem;\n }\n`;\n\nexport default DraggedItem;\n","import React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport ModalPortal from './Abstractions/ModalPortal';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface IRelativeMenuProps {\n options: IListMenuOption[];\n onSelected: (selectedOptionId: string) => void;\n fontSize?: number;\n onOutsideClick?: () => void;\n pos: { x: number; y: number };\n}\n\nexport const RelativeListMenu: React.FC<IRelativeMenuProps> = ({\n options,\n onSelected,\n onOutsideClick,\n fontSize = 0.8,\n pos,\n}) => {\n const ref = useRef(null);\n\n useOutsideClick(ref, 'relative-context-menu');\n\n useEffect(() => {\n document.addEventListener('clickOutside', event => {\n const e = event as CustomEvent;\n\n if (e.detail.id === 'relative-context-menu') {\n if (onOutsideClick) {\n onOutsideClick();\n }\n }\n });\n\n return () => {\n document.removeEventListener('clickOutside', _e => {});\n };\n }, []);\n\n return (\n <ModalPortal>\n <Container fontSize={fontSize} ref={ref} {...pos}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onPointerDown={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n </ModalPortal>\n );\n};\n\ninterface IContainerProps {\n fontSize?: number;\n x: number;\n y: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: absolute;\n top: ${props => props.y}px;\n left: ${props => props.x}px;\n\n display: flex;\n flex-direction: column;\n width: max-content;\n justify-content: start;\n align-items: flex-start;\n\n li {\n font-size: ${props => props.fontSize}em;\n }\n`;\n\nconst ListElement = styled.li`\n margin-right: 0.5rem;\n`;\n","import { IEquipmentSet, IItem } from '@rpg-engine/shared';\nimport React from 'react';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { MobileItemTooltip } from '../Cards/MobileItemTooltip';\nimport { useItemSlotDetails } from './context/ItemSlotDetailsContext';\nimport { useItemSlotDragging } from './context/ItemSlotDraggingContext';\n\ninterface IProps {\n dragScale: number | undefined;\n onSelected?: (optionId: string, item: IItem) => void;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n isContextMenuDisabled?: boolean;\n}\n\nexport const ItemSlotToolTips = ({\n dragScale,\n onSelected,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isContextMenuDisabled,\n}: IProps): JSX.Element => {\n const { detailsState, updateDetailsState } = useItemSlotDetails();\n\n const {\n isTooltipVisible,\n isTooltipMobileVisible,\n isContextMenuVisible,\n contextMenuPosition,\n contextActions,\n item,\n } = detailsState;\n\n const { draggingState } = useItemSlotDragging();\n\n const { isFocused } = draggingState;\n\n return (\n <>\n {isTooltipVisible && item && !isFocused && (\n <ItemTooltip\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n />\n )}\n\n {isTooltipMobileVisible && item && (\n <MobileItemTooltip\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n closeTooltip={() => {\n updateDetailsState({ isTooltipMobileVisible: false });\n }}\n scale={dragScale}\n options={contextActions}\n onSelected={(optionId: string) => {\n updateDetailsState({\n isContextMenuVisible: false,\n });\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n />\n )}\n\n {!isContextMenuDisabled &&\n isContextMenuVisible &&\n contextActions &&\n contextActions.length > 0 && (\n <RelativeListMenu\n options={contextActions}\n onSelected={(optionId: string) => {\n updateDetailsState({ isContextMenuVisible: false });\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n onOutsideClick={() => {\n updateDetailsState({ isContextMenuVisible: false });\n }}\n pos={contextMenuPosition}\n />\n )}\n </>\n );\n};\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n isMobile,\n ItemContainerType,\n ItemSlotType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { ItemSlotDetailsProvider } from '../Item/Inventory/context/ItemSlotDetailsContext';\nimport { ItemSlotDraggingProvider } from '../Item/Inventory/context/ItemSlotDraggingContext';\nimport DraggedItem from '../Item/Inventory/DraggedItem';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { ItemSlotToolTips } from '../Item/Inventory/ItemSlotTooltips';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\n\nexport interface IEquipmentSetProps {\n equipmentSet: IEquipmentSet;\n onClose?: () => void;\n onItemClick?: (\n ItemType: ItemType,\n item: IItem,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragEnd?: (quantity?: number) => void;\n onItemPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemOutsideDrop?: (item: IItem, position: IPosition) => void;\n scale?: number;\n checkIfItemCanBeMoved: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;\n onSelected?: (optionId: string) => void;\n initialPosition?: { x: number; y: number };\n type: ItemContainerType | null;\n atlasIMG: any;\n atlasJSON: any;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n}\n\nexport const EquipmentSet: React.FC<IEquipmentSetProps> = ({\n equipmentSet,\n onClose,\n onMouseOver,\n onSelected,\n onItemClick,\n atlasIMG,\n atlasJSON,\n onItemDragEnd,\n onItemDragStart,\n onItemPlaceDrop,\n onItemOutsideDrop,\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n scale,\n initialPosition,\n onPositionChangeEnd,\n onPositionChangeStart,\n}) => {\n const {\n neck,\n leftHand,\n ring,\n head,\n armor,\n legs,\n boot,\n inventory,\n rightHand,\n accessory,\n } = equipmentSet;\n\n const equipmentData = [\n neck,\n leftHand,\n ring,\n head,\n armor,\n legs,\n boot,\n inventory,\n rightHand,\n accessory,\n ];\n\n const equipmentMaskSlots = [\n ItemSlotType.Neck,\n ItemSlotType.LeftHand,\n ItemSlotType.Ring,\n ItemSlotType.Head,\n ItemSlotType.Torso,\n ItemSlotType.Legs,\n ItemSlotType.Feet,\n ItemSlotType.Inventory,\n ItemSlotType.RightHand,\n ItemSlotType.Accessory,\n ];\n\n const onRenderEquipmentSlotRange = (start: number, end: number) => {\n const equipmentRange = equipmentData.slice(start, end);\n const slotMaksRange = equipmentMaskSlots.slice(start, end);\n\n return equipmentRange.map((data, i) => {\n const item = data as IItem;\n const itemContainer =\n (item && (item.itemContainer as IItemContainer)) ?? null;\n\n return (\n <ItemSlot\n key={i}\n slotIndex={i}\n item={item}\n itemContainer={itemContainer}\n itemContainerType={ItemContainerType.Equipment}\n slotSpriteMask={slotMaksRange[i]}\n onMouseOver={(event, slotIndex, item) => {\n if (onMouseOver) onMouseOver(event, slotIndex, item);\n }}\n onPointerDown={(itemType, ContainerType) => {\n if (onItemClick) onItemClick(itemType, item, ContainerType);\n }}\n onDragStart={(item, slotIndex, itemContainerType) => {\n if (!item) {\n return;\n }\n\n if (onItemDragStart)\n onItemDragStart(item, slotIndex, itemContainerType);\n }}\n onDragEnd={quantity => {\n if (onItemDragEnd) onItemDragEnd(quantity);\n }}\n dragScale={scale}\n checkIfItemCanBeMoved={checkIfItemCanBeMoved}\n checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}\n onPlaceDrop={(item, slotIndex, itemContainerType) => {\n if (onItemPlaceDrop)\n onItemPlaceDrop(item, slotIndex, itemContainerType);\n }}\n onOutsideDrop={(item, position) => {\n if (onItemOutsideDrop) onItemOutsideDrop(item, position);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n });\n };\n\n return (\n <ItemSlotDraggingProvider>\n <ItemSlotDetailsProvider>\n <DraggedItem atlasIMG={atlasIMG} atlasJSON={atlasJSON} scale={scale} />\n <DraggableContainer\n title={'Equipments'}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"330px\"\n cancelDrag=\".equipment-container-body\"\n scale={scale}\n initialPosition={initialPosition}\n onPositionChangeEnd={onPositionChangeEnd}\n onPositionChangeStart={onPositionChangeStart}\n >\n <EquipmentSetContainer className=\"equipment-container-body\">\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(0, 3)}\n </EquipmentColumn>\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(3, 7)}\n </EquipmentColumn>\n <EquipmentColumn>\n {onRenderEquipmentSlotRange(7, 10)}\n </EquipmentColumn>\n </EquipmentSetContainer>\n </DraggableContainer>\n\n <ItemSlotToolTips\n dragScale={scale}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n onSelected={onSelected}\n isContextMenuDisabled={isMobile()}\n />\n </ItemSlotDetailsProvider>\n </ItemSlotDraggingProvider>\n );\n};\n\nconst EquipmentSetContainer = styled.div`\n width: inherit;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n flex-direction: row;\n touch-action: none;\n overflow: hidden;\n`;\n\nconst EquipmentColumn = styled.div`\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n flex-direction: column;\n touch-action: none;\n`;\n","import styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport const Table = styled.table`\n width: 100%;\n border-collapse: collapse;\n margin-top: 1rem;\n`;\n\nexport const TableRow = styled.tr`\n &:nth-child(even) {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n &:hover {\n background-color: rgba(255, 255, 255, 0.1) !important;\n }\n`;\n\nexport const TableHeader = styled.th`\n text-align: left;\n padding: 0.5rem;\n color: ${uiColors.yellow} !important;\n border-bottom: 1px solid ${uiColors.lightGray};\n text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;\n`;\n\nexport const TableCell = styled.td`\n padding: 0.5rem;\n color: ${uiColors.white};\n border-bottom: 1px solid ${uiColors.lightGray};\n text-shadow: -2px 0 black, 0 2px black, 2px 0 black, 0 -2px black;\n`;\n\nexport const ActionButtons = styled.div`\n display: flex;\n gap: 10px;\n align-items: center;\n`;\n\ninterface IUserActionProps {\n color: string;\n}\n\nexport const UserActionLink = styled.span<IUserActionProps>`\n color: ${({ color }) => color} !important;\n cursor: pointer;\n margin-right: 0.5rem;\n\n &:hover {\n text-decoration: underline;\n }\n`;\n","import { debounce } from 'lodash';\nimport React, { useCallback, useState } from 'react';\nimport styled from 'styled-components';\nimport { InternalTabs, UserActionLink } from '../..';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { IFriend } from './FriendList';\n\ninterface ISearchFriendProps {\n searchedCharacters: IFriend[];\n friendRequests: IFriend[];\n onFocus?: () => void;\n onBlur?: () => void;\n onSearch: (characterName: string) => void;\n onSendFriendRequest: (character: IFriend) => void;\n onAcceptRequest: (character: IFriend) => void;\n onRejectRequest: (character: IFriend) => void;\n}\n\nexport const SearchFriend: React.FC<ISearchFriendProps> = ({\n searchedCharacters,\n friendRequests,\n onBlur,\n onFocus,\n onSearch,\n onSendFriendRequest,\n onAcceptRequest,\n onRejectRequest,\n}) => {\n const [characterName, setCharacterName] = useState('');\n\n const debouncedSearch = useCallback(\n debounce((name: string) => {\n onSearch(name);\n }, 300),\n []\n );\n\n const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const name = e.target.value;\n setCharacterName(name);\n debouncedSearch(name);\n };\n\n const handleSubmit = (event: React.SyntheticEvent<HTMLFormElement>) => {\n event.preventDefault();\n if (characterName.trim()) {\n onSearch(characterName);\n }\n };\n\n const searchTabContent = (\n <ListContainer>\n <SearchForm onSubmit={handleSubmit}>\n <SearchInput\n value={characterName}\n id=\"characterName\"\n name=\"characterName\"\n onChange={handleInputChange}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n autoFocus\n placeholder=\"Search for a character...\"\n />\n </SearchForm>\n <CharacterList\n characters={searchedCharacters}\n onAction={onSendFriendRequest}\n actionLabel=\"Add Friend\"\n />\n </ListContainer>\n );\n\n const requestsTabContent = (\n <ListContainer>\n <FriendRequestSection\n friendRequests={friendRequests}\n onAccept={onAcceptRequest}\n onReject={onRejectRequest}\n />\n </ListContainer>\n );\n\n const tabs = [\n { id: 'search', title: 'Search', content: searchTabContent },\n {\n id: 'requests',\n title: `Requests (${friendRequests.length})`,\n content: requestsTabContent,\n },\n ];\n\n return (\n <Container>\n <InternalTabs\n tabs={tabs}\n activeTextColor=\"#000\"\n inactiveColor=\"#777\"\n borderColor=\"#f59e0b\"\n />\n </Container>\n );\n};\n\nconst CharacterList: React.FC<{\n characters: IFriend[];\n onAction: (character: IFriend) => void;\n actionLabel: string;\n}> = ({ characters, onAction, actionLabel }) => (\n <ListContainer>\n {characters.map(character => (\n <ListItem key={character._id}>\n <CharacterName>{character.name}</CharacterName>\n <UserActionLink\n color={uiColors.lightGreen}\n onClick={() => onAction(character)}\n >\n {actionLabel}\n </UserActionLink>\n </ListItem>\n ))}\n </ListContainer>\n);\n\nconst FriendRequestSection: React.FC<{\n friendRequests: IFriend[];\n onAccept: (character: IFriend) => void;\n onReject: (character: IFriend) => void;\n}> = ({ friendRequests, onAccept, onReject }) => (\n <>\n {friendRequests.length > 0 && (\n <ListContainer>\n {friendRequests.map(character => (\n <ListItem key={character._id}>\n <CharacterName>{character.name}</CharacterName>\n <AcceptRejectActions>\n <UserActionLink\n color={uiColors.lightGreen}\n onClick={() => onAccept(character)}\n >\n Accept\n </UserActionLink>\n <UserActionLink\n color={uiColors.red}\n onClick={() => onReject(character)}\n >\n Reject\n </UserActionLink>\n </AcceptRejectActions>\n </ListItem>\n ))}\n </ListContainer>\n )}\n </>\n);\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n gap: 1rem;\n`;\n\nconst SearchForm = styled.form`\n display: flex;\n align-items: center;\n width: 100%;\n margin-top: 1rem;\n`;\n\nconst SearchInput = styled.input`\n width: 100%;\n background-color: rgba(0, 0, 0, 0.25);\n border: none;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n`;\n\nconst ListContainer = styled.ul`\n list-style: none;\n padding: 0;\n margin: 0;\n width: 100%;\n max-height: 50vh;\n overflow-y: auto;\n\n @media (max-width: 768px) {\n max-height: 90vh;\n }\n`;\n\nconst ListItem = styled.li`\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0.5rem;\n border-bottom: 1px solid rgba(255, 255, 255, 0.1);\n`;\n\nconst CharacterName = styled.p`\n font-size: ${uiFonts.size.small};\n margin: 0;\n`;\n\nconst AcceptRejectActions = styled.div`\n display: flex;\n gap: 0.5rem;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Button, ButtonTypes } from '../Button';\n\nimport { ICharacter } from '@rpg-engine/shared';\nimport {\n ActionButtons,\n Table,\n TableCell,\n TableHeader,\n TableRow,\n UserActionLink,\n} from '../Table/Table';\nimport { SearchFriend } from './SearchFriend';\nexport type IFriend = Pick<ICharacter, 'name' | '_id' | 'isOnline'>;\ninterface IFriendListProps {\n scale?: number;\n friends: IFriend[];\n friendRequests: IFriend[];\n searchedCharacters: IFriend[];\n onFocus?: () => void;\n onBlur?: () => void;\n onClose: () => void;\n onOpenPrivateMessage: (character: IFriend) => void;\n onRemoveFriend: (character: IFriend) => void;\n onSendFriendRequest: (character: IFriend) => void;\n onSearch: (characterName: string) => void;\n onAcceptRequest: (character: IFriend) => void;\n onRejectRequest: (character: IFriend) => void;\n onAddFriend?: () => void;\n onBackFriendList?: () => void;\n}\n\nexport const FriendList: React.FC<IFriendListProps> = ({\n friends,\n friendRequests,\n searchedCharacters,\n onFocus,\n onBlur,\n onSearch,\n onAcceptRequest,\n onSendFriendRequest,\n onRemoveFriend,\n onOpenPrivateMessage,\n onRejectRequest,\n onAddFriend,\n onBackFriendList,\n}) => {\n const [isAddFriendUI, setIsAddFriendUI] = useState(false);\n\n useEffect(() => {\n if (isAddFriendUI) {\n onAddFriend?.();\n } else {\n onBackFriendList?.();\n }\n }, [isAddFriendUI]);\n\n return (\n <ListWrapper>\n {isAddFriendUI ? (\n <SearchFriend\n searchedCharacters={searchedCharacters}\n onSendFriendRequest={onSendFriendRequest}\n onAcceptRequest={onAcceptRequest}\n onRejectRequest={onRejectRequest}\n friendRequests={friendRequests}\n onSearch={onSearch}\n onBlur={onBlur}\n onFocus={onFocus}\n />\n ) : (\n <>\n <ScrollableArea>\n <Table>\n <thead>\n <TableRow>\n <TableHeader>Online</TableHeader>\n <TableHeader>Name</TableHeader>\n <TableHeader>Actions</TableHeader>\n </TableRow>\n </thead>\n <tbody>\n {friends.map(friend => (\n <TableRow key={friend._id}>\n <TableCell>\n <IsOnlineBadge $isOnline={friend.isOnline} />\n </TableCell>\n <TableCell>{friend.name}</TableCell>\n <TableCell>\n <ActionButtons>\n <UserActionLink\n color={uiColors.white}\n onClick={() => onOpenPrivateMessage(friend)}\n >\n Chat\n </UserActionLink>\n <UserActionLink\n color={uiColors.red}\n onClick={() => onRemoveFriend(friend)}\n >\n Remove\n </UserActionLink>\n </ActionButtons>\n </TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </ScrollableArea>\n </>\n )}\n\n <ButtonContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => setIsAddFriendUI(prev => !prev)}\n >\n {isAddFriendUI ? 'Back' : 'Add New Friend'}\n </Button>\n </ButtonContainer>\n </ListWrapper>\n );\n};\n\n// Styled components for FriendList UI\nconst ListWrapper = styled.div`\n margin-top: 1rem;\n max-height: 350px;\n display: flex;\n flex-direction: column;\n`;\n\nconst ScrollableArea = styled.div`\n overflow-y: auto;\n max-height: 300px; /* Adjust this value based on your layout */\n`;\n\nconst IsOnlineBadge = styled.div<{ $isOnline: boolean }>`\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: ${({ $isOnline }) =>\n $isOnline ? uiColors.lightGreen : uiColors.red};\n margin-right: 1rem;\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 1rem;\n`;\n","import { isMobileOrTablet } from '@rpg-engine/shared';\n\nexport const IS_MOBILE_OR_TABLET = isMobileOrTablet();\n","export const chunkString = (str: string, length: number) => {\n return str.match(new RegExp('.{1,' + length + '}', 'g'));\n};\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n text: string;\n onFinish?: () => void;\n onStart?: () => void;\n}\n\nexport const DynamicText: React.FC<IProps> = ({ text, onFinish, onStart }) => {\n const [textState, setTextState] = useState<string>('');\n\n useEffect(() => {\n let i = 0;\n const interval = setInterval(() => {\n // on every interval, show one more character\n\n if (i === 0) {\n if (onStart) {\n onStart();\n }\n }\n\n if (i < text.length) {\n setTextState(text.substring(0, i + 1));\n i++;\n } else {\n clearInterval(interval);\n if (onFinish) {\n onFinish();\n }\n }\n }, 25);\n\n return () => {\n clearInterval(interval);\n };\n }, [text]);\n\n return <TextContainer>{textState}</TextContainer>;\n};\n\nconst TextContainer = styled.p`\n font-size: 0.7rem !important;\n color: white;\n text-shadow: 1px 1px 0px #000000;\n letter-spacing: 1.2px;\n word-break: normal;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { NPCDialogType } from '../..';\nimport { IS_MOBILE_OR_TABLET } from '../../constants/uiDevices';\nimport { chunkString } from '../../libs/StringHelpers';\nimport { DynamicText } from '../typography/DynamicText';\nimport pressButtonGif from './img/press-button.gif';\nimport pressSpaceGif from './img/space.gif';\n\ninterface IProps {\n text: string;\n onClose: () => void;\n onEndStep?: () => void;\n onStartStep?: () => void;\n type?: NPCDialogType;\n}\n\nexport const NPCDialogText: React.FC<IProps> = ({\n text,\n onClose,\n onEndStep,\n onStartStep,\n type,\n}) => {\n const windowSize = useRef([window.innerWidth, window.innerHeight]);\n function maxCharacters(width: number) {\n // Set the font size to 16 pixels\n var fontSize = 11.2;\n\n // Calculate the number of characters that can fit in one line\n var charactersPerLine = Math.floor(width / 2 / fontSize);\n\n // Calculate the number of lines that can fit in the div\n var linesPerDiv = Math.floor(180 / fontSize);\n\n // Calculate the maximum number of characters that can fit in the div\n var maxCharacters = charactersPerLine * linesPerDiv;\n\n // Return the maximum number of characters\n return Math.round(maxCharacters / 5);\n }\n\n const textChunks = chunkString(text, maxCharacters(windowSize.current[0]));\n\n const [chunkIndex, setChunkIndex] = useState<number>(0);\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n goToNextStep();\n }\n };\n\n const goToNextStep = () => {\n const hasNextChunk = textChunks?.[chunkIndex + 1] || false;\n\n if (hasNextChunk) {\n setChunkIndex(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [chunkIndex]);\n\n const [showGoNextIndicator, setShowGoNextIndicator] = useState<boolean>(\n false\n );\n\n return (\n <Container>\n <DynamicText\n text={textChunks?.[chunkIndex] || ''}\n onFinish={() => {\n setShowGoNextIndicator(true);\n\n onEndStep && onEndStep();\n }}\n onStart={() => {\n setShowGoNextIndicator(false);\n\n onStartStep && onStartStep();\n }}\n />\n {showGoNextIndicator && (\n <PressSpaceIndicator\n right={type === NPCDialogType.TextOnly ? '1rem' : '10.5rem'}\n src={IS_MOBILE_OR_TABLET ? pressButtonGif : pressSpaceGif}\n onPointerDown={() => {\n goToNextStep();\n }}\n />\n )}\n </Container>\n );\n};\n\nconst Container = styled.div``;\n\ninterface IPressSpaceIndicatorProps {\n right: string;\n}\n\nconst PressSpaceIndicator = styled.img<IPressSpaceIndicatorProps>`\n position: absolute;\n right: ${({ right }) => right};\n bottom: 1rem;\n height: 20.7px;\n image-rendering: -webkit-optimize-contrast;\n`;\n","import React from 'react';\n\n//@ts-ignore\nexport const useEventListener = (type, handler, el = window) => {\n const savedHandler = React.useRef();\n\n React.useEffect(() => {\n savedHandler.current = handler;\n }, [handler]);\n\n React.useEffect(() => {\n //@ts-ignore\n const listener = e => savedHandler.current(e);\n\n el.addEventListener(type, listener);\n\n return () => {\n el.removeEventListener(type, listener);\n };\n }, [type, el]);\n};\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { useEventListener } from '../../../hooks/useEventListener';\nimport { DynamicText } from '../../typography/DynamicText';\n\nexport interface IQuestionDialogAnswer {\n id: number;\n text: string;\n nextQuestionId?: number;\n}\n\nexport interface IQuestionDialog {\n id: number;\n text: string;\n answerIds?: number[];\n}\n\nexport interface IProps {\n questions: IQuestionDialog[];\n answers: IQuestionDialogAnswer[];\n onClose: () => void;\n}\n\nexport const QuestionDialog: React.FC<IProps> = ({\n questions,\n answers,\n onClose,\n}) => {\n const [currentQuestion, setCurrentQuestion] = useState(questions[0]);\n\n const [canShowAnswers, setCanShowAnswers] = useState<boolean>(false);\n\n const onGetFirstAnswer = () => {\n if (!currentQuestion.answerIds || currentQuestion.answerIds.length === 0) {\n return null;\n }\n\n const firstAnswerId = currentQuestion.answerIds![0];\n\n return answers.find(answer => answer.id === firstAnswerId);\n };\n\n const [\n currentAnswer,\n setCurrentAnswer,\n ] = useState<IQuestionDialogAnswer | null>(onGetFirstAnswer()!);\n\n useEffect(() => {\n setCurrentAnswer(onGetFirstAnswer()!);\n }, [currentQuestion]);\n\n const onGetAnswers = (answerIds: number[]) => {\n return answerIds.map((answerId: number) =>\n answers.find(answer => answer.id === answerId)\n );\n };\n\n const onKeyPress = (e: KeyboardEvent) => {\n switch (e.key) {\n case 'ArrowDown':\n // select next answer, if any.\n // if no next answer, select first answer\n // const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n // (answer) => answer?.id === currentAnswer!.id + 1\n // );\n\n const nextAnswerIndex = onGetAnswers(\n currentQuestion.answerIds!\n ).findIndex(answer => answer?.id === currentAnswer!.id + 1);\n\n const nextAnswerID = currentQuestion.answerIds![nextAnswerIndex];\n\n const nextAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n answer => answer?.id === nextAnswerID\n );\n\n setCurrentAnswer(nextAnswer || onGetFirstAnswer()!);\n\n break;\n case 'ArrowUp':\n // select previous answer, if any.\n // if no previous answer, select last answer\n\n const previousAnswerIndex = onGetAnswers(\n currentQuestion.answerIds!\n ).findIndex(answer => answer?.id === currentAnswer!.id - 1);\n\n const previousAnswerID =\n currentQuestion.answerIds &&\n currentQuestion.answerIds[previousAnswerIndex];\n\n const previousAnswer = onGetAnswers(currentQuestion.answerIds!).find(\n answer => answer?.id === previousAnswerID\n );\n\n if (previousAnswer) {\n setCurrentAnswer(previousAnswer);\n } else {\n setCurrentAnswer(onGetAnswers(currentQuestion.answerIds!).pop()!);\n }\n\n break;\n case 'Enter':\n setCanShowAnswers(false);\n\n if (!currentAnswer?.nextQuestionId) {\n onClose();\n return;\n } else {\n setCurrentQuestion(\n questions.find(\n question => question.id === currentAnswer!.nextQuestionId\n )!\n );\n }\n\n break;\n }\n };\n useEventListener('keydown', onKeyPress);\n\n const onAnswerClick = (answer: IQuestionDialogAnswer) => {\n setCanShowAnswers(false);\n if (answer.nextQuestionId) {\n // if there is a next question, go to it\n setCurrentQuestion(\n questions.find(question => question.id === answer.nextQuestionId)!\n );\n } else {\n // else, finish dialog!\n onClose();\n }\n };\n\n const onRenderCurrentAnswers = () => {\n const answerIds = currentQuestion.answerIds;\n if (!answerIds) {\n return null;\n }\n\n const answers = onGetAnswers(answerIds);\n\n if (!answers) {\n return null;\n }\n\n return answers.map(answer => {\n const isSelected = currentAnswer?.id === answer?.id;\n const selectedColor = isSelected ? 'yellow' : 'white';\n\n if (answer) {\n return (\n <AnswerRow key={`answer_${answer.id}`}>\n <AnswerSelectedIcon color={selectedColor}>\n {isSelected ? 'X' : null}\n </AnswerSelectedIcon>\n\n <Answer\n key={answer.id}\n onPointerDown={() => onAnswerClick(answer)}\n color={selectedColor}\n >\n {answer.text}\n </Answer>\n </AnswerRow>\n );\n }\n\n return null;\n });\n };\n\n return (\n <Container>\n <QuestionContainer>\n <DynamicText\n text={currentQuestion.text}\n onStart={() => setCanShowAnswers(false)}\n onFinish={() => setCanShowAnswers(true)}\n />\n </QuestionContainer>\n\n {canShowAnswers && (\n <AnswersContainer>{onRenderCurrentAnswers()}</AnswersContainer>\n )}\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n word-break: break-all;\n box-sizing: border-box;\n justify-content: flex-start;\n align-items: flex-start;\n flex-wrap: wrap;\n`;\n\nconst QuestionContainer = styled.div`\n flex: 100%;\n width: 100%;\n`;\n\nconst AnswersContainer = styled.div`\n flex: 100%;\n`;\n\ninterface IAnswerProps {\n color: string;\n}\n\nconst Answer = styled.p<IAnswerProps>`\n flex: auto;\n color: ${props => props.color} !important;\n font-size: 0.65rem !important;\n background: inherit;\n border: none;\n`;\n\nconst AnswerSelectedIcon = styled.span<IAnswerProps>`\n flex: 5% 0 0;\n color: ${props => props.color} !important;\n`;\n\nconst AnswerRow = styled.div`\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n margin-bottom: 0.5rem;\n height: 22px;\n p {\n line-height: unset;\n margin-top: 0;\n margin-bottom: 0rem;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { NPCDialogText } from './NPCDialogText';\nimport {\n IQuestionDialog,\n IQuestionDialogAnswer,\n QuestionDialog,\n} from './QuestionDialog/QuestionDialog';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\n\nexport enum NPCDialogType {\n TextOnly = 'TextOnly',\n TextAndThumbnail = 'TextAndThumbnail',\n}\n\nexport interface INPCDialogProps {\n text?: string;\n type: NPCDialogType;\n imagePath?: string;\n onClose?: () => void;\n isQuestionDialog?: boolean;\n answers?: IQuestionDialogAnswer[];\n questions?: IQuestionDialog[];\n}\n\nexport const NPCDialog: React.FC<INPCDialogProps> = ({\n text,\n type,\n onClose,\n imagePath,\n isQuestionDialog = false,\n questions,\n answers,\n}) => {\n return (\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGold}\n width={isQuestionDialog ? '600px' : '80%'}\n height={'180px'}\n >\n {isQuestionDialog && questions && answers ? (\n <>\n <TextContainer\n flex={type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'}\n >\n <QuestionDialog\n questions={questions}\n answers={answers}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {type === NPCDialogType.TextAndThumbnail && (\n <ThumbnailContainer>\n <NPCThumbnail src={imagePath || aliceDefaultThumbnail} />\n </ThumbnailContainer>\n )}\n </>\n ) : (\n <>\n <Container>\n <CloseIcon onPointerDown={onClose}>X</CloseIcon>\n <TextContainer\n flex={type === NPCDialogType.TextAndThumbnail ? '70%' : '100%'}\n >\n <NPCDialogText\n type={type}\n text={text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {type === NPCDialogType.TextAndThumbnail && (\n <ThumbnailContainer>\n <NPCThumbnail src={imagePath || aliceDefaultThumbnail} />\n </ThumbnailContainer>\n )}\n </Container>\n </>\n )}\n </RPGUIContainer>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n\n box-sizing: border-box;\n justify-content: center;\n align-items: flex-start;\n position: relative;\n`;\n\nconst CloseIcon = styled.p`\n position: absolute;\n top: -1.5rem;\n right: -0.4rem;\n cursor: pointer;\n color: white;\n font-size: 1.1rem !important;\n`;\n\ninterface ITextContainerProps {\n flex: string;\n}\n\nconst TextContainer = styled.div<ITextContainerProps>`\n flex: ${({ flex }) => flex} 0 0;\n width: 355px;\n`;\n\nconst ThumbnailContainer = styled.div`\n flex: 30% 0 0;\n display: flex;\n justify-content: flex-end;\n`;\n\nconst NPCThumbnail = styled.img`\n image-rendering: pixelated;\n height: 128px;\n width: 128px;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { NPCDialogText } from './NPCDialogText';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\nimport pressSpaceGif from './img/space.gif';\n\nexport enum ImgSide {\n right = 'right',\n left = 'left',\n}\n\nexport interface NPCMultiDialogType {\n text: string;\n imagePath?: string;\n imageSide: ImgSide;\n}\n\nexport interface INPCMultiDialogProps {\n onClose: () => void;\n textAndTypeArray: NPCMultiDialogType[];\n}\n\nexport const NPCMultiDialog: React.FC<INPCMultiDialogProps> = ({\n onClose,\n textAndTypeArray,\n}) => {\n const [showGoNextIndicator, setShowGoNextIndicator] = useState<boolean>(\n false\n );\n const [slide, setSlide] = useState<number>(0);\n\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n if (slide < textAndTypeArray?.length - 1) {\n setSlide(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [slide]);\n\n return (\n <RPGUIContainer\n type={RPGUIContainerTypes.FramedGold}\n width={'50%'}\n height={'180px'}\n >\n <>\n <Container>\n {textAndTypeArray[slide]?.imageSide === 'right' && (\n <>\n <TextContainer flex={'70%'}>\n <NPCDialogText\n onStartStep={() => setShowGoNextIndicator(false)}\n onEndStep={() => setShowGoNextIndicator(true)}\n text={textAndTypeArray[slide].text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n <ThumbnailContainer>\n <NPCThumbnail\n src={\n textAndTypeArray[slide].imagePath || aliceDefaultThumbnail\n }\n />\n </ThumbnailContainer>\n {showGoNextIndicator && (\n <PressSpaceIndicator right={'10.5rem'} src={pressSpaceGif} />\n )}\n </>\n )}\n {textAndTypeArray[slide].imageSide === 'left' && (\n <>\n <ThumbnailContainer>\n <NPCThumbnail\n src={\n textAndTypeArray[slide].imagePath || aliceDefaultThumbnail\n }\n />\n </ThumbnailContainer>\n <TextContainer flex={'70%'}>\n <NPCDialogText\n onStartStep={() => setShowGoNextIndicator(false)}\n onEndStep={() => setShowGoNextIndicator(true)}\n text={textAndTypeArray[slide].text || 'No text provided.'}\n onClose={() => {\n if (onClose) {\n onClose();\n }\n }}\n />\n </TextContainer>\n {showGoNextIndicator && (\n <PressSpaceIndicator right={'1rem'} src={pressSpaceGif} />\n )}\n </>\n )}\n </Container>\n )\n </>\n </RPGUIContainer>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n width: 100%;\n height: 100%;\n\n box-sizing: border-box;\n justify-content: center;\n align-items: flex-start;\n position: relative;\n`;\n\ninterface ITextContainerProps {\n flex: string;\n}\n\nconst TextContainer = styled.div<ITextContainerProps>`\n flex: ${({ flex }) => flex} 0 0;\n width: 355px;\n`;\n\nconst ThumbnailContainer = styled.div`\n flex: 30% 0 0;\n display: flex;\n justify-content: flex-end;\n`;\n\nconst NPCThumbnail = styled.img`\n image-rendering: pixelated;\n height: 128px;\n width: 128px;\n`;\n\ninterface IPressSpaceIndicatorProps {\n right: string;\n}\n\nconst PressSpaceIndicator = styled.img<IPressSpaceIndicatorProps>`\n position: absolute;\n right: ${({ right }) => right};\n bottom: 1rem;\n height: 20.7px;\n image-rendering: -webkit-optimize-contrast;\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { NPCDialog, NPCDialogType } from './NPCDialog/NPCDialog';\nimport { NPCMultiDialog, NPCMultiDialogType } from './NPCDialog/NPCMultiDialog';\nimport {\n IQuestionDialog,\n IQuestionDialogAnswer,\n QuestionDialog,\n} from './NPCDialog/QuestionDialog/QuestionDialog';\n\nexport interface IHistoryDialogProps {\n backgroundImgPath: string[];\n fullCoverBackground: boolean;\n questions?: IQuestionDialog[];\n answers?: IQuestionDialogAnswer[];\n text?: string;\n imagePath?: string;\n textAndTypeArray?: NPCMultiDialogType[];\n onClose: () => void;\n}\n\nexport const HistoryDialog: React.FC<IHistoryDialogProps> = ({\n backgroundImgPath,\n fullCoverBackground,\n questions,\n answers,\n text,\n imagePath,\n textAndTypeArray,\n onClose,\n}) => {\n const [img, setImage] = useState<number>(0);\n const onHandleSpacePress = (event: KeyboardEvent) => {\n if (event.code === 'Space') {\n if (img < backgroundImgPath?.length - 1) {\n setImage(prev => prev + 1);\n } else {\n // if there's no more text chunks, close the dialog\n onClose();\n }\n }\n };\n\n useEffect(() => {\n document.addEventListener('keydown', onHandleSpacePress);\n\n return () => document.removeEventListener('keydown', onHandleSpacePress);\n }, [backgroundImgPath]);\n return (\n <BackgroundContainer\n imgPath={backgroundImgPath[img]}\n fullImg={fullCoverBackground}\n >\n <DialogContainer>\n {textAndTypeArray ? (\n <NPCMultiDialog\n textAndTypeArray={textAndTypeArray}\n onClose={onClose}\n />\n ) : questions && answers ? (\n <QuestionDialog\n questions={questions}\n answers={answers}\n onClose={onClose}\n />\n ) : text && imagePath ? (\n <NPCDialog\n text={text}\n imagePath={imagePath}\n onClose={onClose}\n type={NPCDialogType.TextAndThumbnail}\n />\n ) : (\n <NPCDialog\n text={text}\n onClose={onClose}\n type={NPCDialogType.TextOnly}\n />\n )}\n </DialogContainer>\n </BackgroundContainer>\n );\n};\n\ninterface IImgContainerProps {\n imgPath: string;\n fullImg: boolean;\n}\n\nconst BackgroundContainer = styled.div<IImgContainerProps>`\n width: 100%;\n height: 100%;\n background-image: url(${props => props.imgPath});\n background-size: ${props => (props.imgPath ? 'cover' : 'auto')};\n display: flex;\n justify-content: space-evenly;\n align-items: center;\n`;\n\nconst DialogContainer = styled.div`\n display: flex;\n justify-content: center;\n padding-top: 200px;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { DynamicText } from '../typography/DynamicText';\n\nexport interface ITextImageProps {\n image: string;\n textPosition?: 'flex-start' | 'flex-end';\n text: string;\n}\n\nexport interface IImageCarouselProps {\n textImage: ITextImageProps[];\n isTextFixed: boolean;\n onCloseButton?: () => void;\n}\n\nexport const ImageCarousel: React.FC<IImageCarouselProps> = ({\n textImage,\n isTextFixed,\n onCloseButton,\n}) => {\n const [textImageSelected, setTextImageSelected] = useState(textImage[0]);\n\n const goToPreviousImage = () => {\n const currentIndex = textImage.indexOf(textImageSelected);\n if (currentIndex > 0) {\n setTextImageSelected(textImage[currentIndex - 1]);\n }\n };\n\n const goToNextImage = () => {\n const currentIndex = textImage.indexOf(textImageSelected);\n if (currentIndex < textImage.length - 1) {\n setTextImageSelected(textImage[currentIndex + 1]);\n }\n };\n\n return (\n <CarouselWrapper type={RPGUIContainerTypes.Framed}>\n {isTextFixed ? (\n <>\n <BackgroundImage\n imagePath={textImageSelected.image}\n isTextFixed={isTextFixed}\n >\n <ArrowContainer>\n {textImageSelected !== textImage[0] && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => goToPreviousImage()}\n ></SelectArrow>\n )}\n\n {textImageSelected !== textImage[textImage.length - 1] && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() => goToNextImage()}\n ></SelectArrow>\n )}\n </ArrowContainer>\n </BackgroundImage>\n <Description\n textPosition={textImageSelected.textPosition ?? 'flex-start'}\n isTextFixed={isTextFixed}\n >\n <DynamicText text={textImageSelected.text} />\n </Description>\n </>\n ) : (\n <BackgroundImage\n imagePath={textImageSelected.image}\n isTextFixed={isTextFixed}\n >\n <ArrowContainer>\n {textImageSelected !== textImage[0] && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => goToPreviousImage()}\n ></SelectArrow>\n )}\n <Description\n textPosition={textImageSelected.textPosition ?? 'flex-start'}\n isTextFixed={isTextFixed}\n >\n <DynamicText text={textImageSelected.text} />\n </Description>\n {textImageSelected !== textImage[textImage.length - 1] && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() => goToNextImage()}\n ></SelectArrow>\n )}\n </ArrowContainer>\n </BackgroundImage>\n )}\n {onCloseButton && (\n <CloseButton className=\"container-close\" onPointerDown={onCloseButton}>\n X\n </CloseButton>\n )}\n </CarouselWrapper>\n );\n};\n\ninterface IBackgroundImage {\n imagePath: string;\n isTextFixed: boolean;\n}\n\ninterface ITextDescription {\n textPosition: 'flex-start' | 'flex-end';\n isTextFixed: boolean;\n}\n\nconst CarouselWrapper = styled(DraggableContainer)`\n width: 100%;\n height: 100%;\n`;\n\nconst ArrowContainer = styled.span`\n display: flex;\n height: 100%;\n align-items: center;\n`;\n\nconst BackgroundImage = styled.div<IBackgroundImage>`\n background-image: url(${props => props.imagePath});\n background-repeat: no-repeat;\n background-attachment: fixed;\n background-size: contain;\n background-position: center;\n width: 100%;\n height: ${props => (props.isTextFixed ? '80%' : '100%')};\n`;\n\nconst Description = styled.div<ITextDescription>`\n width: 100%;\n height: ${props => (props.isTextFixed ? 'auto' : '100%')};\n display: flex;\n align-items: ${props => props.textPosition};\n p {\n background-color: ${props =>\n props.isTextFixed ? 'none' : 'rgba(0, 0, 0, 0.6)'};\n border-radius: 5px;\n text-align: justify;\n height: auto;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n @media (max-width: 950px) {\n font-size: 1.7rem;\n padding: 12px;\n }\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled, { keyframes } from 'styled-components';\nimport SelectArrow from '../Arrow/SelectArrow';\n\nexport interface ISimpleImageCarousel {\n images: string[];\n styles?: React.CSSProperties;\n autoCycle?: boolean;\n autoCycleDelay?: number;\n stopAutoCyclingOnInteraction?: boolean;\n}\n\nexport const SimpleImageCarousel: React.FC<ISimpleImageCarousel> = ({\n images,\n styles,\n autoCycle = false,\n autoCycleDelay = 3000,\n stopAutoCyclingOnInteraction = false,\n}) => {\n const [currentImage, setCurrentImage] = useState(0);\n const autoCycleId = useRef<NodeJS.Timeout | null>(null);\n\n const handleLeftClick = () => {\n setCurrentImage(\n prevImage => (prevImage - 1 + images?.length) % images?.length\n );\n if (stopAutoCyclingOnInteraction && autoCycleId.current) {\n clearInterval(autoCycleId.current);\n autoCycleId.current = null;\n }\n };\n\n const handleRightClick = () => {\n setCurrentImage(prevImage => (prevImage + 1) % images?.length);\n if (stopAutoCyclingOnInteraction && autoCycleId.current) {\n clearInterval(autoCycleId.current);\n autoCycleId.current = null;\n }\n };\n\n useEffect(() => {\n if (autoCycle) {\n autoCycleId.current = setInterval(() => {\n setCurrentImage(prevImage => (prevImage + 1) % images?.length);\n }, autoCycleDelay);\n }\n\n return () => {\n if (autoCycleId.current) {\n clearInterval(autoCycleId.current);\n }\n };\n }, [autoCycle, autoCycleDelay, images?.length]);\n\n const hasMoreThanOneImage = images?.length > 1;\n\n return (\n <ImageContainer style={styles}>\n {hasMoreThanOneImage && (\n <CustomLeftArrow direction=\"left\" onPointerDown={handleLeftClick} />\n )}\n {hasMoreThanOneImage && (\n <CustomRightArrow direction=\"right\" onPointerDown={handleRightClick} />\n )}\n <Carousel>\n <FadeInCarouselImg\n key={currentImage}\n src={images?.[currentImage]}\n alt={`Image ${currentImage}`}\n />\n </Carousel>\n </ImageContainer>\n );\n};\n\nconst ImageContainer = styled.div`\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100%;\n margin-right: 0.5rem;\n max-width: 400px;\n position: relative;\n width: 400px;\n`;\n\nconst CustomLeftArrow = styled(SelectArrow)`\n position: absolute;\n left: -0.5rem;\n top: 50%;\n transform: translateY(-50%);\n`;\n\nconst CustomRightArrow = styled(SelectArrow)`\n position: absolute;\n right: -2.5rem;\n top: 50%;\n transform: translateY(-50%);\n`;\n\nconst Carousel = styled.div`\n display: flex;\n`;\n\nconst CarouselImg = styled.img`\n flex: 0 0 auto;\n width: 100%;\n height: auto;\n margin: 0 1rem;\n border-radius: 5px;\n box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.2);\n scroll-snap-align: start;\n margin-right: 3rem;\n`;\n\nconst fadeIn = keyframes`\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n`;\n\nconst FadeInCarouselImg = styled(CarouselImg)`\n animation: ${fadeIn} 0.5s;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\n\ninterface TabItem {\n id: string;\n title: string;\n content: React.ReactNode;\n}\n\nexport interface TableTabProps {\n tabs: TabItem[];\n activeColor?: string;\n activeTextColor: string;\n inactiveColor?: string;\n borderColor?: string;\n hoverColor?: string;\n}\n\nexport const InternalTabs: React.FC<TableTabProps> = ({\n tabs,\n activeColor = '#fef08a',\n activeTextColor = '#000000',\n inactiveColor = '#6b7280',\n borderColor = '#f59e0b',\n hoverColor = '#fef3c7',\n}) => {\n const [activeTab, setActiveTab] = useState(tabs[0].id);\n\n return (\n <TableWrapper>\n <TabHeader borderColor={borderColor}>\n {tabs.map(tab => (\n <TabButton\n key={tab.id}\n active={activeTab === tab.id}\n activeColor={activeColor}\n activeTextColor={activeTextColor}\n inactiveColor={inactiveColor}\n borderColor={borderColor}\n hoverColor={hoverColor}\n onClick={() => setActiveTab(tab.id)}\n >\n {tab.title}\n </TabButton>\n ))}\n </TabHeader>\n <ContentWrapper>\n {tabs.find(tab => tab.id === activeTab)?.content}\n </ContentWrapper>\n </TableWrapper>\n );\n};\n\nconst TableWrapper = styled.div`\n width: 100%;\n`;\n\nconst TabHeader = styled.div<{ borderColor: string }>`\n display: flex;\n border-bottom: 1px solid ${props => props.borderColor};\n`;\n\nconst TabButton = styled.button<{\n active: boolean;\n activeColor: string;\n activeTextColor: string;\n inactiveColor: string;\n borderColor: string;\n hoverColor: string;\n}>`\n flex: 1;\n padding: 0.5rem 1rem;\n font-size: 0.875rem;\n font-weight: 500;\n border-right: 1px solid ${props => props.borderColor};\n background-color: ${props =>\n props.active ? props.activeColor : 'transparent'};\n color: ${props =>\n props.active ? props.activeTextColor : props.inactiveColor};\n\n &:last-child {\n border-right: none;\n }\n\n &:hover {\n background-color: ${props =>\n props.active ? props.activeColor : props.hoverColor};\n }\n`;\n\nconst ContentWrapper = styled.div`\n padding: 1rem;\n`;\n","import React from 'react';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\n\ninterface IProps {\n children: React.ReactNode;\n title: string;\n onClose?: () => void;\n onPositionChange?: (position: IPosition) => void;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n scale?: number;\n width?: string;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\nexport const SlotsContainer: React.FC<IProps> = ({\n children,\n title,\n onClose,\n onPositionChange,\n onPositionChangeEnd,\n onPositionChangeStart,\n onOutsideClick,\n initialPosition,\n scale,\n width,\n isFullScreen,\n opacity,\n}) => {\n return (\n <DraggableContainer\n isFullScreen={isFullScreen}\n opacity={opacity}\n title={title}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n width={width ?? '415px'}\n cancelDrag=\".item-container-body, #shortcuts_list\"\n onPositionChange={({ x, y }) => {\n if (onPositionChange) {\n onPositionChange({ x, y });\n }\n }}\n onPositionChangeEnd={({ x, y }) => {\n if (onPositionChangeEnd) {\n onPositionChangeEnd({ x, y });\n }\n }}\n onPositionChangeStart={({ x, y }) => {\n if (onPositionChangeStart) {\n onPositionChangeStart({ x, y });\n }\n }}\n onOutsideClick={onOutsideClick}\n initialPosition={initialPosition}\n scale={scale}\n >\n {children}\n </DraggableContainer>\n );\n};\n","import { useCallback, useRef } from 'react';\n\ninterface IUseScrollOnDragProps {\n containerRef: React.RefObject<HTMLDivElement>;\n threshold: number;\n scrollStep: number;\n}\n\nexport const useScrollOnDrag = ({\n containerRef,\n threshold,\n scrollStep,\n}: IUseScrollOnDragProps) => {\n const animationFrameId = useRef<number | null>(null);\n\n const startScrolling = useCallback(\n (clientY: number) => {\n const scroll = () => {\n if (containerRef.current) {\n const { top, bottom } = containerRef.current.getBoundingClientRect();\n\n const maxScrollTop =\n containerRef.current.scrollHeight -\n containerRef.current.clientHeight;\n const distanceFromTop = clientY - top;\n const distanceFromBottom = bottom - clientY;\n\n if (\n distanceFromTop < threshold &&\n containerRef.current.scrollTop > 0\n ) {\n containerRef.current.scrollTop -= scrollStep;\n animationFrameId.current = requestAnimationFrame(scroll);\n } else if (\n distanceFromBottom < threshold &&\n containerRef.current.scrollTop < maxScrollTop\n ) {\n containerRef.current.scrollTop += scrollStep;\n animationFrameId.current = requestAnimationFrame(scroll);\n } else {\n // Check if we are near the bottom of the container\n if (containerRef.current.scrollTop >= maxScrollTop) {\n // You can perform any action here when the scroll hits the bottom.\n } else {\n // Check if we are near the top of the container\n if (containerRef.current.scrollTop <= 0) {\n // You can perform any action here when the scroll hits the top.\n }\n }\n // Stop scrolling if neither condition is met\n stopScrolling();\n }\n }\n };\n\n const stopScrolling = () => {\n if (animationFrameId.current !== null) {\n cancelAnimationFrame(animationFrameId.current);\n animationFrameId.current = null;\n }\n };\n\n //@ts-ignore\n cancelAnimationFrame(animationFrameId.current); // Cancel any existing animation frame\n animationFrameId.current = requestAnimationFrame(scroll);\n },\n [containerRef, threshold, scrollStep]\n );\n\n const stopScrolling = useCallback(() => {\n if (animationFrameId.current !== null) {\n cancelAnimationFrame(animationFrameId.current);\n animationFrameId.current = null;\n }\n }, []);\n\n return { startScrolling, stopScrolling };\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\ntype ShortcutsSetterProps = {\n setSettingShortcutIndex: (index: number) => void;\n settingShortcutIndex: number;\n shortcuts: IShortcut[];\n removeShortcut: (index: number) => void;\n atlasJSON: any;\n atlasIMG: any;\n};\n\nexport const ShortcutsSetter: React.FC<ShortcutsSetterProps> = ({\n setSettingShortcutIndex,\n settingShortcutIndex,\n shortcuts,\n removeShortcut,\n atlasJSON,\n atlasIMG,\n}) => {\n const getContent = (index: number) => {\n if (shortcuts[index]?.type === ShortcutType.Item) {\n const payload = shortcuts[index]?.payload as IItem | undefined;\n\n if (!payload) return null;\n\n return (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n imgScale={1.2}\n imgStyle={{ left: '3px' }}\n />\n );\n }\n const IMAGE_SIZE = 32;\n const IMAGE_SCALE = 1;\n\n const shortcut = shortcuts[index];\n\n if (shortcut?.type === ShortcutType.Spell && shortcut.payload) {\n const payload = shortcut.payload as IRawSpell; // TypeScript type assertion\n\n return (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath ?? ''}\n width={IMAGE_SIZE}\n height={IMAGE_SIZE}\n imgScale={IMAGE_SCALE}\n centered\n borderRadius=\"50%\"\n />\n );\n }\n\n return null;\n };\n\n return (\n <Container>\n <p>Shortcuts:</p>\n <List id=\"shortcuts_list\">\n {Array.from({ length: 12 }).map((_, i) => (\n <Shortcut\n key={i}\n onPointerDown={() => {\n if (settingShortcutIndex !== -1) setSettingShortcutIndex(-1);\n\n removeShortcut(i);\n if (\n settingShortcutIndex === -1 &&\n (!shortcuts[i] || shortcuts[i].type === ShortcutType.None)\n )\n setSettingShortcutIndex(i);\n }}\n disabled={settingShortcutIndex !== -1 && settingShortcutIndex !== i}\n isBeingSet={settingShortcutIndex === i}\n id={`shortcutSetter_${i}`}\n >\n {getContent(i)}\n </Shortcut>\n ))}\n </List>\n </Container>\n );\n};\n\nconst Container = styled.div`\n p {\n margin: 0;\n margin-left: 0.5rem;\n font-size: 10px;\n }\n\n width: 100%;\n`;\n\nconst Shortcut = styled.button<{ isBeingSet?: boolean }>`\n width: 2.4rem;\n height: 2.4rem;\n\n background-color: ${uiColors.lightGray};\n border: 2px solid\n ${({ isBeingSet }) => (isBeingSet ? uiColors.yellow : uiColors.darkGray)};\n border-radius: 50%;\n text-transform: uppercase;\n font-size: 0.7rem;\n font-weight: bold;\n display: flex;\n align-items: center;\n justify-content: center;\n\n span {\n margin-top: 4px;\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background-color: ${uiColors.gray};\n }\n\n &:disabled {\n opacity: 0.5;\n }\n`;\n\nconst List = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n gap: 0.4rem;\n box-sizing: border-box;\n margin: 0 !important;\n\n flex-wrap: wrap;\n\n padding: 0.3rem;\n\n padding-bottom: 1rem;\n`;\n","import React, { useCallback, useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport enum RangeSliderType {\n Slider = 'rpgui-slider',\n GoldSlider = 'rpgui-slider golden',\n}\n\nexport interface IRangeSliderProps {\n type: RangeSliderType;\n valueMin: number;\n valueMax: number;\n width: string;\n onChange: (value: number) => void;\n value: number;\n step?: number;\n}\n\nexport const RangeSlider: React.FC<IRangeSliderProps> = React.memo(\n ({ type, valueMin, valueMax, width, onChange, value, step = 1 }) => {\n const sliderId = uuidv4();\n\n const containerRef = useRef<HTMLDivElement>(null);\n const [left, setLeft] = useState(0);\n\n useEffect(() => {\n const calculatedWidth = containerRef.current?.clientWidth || 0;\n setLeft(\n Math.max(\n ((value - valueMin) / (valueMax - valueMin)) *\n (calculatedWidth - 35) +\n 10\n )\n );\n }, [value, valueMin, valueMax]);\n\n const typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';\n\n const handleChange = useCallback(\n (e: { target: { value: any } }) => {\n onChange(Number(e.target.value));\n },\n [onChange]\n );\n\n return (\n <div\n style={{ width: width, position: 'relative' }}\n className={`rpgui-slider-container ${typeClass}`}\n id={`rpgui-slider-${sliderId}`}\n ref={containerRef}\n >\n <div style={{ pointerEvents: 'none' }}>\n <div className={`rpgui-slider-track ${typeClass}`} />\n <div className={`rpgui-slider-left-edge ${typeClass}`} />\n <div className={`rpgui-slider-right-edge ${typeClass}`} />\n <div className={`rpgui-slider-thumb ${typeClass}`} style={{ left }} />\n </div>\n <Input\n type=\"range\"\n style={{ width: width }}\n min={valueMin}\n max={valueMax}\n step={step}\n onChange={handleChange}\n value={value}\n className=\"rpgui-cursor-point\"\n />\n </div>\n );\n }\n);\n\nconst Input = styled.input`\n opacity: 0;\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n margin-top: -5px;\n`;\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { RangeSlider, RangeSliderType } from '../RangeSlider';\n\nexport interface IQuantitySelectorProps {\n maxQuantity: number;\n initialQuantity?: number;\n title?: string;\n onConfirm: (quantity: number) => void;\n onClose: () => void;\n}\n\nexport const QuantitySelector: React.FC<IQuantitySelectorProps> = ({\n maxQuantity,\n initialQuantity,\n title = 'Select quantity',\n onConfirm,\n onClose,\n}) => {\n const [value, setValue] = useState(initialQuantity ?? maxQuantity);\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n const closeSelector = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose();\n }\n };\n\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n }\n\n document.addEventListener('keydown', closeSelector);\n return () => document.removeEventListener('keydown', closeSelector);\n }, [onClose]);\n\n return (\n <StyledContainer type={RPGUIContainerTypes.Framed} width=\"25rem\">\n <CloseButton className=\"container-close\" onPointerDown={onClose}>\n X\n </CloseButton>\n <h2>{title}</h2>\n <StyledForm\n onSubmit={e => {\n e.preventDefault();\n const numberValue = Number(value);\n if (!Number.isNaN(numberValue)) {\n onConfirm(Math.max(1, Math.min(maxQuantity, numberValue)));\n }\n }}\n noValidate\n >\n <StyledInput\n ref={inputRef}\n placeholder=\"Enter quantity\"\n type=\"number\"\n min={1}\n max={maxQuantity}\n value={value}\n onChange={e => {\n if (Number(e.target.value) >= maxQuantity) {\n setValue(maxQuantity);\n return;\n }\n setValue(Number(e.target.value));\n }}\n onBlur={e => {\n setValue(\n Math.max(1, Math.min(maxQuantity, Number(e.target.value)))\n );\n }}\n />\n <RangeSlider\n type={RangeSliderType.Slider}\n valueMin={1}\n valueMax={maxQuantity}\n width=\"100%\"\n onChange={setValue}\n value={value}\n />\n <Button buttonType={ButtonTypes.RPGUIButton} type=\"submit\">\n Confirm\n </Button>\n </StyledForm>\n </StyledContainer>\n );\n};\n\nconst StyledContainer = styled(RPGUIContainer)`\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n padding: 1rem;\n\n h2 {\n margin: 0;\n margin-bottom: 1rem;\n font-size: 1rem;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 3px;\n right: 0px;\n color: white;\n z-index: 22;\n font-size: 1.5rem;\n cursor: pointer;\n`;\n\nconst StyledForm = styled.form`\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 1rem;\n width: 100%;\n`;\n\nconst StyledInput = styled.input`\n width: 100%;\n padding: 0.5rem;\n background-color: rgba(0, 0, 0, 0.25);\n border: none;\n color: white;\n font-size: 1rem;\n text-align: center;\n\n &::-webkit-inner-spin-button,\n &::-webkit-outer-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n -moz-appearance: textfield;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../Abstractions/ModalPortal';\nimport { QuantitySelector } from './QuantitySelector';\n\nexport interface IQuantitySelect {\n isOpen: boolean;\n maxQuantity: number;\n callback: (quantity: number) => void;\n title?: string;\n initialQuantity?: number;\n}\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nconst validateQuantitySelect = (\n quantitySelect: IQuantitySelect\n): IQuantitySelect => ({\n ...quantitySelect,\n maxQuantity: Math.max(1, quantitySelect.maxQuantity),\n initialQuantity: quantitySelect.initialQuantity\n ? Math.max(\n 1,\n Math.min(quantitySelect.maxQuantity, quantitySelect.initialQuantity)\n )\n : undefined,\n});\n\nexport const QuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps): JSX.Element => {\n const resetQuantitySelect = () => {\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\n };\n\n // Validate the input values\n const validatedQuantitySelect = validateQuantitySelect(quantitySelect);\n\n return (\n <ModalPortal>\n <QuantitySelectorContainer>\n <QuantitySelector\n maxQuantity={validatedQuantitySelect.maxQuantity}\n initialQuantity={validatedQuantitySelect.initialQuantity}\n title={validatedQuantitySelect.title}\n onConfirm={quantity => {\n validatedQuantitySelect.callback(quantity);\n resetQuantitySelect();\n }}\n onClose={() => {\n validatedQuantitySelect.callback(-1);\n resetQuantitySelect();\n }}\n />\n </QuantitySelectorContainer>\n </ModalPortal>\n );\n};\n\nconst QuantitySelectorContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n`;\n","import React from 'react';\nimport { IQuantitySelect, QuantitySelectorModal } from '../../QuantitySelector/QuantitySelectorModal';\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nexport const ItemQuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps): JSX.Element => {\n return (\n <QuantitySelectorModal\n quantitySelect={quantitySelect}\n setQuantitySelect={setQuantitySelect}\n />\n );\n};\n\nexport type { IQuantitySelect };\n","import {\n IEquipmentSet,\n IItem,\n IItemContainer,\n IShortcut,\n ItemContainerType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, useMemo, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { SlotsContainer } from '../../Abstractions/SlotsContainer';\n\nimport { useScrollOnDrag } from '../../../hooks/useScrollOnDrag';\nimport { IPosition } from '../../../types/eventTypes';\nimport { ShortcutsSetter } from '../../Shortcuts/ShortcutsSetter';\nimport { ItemSlotDetailsProvider } from './context/ItemSlotDetailsContext';\nimport { ItemSlotDraggingProvider } from './context/ItemSlotDraggingContext';\nimport { DraggedItem } from './DraggedItem';\nimport { ItemQuantitySelectorModal } from './ItemQuantitySelectorModal';\nimport { ItemSlot } from './ItemSlot';\nimport { ItemSlotToolTips } from './ItemSlotTooltips';\n\nexport interface IItemContainerProps {\n itemContainer: IItemContainer;\n onClose?: () => void;\n onItemClick?: (\n item: IItem,\n ItemType: IItem['type'],\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragStart?: (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n onItemDragEnd?: (quantity?: number) => void;\n onOutsideDrop?: (item: IItem, position: IPosition) => void;\n onItemPlaceDrop?: (\n item: IItem | null,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void;\n scale?: number;\n checkIfItemCanBeMoved: () => boolean;\n checkIfItemShouldDragEnd?: () => boolean;\n onMouseOver?: (e: any, slotIndex: number, item: IItem | null) => void;\n onSelected?: (optionId: string, item: IItem) => void;\n type: ItemContainerType;\n atlasJSON: any;\n atlasIMG: any;\n disableContextMenu?: boolean;\n initialPosition?: { x: number; y: number };\n shortcuts?: IShortcut[];\n setItemShortcut?: (key: string, index: number) => void;\n removeShortcut?: (index: number) => void;\n equipmentSet?: IEquipmentSet | null;\n isDepotSystem?: boolean;\n onPositionChangeEnd?: (position: IPosition) => void;\n onPositionChangeStart?: (position: IPosition) => void;\n isFullScreen?: boolean;\n opacity?: number;\n}\n\ntype onDragStart =\n | ((\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => void)\n | undefined;\ntype onDragEnd = ((quantity?: number) => void) | undefined;\n\nconst MIN_SLOTS_FOR_SCROLL = 20;\n\nexport const ItemContainer: React.FC<IItemContainerProps> = React.memo(\n ({\n itemContainer,\n onClose,\n onMouseOver,\n onSelected,\n onItemClick,\n type,\n atlasJSON,\n atlasIMG,\n disableContextMenu = false,\n onItemDragEnd,\n onItemDragStart,\n onItemPlaceDrop,\n onOutsideDrop,\n checkIfItemCanBeMoved,\n initialPosition,\n checkIfItemShouldDragEnd,\n scale,\n shortcuts,\n setItemShortcut,\n removeShortcut,\n equipmentSet,\n isDepotSystem,\n onPositionChangeEnd,\n onPositionChangeStart,\n isFullScreen,\n opacity,\n }) => {\n const [quantitySelect, setQuantitySelect] = useState({\n isOpen: false,\n maxQuantity: 1,\n callback: (_quantity: number) => {},\n });\n const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);\n\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { startScrolling, stopScrolling } = useScrollOnDrag({\n containerRef,\n threshold: 50,\n scrollStep: 4,\n });\n\n const handleSetShortcut = useCallback(\n (item: IItem, index: number) => {\n if (\n item.type === ItemType.Consumable ||\n item.type === ItemType.Tool ||\n item.subType === ItemSubType.Seed\n ) {\n setItemShortcut?.(item.key, index);\n }\n },\n [setItemShortcut]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n startScrolling(e.clientY);\n },\n [startScrolling]\n );\n\n const onDragStartScrollingEvents = useCallback(() => {\n document.addEventListener('pointermove', handleMouseMove);\n document.addEventListener(\n 'pointerup',\n () => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n },\n { once: true }\n );\n }, [handleMouseMove, stopScrolling]);\n\n const onDragEndScrollingEvents = useCallback(() => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n }, [handleMouseMove, stopScrolling]);\n\n const onDragStartHandler: onDragStart = useCallback(\n (\n item: IItem,\n slotIndex: number,\n itemContainerType: ItemContainerType | null\n ) => {\n if (onItemDragStart) {\n onItemDragStart(item, slotIndex, itemContainerType);\n }\n\n onDragStartScrollingEvents();\n },\n [onItemDragStart, onDragStartScrollingEvents]\n );\n\n const onDragEndHandler: onDragEnd = useCallback(\n (quantity: number | undefined) => {\n if (onItemDragEnd) {\n onItemDragEnd(quantity);\n }\n onDragEndScrollingEvents();\n },\n [onItemDragEnd, onDragEndScrollingEvents]\n );\n\n // Memoize handleSetShortcut to prevent unnecessary re-renders\n const memoizedHandleSetShortcut = useCallback(\n (item: IItem, index: number) => {\n handleSetShortcut(item, index);\n },\n [handleSetShortcut]\n );\n\n // Memoize onRenderSlots to prevent re-creating the slots array on every render\n const onRenderSlots = useMemo(() => {\n const slots = [];\n\n for (let i = 0; i < itemContainer.slotQty; i++) {\n const currentItem = itemContainer.slots?.[i] || null;\n\n slots.push(\n <ItemSlot\n key={i}\n slotIndex={i}\n item={currentItem}\n itemContainerType={type}\n onMouseOver={\n onMouseOver\n ? (event, slotIndex, item) =>\n onMouseOver(event, slotIndex, item)\n : undefined\n }\n onMouseOut={undefined} // Assuming you don't need onMouseOut here\n onPointerDown={(itemType, containerType, item) => {\n if (settingShortcutIndex !== -1) {\n setSettingShortcutIndex(-1);\n memoizedHandleSetShortcut(item, settingShortcutIndex);\n } else if (onItemClick) {\n onItemClick(item, itemType, containerType);\n }\n }}\n onDragStart={onDragStartHandler}\n onDragEnd={onDragEndHandler}\n dragScale={scale}\n checkIfItemCanBeMoved={checkIfItemCanBeMoved}\n checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}\n openQuantitySelector={(maxQuantity, callback) => {\n setQuantitySelect({\n isOpen: true,\n maxQuantity,\n callback,\n });\n }}\n onPlaceDrop={(item, slotIndex, itemContainerType) => {\n if (onItemPlaceDrop) {\n onItemPlaceDrop(item, slotIndex, itemContainerType);\n }\n\n console.log('PLACE DROP');\n\n onDragEndScrollingEvents();\n }}\n onOutsideDrop={(item, position) => {\n if (onOutsideDrop) {\n onOutsideDrop(item, position);\n }\n\n console.log('OUTSIDE DROP');\n\n onDragEndScrollingEvents();\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n isSelectingShortcut={settingShortcutIndex !== -1}\n equipmentSet={equipmentSet}\n setItemShortcut={\n type === ItemContainerType.Inventory\n ? memoizedHandleSetShortcut\n : undefined\n }\n isDepotSystem={isDepotSystem}\n />\n );\n }\n return slots;\n }, [\n itemContainer.slotQty,\n itemContainer.slots,\n type,\n onMouseOver,\n settingShortcutIndex,\n memoizedHandleSetShortcut,\n onItemClick,\n onDragStartHandler,\n onDragEndHandler,\n scale,\n checkIfItemCanBeMoved,\n checkIfItemShouldDragEnd,\n onItemPlaceDrop,\n onOutsideDrop,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n isDepotSystem,\n onDragEndScrollingEvents,\n ]);\n\n return (\n <ItemSlotDraggingProvider>\n <ItemSlotDetailsProvider>\n <DraggedItem\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n scale={scale}\n />\n <SlotsContainer\n title={itemContainer.name || 'Container'}\n onClose={onClose}\n initialPosition={initialPosition}\n scale={scale}\n onPositionChangeEnd={onPositionChangeEnd}\n onPositionChangeStart={onPositionChangeStart}\n isFullScreen={isFullScreen}\n opacity={opacity}\n >\n {type === ItemContainerType.Inventory &&\n shortcuts &&\n removeShortcut && (\n <ShortcutsSetter\n setSettingShortcutIndex={setSettingShortcutIndex}\n settingShortcutIndex={settingShortcutIndex}\n shortcuts={shortcuts}\n removeShortcut={removeShortcut}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n )}\n <ItemsContainer\n className=\"item-container-body\"\n ref={containerRef}\n isScrollable={itemContainer.slotQty > MIN_SLOTS_FOR_SCROLL}\n isFullScreen={isFullScreen}\n >\n {onRenderSlots}\n </ItemsContainer>\n </SlotsContainer>\n {quantitySelect.isOpen && (\n <ItemQuantitySelectorModal\n quantitySelect={quantitySelect}\n setQuantitySelect={setQuantitySelect}\n />\n )}\n <ItemSlotToolTips\n dragScale={scale}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n isContextMenuDisabled={disableContextMenu}\n onSelected={onSelected}\n />\n </ItemSlotDetailsProvider>\n </ItemSlotDraggingProvider>\n );\n }\n);\n\ninterface IItemsContainerProps {\n isScrollable: boolean;\n isFullScreen?: boolean;\n}\n\nconst ItemsContainer = styled.div<IItemsContainerProps>`\n display: flex;\n justify-content: ${({ isFullScreen }) =>\n isFullScreen ? 'flex-start' : 'center'};\n flex-wrap: wrap;\n max-height: ${({ isFullScreen }) =>\n isFullScreen\n ? undefined\n : '270px'}; // Adjust the max-height based on the prop\n overflow-y: ${({ isScrollable }) => (isScrollable ? 'auto' : 'hidden')};\n overflow-x: hidden;\n width: ${({ isFullScreen }) =>\n isFullScreen ? '100vw' : '415px'}; // Adjust the width based on the prop\n\n max-height: ${({ isFullScreen }) => isFullScreen && '60%'};\n\n @media screen and (max-height: 350px) {\n max-height: ${({ isFullScreen }) => isFullScreen && '50%'};\n }\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nexport interface IOptionsItemSelectorProps {\n name: string;\n description?: string;\n imageKey: string;\n}\n\nexport interface IItemSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n options: IOptionsItemSelectorProps[];\n onClose: () => void;\n onSelect: (value: string) => void;\n}\n\nexport const ItemSelector: React.FC<IItemSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n options,\n onClose,\n onSelect,\n}) => {\n const [selectedValue, setSelectedValue] = useState<string>();\n\n const handleClick = () => {\n let element = document.querySelector(\n `input[name='test']:checked`\n ) as HTMLInputElement;\n const elementValue = element.value;\n setSelectedValue(elementValue);\n };\n\n useEffect(() => {\n if (selectedValue) {\n onSelect(selectedValue);\n }\n }, [selectedValue]);\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n width=\"500px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n >\n <div style={{ width: '100%' }}>\n <Title>{'Harvesting instruments'}</Title>\n <Subtitle>{'Use the tool, you need it'}</Subtitle>\n <hr className=\"golden\" />\n </div>\n\n <RadioInputScroller>\n {options?.map((option, index) => (\n <RadioOptionsWrapper key={index}>\n <SpriteAtlasWrapper>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.imageKey}\n imgScale={3}\n />\n </SpriteAtlasWrapper>\n <div>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={option.name}\n name=\"test\"\n />\n <label\n onPointerDown={handleClick}\n style={{ display: 'flex', alignItems: 'center' }}\n >\n {option.name} <br />\n {option.description}\n </label>\n </div>\n </RadioOptionsWrapper>\n ))}\n </RadioInputScroller>\n <ButtonWrapper>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n <Button buttonType={ButtonTypes.RPGUIButton}>Select</Button>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: yellow !important;\n`;\nconst Subtitle = styled.h1`\n font-size: 0.4rem;\n color: yellow !important;\n`;\n\nconst RadioInputScroller = styled.div`\n padding-left: 15px;\n padding-top: 10px;\n width: 100%;\n margin-top: 1rem;\n align-items: center;\n margin-left: 20px;\n align-items: flex-start;\n overflow-y: scroll;\n height: 360px;\n`;\n\nconst SpriteAtlasWrapper = styled.div`\n margin-right: 40px;\n`;\n\nconst RadioOptionsWrapper = styled.div`\n display: flex;\n align-items: stretch;\n margin-bottom: 40px;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n padding-top: 20px;\n width: 100%;\n`;\n","import {\n IRankingTopCharacterEntry,\n IRankingTopSkillEntry,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Ellipsis } from '../shared/Ellipsis';\n\nexport interface ILeaderboardLevelProps {\n items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;\n rankType: string;\n}\n\nexport const LeaderboardTable: React.FC<ILeaderboardLevelProps> = props => {\n const { items, rankType } = props;\n if (!items) return null;\n\n function isTopSkillEntry(entry: any): entry is IRankingTopSkillEntry {\n return 'skill' in entry;\n }\n\n return (\n <>\n <thead>\n <TableRowWrapper>\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Name\n </Ellipsis>\n </p>\n </TableRowValue>\n {rankType === 'Skill' ? (\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Skill\n </Ellipsis>\n </p>\n </TableRowValue>\n ) : null}\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"14px\">\n Level\n </Ellipsis>\n </p>\n </TableRowValue>\n </TableRowWrapper>\n </thead>\n <tbody>\n {Array.from(items).map(entry => (\n <TableRowWrapper key={entry.name}>\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.name}\n </Ellipsis>\n </p>\n </TableRowValue>\n {isTopSkillEntry(entry) ? (\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.skill}\n </Ellipsis>\n </p>\n </TableRowValue>\n ) : null}\n <TableRowValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {entry.level}\n </Ellipsis>\n </p>\n </TableRowValue>\n </TableRowWrapper>\n ))}\n </tbody>\n </>\n );\n};\n\nconst TableRowWrapper = styled.tr`\n margin: auto;\n padding: 0.5rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n\n p {\n font-size: 0.8rem;\n }\n`;\n\nconst TableRowValue = styled.td`\n padding: 0 20px;\n`;\n","import {\n IRankingTopCharacterEntry,\n IRankingTopSkillEntry,\n} from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { LeaderboardTable } from './LeaderboardTable';\n\nexport interface ILeaderboardProps {\n items: Set<IRankingTopCharacterEntry> | Set<IRankingTopSkillEntry> | null;\n onChangeClassType: (value: string) => void;\n onChangeRankType: (value: string) => void;\n onChangeSkillType: (value: string) => void;\n skillOptions: string[];\n rankOptions: string[];\n classOptions: string[];\n rankType: string;\n}\n\nexport const Leaderboard = (props: ILeaderboardProps) => {\n const {\n items,\n onChangeRankType,\n onChangeClassType,\n rankType,\n skillOptions,\n onChangeSkillType,\n classOptions,\n rankOptions,\n } = props;\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, []);\n\n const rankTypeOptions: IOptionsProps[] = rankOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n const skillTypeOptions: IOptionsProps[] = skillOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n const classTypeOptions: IOptionsProps[] = classOptions.map(\n (itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n })\n );\n\n return (\n <>\n <WrapperContainer>\n <StyledDropdown\n options={rankTypeOptions}\n onChange={onChangeRankType}\n width=\"80%\"\n />\n {rankType === 'Class' ? (\n <StyledDropdown\n options={classTypeOptions}\n onChange={onChangeClassType}\n width=\"100%\"\n />\n ) : null}\n {rankType === 'Skill' ? (\n <StyledDropdown\n options={skillTypeOptions}\n onChange={onChangeSkillType}\n width=\"100%\"\n />\n ) : null}\n </WrapperContainer>\n <ItemComponentScrollWrapper\n id=\"LeaderboardContainer\"\n ref={itemsContainer}\n >\n <TableWrapper>\n <LeaderboardTable items={items} rankType={rankType} />\n </TableWrapper>\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst WrapperContainer = styled.div`\n display: grid;\n grid-template-columns: 50% 50%;\n justify-content: space-between;\n width: calc(100% - 40px);\n margin-left: 10px;\n\n .rpgui-content .rpgui-dropdown-imp-header {\n padding: 0px 10px 0 !important;\n }\n`;\n\nconst StyledDropdown = styled(Dropdown)`\n margin: 3px !important;\n width: 170px !important;\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: auto;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst TableWrapper = styled.table`\n margin: auto;\n width: 100%;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface IListMenuProps {\n x: number;\n y: number;\n options: IListMenuOption[];\n onSelected: (selectedOptionId: string) => void;\n}\n\nexport const ListMenu: React.FC<IListMenuProps> = ({\n options,\n onSelected,\n x,\n y,\n}) => {\n return (\n <Container x={x} y={y}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onPointerDown={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n );\n};\n\ninterface IContainerProps {\n x?: number;\n y?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: start;\n align-items: flex-start;\n position: absolute;\n top: ${props => props.y || 0}px;\n left: ${props => props.x || 0}px;\n\n li {\n font-size: ${uiFonts.size.xsmall};\n }\n`;\n\nconst ListElement = styled.li`\n margin-right: 0.5rem;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { uiFonts } from '../constants/uiFonts';\n\ninterface PagerProps {\n totalItems: number;\n currentPage: number;\n itemsPerPage: number;\n onPageChange: (page: number) => void;\n}\n\nexport const Pager: React.FC<PagerProps> = ({\n totalItems,\n currentPage,\n itemsPerPage,\n onPageChange,\n}) => {\n const totalPages = Math.ceil(totalItems / itemsPerPage);\n\n return (\n <Container>\n <p>Total items: {totalItems}</p>\n <PagerContainer>\n <button\n disabled={currentPage === 1}\n onPointerDown={() => onPageChange(Math.max(currentPage - 1, 1))}\n >\n {'<'}\n </button>\n\n <div className=\"rpgui-container framed-grey\">{currentPage}</div>\n\n <button\n disabled={currentPage === totalPages}\n onPointerDown={() =>\n onPageChange(Math.min(currentPage + 1, totalPages))\n }\n >\n {'>'}\n </button>\n </PagerContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n\n p {\n margin: 0;\n font-size: ${uiFonts.size.xsmall};\n }\n`;\n\nconst PagerContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 5px;\n\n p {\n margin: 0;\n }\n\n div {\n color: white;\n }\n\n button {\n width: 40px;\n height: 40px;\n background-color: ${uiColors.darkGray};\n border: none;\n border-radius: 5px;\n color: white;\n\n :hover {\n background-color: ${uiColors.lightGray};\n }\n\n :disabled {\n opacity: 0.5;\n }\n\n &.active {\n background-color: ${uiColors.orange};\n font-weight: bold;\n color: black;\n }\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from './Abstractions/ModalPortal';\nimport { Button, ButtonTypes } from './Button';\nimport { DraggableContainer } from './DraggableContainer';\n\nexport interface IConfirmModalProps {\n onConfirm: () => void;\n onClose: () => void;\n message?: string;\n}\n\nexport const ConfirmModal: React.FC<IConfirmModalProps> = ({\n onConfirm,\n onClose,\n message,\n}) => {\n return (\n <ModalPortal>\n <Background />\n <Container onPointerDown={onClose}>\n <DraggableContainer width=\"auto\" dragDisabled>\n <Wrapper onPointerDown={e => e.stopPropagation()}>\n <p>{message ?? 'Are you sure?'}</p>\n\n <ButtonsWrapper>\n <div className=\"cancel-button\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={onClose}\n >\n No\n </Button>\n </div>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={onConfirm}\n >\n Yes\n </Button>\n </ButtonsWrapper>\n </Wrapper>\n </DraggableContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Background = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: #000000;\n opacity: 0.5;\n left: 0;\n top: 0;\n z-index: 1000;\n`;\n\nconst Container = styled.div`\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1001;\n`;\n\nconst Wrapper = styled.div`\n p {\n margin: 0;\n }\n`;\n\nconst ButtonsWrapper = styled.div`\n display: flex;\n justify-content: flex-end;\n gap: 5px;\n margin-top: 5px;\n\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n","import {\n getItemTextureKeyPath,\n IEquipmentSet,\n IItem,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { onRenderGems } from '../Item/Inventory/ItemGem';\nimport { rarityColor } from '../Item/Inventory/ItemSlotRarity';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\n\nexport interface IMarketPlaceRowsPropos {\n atlasJSON: any;\n atlasIMG: any;\n item: IItem;\n itemPrice: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n onMarketPlaceItemBuy?: () => void;\n onMarketPlaceItemRemove?: () => void;\n disabled?: boolean;\n}\n\nexport const MarketplaceRows: React.FC<IMarketPlaceRowsPropos> = ({\n atlasJSON,\n atlasIMG,\n item,\n itemPrice,\n equipmentSet,\n scale,\n onMarketPlaceItemBuy,\n onMarketPlaceItemRemove,\n disabled,\n}) => {\n const renderGems = (item: IItem) => {\n return item.attachedGems && onRenderGems(item);\n };\n\n return (\n <MarketplaceWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <ItemInfoWrapper\n item={item}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n scale={scale}\n >\n <GemContainer>{renderGems(item)}</GemContainer>\n <RarityContainer item={item}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: item.key,\n stackQty: item.stackQty || 1,\n texturePath: item.texturePath,\n isStackable: item.isStackable,\n },\n atlasJSON\n )}\n imgScale={2}\n imgClassname=\"sprite-from-atlas-img--item\"\n />\n </RarityContainer>\n\n <QuantityContainer>\n {item.stackQty &&\n item.stackQty > 1 &&\n `x${Math.round(item.stackQty * 10) / 10}`}\n </QuantityContainer>\n </ItemInfoWrapper>\n </SpriteContainer>\n <PriceValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n {item.name}\n </Ellipsis>\n </p>\n </PriceValue>\n </ItemIconContainer>\n\n <Flex>\n <ItemIconContainer>\n <GoldContainer>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey=\"others/gold-coin-qty-5.png\"\n imgScale={2}\n />\n </GoldContainer>\n <PriceValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"200px\" fontSize=\"10px\">\n ${itemPrice}\n </Ellipsis>\n </p>\n </PriceValue>\n </ItemIconContainer>\n <ButtonContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={disabled}\n onPointerDown={() => {\n if (disabled) return;\n\n onMarketPlaceItemBuy?.();\n onMarketPlaceItemRemove?.();\n }}\n >\n {onMarketPlaceItemBuy ? 'Buy' : 'Remove'}\n </Button>\n </ButtonContainer>\n </Flex>\n </MarketplaceWrapper>\n );\n};\n\nconst MarketplaceWrapper = styled.div`\n margin: auto;\n display: flex;\n justify-content: space-between;\n padding: 0.5rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n\n p {\n font-size: 0.8rem;\n }\n`;\n\nconst QuantityContainer = styled.p`\n position: absolute;\n display: block;\n top: 15px;\n left: 25px;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst GemContainer = styled.p`\n position: absolute;\n display: block;\n top: -5px;\n left: -10px;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst Flex = styled.div`\n display: flex;\n gap: 24px;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n`;\n\nconst GoldContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0.5rem;\n`;\nconst SpriteContainer = styled.div`\n position: relative;\n left: 0.5rem;\n`;\n\nconst PriceValue = styled.div`\n margin-left: 40px;\n`;\n\nconst ButtonContainer = styled.div`\n margin: auto;\n`;\n\nconst RarityContainer = styled.div<{ item: IItem }>`\n border-color: ${({ item }) => rarityColor(item)};\n box-shadow: ${({ item }) => `0 0 5px 8px ${rarityColor(item)}`} inset,\n ${({ item }) => `0 0 8px 6px ${rarityColor(item)}`};\n width: 32px;\n height: 32px;\n`;\n","import { ItemRarities, ItemSubType } from '@rpg-engine/shared';\nimport React from 'react';\nimport { IOptionsProps } from '../../Dropdown';\n\nexport enum OrderByType {\n Name = 'Name',\n Price = 'Price',\n}\n\nexport const itemTypeOptions: IOptionsProps[] = [\n 'Type',\n ...Object.keys(ItemSubType),\n]\n .filter(type => type !== 'DeadBody')\n .map((itemType, index) => ({\n id: index + 1,\n value: itemType,\n option: itemType,\n }));\n\nexport const itemRarityOptions: IOptionsProps[] = [\n 'Rarity',\n ...Object.values(ItemRarities),\n].map((itemRarity, index) => ({\n id: index + 1,\n value: itemRarity,\n option: itemRarity,\n}));\n\nexport const orderByOptions: IOptionsProps[] = Object.values(\n OrderByType\n).flatMap((orderBy, index) => [\n {\n id: index * 2 + 1,\n value: orderBy.toLowerCase(),\n option: (\n <>\n {orderBy}{' '}\n <span\n style={{\n transform: 'translateY(-2px)',\n display: 'inline-block',\n }}\n >\n ↑\n </span>\n </>\n ),\n },\n {\n id: index * 2 + 2,\n value: '-' + orderBy.toLowerCase(),\n option: (\n <>\n {orderBy}{' '}\n <span\n style={{\n transform: 'translateY(-2px)',\n display: 'inline-block',\n }}\n >\n ↓\n </span>\n </>\n ),\n },\n]);\n","import { IEquipmentSet, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { AiFillCaretRight } from 'react-icons/ai';\nimport styled from 'styled-components';\nimport { ConfirmModal } from '../ConfirmModal';\nimport { Dropdown } from '../Dropdown';\nimport { Input } from '../Input';\nimport { MarketplaceRows } from './MarketplaceRows';\nimport { itemRarityOptions, itemTypeOptions, orderByOptions } from './filters';\n\nexport interface IBuyPanelProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onChangeType: (value: string) => void;\n onChangeRarity: (value: string) => void;\n onChangeOrder: (value: string) => void;\n onChangeNameInput: (value: string) => void;\n onChangeMainLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangeSecondaryLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangePriceInput: (value: [number | undefined, number | undefined]) => void;\n scale?: number;\n equipmentSet?: IEquipmentSet | null;\n onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;\n characterId: string;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n currentPage: number;\n}\n\nexport const BuyPanel: React.FC<IBuyPanelProps> = ({\n items,\n atlasIMG,\n atlasJSON,\n onChangeType,\n onChangeRarity,\n onChangeOrder,\n onChangeNameInput,\n onChangeMainLevelInput,\n onChangeSecondaryLevelInput,\n onChangePriceInput,\n equipmentSet,\n onMarketPlaceItemBuy,\n characterId,\n enableHotkeys,\n disableHotkeys,\n currentPage,\n}) => {\n const [name, setName] = useState('');\n const [mainLevel, setMainLevel] = useState<\n [number | undefined, number | undefined]\n >([undefined, undefined]);\n const [secondaryLevel, setSecondaryLevel] = useState<\n [number | undefined, number | undefined]\n >([undefined, undefined]);\n const [price, setPrice] = useState<[number | undefined, number | undefined]>([\n undefined,\n undefined,\n ]);\n const [buyingItemId, setBuyingItemId] = useState<string | null>(null);\n\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, [currentPage]);\n\n return (\n <>\n {buyingItemId && (\n <ConfirmModal\n onClose={setBuyingItemId.bind(null, null)}\n onConfirm={() => {\n onMarketPlaceItemBuy?.(buyingItemId);\n setBuyingItemId(null);\n enableHotkeys?.();\n }}\n message=\"Are you sure to buy this item?\"\n />\n )}\n <InputWrapper>\n <p>Search By Name</p>\n <Input\n onChange={e => {\n setName(e.target.value);\n onChangeNameInput(e.target.value);\n }}\n value={name}\n placeholder=\"Enter name...\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </InputWrapper>\n\n <OptionsWrapper>\n <FilterInputsWrapper>\n <div>\n <p>Main level</p>\n <Input\n onChange={e => {\n setMainLevel([Number(e.target.value), mainLevel[1]]);\n onChangeMainLevelInput([Number(e.target.value), mainLevel[1]]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setMainLevel([mainLevel[0], Number(e.target.value)]);\n onChangeMainLevelInput([mainLevel[0], Number(e.target.value)]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n\n <div>\n <p>Secondary level</p>\n <Input\n onChange={e => {\n setSecondaryLevel([Number(e.target.value), secondaryLevel[1]]);\n onChangeSecondaryLevelInput([\n Number(e.target.value),\n secondaryLevel[1],\n ]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setSecondaryLevel([secondaryLevel[0], Number(e.target.value)]);\n onChangeSecondaryLevelInput([\n secondaryLevel[0],\n Number(e.target.value),\n ]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n\n <div>\n <p>Price</p>\n <Input\n onChange={e => {\n setPrice([Number(e.target.value), price[1]]);\n onChangePriceInput([Number(e.target.value), price[1]]);\n }}\n placeholder=\"Min\"\n type=\"number\"\n min={0}\n className=\"big-input\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <AiFillCaretRight />\n <Input\n onChange={e => {\n setPrice([price[0], Number(e.target.value)]);\n onChangePriceInput([price[0], Number(e.target.value)]);\n }}\n placeholder=\"Max\"\n type=\"number\"\n min={0}\n className=\"big-input\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </div>\n </FilterInputsWrapper>\n\n <WrapperContainer>\n <StyledDropdown\n options={itemTypeOptions}\n onChange={onChangeType}\n width=\"95%\"\n />\n <StyledDropdown\n options={itemRarityOptions}\n onChange={onChangeRarity}\n width=\"95%\"\n />\n <StyledDropdown\n options={orderByOptions}\n onChange={onChangeOrder}\n width=\"100%\"\n />\n </WrapperContainer>\n </OptionsWrapper>\n\n <ItemComponentScrollWrapper id=\"MarketContainer\" ref={itemsContainer}>\n {items?.map(({ item, price, _id, owner }, index) => (\n <MarketplaceRows\n key={`${item.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n item={item}\n itemPrice={price}\n equipmentSet={equipmentSet}\n onMarketPlaceItemBuy={setBuyingItemId.bind(null, _id)}\n disabled={owner === characterId}\n />\n ))}\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst InputWrapper = styled.div`\n width: 95%;\n display: flex !important;\n justify-content: flex-start;\n align-items: center;\n margin: auto;\n\n p {\n width: auto;\n margin-right: 20px;\n }\n\n input {\n width: 68%;\n height: 10px;\n }\n`;\n\nconst OptionsWrapper = styled.div`\n width: 100%;\n height: 100px;\n`;\n\nconst FilterInputsWrapper = styled.div`\n width: 95%;\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n margin-left: 10px;\n gap: 5px;\n color: white;\n flex-wrap: wrap;\n\n p {\n width: auto;\n margin: 0;\n }\n\n input {\n width: 75px;\n height: 10px;\n }\n\n .big-input {\n width: 130px;\n }\n`;\n\nconst WrapperContainer = styled.div`\n display: grid;\n grid-template-columns: 40% 30% 30%;\n justify-content: space-between;\n width: calc(100% - 40px);\n margin-left: 10px;\n\n .rpgui-content .rpgui-dropdown-imp-header {\n padding: 0px 10px 0 !important;\n }\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst StyledDropdown = styled(Dropdown)`\n margin: 3px !important;\n width: 170px !important;\n`;\n","import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { Button, ButtonTypes } from '../Button';\nimport { ConfirmModal } from '../ConfirmModal';\nimport { Input } from '../Input';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { MarketplaceRows } from './MarketplaceRows';\n\nexport interface IManagmentPanelProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onChangeNameInput: (value: string) => void;\n equipmentSet?: IEquipmentSet | null;\n availableGold: number;\n onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;\n selectedItemToSell: IItem | null;\n onSelectedItemToSellRemove: (item: IItem) => void;\n onAddItemToMarketplace: (item: IItem, price: number) => void;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n onMoneyWithdraw: () => void;\n currentPage: number;\n}\n\nexport const ManagmentPanel: React.FC<IManagmentPanelProps> = ({\n items,\n atlasIMG,\n atlasJSON,\n onChangeNameInput,\n equipmentSet,\n availableGold,\n onMarketPlaceItemRemove,\n selectedItemToSell,\n onSelectedItemToSellRemove,\n onAddItemToMarketplace,\n enableHotkeys,\n disableHotkeys,\n onMoneyWithdraw,\n currentPage,\n}) => {\n const [name, setName] = useState('');\n const [price, setPrice] = useState('');\n const [isCreatingOffer, setIsCreatingOffer] = useState(false);\n const [removingItemId, setRemovingItemId] = useState<string | null>(null);\n\n const itemsContainer = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n itemsContainer.current?.scrollTo(0, 0);\n }, [currentPage]);\n\n return (\n <>\n {isCreatingOffer && (\n <ConfirmModal\n onClose={setIsCreatingOffer.bind(null, false)}\n onConfirm={() => {\n if (selectedItemToSell && price && Number(price)) {\n onAddItemToMarketplace(selectedItemToSell, Number(price));\n setPrice('');\n onSelectedItemToSellRemove(selectedItemToSell);\n setIsCreatingOffer(false);\n enableHotkeys?.();\n }\n }}\n message=\"Are you sure to create this offer?\"\n />\n )}\n {removingItemId && (\n <ConfirmModal\n onClose={setRemovingItemId.bind(null, null)}\n onConfirm={() => {\n onMarketPlaceItemRemove?.(removingItemId);\n setRemovingItemId(null);\n enableHotkeys?.();\n }}\n message=\"Are you sure to remove this item?\"\n />\n )}\n <InputWrapper>\n <p>Search By Name</p>\n <Input\n onChange={e => {\n setName(e.target.value);\n onChangeNameInput(e.target.value);\n }}\n value={name}\n placeholder=\"Enter name...\"\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n </InputWrapper>\n\n <OptionsWrapper>\n <InnerOptionsWrapper>\n <SellDescription>\n Click on item in inventory to sell it\n </SellDescription>\n <Flex>\n <ItemSlot\n slotIndex={0}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onPointerDown={(_, __, item) => onSelectedItemToSellRemove(item)}\n item={selectedItemToSell}\n />\n <PriceInputWrapper>\n <p>Enter price</p>\n <Flex>\n <Input\n onChange={e => {\n setPrice(e.target.value);\n }}\n value={price}\n placeholder=\"Enter price...\"\n type=\"number\"\n disabled={!selectedItemToSell}\n onBlur={enableHotkeys}\n onFocus={disableHotkeys}\n />\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!selectedItemToSell || !price}\n onPointerDown={() => {\n if (selectedItemToSell && price && Number(price)) {\n setIsCreatingOffer(true);\n }\n }}\n >\n Create offer\n </Button>\n </Flex>\n </PriceInputWrapper>\n </Flex>\n </InnerOptionsWrapper>\n <InnerOptionsWrapper>\n <AvailableGold $disabled={availableGold === 0}>\n <p>Available gold</p>\n <p className=\"center\">${availableGold}</p>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={availableGold === 0}\n onPointerDown={() => availableGold > 0 && onMoneyWithdraw()}\n >\n Withdraw\n </Button>\n </AvailableGold>\n </InnerOptionsWrapper>\n </OptionsWrapper>\n\n <ItemComponentScrollWrapper id=\"MarketContainer\" ref={itemsContainer}>\n {items?.map(({ item, price, _id }, index) => (\n <MarketplaceRows\n key={`${item.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n item={item}\n itemPrice={price}\n equipmentSet={equipmentSet}\n onMarketPlaceItemRemove={setRemovingItemId.bind(null, _id)}\n />\n ))}\n </ItemComponentScrollWrapper>\n </>\n );\n};\n\nconst Flex = styled.div`\n display: flex;\n gap: 5px;\n align-items: center;\n`;\n\nconst InputWrapper = styled.div`\n width: 95%;\n display: flex !important;\n justify-content: flex-start;\n align-items: center;\n margin: auto;\n\n p {\n width: auto;\n margin-right: 20px;\n }\n\n input {\n width: 68%;\n height: 10px;\n }\n`;\n\nconst OptionsWrapper = styled.div`\n width: 100%;\n height: 100px;\n display: flex;\n align-items: center;\n justify-content: space-around;\n`;\n\nconst InnerOptionsWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n flex-direction: column;\n height: 100%;\n`;\n\nconst ItemComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n\n @media (max-width: 950px) {\n height: 250px;\n }\n`;\n\nconst PriceInputWrapper = styled.div`\n p {\n margin: 0;\n }\n\n input {\n width: 200px;\n }\n`;\n\nconst SellDescription = styled.p`\n margin: 0;\n font-size: ${uiFonts.size.xsmall} !important;\n`;\n\nconst AvailableGold = styled.div<{ $disabled: boolean }>`\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n p {\n margin: 0;\n color: ${props =>\n props.$disabled ? uiColors.lightGray : 'white'} !important;\n }\n\n .center {\n text-align: center;\n font-size: ${uiFonts.size.large} !important;\n color: ${props =>\n props.$disabled ? uiColors.lightGray : uiColors.lightGreen} !important;\n }\n`;\n","import { IEquipmentSet, IItem, IMarketplaceItem } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Pager } from '../Pager';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { BuyPanel } from './BuyPanel';\nimport { ManagmentPanel } from './ManagmentPanel';\n\nexport interface IMarketPlaceProps {\n items: IMarketplaceItem[];\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onChangeType: (value: string) => void;\n onChangeRarity: (value: string) => void;\n onChangeOrder: (value: string) => void;\n onChangeNameInput: (value: string) => void;\n onChangeMainLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangeSecondaryLevelInput: (\n value: [number | undefined, number | undefined]\n ) => void;\n onChangePriceInput: (value: [number | undefined, number | undefined]) => void;\n scale?: number;\n equipmentSet?: IEquipmentSet | null;\n onMarketPlaceItemBuy?: (marketPlaceItemId: string) => void;\n onMarketPlaceItemRemove?: (marketPlaceItemId: string) => void;\n availableGold: number;\n selectedItemToSell: IItem | null;\n onSelectedItemToSellRemove: (item: IItem) => void;\n onYourPanelToggle: (yourPanel: boolean) => void;\n onAddItemToMarketplace: (item: IItem, price: number) => void;\n characterId: string;\n enableHotkeys?: () => void;\n disableHotkeys?: () => void;\n onMoneyWithdraw: () => void;\n totalItems: number;\n currentPage: number;\n itemsPerPage: number;\n onPageChange: (page: number) => void;\n}\n\nexport const Marketplace: React.FC<IMarketPlaceProps> = props => {\n const { onClose, scale, onYourPanelToggle } = props;\n\n const [isYourPanel, setIsYourPanel] = useState(false);\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"800px\"\n cancelDrag=\"#MarketContainer, .rpgui-dropdown-imp, input, .empty-slot, button\"\n scale={scale}\n >\n {isYourPanel && (\n <>\n <ManagmentPanel {...props} />\n\n <PagerContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onYourPanelToggle(false);\n setIsYourPanel(false);\n }}\n >\n Go to marketplace\n </Button>\n <Pager {...props} />\n </PagerContainer>\n </>\n )}\n {!isYourPanel && (\n <>\n <BuyPanel {...props} />\n\n <PagerContainer>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onYourPanelToggle(true);\n setIsYourPanel(true);\n }}\n >\n Go to your panel\n </Button>\n <Pager {...props} />\n </PagerContainer>\n </>\n )}\n </DraggableContainer>\n );\n};\n\nconst PagerContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: calc(100% - 30px);\n`;\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IContainerStyles {\n height?: string;\n width?: string;\n}\n\ninterface IProps {\n id: string;\n children: React.ReactNode;\n styles?: IContainerStyles;\n centerContent?: boolean;\n}\n\nexport const TabBody: React.FC<IProps> = ({\n id,\n children,\n styles,\n centerContent,\n}) => {\n return (\n <Container styles={styles} data-tab-id={id} centerContent={centerContent}>\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n styles?: IContainerStyles;\n centerContent?: boolean;\n}\n\nconst Container = styled.div<IContainerProps>`\n width: ${props => props.styles?.width || '100%'};\n height: ${props => props.styles?.height || 'auto'};\n overflow-y: auto;\n display: ${props => (props.centerContent ? 'flex' : 'block')};\n justify-content: ${props => (props.centerContent ? 'center' : 'initial')};\n align-items: ${props => (props.centerContent ? 'center' : 'initial')};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { MultitabType } from './TabsContainer';\n\nexport interface ISingleTab {\n active: boolean;\n label: string;\n onPointerDown: () => void;\n type: MultitabType;\n}\n\nexport const Tab: React.FC<ISingleTab> = ({\n active,\n label,\n onPointerDown,\n type,\n}) => {\n return (\n <CustomTab\n activeTab={active}\n onPointerDown={onPointerDown}\n className={type}\n >\n <p>{label}</p>\n </CustomTab>\n );\n};\n\ninterface ICustomTab {\n activeTab: boolean;\n}\n\nconst CustomTab = styled.div<ICustomTab>`\n width: 120px;\n color: white;\n font-size: 0.8rem;\n\n &.gray {\n border-left: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-right: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-top: 0.25rem solid rgba(0, 0, 0, 0.25);\n border-bottom: ${props =>\n props.activeTab ? '' : '0.25rem solid rgba(0, 0, 0, 0.25)'};\n background: ${props => (props.activeTab ? '#4E4A4E' : '#2b292b')};\n }\n\n &.brown {\n border-left: 0.25rem solid #996d55;\n border-right: 0.25rem solid #996d55;\n border-top: 0.25rem solid #996d55;\n border-bottom: ${props => (props.activeTab ? '' : '0.25rem solid #996d55')};\n background: ${props => (props.activeTab ? '#BF886A' : '#B67051')};\n }\n\n margin-right: 10px;\n p {\n text-align: center;\n font-size: 0.6rem;\n\n opacity: ${props => (props.activeTab ? '1' : '0.5')};\n }\n\n border-radius: 5px 5px 0 0;\n\n position: relative;\n top: 0.3rem;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { Tab } from './Tab';\n\ninterface ITab {\n label: string;\n id: string;\n}\n\nexport enum MultitabType {\n Brown = 'brown',\n Gray = 'gray',\n}\n\nexport interface ITabsContainer {\n children: React.ReactNode;\n onCloseButton?: () => void;\n tabs: ITab[];\n type: MultitabType;\n styles?: {\n width?: string;\n minWidth?: string;\n minHeight?: string;\n height?: string;\n className?: string;\n title?: string;\n imgSrc?: string;\n imgWidth?: string;\n };\n isDraggableModal?: boolean;\n}\n\nexport const TabsContainer: React.FC<ITabsContainer> = ({\n children,\n onCloseButton,\n tabs,\n type = MultitabType.Brown,\n styles = {},\n isDraggableModal = false,\n}) => {\n const [selectedTab, setSelectedTab] = useState(tabs[0].id);\n\n const onRenderTabs = () =>\n tabs.map((tab, index) => (\n <Tab\n type={type}\n active={selectedTab === tab.id}\n label={tab.label}\n key={`${tab.label}_${index}`}\n onPointerDown={() => setSelectedTab(tab.id)}\n />\n ));\n\n const onGetContainerType = () => {\n switch (type) {\n case MultitabType.Brown:\n return RPGUIContainerTypes.FramedGold;\n case MultitabType.Gray:\n return RPGUIContainerTypes.Framed;\n default:\n return RPGUIContainerTypes.Framed;\n }\n };\n\n const TabsCore = () => (\n <>\n {onRenderTabs()}\n <BodyContainer\n selectedTab={selectedTab}\n className={`${type} tabs-container`}\n >\n {children}\n </BodyContainer>\n </>\n );\n\n if (isDraggableModal) {\n return (\n <DraggableContainer\n onCloseButton={onCloseButton}\n type={onGetContainerType()}\n cancelDrag=\".tabs-container *\"\n width={styles?.width}\n height={styles?.height}\n minWidth={styles?.minWidth}\n minHeight={styles?.minHeight}\n className={styles?.className}\n title={styles?.title}\n imgSrc={styles?.imgSrc}\n imgWidth={styles?.imgWidth}\n >\n {TabsCore()}\n </DraggableContainer>\n );\n }\n\n return (\n <NonDraggableWrapper\n width={styles?.width}\n height={styles?.height}\n minWidth={styles?.minWidth}\n minHeight={styles?.minHeight}\n >\n {TabsCore()}\n </NonDraggableWrapper>\n );\n};\n\ninterface IBodyContainer {\n selectedTab: string;\n}\n\nconst BodyContainer = styled.div<IBodyContainer>`\n\n display: flex; \n width: 100%;\n height: 100%;\n justify-content: space-between;\n\n /* hide everything that is not data-tab-id selectedTab */\n & > *:not([data-tab-id=${props => props.selectedTab}]) {\n display: none;\n }\n\n &.brown {\n border: 0.25rem solid #996D55;\n background-color: #BF886A;\n }\n \n &.gray {\n border: 0.25rem solid rgba(0, 0, 0, 0.25);\n background-color: #4E4A4E;\n }\n \n border-radius: 5px; \n padding: 0.5rem; \n`;\n\ninterface INonDraggableWrapperProps {\n width?: string;\n height?: string;\n minWidth?: string;\n minHeight?: string;\n}\n\nconst NonDraggableWrapper = styled.div<INonDraggableWrapperProps>`\n height: ${props => props.height || 'auto'};\n width: ${props => props.width || '50%'};\n min-width: ${props => props.minWidth || 'auto'};\n min-height: ${props => props.minHeight || 'auto'};\n display: flex;\n flex-wrap: wrap;\n image-rendering: pixelated;\n overflow-y: hidden;\n padding-top: 1.5rem;\n position: relative;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { Input } from '../../Input';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\n\nexport interface IPartyCreateProps {\n onClose: () => void;\n onCreate: () => void;\n}\n\nexport const PartyCreate: React.FC<IPartyCreateProps> = ({\n onClose,\n onCreate,\n}) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"500px\"\n height=\"300px\"\n cancelDrag=\".partyRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Create Party</Title>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <h1>Type your party name</h1>\n <Input placeholder=\"Type party name\" type=\"text\" />\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n onCreate();\n }}\n >\n Confirm\n </Button>\n <div className=\"cancel-button\">\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => {\n close();\n }}\n >\n Cancel\n </Button>\n </div>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst ButtonWrapper = styled.div`\n margin-top: 10px;\n width: 100%;\n display: flex;\n justify-content: space-around;\n align-items: center;\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\n\nexport interface IPartyRowProps {\n id: string;\n charName: string;\n charClass: string;\n charLevel: number;\n playerQty: number;\n isInvited: boolean;\n partyName: string;\n}\n\nexport const PartyRow: React.FC<IPartyRowProps> = ({\n charName,\n charClass,\n charLevel,\n playerQty,\n isInvited,\n partyName,\n}) => {\n return (\n <PartyWrapper>\n <TextContainer>{partyName}</TextContainer>\n <TextContainer>{charName}</TextContainer>\n <TextContainer>{charClass}</TextContainer>\n <TextContainer>{charLevel}</TextContainer>\n <TextContainer>{playerQty}/5</TextContainer>\n {isInvited ? (\n <>\n <Button buttonType={ButtonTypes.RPGUIButton}>Accept</Button>\n <div className=\"cancel-button\">\n <Button buttonType={ButtonTypes.RPGUIButton}>Decline</Button>\n </div>\n </>\n ) : (\n <Button buttonType={ButtonTypes.RPGUIButton}>Join</Button>\n )}\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n .cancel-button {\n filter: grayscale(0.7);\n }\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { IPartyRowProps, PartyRow } from './PartyRows';\n\nexport interface IPartyDashboardProps {\n partyRows: IPartyRowProps[];\n}\n\nexport const PartyDashboard: React.FC<IPartyDashboardProps> = ({\n partyRows,\n}) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n console.log('Close');\n }}\n width=\"800px\"\n height=\"400px\"\n cancelDrag=\".partyRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Party Dashboard</Title>\n <Button buttonType={ButtonTypes.RPGUIButton}>Create</Button>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <RowsWrapper className=\"partyRows\">\n {partyRows.map(partyRows => (\n <PartyRow\n key={partyRows.id}\n charName={partyRows.charName}\n charClass={partyRows.charClass}\n charLevel={partyRows.charLevel}\n playerQty={partyRows.playerQty}\n id={partyRows.id}\n isInvited={partyRows.isInvited}\n partyName={partyRows.partyName}\n />\n ))}\n </RowsWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\n\nconst RowsWrapper = styled.div`\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n width: 100%;\n height: 200px;\n`;\n\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { Button, ButtonTypes } from '../../Button';\n\nexport interface IPlayersRowProps {\n id: string;\n charName: string;\n charClass: string;\n charLevel: number;\n isNotInvited: boolean;\n}\n\nexport const PlayersRow: React.FC<IPlayersRowProps> = ({\n charName,\n charClass,\n charLevel,\n isNotInvited,\n}) => {\n return (\n <PartyWrapper>\n <TextContainer>{charName}</TextContainer>\n <TextContainer>{charClass}</TextContainer>\n <TextContainer>{charLevel}</TextContainer>\n {isNotInvited ? (\n <>\n <Button buttonType={ButtonTypes.RPGUIButton}>Invite</Button>\n </>\n ) : (\n <TextContainer>Invited</TextContainer>\n )}\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-around;\n flex-direction: row;\n flex: auto;\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n flex: auto;\n margin: auto;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { DraggableContainer } from '../../DraggableContainer';\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { IPlayersRowProps, PlayersRow } from './PlayersRows';\n\nexport interface IPartyInviteProps {\n playersRows: IPlayersRowProps[];\n}\n\nexport const PartyInvite: React.FC<IPartyInviteProps> = ({ playersRows }) => {\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n console.log('Close');\n }}\n width=\"600px\"\n height=\"400px\"\n cancelDrag=\".playersRows\"\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Invite for Party</Title>\n <hr className=\"golden\" />\n </div>\n </Wrapper>\n <RowsWrapper className=\"playersRows\">\n {playersRows.map(playersRows => (\n <PlayersRow\n key={playersRows.id}\n charName={playersRows.charName}\n charClass={playersRows.charClass}\n charLevel={playersRows.charLevel}\n id={playersRows.id}\n isNotInvited={playersRows.isNotInvited}\n />\n ))}\n </RowsWrapper>\n </DraggableContainer>\n );\n};\n\nconst Wrapper = styled.div`\n display: flex;\n flex-direction: column;\n width: 100%;\n`;\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst RowsWrapper = styled.div`\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n width: 100%;\n height: 200px;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\ninterface IProps extends React.HTMLAttributes<HTMLParagraphElement> {\n children: string;\n}\n\nexport const HighlightedText = ({ children, ...rest }: IProps) => {\n return <Text {...rest}>{children}</Text>;\n};\n\nconst Text = styled.p`\n color: ${uiColors.yellow} !important;\n\n font-weight: bold;\n font-size: 1.2rem;\n\n // show the cursor as a pointer when hovering over the text\n\n &:hover {\n text-decoration: underline;\n cursor: pointer;\n }\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { HighlightedText } from '../../Text/HighlightedText';\nimport { Ellipsis } from '../../shared/Ellipsis';\n\nexport interface IPartyManagerRowProps {\n id: string;\n charName: string;\n charClass: string;\n isLeader: boolean;\n leaderId: string;\n userId: string;\n onRemovePlayer: (id: string) => void;\n onChangeLeader: (id: string) => void;\n}\n\nexport const PartyManagerRow: React.FC<IPartyManagerRowProps> = ({\n charName,\n charClass,\n isLeader,\n id,\n leaderId,\n userId,\n onRemovePlayer,\n onChangeLeader,\n}) => {\n const isCurrentUser = id === userId;\n const canRemove = leaderId === userId || isCurrentUser;\n\n return (\n <PartyWrapper>\n <TextContainer>\n <Ellipsis maxLines={1} maxWidth=\"300px\">\n {charName} {isCurrentUser ? '(You)' : ''} {isLeader ? '(Leader)' : ''}\n </Ellipsis>\n </TextContainer>\n <TextContainer>\n <Ellipsis maxLines={1} maxWidth=\"300px\">\n {charClass}\n </Ellipsis>\n </TextContainer>\n <ButtonContainer>\n {canRemove && (\n <HighlightedText onPointerDown={() => onRemovePlayer(id)}>\n {isCurrentUser ? 'Leave' : 'Remove'}\n </HighlightedText>\n )}\n {leaderId === userId && leaderId !== id && (\n <HighlightedText onPointerDown={() => onChangeLeader(id)}>\n New Leader\n </HighlightedText>\n )}\n </ButtonContainer>\n </PartyWrapper>\n );\n};\n\nconst PartyWrapper = styled.div`\n display: grid;\n grid-template-columns: 2fr 1fr 1fr;\n align-items: center;\n padding: 0.5rem;\n min-height: 50px;\n box-sizing: border-box;\n width: 100%;\n border-bottom: 1px solid ${uiColors.darkGray};\n\n &:hover {\n background-color: ${uiColors.darkGray};\n cursor: pointer;\n }\n`;\n\nconst TextContainer = styled.div`\n color: ${uiColors.white};\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n`;\n\nconst ButtonContainer = styled.div`\n display: flex;\n align-items: center;\n gap: 1rem;\n justify-content: flex-start;\n`;\n","import { ICharacterPartyShared, isMobileOrTablet } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { PartyManagerRow } from './PartyManagerRows';\n\nexport interface IPartyManagerProps {\n partyRows: ICharacterPartyShared | null;\n\n userId: string;\n onRemovePlayer: (id: string) => void;\n onChangeLeader: (id: string) => void;\n}\n\nexport const PartyManager: React.FC<IPartyManagerProps> = ({\n partyRows,\n userId,\n onRemovePlayer,\n onChangeLeader,\n}) => {\n const invitationActionText = isMobileOrTablet() ? 'Tap' : 'Right click';\n\n const sortedMembers =\n partyRows?.leader && partyRows?.members\n ? [partyRows.leader, ...partyRows.members].sort((a, b) =>\n a._id === partyRows.leader._id\n ? -1\n : b._id === partyRows.leader._id\n ? 1\n : 0\n )\n : [];\n\n return (\n <>\n <RowsWrapper className=\"partyRows\">\n {partyRows && sortedMembers.length ? (\n sortedMembers.map(partyRow => (\n <PartyManagerRow\n userId={userId}\n key={partyRow._id}\n charName={partyRow.name}\n charClass={partyRow.class}\n id={partyRow._id}\n isLeader={partyRow._id === partyRows.leader._id}\n leaderId={partyRows.leader._id}\n onRemovePlayer={() => onRemovePlayer(partyRow._id)}\n onChangeLeader={() => onChangeLeader(partyRow._id)}\n />\n ))\n ) : (\n <NotInParty>\n <p>You're not in a party.</p>\n <p>\n Tip: <YellowText>{invitationActionText}</YellowText> on a player\n to invite them.\n </p>\n </NotInParty>\n )}\n </RowsWrapper>\n </>\n );\n};\n\nconst RowsWrapper = styled.div`\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n overflow-x: hidden;\n`;\n\nconst YellowText = styled.span`\n color: ${uiColors.yellow} !important;\n`;\n\nconst NotInParty = styled.h1`\n font-size: 0.6rem;\n margin: auto;\n`;\n","import { CharacterClass, ICharacterPartyShared } from '@rpg-engine/shared';\nimport { v4 as uuidv4 } from 'uuid';\nimport { IPartyRowProps } from '../PartyDashboard/PartyRows';\nimport { IPlayersRowProps } from '../PartyInvite';\n\nexport const mockedPartyRows: IPartyRowProps[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n playerQty: 3,\n isInvited: true,\n partyName: 'Party',\n },\n];\n\nexport const mockedPlayersRows2: ICharacterPartyShared = {\n id: uuidv4(),\n leader: {\n _id: uuidv4(),\n class: CharacterClass.Druid,\n name: 'leader',\n },\n members: [\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'blblb' },\n ],\n maxSize: 5,\n size: 4,\n};\n\nexport const mockedPlayersRows: IPlayersRowProps[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n charLevel: 1,\n isNotInvited: true,\n },\n];\n\nexport const mockedPartyManager: any[] = [\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n {\n id: uuidv4(),\n charName: 'CharNome',\n charClass: 'CharClass',\n isLeader: false,\n },\n];\n\n// Function to generate mock data for when you are the leader\nexport const getMockedPlayersRowsLeader = (\n userId: string\n): ICharacterPartyShared => ({\n id: uuidv4(),\n leader: {\n _id: userId, // You are the leader\n class: CharacterClass.Warrior,\n name: 'YourName',\n },\n members: [\n { _id: uuidv4(), class: CharacterClass.Druid, name: 'Member1' },\n { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },\n { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },\n ],\n maxSize: 5,\n size: 4,\n});\n\n// Function to generate mock data for when you are not the leader\nexport const getMockedPlayersRowsNotLeader = (\n userId: string\n): ICharacterPartyShared => ({\n id: uuidv4(),\n leader: {\n _id: uuidv4(), // Someone else is the leader\n class: CharacterClass.Druid,\n name: 'LeaderName',\n },\n members: [\n { _id: userId, class: CharacterClass.Warrior, name: 'YourName' }, // You are a member\n { _id: uuidv4(), class: CharacterClass.Sorcerer, name: 'Member2' },\n { _id: uuidv4(), class: CharacterClass.Rogue, name: 'Member3' },\n ],\n maxSize: 5,\n size: 4,\n});\n","import React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\n\nexport interface IBarProps {\n max: number;\n value: number;\n color: 'red' | 'blue' | 'green';\n style?: Record<string, any>;\n displayText?: boolean;\n percentageWidth?: number;\n minWidth?: number;\n mobileScale?: number;\n}\n\nexport const ProgressBar: React.FC<IBarProps> = ({\n max,\n value,\n color,\n displayText = true,\n percentageWidth = 40,\n minWidth = 100,\n style,\n mobileScale,\n}) => {\n value = Math.round(value);\n max = Math.round(max);\n\n const calculatePercentageValue = function(max: number, value: number) {\n if (value > max) {\n value = max;\n }\n return (value * 100) / max;\n };\n\n return (\n <Container\n className=\"rpgui-progress\"\n data-value={calculatePercentageValue(max, value) / 100}\n data-rpguitype=\"progress\"\n percentageWidth={percentageWidth}\n minWidth={minWidth}\n style={style}\n mobileScale={mobileScale}\n >\n {displayText && (\n <TextOverlay>\n <ProgressBarText>\n {value}/{max}\n </ProgressBarText>\n </TextOverlay>\n )}\n <div className=\" rpgui-progress-track\">\n <div\n className={`rpgui-progress-fill ${color} `}\n style={{\n left: '0px',\n width: calculatePercentageValue(max, value) + '%',\n }}\n ></div>\n </div>\n <div className=\" rpgui-progress-left-edge\"></div>\n <div className=\" rpgui-progress-right-edge\"></div>\n </Container>\n );\n};\n\nconst ProgressBarText = styled.span`\n font-size: ${uiFonts.size.small} !important;\n color: white;\n text-align: center;\n z-index: 1;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n top: 12px;\n`;\n\nconst TextOverlay = styled.div`\n width: 100%;\n position: relative;\n`;\n\ninterface IContainerProps {\n percentageWidth?: number;\n minWidth?: number;\n style?: Record<string, any>;\n mobileScale?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: flex;\n flex-direction: column;\n min-width: ${props => props.minWidth}px;\n width: ${props => props.percentageWidth}%;\n justify-content: start;\n align-items: flex-start;\n ${props => props.style}\n @media (max-width: 950px) {\n transform: scale(${props => props.mobileScale});\n }\n`;\n","import { IQuest } from '@rpg-engine/shared';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport SelectArrow from '../../Arrow/SelectArrow';\nimport { Button, ButtonTypes } from '../../Button';\nimport { DraggableContainer } from '../../DraggableContainer';\n\nimport { RPGUIContainerTypes } from '../../RPGUI/RPGUIContainer';\nimport { Column } from '../../shared/Column';\nimport thumbnailDefault from './img/default.png';\n\nexport interface IQuestsButtonProps {\n disabled: boolean;\n title: string;\n onClick: (questId: string, npcId: string) => void;\n}\n\nexport interface IQuestInfoProps {\n onClose?: () => void;\n buttons?: IQuestsButtonProps[];\n quests: IQuest[];\n onChangeQuest: (currentQuestIndex: number, currentQuestId: string) => void;\n scale?: number;\n}\n\nexport const QuestInfo: React.FC<IQuestInfoProps> = ({\n quests,\n onClose,\n buttons,\n onChangeQuest,\n scale,\n}) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const questsLength = quests.length - 1;\n\n useEffect(() => {\n if (onChangeQuest) {\n onChangeQuest(currentIndex, quests[currentIndex]._id);\n }\n }, [currentIndex]);\n\n const onLeftClick = () => {\n if (currentIndex === 0) setCurrentIndex(questsLength);\n else setCurrentIndex(index => index - 1);\n };\n const onRightClick = () => {\n if (currentIndex === questsLength) setCurrentIndex(0);\n else setCurrentIndex(index => index + 1);\n };\n\n return (\n <QuestDraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"730px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n scale={scale}\n >\n {quests.length >= 2 ? (\n <QuestsContainer>\n {currentIndex !== 0 && (\n <SelectArrow\n direction=\"left\"\n onPointerDown={onLeftClick}\n ></SelectArrow>\n )}\n {currentIndex !== quests.length - 1 && (\n <SelectArrow\n direction=\"right\"\n onPointerDown={onRightClick}\n ></SelectArrow>\n )}\n\n <QuestContainer>\n <TitleContainer className=\"drag-handler\">\n <Title>\n <Thumbnail\n src={quests[currentIndex].thumbnail || thumbnailDefault}\n />\n {quests[currentIndex].title}\n </Title>\n <QuestSplitDiv>\n <hr className=\"golden\" />\n </QuestSplitDiv>\n </TitleContainer>\n <Content>\n <p>{quests[currentIndex].description}</p>\n </Content>\n <QuestColumn className=\"dark-background\" justifyContent=\"flex-end\">\n {buttons &&\n buttons.map((button, index) => (\n <Button\n key={index}\n onPointerDown={() =>\n button.onClick(\n quests[currentIndex]._id,\n quests[currentIndex].npcId\n )\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n ) : (\n <QuestsContainer>\n <QuestContainer>\n <TitleContainer className=\"drag-handler\">\n <Title>\n <Thumbnail src={quests[0].thumbnail || thumbnailDefault} />\n {quests[0].title}\n </Title>\n <QuestSplitDiv>\n <hr className=\"golden\" />\n </QuestSplitDiv>\n </TitleContainer>\n <Content>\n <p>{quests[0].description}</p>\n </Content>\n <QuestColumn className=\"dark-background\" justifyContent=\"flex-end\">\n {buttons &&\n buttons.map((button, index) => (\n <Button\n key={index}\n onPointerDown={() =>\n button.onClick(quests[0]._id, quests[0].npcId)\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n )}\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 600px;\n padding: 0 0 0 0 !important;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n height: auto;\n }\n .container-close {\n position: absolute;\n margin-left: auto;\n top: 20px;\n padding-right: 5px;\n }\n img {\n display: inline-block;\n vertical-align: middle;\n line-height: normal;\n }\n`;\n\nconst QuestContainer = styled.div`\n margin-right: 40px;\n margin-left: 40px;\n`;\n\nconst QuestsContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Content = styled.div`\n padding: 18px;\n h1 {\n text-align: left;\n margin: 14px 0px;\n }\n`;\n\nconst QuestSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n margin-bottom: 10px;\n hr {\n margin: 0px;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst QuestColumn = styled(Column)`\n padding-top: 5px;\n margin-bottom: 20px;\n display: flex;\n justify-content: space-evenly;\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 1rem;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Thumbnail = styled.img`\n color: white;\n z-index: 22;\n width: 32px * 1.5;\n margin-right: 0.5rem;\n position: relative;\n top: -4px;\n`;\n","import { IQuest, QuestStatus } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled, { CSSProperties } from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n styles?: {\n container?: CSSProperties;\n card?: CSSProperties;\n label?: CSSProperties;\n value?: CSSProperties;\n };\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests, styles }) => {\n return (\n <QuestListContainer style={styles?.container}>\n {quests && quests.length > 0 ? (\n quests.map((quest, i) => (\n <QuestCard key={i} style={styles?.card}>\n <QuestItem>\n <Label style={styles?.label}>Title:</Label>\n <Value style={styles?.value}>\n {formatQuestText(quest.title)}\n </Value>\n </QuestItem>\n <QuestItem>\n <Label style={styles?.label}>Status:</Label>\n <Value\n style={{\n ...styles?.value,\n color: getQuestStatusColor(quest.status),\n }}\n >\n {formatQuestStatus(quest.status) ?? 'Unknown'}\n </Value>\n </QuestItem>\n <QuestItem>\n <Label style={styles?.label}>Description:</Label>\n <Value style={styles?.value}>{quest.description}</Value>\n </QuestItem>\n </QuestCard>\n ))\n ) : (\n <NoQuestContainer>\n <p>There are no ongoing quests</p>\n </NoQuestContainer>\n )}\n </QuestListContainer>\n );\n};\n\nconst QuestListContainer = styled.div`\n max-height: 400px;\n padding: 10px;\n border-radius: 10px;\n font-size: 0.7rem;\n`;\n\nconst QuestCard = styled.div`\n background-color: ${uiColors.darkGray};\n padding: 15px;\n margin-bottom: 10px;\n border-radius: 10px;\n border: 1px solid ${uiColors.gray};\n display: flex;\n flex-direction: column;\n`;\n\nconst QuestItem = styled.div`\n display: flex;\n margin-bottom: 5px;\n flex-wrap: wrap;\n\n &:last-child {\n margin-bottom: 0;\n }\n`;\n\nconst Label = styled.span`\n font-weight: bold;\n color: ${uiColors.yellow} !important;\n margin-right: 10px;\n`;\n\nconst Value = styled.span`\n flex-grow: 1;\n color: ${uiColors.white};\n word-wrap: break-word;\n`;\n\nconst NoQuestContainer = styled.div`\n text-align: center;\n p {\n margin-top: 5px;\n color: ${uiColors.lightGray};\n }\n`;\n\nexport const formatQuestText = (text: string) => {\n if (!text) return '';\n return text\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n};\n\nexport const getQuestStatusColor = (status?: QuestStatus) => {\n switch (status) {\n case QuestStatus.Pending:\n return uiColors.orange;\n case QuestStatus.InProgress:\n return uiColors.blue;\n case QuestStatus.Completed:\n return uiColors.lightGreen;\n default:\n return uiColors.white;\n }\n};\n\nexport const formatQuestStatus = (status?: QuestStatus) => {\n if (!status) return '';\n return status\n .split(/(?=[A-Z])/)\n .join(' ')\n .replace(/^\\w/, c => c.toUpperCase());\n};\n","import React, { useEffect, useState } from 'react';\n\nexport interface IRadioItems {\n label: string;\n value: string;\n}\n\nexport interface IRadioProps {\n name: string;\n items: IRadioItems[];\n onChange: (value: string) => void;\n}\n\nexport const InputRadio: React.FC<IRadioProps> = ({\n name,\n items,\n onChange,\n}) => {\n const [selectedValue, setSelectedValue] = useState<string>();\n const handleClick = () => {\n let element = document.querySelector(\n `input[name=${name}]:checked`\n ) as HTMLInputElement;\n const elementValue = element.value;\n setSelectedValue(elementValue);\n };\n\n useEffect(() => {\n if (selectedValue) {\n onChange(selectedValue);\n }\n }, [selectedValue]);\n\n return (\n <div id=\"elemento-radio\">\n {items.map(element => {\n return (\n <>\n <input\n key={element.value}\n className=\"rpgui-radio\"\n value={element.value}\n name={name}\n type=\"radio\"\n />\n <label onPointerDown={handleClick}>{element.label}</label>\n <br />\n </>\n );\n })}\n </div>\n );\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const RPGUIScrollbar = ({ children }: IProps) => {\n return <Container>{children}</Container>;\n};\n\nconst Container = styled.div`\n /* Override RPGUI CSS */\n\n .rpgui-content ::-webkit-scrollbar,\n .rpgui-content::-webkit-scrollbar {\n width: 25px !important;\n }\n\n .rpgui-content ::-webkit-scrollbar-track,\n .rpgui-content::-webkit-scrollbar-track {\n background-size: 25px 60px !important;\n }\n`;\n","import React from 'react';\nimport { RPGUIScrollbar } from './RPGUIScrollbar';\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const RPGUIOverrides = ({ children }: IProps) => {\n return <RPGUIScrollbar>{children}</RPGUIScrollbar>;\n};\n","import React from 'react';\nimport 'rpgui/rpgui.css';\nimport 'rpgui/rpgui.min.js';\nimport { RPGUIOverrides } from './RPGUIOverrides';\n\ninterface IProps {\n children: React.ReactNode;\n}\n\n//@ts-ignore\nexport const _RPGUI = RPGUI;\n\nexport const RPGUIRoot: React.FC<IProps> = ({ children }) => {\n return (\n <RPGUIOverrides>\n <div className=\"rpgui-content\">{children}</div>\n </RPGUIOverrides>\n );\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n IRawSpell,\n IShortcut,\n ShortcutType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SingleShortcut } from './SingleShortcut';\nimport { useShortcutCooldown } from './useShortcutCooldown';\n\nexport type ShortcutsProps = {\n shortcuts: IShortcut[];\n onShortcutCast: (index: number) => void;\n mana: number;\n isBlockedCastingByKeyboard?: boolean;\n inventory?: IItemContainer | null;\n atlasJSON: any;\n atlasIMG: any;\n spellCooldowns?: Record<string, number>;\n};\n\nexport const Shortcuts: React.FC<ShortcutsProps> = ({\n shortcuts,\n onShortcutCast,\n mana,\n isBlockedCastingByKeyboard = false,\n atlasJSON,\n atlasIMG,\n inventory,\n spellCooldowns,\n}) => {\n const shortcutsRefs = useRef<HTMLButtonElement[]>([]);\n\n const { handleShortcutCast, shortcutCooldown } = useShortcutCooldown(\n onShortcutCast\n );\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (isBlockedCastingByKeyboard) return;\n\n const shortcutIndex = Number(e.key) - 1;\n if (shortcutIndex >= 0 && shortcutIndex <= 11) {\n handleShortcutCast(shortcutIndex);\n shortcutsRefs.current[shortcutIndex]?.classList.add('active');\n const timeoutId = setTimeout(() => {\n shortcutsRefs.current[shortcutIndex]?.classList.remove('active');\n }, 150);\n // Store timeoutId for later cleanup\n timeoutIds.current.push((timeoutId as unknown) as number);\n }\n },\n [isBlockedCastingByKeyboard, handleShortcutCast]\n );\n\n // Initialize a ref to store the timeout ids\n const timeoutIds = useRef<number[]>([]);\n\n useEffect(() => {\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n // Clear all timeouts when the component unmounts\n timeoutIds.current.forEach(id => clearTimeout(id));\n };\n }, [handleKeyDown]);\n\n return (\n <List>\n {Array.from({ length: 12 }).map((_, i) => {\n const buildClassName = (classBase: string, isOnCooldown: boolean) => {\n return `${classBase} ${isOnCooldown ? 'onCooldown' : ''}`;\n };\n\n const isOnShortcutCooldown = shortcutCooldown > 0;\n\n if (shortcuts && shortcuts[i]?.type === ShortcutType.Item) {\n const payload = shortcuts[i]?.payload as IItem | undefined;\n\n let itemsFromEquipment: (IItem | undefined | null)[] = [];\n\n if (inventory) {\n Object.keys(inventory.slots).forEach(i => {\n const index = parseInt(i);\n\n if (inventory.slots[index]?.key === payload?.key) {\n itemsFromEquipment.push(inventory.slots[index]);\n }\n });\n }\n\n const totalQty =\n payload && inventory\n ? countItemFromInventory(payload.key, inventory)\n : 0;\n\n return (\n <StyledShortcut\n key={i}\n onPointerDown={handleShortcutCast.bind(null, i)}\n disabled={false}\n ref={el => {\n if (el) shortcutsRefs.current[i] = el;\n }}\n >\n {isOnShortcutCooldown && (\n <span className=\"cooldown\">{shortcutCooldown.toFixed(1)}</span>\n )}\n {payload && (\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: payload.texturePath,\n texturePath: payload.texturePath,\n stackQty: payload.stackQty || 1,\n isStackable: payload.isStackable,\n },\n atlasJSON\n )}\n width={32}\n height={32}\n />\n )}\n <span className={buildClassName('qty', isOnShortcutCooldown)}>\n {totalQty}\n </span>\n <span\n className={buildClassName('keyboard', isOnShortcutCooldown)}\n >\n {i + 1}\n </span>\n </StyledShortcut>\n );\n }\n\n const payload =\n shortcuts && (shortcuts[i]?.payload as IRawSpell | undefined); //check if shortcuts exists before using the ? operator.\n\n const spellCooldown = !payload\n ? 0\n : spellCooldowns?.[payload.magicWords.replaceAll(' ', '_')] ??\n shortcutCooldown;\n const cooldown =\n spellCooldown > shortcutCooldown ? spellCooldown : shortcutCooldown;\n const isOnCooldown = cooldown > 0 && !!payload;\n\n const IMAGE_SCALE = 1.5;\n const IMAGE_SIZE = 32;\n\n return (\n <StyledShortcut\n key={i}\n onPointerDown={handleShortcutCast.bind(null, i)}\n disabled={mana < (payload?.manaCost ?? 0)}\n ref={el => {\n if (el) shortcutsRefs.current[i] = el;\n }}\n >\n {isOnCooldown && (\n <span className=\"cooldown\">\n {cooldown.toFixed(cooldown < 10 ? 1 : 0)}\n </span>\n )}\n <span>\n {payload?.atlasIMG && (\n <SpriteFromAtlas\n atlasIMG={payload.atlasIMG}\n atlasJSON={payload.atlasJSON}\n spriteKey={payload.texturePath ?? ''}\n width={IMAGE_SIZE}\n height={IMAGE_SIZE}\n imgScale={IMAGE_SCALE}\n centered\n borderRadius=\"50%\"\n />\n )}\n </span>\n <span className={buildClassName('mana', isOnCooldown)}>\n {payload && payload.manaCost}\n </span>\n <span className={buildClassName('keyboard', isOnCooldown)}>\n {i + 1}\n </span>\n </StyledShortcut>\n );\n })}\n </List>\n );\n};\n\nconst StyledShortcut = styled(SingleShortcut)`\n transition: all 0.15s;\n\n &.active {\n background-color: ${uiColors.gray};\n border-color: ${uiColors.yellow};\n }\n`;\n\nconst List = styled.p`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n box-sizing: border-box;\n margin: 0 !important;\n\n scale: 0.9;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\n\nexport interface ISimpleProgressBarProps {\n value: number;\n bgColor?: string;\n margin?: number;\n}\n\nexport const SimpleProgressBar: React.FC<ISimpleProgressBarProps> = ({\n value,\n bgColor = 'red',\n margin = 20,\n}) => {\n // Ensure the width is at least 1% if value is greater than 0\n const width = value > 0 ? Math.max(1, Math.min(100, value)) : 0;\n\n return (\n <Container className=\"simple-progress-bar\">\n <ProgressBarContainer margin={margin}>\n <BackgroundBar>\n <Progress width={width} bgColor={bgColor} />\n </BackgroundBar>\n </ProgressBarContainer>\n </Container>\n );\n};\n\nconst Container = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n`;\n\nconst BackgroundBar = styled.span`\n background-color: rgba(0, 0, 0, 0.075);\n`;\n\ninterface IProgressProps {\n width: number;\n bgColor: string;\n}\n\nconst Progress = styled.span<IProgressProps>`\n background-color: ${props => props.bgColor};\n width: ${props => props.width.toFixed(2)}%;\n transition: width 0.5s ease-in-out;\n`;\n\ninterface IProgressBarContainerProps {\n margin: number;\n}\n\nconst ProgressBarContainer = styled.div<IProgressBarContainerProps>`\n border-radius: 60px;\n border: 1px solid #282424;\n overflow: hidden;\n width: 100%;\n span {\n display: block;\n height: 100%;\n }\n height: 8px;\n margin-left: ${props => props.margin}px;\n`;\n","import styled from 'styled-components';\n\nexport const Tooltip = styled.div`\n visibility: hidden;\n position: absolute;\n background-color: black;\n color: white;\n text-align: center;\n border-radius: 4px;\n padding: 5px;\n z-index: 1;\n font-size: 0.5rem;\n white-space: nowrap;\n\n /* Positioning */\n top: -20px; /* Adjust based on where you want the tooltip to appear */\n left: 50%;\n transform: translateX(-50%);\n`;\n","import { getSPForLevel } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { ErrorBoundary } from './Item/Inventory/ErrorBoundary';\nimport { SpriteFromAtlas } from './shared/SpriteFromAtlas';\nimport { SimpleProgressBar } from './SimpleProgressBar';\nimport { Tooltip } from './Tooltip/Tooltip';\n\nexport interface ISkillProgressBarProps {\n skillName: string;\n bgColor: string;\n level: number;\n skillPoints: number;\n texturePath: string;\n showSkillPoints?: boolean;\n skillPointsToNextLevel: number;\n atlasJSON: any;\n atlasIMG: any;\n buffAndDebuff?: number;\n}\n\nexport const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({\n bgColor,\n skillName,\n level,\n skillPoints: currentSkillPoints,\n skillPointsToNextLevel,\n texturePath,\n showSkillPoints = true,\n atlasIMG,\n atlasJSON,\n\n buffAndDebuff,\n}) => {\n // Skill points needed to start the current level\n const baseSkillPoints = getSPForLevel(level);\n const calculateProgress = (): number => {\n const totalPointsForLevelUp = Math.max(\n 1,\n skillPointsToNextLevel - baseSkillPoints\n );\n const excessSkillPoints = Math.max(0, currentSkillPoints - baseSkillPoints);\n\n return Math.min(\n 100,\n Math.max(0, (excessSkillPoints / totalPointsForLevelUp) * 100)\n );\n };\n\n const progress = calculateProgress();\n\n const formatBuffAndDebuff = (value?: number): string =>\n value !== undefined ? value.toFixed(2) : '0';\n\n const skillsBuffsCalc = (level: number, buffAndDebuff: number): string => {\n if (buffAndDebuff === 0) return '0';\n const result = level * (buffAndDebuff / 100);\n return result > 0 ? `+${result.toFixed(2)}` : `${result.toFixed(2)}`;\n };\n\n return (\n <>\n <ProgressTitle>\n {buffAndDebuff !== undefined && (\n <>\n {buffAndDebuff > 0 ? (\n <BuffAndDebuffContainer>\n <TitleNameContainer>\n <TitleNameBuff>{skillName}</TitleNameBuff>\n <TitleNameBuff>\n lv {level} ({skillsBuffsCalc(level, buffAndDebuff)})\n </TitleNameBuff>\n </TitleNameContainer>\n <TitleNameBuffContainer>\n <TitleNameBuff>\n (+{formatBuffAndDebuff(buffAndDebuff)}%)\n </TitleNameBuff>\n </TitleNameBuffContainer>\n </BuffAndDebuffContainer>\n ) : buffAndDebuff < 0 ? (\n <>\n <TitleNameContainer>\n <TitleNameDebuff>{skillName}</TitleNameDebuff>\n <TitleNameDebuff>\n lv {level} ({skillsBuffsCalc(level, buffAndDebuff)})\n </TitleNameDebuff>\n </TitleNameContainer>\n <div>\n <TitleNameDebuff>\n ({formatBuffAndDebuff(buffAndDebuff)}%)\n </TitleNameDebuff>\n </div>\n </>\n ) : (\n <TitleName>{skillName}</TitleName>\n )}\n </>\n )}\n {!buffAndDebuff && (\n <TitleNameContainer>\n <TitleName>{skillName}</TitleName>\n <ValueDisplay>lv {level}</ValueDisplay>\n </TitleNameContainer>\n )}\n </ProgressTitle>\n\n <ProgressBody>\n <ProgressIconContainer>\n {atlasIMG && atlasJSON ? (\n <SpriteContainer>\n <ErrorBoundary>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={texturePath}\n imgScale={1}\n grayScale\n opacity={0.5}\n />\n </ErrorBoundary>\n </SpriteContainer>\n ) : (\n <></>\n )}\n </ProgressIconContainer>\n\n <ProgressBarWrapper>\n <SimpleProgressBar value={progress} bgColor={bgColor} />\n <Tooltip>SP: {currentSkillPoints}</Tooltip>\n </ProgressBarWrapper>\n </ProgressBody>\n {showSkillPoints && (\n <SkillDisplayContainer>\n <SkillPointsDisplay>{progress.toFixed(2)}%</SkillPointsDisplay>\n </SkillDisplayContainer>\n )}\n </>\n );\n};\n\nconst ProgressBarWrapper = styled.div`\n position: relative;\n\n &:hover ${Tooltip}, &:active ${Tooltip} {\n visibility: visible;\n }\n width: 100%;\n height: auto;\n top: 8px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -3px;\n left: 0;\n`;\n\nconst SkillDisplayContainer = styled.div`\n margin: 0 auto;\n\n p {\n margin: 0;\n }\n`;\n\nconst SkillPointsDisplay = styled.p`\n font-size: 0.55rem !important;\n font-weight: bold;\n text-align: center;\n`;\n\nconst TitleName = styled.span`\n margin-left: 5px;\n`;\n\nconst TitleNameBuff = styled.span`\n margin-left: 5px;\n color: ${uiColors.lightGreen} !important;\n`;\n\nconst TitleNameDebuff = styled.span`\n margin-left: 5px;\n color: ${uiColors.red} !important;\n`;\n\nconst ValueDisplay = styled.span``;\n\nconst ProgressIconContainer = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst ProgressBody = styled.div`\n display: flex;\n flex-direction: row;\n width: 100%;\n`;\n\nconst ProgressTitle = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n span {\n font-size: 0.6rem;\n }\n`;\n\nconst BuffAndDebuffContainer = styled.div``;\n\nconst TitleNameBuffContainer = styled.div``;\n\nconst TitleNameContainer = styled.div`\n display: flex;\n justify-content: space-between;\n`;\n","import {\n ISkill,\n ISkillDetails,\n getSPForLevel,\n getXPForLevel,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { DraggableContainer } from './DraggableContainer';\nimport { SkillProgressBar } from './SkillProgressBar';\n\nexport interface ISkillContainerProps {\n skill: ISkill;\n onCloseButton: () => void;\n atlasJSON: any;\n atlasIMG: any;\n scale?: number;\n}\n\nconst skillProps = {\n attributes: {\n color: uiColors.purple,\n values: {\n stamina: 'staffs/doom-staff.png',\n magic: 'helmets/yellow-enchanter-hat.png',\n magicResistance: 'gems/amethyst-gem.png',\n strength: 'crafting-resources/dragon-tooth.png',\n resistance: 'books/magic-orb.png',\n dexterity: 'boots/gaias-soleplate.png',\n },\n },\n combat: {\n color: uiColors.cardinal,\n values: {\n first: 'gloves/leather-gloves.png',\n club: 'maces/club.png',\n sword: 'swords/double-edged-sword.png',\n axe: 'axes/double-axe.png',\n distance: 'ranged-weapons/horse-bow.png',\n shielding: 'shields/studded-shield.png',\n dagger: 'daggers/dagger.png',\n },\n },\n crafting: {\n color: uiColors.blue,\n values: {\n fishing: 'foods/fish.png',\n farming: 'tools/watering-can.png',\n mining: 'crafting-resources/iron-ingot.png',\n lumberjacking: 'crafting-resources/greater-wooden-log.png',\n blacksmithing: 'hammers/hammer.png',\n cooking: 'foods/chickens-meat.png',\n alchemy: 'potions/greater-mana-potion.png',\n },\n },\n};\n\ninterface SkillMap {\n [key: string]: string;\n}\n\nconst skillNameMap: SkillMap = {\n stamina: 'Stamina',\n magic: 'Magic',\n magicResistance: 'Magic Resistance',\n strength: 'Strength',\n resistance: 'Resistance',\n dexterity: 'Dexterity',\n first: 'Fist',\n club: 'Club',\n sword: 'Sword',\n axe: 'Axe',\n distance: 'Distance',\n shielding: 'Shielding',\n dagger: 'Dagger',\n fishing: 'Fishing',\n farming: 'Farming',\n mining: 'Mining',\n lumberjacking: 'Lumberjacking',\n blacksmithing: 'Blacksmithing',\n cooking: 'Cooking',\n alchemy: 'Alchemy',\n};\n\nexport const SkillsContainer: React.FC<ISkillContainerProps> = ({\n onCloseButton,\n skill,\n atlasIMG,\n atlasJSON,\n scale,\n}) => {\n const onRenderSkillCategory = (\n category: 'attributes' | 'combat' | 'crafting'\n ) => {\n const skillCategory = skillProps[category];\n\n const skillCategoryColor = skillCategory.color;\n\n const output = [];\n\n for (const [key, value] of Object.entries(skillCategory.values)) {\n if (key === 'stamina') {\n continue;\n }\n //@ts-ignore\n const skillDetails = (skill[key] as unknown) as ISkillDetails;\n\n if (!skillDetails) {\n continue;\n }\n\n output.push(\n <SkillProgressBar\n key={key}\n skillName={skillNameMap[key]}\n bgColor={skillCategoryColor}\n level={skillDetails.level || 0}\n skillPoints={Math.round(skillDetails.skillPoints) || 0}\n skillPointsToNextLevel={\n Math.round(getSPForLevel(skillDetails.level + 1)) || 0\n }\n texturePath={value}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n buffAndDebuff={skillDetails.buffAndDebuff}\n />\n );\n }\n\n return output;\n };\n\n return (\n <SkillsDraggableContainer\n title=\"Skills\"\n cancelDrag=\"#skillsDiv\"\n scale={scale}\n width=\"100%\"\n >\n {onCloseButton && (\n <CloseButton onPointerDown={onCloseButton}>X</CloseButton>\n )}\n <SkillsContainerDiv id=\"skillsDiv\">\n <SkillSplitDiv>\n <p>General</p>\n <hr className=\"golden\" />\n\n <SkillProgressBar\n skillName={'Level'}\n bgColor={uiColors.navyBlue}\n level={Math.round(skill.level) || 0}\n skillPoints={Math.round(skill.experience) || 0}\n skillPointsToNextLevel={\n Math.round(getXPForLevel(skill.level + 1)) || 0\n }\n texturePath={'swords/broad-sword.png'}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n <p>Combat Skills</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('combat')}\n\n <SkillSplitDiv>\n <p>Crafting Skills</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('crafting')}\n\n <SkillSplitDiv>\n <p>Basic Attributes</p>\n <hr className=\"golden\" />\n </SkillSplitDiv>\n\n {onRenderSkillCategory('attributes')}\n </SkillsContainerDiv>\n </SkillsDraggableContainer>\n );\n};\n\nconst SkillsDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n\n max-width: 450px;\n\n height: 90%;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n width: auto;\n height: auto;\n }\n`;\n\nconst SkillsContainerDiv = styled.div`\n width: 100%;\n -webkit-overflow-y: scroll;\n overflow-y: scroll;\n height: 90%;\n padding-right: 10px;\n`;\n\nconst SkillSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n hr {\n margin: 0;\n margin-bottom: 1rem;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst CloseButton = styled.div`\n position: absolute;\n top: 2px;\n right: 2px;\n color: white;\n z-index: 22;\n font-size: 1.1rem;\n`;\n","export const formatSpellCastingType = (castingType: string): string => {\n const formattedCastingType = castingType\n .split(\"-\")\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(\" \");\n \n return formattedCastingType;\n };","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../../constants/uiColors';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { formatSpellCastingType } from '../../../libs/CastingTypeHelper';\n\ninterface ISpellInfoProps {\n spell: ISpell;\n}\n\nexport const SpellInfo: React.FC<ISpellInfoProps> = ({ spell }) => {\n const {\n magicWords,\n name,\n manaCost,\n requiredItem,\n description,\n castingType,\n cooldown,\n maxDistanceGrid,\n } = spell;\n return (\n <Container>\n <Header>\n <div>\n <Title>{name}</Title>\n <Type>{magicWords}</Type>\n </div>\n </Header>\n <Statistic>\n <div className=\"label\">Casting Type:</div>\n <div className=\"value\">{formatSpellCastingType(castingType)}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Magic words:</div>\n <div className=\"value\">{magicWords}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Mana cost:</div>\n <div className=\"value\">{manaCost}</div>\n </Statistic>\n <Statistic>\n <div className=\"label\">Cooldown:</div>\n <div className=\"value\">{cooldown}</div>\n </Statistic>\n {maxDistanceGrid && (\n <Statistic>\n <div className=\"label\">Max Distance Grid:</div>\n <div className=\"value\">{maxDistanceGrid}</div>\n </Statistic>\n )}\n <Statistic>\n {requiredItem && (\n <>\n <div className=\"label\">Required Item:</div>\n <div className=\"value\">{requiredItem}</div>\n </>\n )}\n </Statistic>\n <Description>{description}</Description>\n </Container>\n );\n};\n\nconst Container = styled.div`\n color: white;\n background-color: #222;\n border-radius: 5px;\n padding: 0.5rem;\n font-size: ${uiFonts.size.small};\n border: 3px solid ${uiColors.lightGray};\n height: max-content;\n width: 30rem;\n\n @media (max-width: 580px) {\n width: 80vw;\n }\n`;\n\nconst Title = styled.div`\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n margin-bottom: 0.5rem;\n display: flex;\n align-items: center;\n margin: 0;\n`;\n\nconst Type = styled.div`\n font-size: ${uiFonts.size.small};\n margin-top: 0.2rem;\n color: ${uiColors.lightGray};\n`;\n\nconst Description = styled.div`\n margin-top: 1.5rem;\n font-size: ${uiFonts.size.small};\n color: ${uiColors.lightGray};\n font-style: italic;\n`;\n\nconst Header = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n`;\n\nconst Statistic = styled.div`\n margin-bottom: 0.4rem;\n width: max-content;\n\n .label {\n display: inline-block;\n margin-right: 0.5rem;\n color: inherit;\n }\n\n .value {\n display: inline-block;\n color: inherit;\n }\n\n &.better,\n .better {\n color: ${uiColors.lightGreen};\n }\n\n &.worse,\n .worse {\n color: ${uiColors.cardinal};\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { SpellInfo } from './SpellInfo';\n\nexport interface ISpellInfoDisplayProps {\n spell: ISpell;\n isMobile?: boolean;\n}\n\nexport const SpellInfoDisplay: React.FC<ISpellInfoDisplayProps> = ({\n spell,\n isMobile,\n}) => {\n return (\n <Flex $isMobile={isMobile}>\n <SpellInfo spell={spell} />\n </Flex>\n );\n};\n\nconst Flex = styled.div<{ $isMobile?: boolean }>`\n display: flex;\n gap: 0.5rem;\n flex-direction: ${({ $isMobile }) => ($isMobile ? 'row-reverse' : 'row')};\n\n @media (max-width: 580px) {\n flex-direction: column-reverse;\n align-items: center;\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { SpellInfoDisplay } from './SpellInfoDisplay';\n\ninterface IListMenuOption {\n id: string;\n text: string;\n}\n\nexport interface MobileSpellTooltipProps {\n spell: ISpell;\n closeTooltip: () => void;\n scale?: number;\n options?: IListMenuOption[];\n onSelected?: (selectedOptionId: string) => void;\n}\n\nexport const MobileSpellTooltip: React.FC<MobileSpellTooltipProps> = ({\n spell,\n closeTooltip,\n scale = 1,\n options,\n onSelected,\n}) => {\n const ref = useRef<HTMLDivElement>(null);\n\n const handleFadeOut = () => {\n ref.current?.classList.add('fadeOut');\n };\n\n return (\n <ModalPortal>\n <Container\n ref={ref}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n closeTooltip();\n }, 100);\n }}\n scale={scale}\n >\n <SpellInfoDisplay spell={spell} isMobile />\n <OptionsContainer>\n {options?.map(option => (\n <Option\n key={option.id}\n onTouchEnd={() => {\n handleFadeOut();\n setTimeout(() => {\n onSelected?.(option.id);\n closeTooltip();\n }, 100);\n }}\n >\n {option.text}\n </Option>\n ))}\n </OptionsContainer>\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div<{ scale: number }>`\n position: absolute;\n z-index: 100;\n left: 0;\n top: 0;\n width: 100vw;\n height: 100vh;\n background-color: rgba(0 0 0 / 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 0.5rem;\n transition: opacity 0.08s;\n animation: fadeIn 0.1s forwards;\n\n @keyframes fadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 0.92;\n }\n }\n\n @keyframes fadeOut {\n 0% {\n opacity: 0.92;\n }\n 100% {\n opacity: 0;\n }\n }\n\n &.fadeOut {\n animation: fadeOut 0.1s forwards;\n }\n\n @media (max-width: 580px) {\n flex-direction: column;\n }\n`;\n\nconst OptionsContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n flex-wrap: wrap;\n\n @media (max-width: 580px) {\n flex-direction: row;\n justify-content: center;\n }\n`;\n\nconst Option = styled.button`\n padding: 1rem;\n background-color: #333;\n color: white;\n border: none;\n border-radius: 3px;\n width: 8rem;\n transition: background-color 0.1s;\n\n &:hover {\n background-color: #555;\n }\n\n @media (max-width: 580px) {\n padding: 1rem 0.5rem;\n }\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { SpellInfoDisplay } from './SpellInfoDisplay';\n\nexport interface IMagicTooltipProps {\n spell: ISpell;\n}\n\nconst offset = 20;\n\nexport const MagicTooltip: React.FC<IMagicTooltipProps> = ({ spell }) => {\n const ref = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const { current } = ref;\n\n if (current) {\n const handleMouseMove = (event: MouseEvent) => {\n const { clientX, clientY } = event;\n\n // Adjust the position of the tooltip based on the mouse position\n const rect = current.getBoundingClientRect();\n\n const tooltipWidth = rect.width;\n const tooltipHeight = rect.height;\n const isOffScreenRight =\n clientX + tooltipWidth + offset > window.innerWidth;\n const isOffScreenBottom =\n clientY + tooltipHeight + offset > window.innerHeight;\n const x = isOffScreenRight\n ? clientX - tooltipWidth - offset\n : clientX + offset;\n const y = isOffScreenBottom\n ? clientY - tooltipHeight - offset\n : clientY + offset;\n\n current.style.transform = `translate(${x}px, ${y}px)`;\n current.style.opacity = '1';\n };\n\n window.addEventListener('mousemove', handleMouseMove);\n\n return () => {\n window.removeEventListener('mousemove', handleMouseMove);\n };\n }\n\n return;\n }, []);\n\n return (\n <ModalPortal>\n <Container ref={ref}>\n <SpellInfoDisplay spell={spell} />\n </Container>\n </ModalPortal>\n );\n};\n\nconst Container = styled.div`\n position: absolute;\n z-index: 100;\n pointer-events: none;\n left: 0;\n top: 0;\n opacity: 0;\n transition: opacity 0.08s;\n`;\n","import { ISpell } from '@rpg-engine/shared';\nimport React, { useRef, useState } from 'react';\nimport { MobileSpellTooltip } from './MobileSpellTooltip';\nimport { MagicTooltip } from './SpellTooltip';\n\ninterface ISpellInfoWrapperProps {\n spell: ISpell;\n children: React.ReactNode;\n scale?: number;\n holdTouchDuration?: number; // New prop for hold touch duration\n}\n\nexport const SpellInfoWrapper: React.FC<ISpellInfoWrapperProps> = ({\n children,\n spell,\n scale,\n holdTouchDuration = 500, // Default hold duration to 500ms\n}) => {\n const [isTooltipVisible, setIsTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n const touchTimeoutRef = useRef<NodeJS.Timeout | null>(null);\n\n const handleTouchStart = () => {\n touchTimeoutRef.current = setTimeout(() => {\n setIsTooltipMobileVisible(true);\n setIsTooltipVisible(false);\n }, holdTouchDuration);\n };\n\n const handleTouchEnd = () => {\n if (touchTimeoutRef.current) {\n clearTimeout(touchTimeoutRef.current);\n touchTimeoutRef.current = null;\n }\n };\n\n return (\n <div\n onMouseEnter={() => {\n if (!isTooltipMobileVisible) setIsTooltipVisible(true);\n }}\n onMouseLeave={setIsTooltipVisible.bind(null, false)}\n onTouchStart={handleTouchStart}\n onTouchEnd={handleTouchEnd}\n >\n {children}\n\n {isTooltipVisible && !isTooltipMobileVisible && (\n <MagicTooltip spell={spell} />\n )}\n {isTooltipMobileVisible && (\n <MobileSpellTooltip\n closeTooltip={() => {\n setIsTooltipMobileVisible(false);\n console.log('close');\n }}\n spell={spell}\n scale={scale}\n />\n )}\n </div>\n );\n};","import { ISpell } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport { SpellInfoWrapper } from './cards/SpellInfoWrapper';\n\nexport interface ISpellProps {\n atlasJSON: any;\n atlasIMG: any;\n charMana: number;\n charMagicLevel: number;\n onPointerUp?: (spellKey: string) => void;\n isSettingShortcut?: boolean;\n spellKey: string;\n spell: ISpell;\n activeCooldown?: number;\n}\n\nexport const Spell: React.FC<ISpellProps> = ({\n atlasIMG,\n atlasJSON,\n spellKey,\n charMana,\n charMagicLevel,\n onPointerUp,\n isSettingShortcut,\n spell,\n activeCooldown,\n}) => {\n const {\n manaCost,\n minMagicLevelRequired,\n magicWords,\n name,\n description,\n } = spell;\n const disabled = isSettingShortcut\n ? charMagicLevel < minMagicLevelRequired\n : manaCost > charMana || charMagicLevel < minMagicLevelRequired;\n\n const CONTAINER_STYLE = { width: '32px', height: '32px' };\n const IMAGE_SCALE = 2;\n\n return (\n <SpellInfoWrapper spell={spell}>\n <Container\n onPointerUp={onPointerUp?.bind(null, spellKey)}\n isSettingShortcut={isSettingShortcut && !disabled}\n className=\"spell\"\n >\n {disabled && (\n <Overlay>\n {charMagicLevel < minMagicLevelRequired\n ? 'Low magic level'\n : manaCost > charMana && 'No mana'}\n </Overlay>\n )}\n <SpellImage>\n {activeCooldown && activeCooldown > 0 ? (\n <span className=\"cooldown\">\n {activeCooldown.toFixed(activeCooldown > 10 ? 0 : 1)}\n </span>\n ) : null}\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={spell.texturePath ?? ''}\n imgScale={IMAGE_SCALE}\n containerStyle={CONTAINER_STYLE}\n centered\n />\n </SpellImage>\n <Info>\n <Title>\n <span>{name}</span>\n <span className=\"spell\">({magicWords})</span>\n </Title>\n <Description>{description}</Description>\n </Info>\n\n <Divider />\n <Cost>\n <span>Mana cost:</span>\n <span className=\"mana\">{manaCost}</span>\n </Cost>\n </Container>\n </SpellInfoWrapper>\n );\n};\n\nconst Container = styled.button<{ isSettingShortcut?: boolean }>`\n display: block;\n background: none;\n border: 2px solid transparent;\n border-radius: 1rem;\n width: 100%;\n display: flex;\n\n gap: 1rem;\n align-items: center;\n padding: 0 1rem;\n text-align: left;\n position: relative;\n\n animation: ${({ isSettingShortcut }) =>\n isSettingShortcut ? 'border-color-change 1s infinite' : 'none'};\n\n @keyframes border-color-change {\n 0% {\n border-color: ${uiColors.yellow};\n }\n 50% {\n border-color: transparent;\n }\n 100% {\n border-color: ${uiColors.yellow};\n }\n }\n\n &:hover,\n &:focus {\n background-color: ${uiColors.darkGray};\n }\n\n &:active {\n background: none;\n }\n`;\n\nconst SpellImage = styled.div`\n width: 4rem;\n height: 4rem;\n font-size: ${uiFonts.size.xLarge};\n font-weight: bold;\n background-color: ${uiColors.darkGray};\n color: ${uiColors.lightGray};\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: uppercase;\n position: relative;\n overflow: hidden;\n\n .cooldown {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0 0 0 / 20%);\n color: ${uiColors.darkYellow};\n font-weight: bold;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n`;\n\nconst Info = styled.span`\n width: 0;\n flex: 1;\n\n @media (orientation: portrait) {\n display: none;\n }\n`;\nconst Title = styled.p`\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin-bottom: 5px;\n margin: 0;\n\n span {\n font-size: ${uiFonts.size.medium} !important;\n font-weight: bold !important;\n color: ${uiColors.yellow} !important;\n margin-right: 0.5rem;\n }\n\n .spell {\n font-size: ${uiFonts.size.small} !important;\n font-weight: normal !important;\n color: ${uiColors.lightGray} !important;\n }\n`;\n\nconst Description = styled.div`\n font-size: ${uiFonts.size.small} !important;\n line-height: 1.1 !important;\n`;\n\nconst Divider = styled.div`\n width: 1px;\n height: 100%;\n margin: 0 1rem;\n background-color: ${uiColors.lightGray};\n`;\n\nconst Cost = styled.p`\n display: flex;\n align-items: center;\n flex-direction: column;\n gap: 0.5rem;\n\n div {\n z-index: 1;\n }\n\n .mana {\n position: relative;\n font-size: ${uiFonts.size.medium};\n font-weight: bold;\n z-index: 1;\n\n &::after {\n position: absolute;\n content: '';\n top: 0;\n left: 0;\n background-color: ${uiColors.blue};\n width: 100%;\n height: 100%;\n border-radius: 50%;\n transform: scale(1.8);\n filter: blur(10px);\n z-index: -1;\n }\n }\n`;\n\nconst Overlay = styled.p`\n margin: 0 !important;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border-radius: 1rem;\n display: flex;\n justify-content: center;\n align-items: center;\n color: ${uiColors.yellow};\n font-size: ${uiFonts.size.large} !important;\n font-weight: bold;\n z-index: 10;\n background-color: rgba(0 0 0 / 0.2);\n`;\n","import { IShortcut, ISpell } from '@rpg-engine/shared';\nimport React, { Fragment, useMemo, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Input } from '../Input';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { ShortcutsSetter } from '../Shortcuts/ShortcutsSetter';\nimport { Spell } from './Spell';\n\nexport interface ISpellbookProps {\n onClose?: () => void;\n onInputFocus?: () => void;\n onInputBlur?: () => void;\n spells: ISpell[];\n magicLevel: number;\n mana: number;\n onSpellClick: (spellKey: string) => void;\n setSpellShortcut: (key: string, index: number) => void;\n shortcuts: IShortcut[];\n removeShortcut: (index: number) => void;\n atlasIMG: any;\n atlasJSON: any;\n iconAtlasIMG?: any;\n iconAtlasJSON?: any;\n scale?: number;\n spellCooldowns?: Record<string, number>;\n}\n\nexport const Spellbook: React.FC<ISpellbookProps> = ({\n onClose,\n onInputFocus,\n onInputBlur,\n spells,\n magicLevel,\n mana,\n onSpellClick,\n setSpellShortcut,\n shortcuts,\n removeShortcut,\n atlasIMG,\n atlasJSON,\n iconAtlasIMG,\n iconAtlasJSON,\n scale,\n spellCooldowns,\n}) => {\n const [search, setSearch] = useState('');\n const [settingShortcutIndex, setSettingShortcutIndex] = useState(-1);\n\n const spellsToDisplay = useMemo(() => {\n return spells\n .sort((a, b) => {\n if (a.minMagicLevelRequired > b.minMagicLevelRequired) return 1;\n if (a.minMagicLevelRequired < b.minMagicLevelRequired) return -1;\n return 0;\n })\n .filter(\n spell =>\n spell.name.toLocaleLowerCase().includes(search.toLocaleLowerCase()) ||\n spell.magicWords\n .toLocaleLowerCase()\n .includes(search.toLocaleLowerCase())\n );\n }, [search, spells]);\n\n const setShortcut = (spellKey: string) => {\n setSpellShortcut?.(spellKey, settingShortcutIndex);\n setSettingShortcutIndex(-1);\n };\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={onClose}\n width=\"inherit\"\n height=\"inherit\"\n cancelDrag=\"#spellbook-search, #shortcuts_list, .spell\"\n scale={scale}\n >\n <Container>\n <Title>Learned Spells</Title>\n\n <ShortcutsSetter\n setSettingShortcutIndex={setSettingShortcutIndex}\n settingShortcutIndex={settingShortcutIndex}\n shortcuts={shortcuts}\n removeShortcut={removeShortcut}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n\n <Input\n placeholder=\"Search for spell\"\n value={search}\n onChange={e => setSearch(e.target.value)}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n id=\"spellbook-search\"\n />\n\n <SpellList>\n {spellsToDisplay.map(spell => (\n <Fragment key={spell.key}>\n <Spell\n atlasIMG={iconAtlasIMG}\n atlasJSON={iconAtlasJSON}\n charMana={mana}\n charMagicLevel={magicLevel}\n onPointerUp={\n settingShortcutIndex !== -1 ? setShortcut : onSpellClick\n }\n spellKey={spell.key}\n isSettingShortcut={settingShortcutIndex !== -1}\n spell={spell}\n activeCooldown={\n spellCooldowns?.[spell.magicWords.replaceAll(' ', '_')]\n }\n {...spell}\n />\n </Fragment>\n ))}\n </SpellList>\n </Container>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n font-size: ${uiFonts.size.large} !important;\n margin-bottom: 0 !important;\n`;\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n color: white;\n display: flex;\n flex-direction: column;\n`;\n\nconst SpellList = styled.div`\n width: 100%;\n min-height: 0;\n flex: 1;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n gap: 1.5rem;\n margin-top: 1rem;\n`;\n","import React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport SelectArrow from './Arrow/SelectArrow';\nimport { Button, ButtonTypes } from './Button';\n\ninterface IStep {\n component: React.ReactNode;\n id: number;\n validate?: () => boolean | Promise<boolean>;\n errorMessage?: string;\n}\n\ninterface IStepperProps {\n steps: IStep[];\n finalCTAButton?: {\n label: string;\n onClick: (() => void) | (() => Promise<void>) | ((e: any) => Promise<void>);\n };\n onError?: (message: string) => void;\n useSideArrows?: boolean; // New prop to control arrow position\n styles?: {\n stepperProgressColor?: string;\n };\n}\n\nexport const Stepper: React.FC<IStepperProps> = ({\n steps,\n finalCTAButton,\n onError,\n useSideArrows = false, // Default to false for backwards compatibility\n styles,\n}) => {\n const [currentStep, setCurrentStep] = useState(0);\n\n const currentComponent = steps[currentStep]?.component;\n\n const totalSteps = steps.length;\n\n const onStepChange = async (step: number) => {\n if (steps[currentStep]?.validate) {\n try {\n const isValid = await steps[currentStep].validate!();\n if (!isValid) {\n if (onError) {\n onError(\n steps[currentStep].errorMessage ||\n `Validation failed on step ${currentStep + 1}`\n );\n }\n return;\n }\n } catch (error) {\n if (onError) {\n onError(\n `An error occurred during validation on step ${currentStep + 1}`\n );\n }\n return;\n }\n }\n setCurrentStep(step);\n };\n\n const renderArrows = () => {\n const leftArrow = (\n <SelectArrow\n direction=\"left\"\n onPointerDown={() => onStepChange(Math.max(0, currentStep - 1))}\n />\n );\n\n const rightArrow = (\n <SelectArrow\n direction=\"right\"\n onPointerDown={() =>\n onStepChange(Math.min(totalSteps - 1, currentStep + 1))\n }\n />\n );\n\n if (useSideArrows) {\n return (\n <>\n {currentStep > 0 && <ArrowContainer left>{leftArrow}</ArrowContainer>}\n {currentStep < totalSteps - 1 && (\n <ArrowContainer right>{rightArrow}</ArrowContainer>\n )}\n </>\n );\n } else {\n return (\n <>\n {currentStep > 0 && leftArrow}\n {currentStep < totalSteps - 1 && rightArrow}\n </>\n );\n }\n };\n\n return (\n <StepperContainer className=\"stepper-container\">\n <StepperTop>\n {Array.from({ length: totalSteps }, (_, i) => (\n <ProgressIndicator\n key={i}\n isActive={i <= currentStep}\n stepperProgressColor={styles?.stepperProgressColor}\n onClick={() => onStepChange(i)}\n />\n ))}\n </StepperTop>\n\n <StepperBodyContainer>\n {useSideArrows && renderArrows()}\n <StepperBody>{currentComponent}</StepperBody>\n </StepperBodyContainer>\n\n {(!useSideArrows ||\n (currentStep === totalSteps - 1 && finalCTAButton)) && (\n <StepperFooter>\n {!useSideArrows && renderArrows()}\n {currentStep === totalSteps - 1 && finalCTAButton && (\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={finalCTAButton.onClick}\n >\n {finalCTAButton.label}\n </Button>\n )}\n </StepperFooter>\n )}\n </StepperContainer>\n );\n};\n\nconst StepperContainer = styled.div`\n display: flex;\n flex-direction: column;\n height: 100%;\n`;\n\nconst StepperTop = styled.div`\n flex: 1;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n margin-bottom: 1rem;\n`;\n\nconst StepperBodyContainer = styled.div`\n flex: 8;\n display: flex;\n align-items: center;\n position: relative;\n height: 100%; /* Ensure full height */\n`;\n\nconst StepperBody = styled.div`\n flex: 1;\n min-height: 200px; /* Set an appropriate minimum height */\n transition: height 0.3s ease-in-out; /* Smooth height transition */\n`;\n\nconst ArrowContainer = styled.div<{ left?: boolean; right?: boolean }>`\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n ${props => props.left && 'left: -30px;'}\n ${props => props.right && 'right: -30px;'}\n`;\n\nconst StepperFooter = styled.div`\n margin-top: 1rem;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst ProgressIndicator = styled.div<{\n isActive: boolean;\n stepperProgressColor?: string;\n}>`\n width: 20px;\n height: 20px;\n background-color: ${({ isActive, stepperProgressColor }) =>\n isActive ? stepperProgressColor || uiColors.orange : uiColors.lightGray};\n margin: 0 5px;\n transition: background-color 0.3s;\n opacity: ${({ isActive }) => (isActive ? 1 : 0.25)};\n border: 1px solid ${uiColors.raisinBlack};\n cursor: pointer;\n clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);\n /* Create a diamond shape */\n box-shadow: ${({ isActive }) =>\n isActive\n ? '0 0 0 1px black, 1px 1px 0 1px black, 2px 2px 0 1px black, -1px -1px 0 1px black'\n : '0 0 0 1px black, 1px 1px 0 1px gray, 2px 2px 0 1px gray, -1px -1px 0 1px gray'};\n /* Add pixel art border effect */\n border-radius: 0;\n /* Remove border-radius to make it square */\n`;\n","import React from 'react';\n\nexport interface ITextArea\n extends React.DetailedHTMLProps<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n HTMLTextAreaElement\n > {}\n\nexport const TextArea: React.FC<ITextArea> = ({ ...props }) => {\n return <textarea {...props} />;\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport { PeriodOfDay } from '@rpg-engine/shared';\nimport AfternoonGif from './gif/afternoon.gif';\nimport MorningGif from './gif/morning.gif';\nimport NightGif from './gif/night.gif';\n\nexport interface IPeriodOfDayDisplayProps {\n periodOfDay: PeriodOfDay;\n}\n\nexport const DayNightPeriod: React.FC<IPeriodOfDayDisplayProps> = ({\n periodOfDay,\n}) => {\n const periodOfDaySrcFiles = {\n [PeriodOfDay.Morning]: MorningGif,\n [PeriodOfDay.Afternoon]: AfternoonGif,\n [PeriodOfDay.Night]: NightGif,\n };\n\n return (\n <GifContainer>\n <img src={periodOfDaySrcFiles[periodOfDay]} />\n </GifContainer>\n );\n};\n\nconst GifContainer = styled.div`\n width: 100%;\n\n img {\n width: 67%;\n }\n`;\n","import { PeriodOfDay } from '@rpg-engine/shared';\nimport React from 'react';\nimport Draggable from 'react-draggable';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../constants/uiFonts';\nimport { DayNightPeriod } from './DayNightPeriod/DayNightPeriod';\n\nimport ClockWidgetImg from './img/clockwidget.png';\n\nexport interface IClockWidgetProps {\n onClose?: () => void;\n TimeClock: string;\n periodOfDay: PeriodOfDay;\n scale?: number;\n}\n\nexport const TimeWidget: React.FC<IClockWidgetProps> = ({\n onClose,\n TimeClock,\n periodOfDay,\n scale,\n}) => {\n return (\n <Draggable\n scale={scale}\n cancel=\".time-widget-close,.time-widget-container,.time-widget-container *\"\n >\n <WidgetContainer>\n <CloseButton onPointerDown={onClose} className=\"time-widget-close\">\n X\n </CloseButton>\n <DayNightContainer className=\"time-widget-container\">\n <DayNightPeriod periodOfDay={periodOfDay} />\n </DayNightContainer>\n <Time>{TimeClock}</Time>\n </WidgetContainer>\n </Draggable>\n );\n};\n\nconst WidgetContainer = styled.div`\n background-image: url(${ClockWidgetImg});\n background-size: 10rem;\n background-repeat: no-repeat;\n width: 10rem;\n position: absolute;\n height: 100px;\n`;\n\nconst Time = styled.div`\n top: 0.75rem;\n right: 0.5rem;\n position: absolute;\n font-size: ${uiFonts.size.small};\n color: white;\n`;\n\nconst CloseButton = styled.p`\n position: absolute;\n top: -0.5rem;\n margin: 0;\n right: -0.2rem;\n font-size: ${uiFonts.size.small} !important;\n z-index: 1;\n`;\n\nconst DayNightContainer = styled.div`\n margin-top: -0.3rem;\n margin-left: -0.3rem;\n`;\n","import { UserAccountTypes } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IPremiumLabelProps {\n accountType: UserAccountTypes;\n}\n\nconst PremiumLabel: React.FC<IPremiumLabelProps> = ({ accountType }) => {\n if (accountType === UserAccountTypes.Free) return null;\n\n const getBackgroundColor = () => {\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n return '#CD7F32';\n case UserAccountTypes.PremiumSilver:\n return '#C0C0C0';\n case UserAccountTypes.PremiumGold:\n return '#FFD700';\n case UserAccountTypes.PremiumUltimate:\n return '#002E99';\n default:\n return 'transparent';\n }\n };\n\n const getShortLabel = () => {\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n return 'Bronze PA';\n case UserAccountTypes.PremiumSilver:\n return 'Silver PA';\n case UserAccountTypes.PremiumGold:\n return 'Gold PA';\n case UserAccountTypes.PremiumUltimate:\n return 'Ultimate PA';\n default:\n return '';\n }\n };\n\n return (\n <StyledLabel backgroundColor={getBackgroundColor()}>\n {getShortLabel()}\n </StyledLabel>\n );\n};\n\nconst StyledLabel = styled.span<{ backgroundColor: string }>`\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${({ backgroundColor }) =>\n backgroundColor === '#002E99' ? 'white' : 'black'};\n font-weight: bold;\n padding: 0 0.4rem;\n border-radius: 3px;\n margin-right: 3px;\n margin-bottom: 2px;\n display: inline-block;\n font-size: 0.5rem !important;\n`;\n\nexport default PremiumLabel;\n","import {\n getItemTextureKeyPath,\n IEquipmentSet,\n ITradeResponseItem,\n} from '@rpg-engine/shared';\nimport capitalize from 'lodash/capitalize';\nimport React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { uiFonts } from '../../constants/uiFonts';\nimport SelectArrow from '../Arrow/SelectArrow';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { Ellipsis } from '../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\nimport PremiumLabel from './PremiumLabel';\n\nexport interface ITradeComponentProps {\n traderItem: ITradeResponseItem;\n onQuantityChange: (\n traderItem: ITradeResponseItem,\n selectedQty: number\n ) => void;\n atlasJSON: any;\n atlasIMG: any;\n selectedQty: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n isBuy?: boolean;\n}\n\nconst outerQty = 10;\n\nexport const TradingItemRow: React.FC<ITradeComponentProps> = ({\n atlasIMG,\n atlasJSON,\n onQuantityChange,\n traderItem,\n selectedQty,\n equipmentSet,\n scale,\n isBuy,\n}) => {\n const [inputQty, setInputQty] = useState(selectedQty.toString());\n\n useEffect(() => {\n setInputQty(selectedQty.toString());\n }, [selectedQty]);\n\n const handleQuantityChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newQty = parseInt(e.target.value, 10);\n if (!isNaN(newQty)) {\n setInputQty(e.target.value);\n onQuantityChange(\n traderItem,\n Math.max(0, Math.min(newQty, traderItem.stackQty ?? 999))\n );\n }\n };\n\n const handleBlur = () => {\n const newQty = parseInt(inputQty, 10);\n if (isNaN(newQty)) {\n setInputQty(selectedQty.toString());\n }\n };\n\n const onLeftClick = (qty = 1) => {\n onQuantityChange(traderItem, Math.max(0, selectedQty - qty));\n };\n\n const onRightClick = (qty = 1) => {\n onQuantityChange(\n traderItem,\n Math.min(traderItem.stackQty ?? 999, selectedQty + qty)\n );\n };\n\n const renderAccountTypeIndicator = () => {\n if (isBuy && traderItem.canBePurchasedOnlyByPremiumPlans) {\n return traderItem.canBePurchasedOnlyByPremiumPlans.map(accountType => (\n <PremiumLabel key={accountType} accountType={accountType} />\n ));\n }\n return null;\n };\n\n return (\n <ItemWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <ItemInfoWrapper\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n item={traderItem}\n scale={scale}\n >\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: traderItem.key,\n stackQty: traderItem.stackQty || 1,\n texturePath: traderItem.texturePath,\n isStackable: traderItem.isStackable,\n },\n atlasJSON\n )}\n imgScale={2}\n />\n </ItemInfoWrapper>\n </SpriteContainer>\n </ItemIconContainer>\n\n <ItemNameContainer>\n <NameValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"180px\">\n {capitalize(traderItem.name)}\n </Ellipsis>\n </p>\n <p>${traderItem.price}</p>\n <p>{renderAccountTypeIndicator()}</p>\n </NameValue>\n </ItemNameContainer>\n <QuantityContainer>\n <SelectArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={() => onLeftClick(outerQty)}\n scale={0.7}\n />\n <StyledArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={() => onLeftClick()}\n />\n <QuantityInput\n type=\"text\"\n value={inputQty}\n onChange={handleQuantityChange}\n onBlur={handleBlur}\n />\n <StyledArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={() => onRightClick()}\n />\n <SelectArrow\n size={24}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={() => onRightClick(outerQty)}\n scale={0.7}\n />\n </QuantityContainer>\n </ItemWrapper>\n );\n};\n\nconst StyledArrow = styled(SelectArrow)`\n margin: 0 1.5rem;\n`;\n\nconst ItemWrapper = styled.div`\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n padding: 0.25rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n`;\n\nconst ItemNameContainer = styled.div`\n flex: 60%;\n display: flex;\n align-items: center;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex: 0 0 40px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0;\n`;\n\nconst NameValue = styled.div`\n p {\n font-size: 0.6rem;\n margin: 0;\n line-height: 1.2;\n }\n`;\n\nconst QuantityContainer = styled.div`\n display: flex;\n min-width: 90px;\n width: 40%;\n justify-content: flex-end;\n align-items: center;\n flex: 30%;\n gap: 2px;\n position: relative;\n`;\n\nconst QuantityInput = styled.input`\n width: 30px;\n text-align: center;\n background-color: ${uiColors.darkGray};\n color: white;\n border: none;\n padding: 1px;\n font-size: ${uiFonts.size.small};\n position: relative;\n right: 4px;\n`;\n","import {\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport { useState } from 'react';\n\ninterface ITradingGoldHook {\n characterAvailableGold: number;\n type: TradeTransactionType;\n traderItems: ITradeResponseItem[];\n}\n\nexport const useTradingGold = ({\n characterAvailableGold,\n type,\n traderItems,\n}: ITradingGoldHook) => {\n const [sum, setSum] = useState(0);\n const [qtyMap, setQtyMap] = useState(new Map<string, number>());\n\n const isBuy = () => type === 'buy';\n\n const hasGoldForSale = () =>\n isBuy() ? !(sum > characterAvailableGold) : true;\n\n const getFinalGold = () =>\n isBuy() ? characterAvailableGold - sum : characterAvailableGold + sum;\n\n const getTradeItems = (): ITradeRequestItem[] => {\n const items: ITradeRequestItem[] = [];\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) {\n items.push({\n ...item,\n qty,\n });\n }\n });\n return items;\n };\n\n const updateQuantity = (item: ITradeResponseItem, selectedQty: number) => {\n setQtyMap(new Map(qtyMap.set(item.key, selectedQty)));\n\n let newSum = 0;\n qtyMap.forEach((qty, key) => {\n const item = traderItems.find(i => i.key === key);\n if (item) newSum += qty * item.price;\n });\n setSum(newSum);\n };\n\n return {\n sum,\n qtyMap,\n isBuy,\n hasGoldForSale,\n getFinalGold,\n getTradeItems,\n updateQuantity,\n };\n};\n","import {\n IEquipmentSet,\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { TradingItemRow } from './TradingItemRow';\nimport { useTradingGold } from './useTradingGold';\n\nexport interface ITradingMenu {\n traderItems: ITradeResponseItem[];\n onClose: () => void;\n onConfirm: (items: ITradeRequestItem[]) => void;\n type: TradeTransactionType;\n atlasJSON: any;\n atlasIMG: any;\n characterAvailableGold: number;\n equipmentSet?: IEquipmentSet | null;\n scale?: number;\n}\n\nexport const TradingMenu: React.FC<ITradingMenu> = ({\n traderItems,\n onClose,\n type,\n atlasJSON,\n atlasIMG,\n characterAvailableGold,\n onConfirm,\n equipmentSet,\n scale,\n}) => {\n const {\n sum,\n qtyMap,\n isBuy,\n hasGoldForSale,\n getFinalGold,\n getTradeItems,\n updateQuantity,\n } = useTradingGold({ characterAvailableGold, type, traderItems });\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={onClose}\n width=\"500px\"\n cancelDrag=\"#TraderContainer\"\n scale={scale}\n >\n <Container>\n <Title>{type.charAt(0).toUpperCase() + type.slice(1)} Menu</Title>\n <hr className=\"golden\" />\n\n <ScrollWrapper id=\"TraderContainer\">\n {traderItems.map((tradeItem, index) => (\n <TradingItemRow\n key={`${tradeItem.key}_${index}`}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onQuantityChange={updateQuantity}\n traderItem={tradeItem}\n selectedQty={qtyMap.get(tradeItem.key) ?? 0}\n equipmentSet={equipmentSet}\n scale={scale}\n isBuy={isBuy()}\n />\n ))}\n </ScrollWrapper>\n\n <InfoSection>\n <GoldInfo>\n <p>Available Gold:</p>\n <p>${characterAvailableGold.toFixed(2)}</p>\n </GoldInfo>\n <GoldInfo>\n <p>Total:</p>\n <p>${sum}</p>\n </GoldInfo>\n {!hasGoldForSale() ? (\n <AlertText>Sorry, not enough money.</AlertText>\n ) : (\n <GoldInfo>\n <p>Final Gold:</p>\n <p>${getFinalGold().toFixed(2)}</p>\n </GoldInfo>\n )}\n </InfoSection>\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onPointerDown={() => onConfirm(getTradeItems())}\n >\n Confirm\n </Button>\n <Button buttonType={ButtonTypes.RPGUIButton} onPointerDown={onClose}>\n Cancel\n </Button>\n </ButtonWrapper>\n </Container>\n </DraggableContainer>\n );\n};\n\nconst Container = styled.div`\n width: 100%;\n`;\n\nconst Title = styled.h1`\n font-size: 0.7rem !important;\n color: yellow !important;\n text-align: center;\n`;\n\nconst ScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 250px;\n width: 100%;\n margin-top: 0.3rem;\n overflow-x: hidden;\n padding: 0 0.3rem;\n`;\n\nconst InfoSection = styled.div`\n margin-top: 0.3rem;\n padding: 0 0.5rem;\n`;\n\nconst GoldInfo = styled.div`\n display: flex;\n justify-content: space-between;\n height: 16px;\n width: 100%;\n margin: 0.5rem 0;\n p {\n color: yellow !important;\n margin: 0;\n font-size: 0.6rem;\n }\n`;\n\nconst AlertText = styled.p`\n color: red !important;\n text-align: center;\n margin: 0.3rem 0;\n font-size: 0.5rem;\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n width: 100%;\n margin-top: 1rem;\n`;\n","/* eslint-disable react/require-default-props */\nimport React from 'react';\nimport styled from 'styled-components';\n\ninterface IProps {\n maxLines?: number;\n children: React.ReactNode;\n}\n\nexport const Truncate: React.FC<IProps> = ({ maxLines = 1, children }) => {\n return <Container maxLines={maxLines}>{children}</Container>;\n};\n\ninterface IContainerProps {\n maxLines: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n display: -webkit-box;\n max-width: 100%;\n max-height: 100%;\n -webkit-line-clamp: ${props => props.maxLines};\n -webkit-box-orient: vertical;\n overflow: hidden;\n`;\n","import React, { useState } from 'react';\n\nexport const ZoomableImage: React.FC<{ src: string; alt: string }> = ({\n src,\n alt,\n}) => {\n const [isZoomed, setIsZoomed] = useState(false);\n const [zoomPosition, setZoomPosition] = useState({ x: 50, y: 50 });\n\n const handleMouseMove = (\n e: React.MouseEvent<HTMLImageElement, MouseEvent>\n ) => {\n const {\n left,\n top,\n width,\n height,\n } = e.currentTarget.getBoundingClientRect();\n const x = ((e.clientX - left) / width) * 100;\n const y = ((e.clientY - top) / height) * 100;\n setZoomPosition({ x, y });\n };\n\n const handleTouchMove = (e: React.TouchEvent<HTMLImageElement>) => {\n const {\n left,\n top,\n width,\n height,\n } = e.currentTarget.getBoundingClientRect();\n const touch = e.touches[0];\n const x = ((touch.clientX - left) / width) * 100;\n const y = ((touch.clientY - top) / height) * 100;\n setZoomPosition({ x, y });\n };\n\n const handleZoomToggle = () => {\n setIsZoomed(!isZoomed);\n };\n\n return (\n <img\n src={src}\n alt={alt}\n onMouseMove={handleMouseMove}\n onTouchMove={handleTouchMove}\n onClick={handleZoomToggle} // Toggle zoom on click/tap\n style={{\n width: '100%',\n height: '100%',\n objectFit: 'cover',\n transform: isZoomed ? 'scale(1.5)' : 'scale(1)',\n transformOrigin: `${zoomPosition.x}% ${zoomPosition.y}%`,\n transition: 'transform 0.3s ease',\n cursor: 'pointer', // Indicate interactivity\n }}\n />\n );\n};\n","import React, { useMemo } from 'react';\nimport styled, { CSSProperties } from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { ZoomableImage } from '../Image/ZoomableImage';\nimport { Stepper } from '../Stepper';\nimport { DynamicText } from '../typography/DynamicText';\n\nexport interface ITutorialLesson {\n title: string;\n body?: React.ReactNode | string;\n text?: string;\n image: string;\n imageUrl?: string;\n}\n\nexport interface ITutorialStepperProps {\n lessons: ITutorialLesson[];\n onLessonFinish: () => void;\n imageStyle?: CSSProperties;\n}\n\nexport const TutorialStepper = React.memo(\n ({ lessons, onLessonFinish, imageStyle }: ITutorialStepperProps) => {\n const generateLessons = useMemo(\n () =>\n lessons.map((lesson, index) => ({\n component: (\n <LessonContainer key={index} className=\"lesson-container\">\n <LessonTitle className=\"lesson-title\">{lesson.title}</LessonTitle>\n {lesson.image && (\n <LessonImageWrapper className=\"lesson-image-wrapper\">\n <LessonImage className=\"lesson-image\" style={imageStyle}>\n {lesson.imageUrl ? (\n <a\n href={lesson.imageUrl}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n <ZoomableImage\n src={lesson.image}\n alt={lesson.title || 'Tutorial image'}\n />\n </a>\n ) : (\n <ZoomableImage\n src={lesson.image}\n alt={lesson.title || 'Tutorial image'}\n />\n )}\n </LessonImage>\n </LessonImageWrapper>\n )}\n <LessonFooter className=\"lesson-footer\">\n {lesson.body && (\n <LessonBody\n className=\"lesson-body\"\n dangerouslySetInnerHTML={{ __html: lesson.body as string }}\n ></LessonBody>\n )}\n {lesson.text && <DynamicText text={lesson.text} />}\n </LessonFooter>\n </LessonContainer>\n ),\n id: index,\n })),\n [lessons, imageStyle]\n );\n\n return (\n <Container>\n <Stepper\n steps={generateLessons}\n finalCTAButton={{\n label: 'Close',\n onClick: onLessonFinish,\n }}\n useSideArrows\n />\n </Container>\n );\n }\n);\n\nconst LessonImageWrapper = styled.div`\n width: 100%;\n max-width: 500px;\n margin: 1rem auto;\n aspect-ratio: auto; /* Allow the image to define its own aspect ratio */\n border-radius: 10px;\n`;\n\nconst LessonBody = styled.div``;\n\nconst Container = styled.div`\n width: 80%;\n max-width: 600px;\n\n @media (max-width: 600px) {\n width: 95%;\n }\n`;\n\nconst LessonFooter = styled.div`\n margin-top: 1rem;\n`;\n\nconst LessonImage = styled.div`\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n max-width: 500px;\n margin: auto;\n\n img {\n width: 100%;\n height: auto;\n object-fit: contain; /* Ensures the entire image is visible */\n border-radius: 10px;\n }\n`;\n\nconst LessonTitle = styled.h1`\n color: ${uiColors.yellow} !important;\n font-size: 0.8rem !important;\n`;\n\nconst LessonContainer = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n min-height: 200px; /* Match with StepperBody for consistent height */\n\n p {\n // make font size consistent with rest\n font-size: 0.7rem !important;\n }\n`;\n"],"names":["SelectArrow","_ref","direction","_ref$direction","size","_ref$scale","scale","onPointerDown","props","_objectWithoutPropertiesLoose","_excluded","React","LeftArrow","RightArrow","styled","span","withConfig","displayName","componentId","LeftArrowIcon","LeftArrowClickIcon","RightArrowIcon","RightArrowClickIcon","uiColors","lightGray","gray","darkGray","darkYellow","yellow","orange","cardinal","red","darkRed","raisinBlack","navyBlue","purple","darkPurple","blue","darkBlue","brown","lightGreen","brownGreen","white","AsyncDropdown","options","width","onChange","defaultValue","_ref$opensUp","opensUp","dropdownId","uuidv4","_useState","useState","_options$","value","selectedValue","setSelectedValue","_useState2","_options$find","find","option","_options$2","selectedOption","setSelectedOption","_useState3","opened","setOpened","useEffect","_options$find2","length","handleSelection","Container","onMouseLeave","DropdownSelect","id","className","onPointerUp","prev","DropdownDisplay","DropdownLabel","BeatLoader","color","DropdownOptions","map","key","label","div","p","ul","uiFonts","xxsmall","xsmall","small","medium","large","xLarge","xxLarge","xxxLarge","ButtonTypes","Button","disabled","_ref$disabled","children","buttonType","ButtonContainer","button","SpriteFromAtlas","atlasJSON","atlasIMG","spriteKey","_ref$width","GRID_WIDTH","_ref$height","height","GRID_HEIGHT","_ref$imgScale","imgScale","imgStyle","containerStyle","_ref$grayScale","grayScale","_ref$opacity","opacity","imgClassname","centered","borderRadius","spriteData","_atlasJSON$frames","frames","_atlasJSON$frames2","console","error","hasHover","style","ImgSprite","frame","w","h","x","y","ErrorBoundary","_Component","_this","_len","arguments","args","Array","_key","call","apply","concat","state","hasError","_inheritsLoose","getDerivedStateFromError","_","_proto","prototype","componentDidCatch","errorInfo","render","Component","Ellipsis","_ref$maxLines","maxLines","maxWidth","fontSize","center","PropertySelect","availableProperties","currentIndex","setCurrentIndex","propertiesLength","onLeftClick","index","onRightClick","JSON","stringify","getCurrentSelectionName","item","name","TextOverlay","Item","CharacterSelection","availableCharacters","propertySelectValues","textureKey","selectedSpriteKey","setSelectedSpriteKey","onSelectedValueChange","display","alignItems","paddingBottom","left","Chat","chatMessages","onSendChatMessage","onCloseButton","onFocus","onBlur","_ref$styles","styles","textColor","buttonColor","buttonBackgroundColor","isExpanded","message","setMessage","inputRef","useRef","scrollChatToBottom","_inputRef$current","current","focus","scrollingElement","document","querySelector","scrollTop","scrollHeight","handleSubmit","event","preventDefault","trim","truncateName","maxLength","slice","formatMessage","chatMessage","timestamp","dayjs","createdAt","format","truncatedName","emitter","ChatContainer","fallback","CloseButton","onClick","FaTimes","MessagesContainer","Message","_id","Form","onSubmit","TextField","ref","e","target","type","autoComplete","placeholder","SendButton","_ref2","form","input","Input","_extends","_objectDestructuringEmpty","rest","innerRef","RPGUIContainerTypes","RPGUIContainer","Column","flex","flexWrap","justifyContent","ChatDeprecated","getInputValue","onRenderMessageLines","Date","onRenderChatMessages","MessageText","CustomContainer","FramedGrey","CustomInput","RPGUIButton","useChat","minimizedByDefault","isPrivate","onChangeTab","onPreviousChatCharacterClick","hideSearchCharacterUI","unseenMessageCharacterIds","showRecentChats","setShowRecentChats","setIsExpanded","toggleExpand","toggleRecentChats","handleTabChange","tabId","handlePreviousChatCharacterClick","character","hasUnseenMessages","SearchCharacter","onChangeCharacterName","recentCharacters","onCharacterClick","characterName","setCharacterName","searchCharacterRef","timer","setTimeout","clearTimeout","handleCharacterClick","SearchContainer","SearchButton","RxMagnifyingGlass","ListContainer","ListElement","_ref3","li","ChatContent","isTrade","isGlobal","searchCharacterUI","onSendLocalChatMessage","onSendGlobalChatMessage","onSendPrivateChatMessage","onSendTradeMessage","autoCloseOnSend","privateChatCharacters","isGuild","onSendGuildChatMessage","handleSendMessage","ChatWrapper","sendMessage","ChatTabs","tabs","activeTab","TabContainer","tab","Tab","active","ExpandButton","StyledExpandButton","IoMdContract","IoMdExpand","RecentChats","showSearchCharacterUI","recentChatCharacters","recentSelectedChatCharacterId","onRemoveRecentChatCharacter","RecentChatTabContainer","isOpen","RecentChatTopBar","BurgerIconContainer","BurgerLineIcon","RecentChatLogContainer","_unseenMessageCharact","ListElementContainer","StatusDot","isUnseen","includes","RxCross2","ChatRevamp","_ref$activeTab","_ref$minimizedByDefau","chatHook","ChatRevampContainer","TopBar","AllChatsContainer","ExpandedChatContent","ChatContentWrapper","CollapsedChatInput","_ref4","CheckButton","items","generateSelectedValuesList","selectedValues","forEach","setSelectedValues","handleClick","_extends2","element","checked","CheckItem","_ref$defaultValue","setChecked","newCheckedState","readOnly","SingleShortcut","useShortcutCooldown","onShortcutCast","shortcutCooldown","setShortcutCooldown","cooldownTimeout","handleShortcutCast","CircularController","onActionClick","onCancelClick","onShortcutClick","mana","shortcuts","inventory","spellCooldowns","_useShortcutCooldown","onTouchStart","classList","add","onTouchEnd","action","remove","renderShortcut","i","buildClassName","classBase","isOnCooldown","variant","onShortcutClickBinded","_shortcuts$i","ShortcutType","None","bind","isOnShortcutCooldown","_shortcuts$i2","_shortcuts$i3","payload","itemsFromEquipment","Object","keys","slots","parseInt","_inventory$slots$inde","push","totalQty","reduce","acc","stackQty","StyledShortcut","toFixed","getItemTextureKeyPath","texturePath","isStackable","pointerEvents","_shortcuts$i4","spellCooldown","_spellCooldowns$paylo","magicWords","replaceAll","cooldown","CONTAINER_STYLE","IMAGE_SCALE","_payload$manaCost","manaCost","split","word","ButtonsContainer","ShortcutsContainer","from","CancelButton","useLocalStorage","initialValue","window","localStorage","getItem","parse","log","storedValue","setStoredValue","setValue","valueToStore","Function","setItem","useOutsideClick","handleClickOutside","contains","CustomEvent","detail","dispatchEvent","addEventListener","removeEventListener","DraggableContainer","minHeight","minWidth","_ref$type","FramedGold","title","imgSrc","_ref$imgWidth","imgWidth","cancelDrag","onPositionChange","onPositionChangeEnd","onPositionChangeStart","onOutsideClick","_ref$initialPosition","initialPosition","_ref$dragDisabled","dragDisabled","isFullScreen","draggableRef","_e","Draggable","cancel","onDrag","data","onStop","onStart","defaultPosition","TitleContainer","Title","Icon","src","_ref5","css","_ref6","h1","img","_ref7","Dropdown","firstOption","change","filter","o","modalRoot","getElementById","ModalPortal","ReactDOM","createPortal","useTouchTarget","getTouchTarget","useCallback","_touchEvent$changedTo","_touchEvent$touches","touchEvent","touch","changedTouches","touches","elementFromPoint","clientX","clientY","body","rarityColor","rarity","ItemRarities","Uncommon","Rare","Epic","Legendary","gemColors","defaultColor","onRenderGems","gemQty","_item$attachedGems","attachedGems","ItemSlotQty","undefined","itemId","ItemQtyContainer","_item$attachedGems2","gem","Gem","onRenderStackInfo","isFractionalStackQty","isLargerThan999","qtyClassName","ItemQty","Math","round","ItemSlotRenderer","containerType","slotSpriteMask","renderStackInfo","renderGems","renderItem","renderEquipment","itemToRender","_itemToRender$allowed","allowedEquipSlotType","EquipmentSlotSpriteByType","onRenderSlot","ItemContainerType","Equipment","generateContextMenuListOptions","actionsByTypeList","contextMenu","text","ItemSocketEventsDisplayLabels","generateContextMenu","itemContainerType","isDepotSystem","contextActionMenu","Inventory","ItemType","Weapon","Armor","Accessory","Jewelry","ActionsForInventory","Consumable","CraftingResource","Tool","Other","DepotSocketEvents","Deposit","contextActionMenuDontHaveUseWith","toLowerCase","hasUseWith","ItemSocketEvents","UseWith","ActionsForEquipmentSet","Loot","ActionsForLoot","MapContainer","ActionsForMapContainer","Depot","GetItemInfo","Withdraw","initialDetailsState","isTooltipVisible","isTooltipMobileVisible","isContextMenuVisible","contextMenuPosition","contextActions","clearContextActions","clearDetailsState","ItemSlotDetailsContext","createContext","detailsState","updateDetailsState","setContextActions","useItemSlotDetails","useContext","ItemSlotDetailsProvider","setDetailsState","newState","prevState","isContextMenuDisabled","newContextActions","contextValue","useMemo","Provider","initialDraggingState","isDragging","position","dropPosition","isFocused","draggingDistance","ItemSlotDraggingContext","draggingState","updateDraggingState","clearDraggingState","useItemSlotDragging","ItemSlotDraggingProvider","setDraggingState","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","RightHand","ItemSlot","observer","slotIndex","onMouseOver","onMouseOut","_ref$isContextMenuDis","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","dragScale","isSelectingShortcut","setItemShortcut","_useItemSlotDetails","dragContainer","_useItemSlotDragging","resetItem","onSuccessfulDrag","quantity","refreshContextActions","onDraggableStop","requestAnimationFrame","isMobile","handleShortcutSetter","removeDraggingClass","shouldHandleDraggedItemResult","shouldHandleDraggedItem","handleDraggedItem","handleContextMenuOrTooltip","isNaN","targetClasses","isOutsideDrop","some","elm","targetElement","_getElementTransform","getElementTransform","processDragEnd","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","isTouchEvent","shouldShowMobileTooltip","shouldToggleContextMenu","mouseEvent","onDraggableStart","onDraggableProgress","_data","isDraggingItem","onMouseUp","_e$changedTouches$","simulatedEvent","MouseEvent","bubbles","_document$elementFrom","subType","ItemSubType","Seed","axis","defaultClassName","bounds","ItemContainer","onMouseEnter","statisticsToDisplay","higherIsWorse","ItemInfo","itemToCompare","renderStatistics","statistics","_i","_statisticsToDisplay","stat","itemStatistic","_itemToCompare$stat$k","_itemToCompare$stat$k2","toUpperCase","isItemToCompare","isOnlyInOneItem","statDiff","toString","isDifference","isBetter","Statistic","renderMissingStatistic","_i2","_statisticsToDisplay2","itemToCompareStatistic","renderEntityEffects","entityEffects","entityEffectChance","effect","renderAvaibleSlots","slotType","skillName","_item$minRequirements","minRequirements","_item$minRequirements2","skill","Header","Rarity","Type","AllowedSlots","LevelRequirement","_item$minRequirements3","level","charAt","_item$minRequirements4","_item$minRequirements5","usableEffectDescription","equippedBuffDescription","isTwoHanded","Description","description","maxStackSize","StackInfo","_item$stackQty","MissingStatistics","_rarityColor","$isSpecial","itemSlotTypes","getSlotType","ItemInfoDisplay","equipmentSet","_item$allowedEquipSlo","allowedSlotTypeCamelCase","camelCase","itemSubTypeCamelCase","itemSubTypeFromEquipment","values","_item$subType","itemFromEquipment","Flex","CompareContainer","Equipped","$isMobile","offset","ItemTooltip","handleMouseMove","rect","getBoundingClientRect","tooltipWidth","tooltipHeight","isOffScreenRight","innerWidth","isOffScreenBottom","innerHeight","MobileItemTooltip","closeTooltip","onSelected","handleFadeOut","_ref$current","OptionsContainer","Option","ItemInfoWrapper","setIsTooltipVisible","setIsTooltipMobileVisible","countItemFromInventory","itemKey","itemsFromInventory","modifyString","str","parts","fileName","replace","words","firstWord","modifiedWords","join","TooltipContainer","MinCraftingRequirementsText","levelIsOk","IngredientsTitle","Recipe","Ingredient","isQuantityOk","CraftingTooltip","recipe","skills","levelInSkill","_skills$level","_skills","_recipe$minCraftingRe","_recipe$minCraftingRe2","minCraftingRequirements","_recipe$levelIsOk","_recipe$minCraftingRe3","_recipe$minCraftingRe4","_recipe$minCraftingRe5","_recipe$minCraftingRe6","ingredients","ingredient","itemQtyInInventory","qty","RadioOptionsWrapper","SpriteAtlasWrapper","MainContent","ItemHeader","CraftingRecipe","handleRecipeSelect","selectedCraftItemKey","showTooltip","setShowTooltip","tooltipPosition","setTooltipPosition","wrapperRef","isSelected","right","top","canCraft","calculateMaxCraftable","maxPossible","inventoryItem","possibleWithThisIngredient","floor","_inventoryItem$stackQ","min","desktop","mobileLanscape","mobilePortrait","ITEMS_PER_PAGE","CraftBook","onClose","onSelect","onCraftItem","craftablesItems","savedSelectedType","craftItemKey","setCraftItemKey","selectedType","setSelectedType","setSize","_useState4","searchTerm","setSearchTerm","_useState5","isSearchVisible","setIsSearchVisible","_useState6","isCraftingDisabled","setIsCraftingDisabled","_useLocalStorage","pinnedItems","setPinnedItems","_useState7","currentPage","setCurrentPage","_useState8","setItems","handleResize","togglePinItem","categoryOptions","sort","a","b","localeCompare","filteredCraftableItems","matchesSearch","matchesCategory","sortedItems","aIsPinned","bIsPinned","totalPages","ceil","paginatedItems","Framed","Wrapper","HeaderContainer","HeaderControls","DropdownWrapper","FaSearch","autoFocus","ContentContainer","RadioInputScroller","CraftingRecipeWrapper","PinButton","stopPropagation","isPinned","FaThumbtack","PaginationContainer","PaginationButton","max","FaChevronLeft","PageInfo","FaChevronRight","Footer","selectedItem","maxCraftable","DropdownSelectorContainer","details","Details","useCursorPosition","setPosition","scalePosition","setFromEvent","scaledPosition","cleanup","handleEvent","CONTAINER_SIZE","OFFSET","DraggedItem","_useCursorPosition","centeredX","centeredY","stackInfo","_item$_id","SpriteContainer","pulse","attrs","RelativeListMenu","_ref$fontSize","pos","overflow","params","ItemSlotToolTips","optionId","EquipmentSet","onItemClick","onItemDragEnd","onItemDragStart","onItemPlaceDrop","onItemOutsideDrop","neck","leftHand","ring","head","armor","legs","boot","rightHand","accessory","equipmentData","equipmentMaskSlots","ItemSlotType","onRenderEquipmentSlotRange","start","end","equipmentRange","slotMaksRange","itemContainer","itemType","ContainerType","EquipmentSetContainer","EquipmentColumn","Table","table","TableRow","tr","TableHeader","th","TableCell","td","ActionButtons","UserActionLink","SearchFriend","searchedCharacters","friendRequests","onSearch","onSendFriendRequest","onAcceptRequest","onRejectRequest","debouncedSearch","debounce","handleInputChange","searchTabContent","SearchForm","SearchInput","CharacterList","characters","onAction","actionLabel","requestsTabContent","FriendRequestSection","onAccept","onReject","content","InternalTabs","activeTextColor","inactiveColor","borderColor","ListItem","CharacterName","AcceptRejectActions","FriendList","friends","onRemoveFriend","onOpenPrivateMessage","onAddFriend","onBackFriendList","isAddFriendUI","setIsAddFriendUI","ListWrapper","ScrollableArea","friend","IsOnlineBadge","isOnline","$isOnline","IS_MOBILE_OR_TABLET","isMobileOrTablet","chunkString","match","RegExp","DynamicText","onFinish","textState","setTextState","interval","setInterval","substring","clearInterval","TextContainer","NPCDialogText","onEndStep","onStartStep","windowSize","maxCharacters","charactersPerLine","linesPerDiv","textChunks","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","hasNextChunk","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","NPCDialogType","TextOnly","pressButtonGif","pressSpaceGif","useEventListener","handler","el","savedHandler","listener","QuestionDialog","questions","answers","currentQuestion","setCurrentQuestion","canShowAnswers","setCanShowAnswers","onGetFirstAnswer","answerIds","firstAnswerId","answer","currentAnswer","setCurrentAnswer","onGetAnswers","answerId","onKeyPress","nextAnswerIndex","findIndex","nextAnswerID","nextAnswer","previousAnswerIndex","previousAnswerID","previousAnswer","pop","nextQuestionId","question","onAnswerClick","onRenderCurrentAnswers","selectedColor","AnswerRow","AnswerSelectedIcon","Answer","QuestionContainer","AnswersContainer","NPCDialog","imagePath","_ref$isQuestionDialog","isQuestionDialog","TextAndThumbnail","ThumbnailContainer","NPCThumbnail","aliceDefaultThumbnail","CloseIcon","ImgSide","NPCMultiDialog","textAndTypeArray","slide","setSlide","_textAndTypeArray$sli","imageSide","HistoryDialog","backgroundImgPath","fullCoverBackground","setImage","BackgroundContainer","imgPath","fullImg","DialogContainer","ImageCarousel","textImage","isTextFixed","textImageSelected","setTextImageSelected","goToPreviousImage","indexOf","goToNextImage","CarouselWrapper","BackgroundImage","image","ArrowContainer","textPosition","_textImageSelected$te","_textImageSelected$te2","SimpleImageCarousel","images","_ref$autoCycle","autoCycle","_ref$autoCycleDelay","autoCycleDelay","_ref$stopAutoCyclingO","stopAutoCyclingOnInteraction","currentImage","setCurrentImage","autoCycleId","handleLeftClick","prevImage","handleRightClick","hasMoreThanOneImage","ImageContainer","CustomLeftArrow","CustomRightArrow","Carousel","FadeInCarouselImg","alt","CarouselImg","fadeIn","keyframes","_ref$activeColor","activeColor","_ref$activeTextColor","_ref$inactiveColor","_ref$borderColor","_ref$hoverColor","hoverColor","setActiveTab","TableWrapper","TabHeader","TabButton","ContentWrapper","_tabs$find","SlotsContainer","useScrollOnDrag","containerRef","threshold","scrollStep","animationFrameId","startScrolling","scroll","_containerRef$current","bottom","maxScrollTop","clientHeight","distanceFromTop","distanceFromBottom","stopScrolling","cancelAnimationFrame","ShortcutsSetter","setSettingShortcutIndex","settingShortcutIndex","removeShortcut","getContent","_shortcuts$index","_shortcuts$index2","IMAGE_SIZE","shortcut","Spell","_payload$texturePath","List","Shortcut","isBeingSet","RangeSliderType","RangeSlider","memo","valueMin","valueMax","_ref$step","step","sliderId","setLeft","calculatedWidth","clientWidth","typeClass","GoldSlider","handleChange","Number","QuantitySelector","maxQuantity","initialQuantity","_ref$title","onConfirm","closeSelector","select","StyledContainer","StyledForm","numberValue","noValidate","StyledInput","Slider","validateQuantitySelect","quantitySelect","QuantitySelectorModal","setQuantitySelect","resetQuantitySelect","callback","validatedQuantitySelect","QuantitySelectorContainer","ItemQuantitySelectorModal","MIN_SLOTS_FOR_SCROLL","_ref$disableContextMe","disableContextMenu","_quantity","_useScrollOnDrag","handleSetShortcut","onDragStartScrollingEvents","once","onDragEndScrollingEvents","onDragStartHandler","onDragEndHandler","memoizedHandleSetShortcut","onRenderSlots","slotQty","_itemContainer$slots","currentItem","ItemsContainer","isScrollable","ItemSelector","elementValue","Subtitle","imageKey","ButtonWrapper","LeaderboardTable","rankType","isTopSkillEntry","entry","TableRowWrapper","TableRowValue","Leaderboard","onChangeRankType","onChangeClassType","skillOptions","onChangeSkillType","classOptions","rankOptions","itemsContainer","_itemsContainer$curre","scrollTo","rankTypeOptions","skillTypeOptions","classTypeOptions","WrapperContainer","StyledDropdown","ItemComponentScrollWrapper","ListMenu","Pager","totalItems","itemsPerPage","onPageChange","PagerContainer","ConfirmModal","Background","ButtonsWrapper","MarketplaceRows","itemPrice","onMarketPlaceItemBuy","onMarketPlaceItemRemove","MarketplaceWrapper","ItemIconContainer","GemContainer","RarityContainer","QuantityContainer","PriceValue","GoldContainer","OrderByType","itemTypeOptions","itemRarityOptions","itemRarity","orderByOptions","flatMap","orderBy","BuyPanel","onChangeType","onChangeRarity","onChangeOrder","onChangeNameInput","onChangeMainLevelInput","onChangeSecondaryLevelInput","onChangePriceInput","characterId","enableHotkeys","disableHotkeys","setName","mainLevel","setMainLevel","secondaryLevel","setSecondaryLevel","price","setPrice","buyingItemId","setBuyingItemId","InputWrapper","OptionsWrapper","FilterInputsWrapper","AiFillCaretRight","owner","ManagmentPanel","availableGold","selectedItemToSell","onSelectedItemToSellRemove","onAddItemToMarketplace","onMoneyWithdraw","isCreatingOffer","setIsCreatingOffer","removingItemId","setRemovingItemId","InnerOptionsWrapper","SellDescription","__","PriceInputWrapper","AvailableGold","$disabled","Marketplace","onYourPanelToggle","isYourPanel","setIsYourPanel","TabBody","centerContent","_props$styles","_props$styles2","CustomTab","MultitabType","TabsContainer","Brown","_ref$isDraggableModal","isDraggableModal","selectedTab","setSelectedTab","onRenderTabs","onGetContainerType","Gray","TabsCore","BodyContainer","NonDraggableWrapper","PartyCreate","onCreate","close","PartyRow","charName","charClass","charLevel","playerQty","isInvited","partyName","PartyWrapper","PartyDashboard","partyRows","RowsWrapper","PlayersRow","isNotInvited","PartyInvite","playersRows","HighlightedText","Text","PartyManagerRow","isLeader","leaderId","userId","onRemovePlayer","onChangeLeader","isCurrentUser","canRemove","PartyManager","invitationActionText","sortedMembers","leader","members","partyRow","NotInParty","YellowText","mockedPartyRows","mockedPlayersRows2","CharacterClass","Druid","maxSize","mockedPlayersRows","mockedPartyManager","getMockedPlayersRowsLeader","Warrior","Sorcerer","Rogue","getMockedPlayersRowsNotLeader","ProgressBar","_ref$displayText","displayText","_ref$percentageWidth","percentageWidth","_ref$minWidth","mobileScale","calculatePercentageValue","ProgressBarText","QuestInfo","quests","buttons","onChangeQuest","questsLength","QuestDraggableContainer","QuestsContainer","QuestContainer","Thumbnail","thumbnail","thumbnailDefault","QuestSplitDiv","Content","QuestColumn","npcId","QuestList","QuestListContainer","container","quest","_formatQuestStatus","QuestCard","card","QuestItem","Label","Value","formatQuestText","getQuestStatusColor","status","formatQuestStatus","NoQuestContainer","QuestStatus","Pending","InProgress","Completed","c","InputRadio","RPGUIScrollbar","RPGUIOverrides","_RPGUI","RPGUI","RPGUIRoot","Shortcuts","_ref$isBlockedCasting","isBlockedCastingByKeyboard","shortcutsRefs","handleKeyDown","shortcutIndex","_shortcutsRefs$curren","timeoutId","_shortcutsRefs$curren2","timeoutIds","SimpleProgressBar","_ref$bgColor","bgColor","_ref$margin","margin","ProgressBarContainer","BackgroundBar","Progress","Tooltip","SkillProgressBar","currentSkillPoints","skillPoints","skillPointsToNextLevel","_ref$showSkillPoints","showSkillPoints","buffAndDebuff","baseSkillPoints","getSPForLevel","calculateProgress","totalPointsForLevelUp","excessSkillPoints","progress","formatBuffAndDebuff","skillsBuffsCalc","result","ProgressTitle","BuffAndDebuffContainer","TitleNameContainer","TitleNameBuff","TitleNameBuffContainer","TitleNameDebuff","TitleName","ValueDisplay","ProgressBody","ProgressIconContainer","ProgressBarWrapper","SkillDisplayContainer","SkillPointsDisplay","skillProps","attributes","stamina","magic","magicResistance","strength","resistance","dexterity","combat","first","club","sword","axe","distance","shielding","dagger","crafting","fishing","farming","mining","lumberjacking","blacksmithing","cooking","alchemy","skillNameMap","SkillsContainer","onRenderSkillCategory","category","skillCategory","skillCategoryColor","output","_Object$entries","entries","_Object$entries$_i","skillDetails","SkillsDraggableContainer","SkillsContainerDiv","SkillSplitDiv","experience","getXPForLevel","formatSpellCastingType","castingType","formattedCastingType","SpellInfo","spell","requiredItem","maxDistanceGrid","SpellInfoDisplay","MobileSpellTooltip","MagicTooltip","SpellInfoWrapper","_ref$holdTouchDuratio","holdTouchDuration","touchTimeoutRef","handleTouchStart","handleTouchEnd","spellKey","charMana","charMagicLevel","isSettingShortcut","activeCooldown","minMagicLevelRequired","Overlay","SpellImage","_spell$texturePath","Info","Divider","Cost","Spellbook","onInputFocus","onInputBlur","spells","magicLevel","onSpellClick","setSpellShortcut","iconAtlasIMG","iconAtlasJSON","search","setSearch","spellsToDisplay","toLocaleLowerCase","setShortcut","SpellList","Fragment","Stepper","steps","finalCTAButton","onError","_ref$useSideArrows","useSideArrows","currentStep","setCurrentStep","currentComponent","_steps$currentStep","component","totalSteps","onStepChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_steps$currentStep2","isValid","wrap","_callee$","_context","next","validate","sent","errorMessage","abrupt","t0","stop","_x","renderArrows","leftArrow","rightArrow","StepperContainer","StepperTop","ProgressIndicator","isActive","stepperProgressColor","StepperBodyContainer","StepperBody","StepperFooter","TextArea","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","_periodOfDaySrcFiles","PeriodOfDay","Morning","MorningGif","Afternoon","AfternoonGif","Night","NightGif","GifContainer","TimeWidget","TimeClock","WidgetContainer","DayNightContainer","Time","ClockWidgetImg","PremiumLabel","accountType","UserAccountTypes","Free","getBackgroundColor","PremiumBronze","PremiumSilver","PremiumGold","PremiumUltimate","getShortLabel","StyledLabel","backgroundColor","outerQty","TradingItemRow","onQuantityChange","traderItem","selectedQty","isBuy","inputQty","setInputQty","handleQuantityChange","newQty","_traderItem$stackQty","handleBlur","_traderItem$stackQty2","renderAccountTypeIndicator","canBePurchasedOnlyByPremiumPlans","ItemWrapper","ItemNameContainer","NameValue","capitalize","StyledArrow","QuantityInput","useTradingGold","characterAvailableGold","traderItems","sum","setSum","Map","qtyMap","setQtyMap","hasGoldForSale","getFinalGold","getTradeItems","get","updateQuantity","set","newSum","TradingMenu","_useTradingGold","ScrollWrapper","tradeItem","_qtyMap$get","InfoSection","GoldInfo","AlertText","Truncate","ZoomableImage","isZoomed","setIsZoomed","zoomPosition","setZoomPosition","_e$currentTarget$getB","currentTarget","handleTouchMove","_e$currentTarget$getB2","handleZoomToggle","onMouseMove","onTouchMove","objectFit","transformOrigin","transition","cursor","TutorialStepper","lessons","onLessonFinish","imageStyle","generateLessons","lesson","LessonContainer","LessonTitle","LessonImageWrapper","LessonImage","imageUrl","href","rel","LessonFooter","LessonBody","dangerouslySetInnerHTML","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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