@rpg-engine/long-bow 0.6.76 → 0.6.78

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.cjs.development.js","sources":["../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/Arrow/SelectArrow.tsx","../src/components/shared/Ellipsis.tsx","../src/components/PropertySelect/PropertySelect.tsx","../src/components/Character/CharacterSelection.tsx","../src/components/shared/Column.tsx","../src/components/Chat/Chat.tsx","../src/components/Input.tsx","../src/components/RPGUI/RPGUIContainer.tsx","../src/components/Chatdeprecated/ChatDeprecated.tsx","../src/components/ChatRevamp/SearchCharacter.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/useOutsideAlerter.ts","../src/components/DraggableContainer.tsx","../src/components/InputRadio.tsx","../src/libs/itemCounter.ts","../src/components/Abstractions/ModalPortal.tsx","../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/RelativeListMenu.tsx","../src/components/Item/Cards/MobileItemTooltip.tsx","../src/components/Item/Inventory/ItemSlotTooltips.tsx","../src/components/Item/Inventory/context/DraggingContext.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../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/ItemInfoWrapper.tsx","../src/components/CraftBook/CraftingRecipe.tsx","../src/components/CraftBook/CraftBook.tsx","../src/components/Dropdown.tsx","../src/components/DropdownSelectorContainer.tsx","../src/hooks/useCursorPosition.ts","../src/components/Item/Inventory/DraggedItem.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/Abstractions/SlotsContainer.tsx","../src/hooks/useScrollOnDrag.ts","../src/components/Shortcuts/ShortcutsSetter.tsx","../src/components/RangeSlider.tsx","../src/components/Item/Inventory/ItemQuantitySelector.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/QuestInfo/QuestInfo.tsx","../src/components/RPGUI/RPGUIScrollbar.tsx","../src/components/RPGUI/RPGUIOverrides.tsx","../src/components/RPGUI/RPGUIRoot.tsx","../src/components/shared/SimpleTooltip.tsx","../src/components/QuestList.tsx","../src/components/RadioButton.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/TableTab/TableTab.tsx","../src/components/TextArea.tsx","../src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx","../src/components/TimeWidget/TimeWidget.tsx","../src/components/TradingMenu/TradingItemRow.tsx","../src/components/TradingMenu/TradingMenu.tsx","../src/components/Truncate.tsx","../src/components/Image/ZoomableImage.tsx","../src/components/Tutorial/TutorialStepper.tsx"],"sourcesContent":["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';\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}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n onPointerDown,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow\n size={size}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></RightArrow>\n )}\n </>\n );\n};\n\ninterface IArrowProps {\n size?: 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 :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 :active {\n background-image: url(${RightArrowClickIcon});\n }\n z-index: 2;\n`;\n\nexport default SelectArrow;\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 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 dayjs from 'dayjs';\nimport React, { useEffect, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { RxPaperPlane } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { ChatMessage } from '../ChatRevamp/ChatRevamp';\nimport { Column } from '../shared/Column';\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}\n\nexport const Chat: React.FC<IChatProps> = ({\n chatMessages,\n onSendChatMessage,\n onFocus,\n onBlur,\n styles = {\n textColor: '#c65102',\n buttonColor: '#005b96',\n buttonBackgroundColor: 'rgba(0,0,0,.2)',\n width: '80%',\n height: 'auto',\n },\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 if (!message || message.trim() === '') return;\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: ChatMessage[]) => {\n return chatMessages?.length ? (\n chatMessages?.map((chatMessage, index) => (\n <Message\n color={styles?.textColor || '#c65102'}\n key={`${chatMessage._id}_${index}`}\n >\n {onRenderMessageLines(\n chatMessage.emitter,\n chatMessage.createdAt as string,\n chatMessage.message\n )}\n </Message>\n ))\n ) : (\n <Message color={styles?.textColor || '#c65102'}>\n No messages available.\n </Message>\n );\n };\n\n return (\n <ChatContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n >\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n <MessagesContainer className=\"chat-body\">\n {onRenderChatMessages(chatMessages)}\n </MessagesContainer>\n\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <TextField\n value={message}\n id=\"inputMessage\"\n onChange={e => getInputValue(e.target.value)}\n height={20}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n autoFocus\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <Button\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 <RxPaperPlane size={15} />\n </Button>\n </Column>\n </Form>\n </ErrorBoundary>\n </ChatContainer>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\ninterface IMessageProps {\n color: string;\n}\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst ChatContainer = styled.div<IContainerProps>`\n height: ${props => props.height} !important;\n width: 100%;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n height: auto;\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 MessagesContainer = styled.div`\n height: 70%;\n margin-bottom: 10px;\n overflow-y: auto;\n`;\n\nconst Message = styled.div<IMessageProps>`\n margin-bottom: 8px;\n color: ${({ color }) => color};\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst Button = styled.button<IButtonProps>`\n color: ${({ buttonColor }) => buttonColor};\n background-color: ${({ buttonBackgroundColor }) => buttonBackgroundColor};\n width: 28px;\n height: 28px;\n border: none !important;\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 { IChatMessage } 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: IChatMessage[];\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: IChatMessage[]) => {\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 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 type { PrivateChatCharacter } from './ChatRevamp';\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 = (\n character: PrivateChatCharacter\n ) => {\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 onPointerDown={() => handleCharacterClick(character)} key={character._id}>\n {character.name}\n </ListElement>\n ))}\n </ListContainer>\n )}\n </SearchContainer>\n );\n};\n\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst SearchContainer = styled.div`\nwidth: 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\n\n","import {\n ICharacter,\n IChatMessage,\n IPrivateChatMessage,\n ITradeChatMessage,\n} from '@rpg-engine/shared';\nimport React, { useState } 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 { Chat, IStyles } from '../Chat/Chat';\nimport { SearchCharacter } from './SearchCharacter';\n\nexport type PrivateChatCharacter = Pick<ICharacter, '_id' | 'name'>;\n\nexport type ChatMessage =\n | IChatMessage\n | IPrivateChatMessage\n | ITradeChatMessage;\nexport interface IChatRevampProps {\n chatMessages: ChatMessage[];\n onSendGlobalChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n styles?: IStyles;\n tabs: { label: string; id: string }[];\n activeTab: string;\n onChangeTab: (tabId: string) => void;\n privateChatCharacters?: PrivateChatCharacter[];\n onChangeCharacterName: (characterName: string) => void;\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n onSendPrivateChatMessage: (message: string) => void;\n recentChatCharacters?: PrivateChatCharacter[];\n recentSelectedChatCharacterId?: string;\n onPreviousChatCharacterClick?: (character: PrivateChatCharacter) => void;\n onRemoveRecentChatCharacter?: (character: PrivateChatCharacter) => void;\n unseenMessageCharacterIds?: string[];\n onSendTradeMessage: (message: string) => void;\n searchCharacterUI: boolean;\n hideSearchCharacterUI: () => void;\n showSearchCharacterUI: () => void;\n}\n\nexport const ChatRevamp = ({\n chatMessages,\n onSendGlobalChatMessage,\n onChangeCharacterName,\n onFocus,\n onBlur,\n onCloseButton,\n styles,\n tabs,\n onChangeTab,\n activeTab,\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}: IChatRevampProps) => {\n const [showRecentChats, setShowRecentChats] = useState(false);\n\n const isPrivate = activeTab === 'private';\n const isTrade = activeTab === 'trade';\n\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n if (!onPreviousChatCharacterClick) return;\n onPreviousChatCharacterClick(character);\n hideSearchCharacterUI();\n };\n\n return (\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 <PrivateChatContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n >\n <RecentChatTabContainer isPrivate={isPrivate} isOpen={showRecentChats}>\n <RecentChatTopBar isOpen={showRecentChats}>\n <BurgerIconContainer\n onPointerDown={() => setShowRecentChats(t => !t)}\n hasUnseenMessages={unseenMessageCharacterIds?.length > 0 || false}\n >\n <BurgerLineIcon></BurgerLineIcon>\n <BurgerLineIcon></BurgerLineIcon>\n <BurgerLineIcon></BurgerLineIcon>\n </BurgerIconContainer>\n {showRecentChats && (\n <SearchButton onPointerDown={() => showSearchCharacterUI()}>\n <RxMagnifyingGlass size={16} color={uiColors.white} />\n </SearchButton>\n )}\n </RecentChatTopBar>\n\n <RecentChatLogContainer isOpen={showRecentChats}>\n {recentChatCharacters?.map(character => (\n <ListElementContainer key={character._id}>\n <ListElement\n active={character._id === recentSelectedChatCharacterId}\n onPointerDown={() =>\n handlePreviousChatCharacterClick(character)\n }\n >\n <StatusDot\n isUnseen={\n unseenMessageCharacterIds?.includes(character._id) ||\n false\n }\n />\n {character.name}\n </ListElement>\n <CloseButton\n onPointerDown={() => onRemoveRecentChatCharacter?.(character)}\n >\n <RxCross2 size={16} />\n </CloseButton>\n </ListElementContainer>\n ))}\n </RecentChatLogContainer>\n </RecentChatTabContainer>\n {isPrivate && searchCharacterUI ? (\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 <Chat\n chatMessages={chatMessages}\n onSendChatMessage={\n isPrivate\n ? onSendPrivateChatMessage\n : isTrade\n ? onSendTradeMessage\n : onSendGlobalChatMessage\n }\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n )}\n </PrivateChatContainer>\n </>\n );\n};\n\nconst TabContainer = styled.div`\n width: 100%;\n display: flex;\n gap: 10px;\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\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 => (props.active ? '#c65102' : uiColors.gray)};\n\n background-color: ${props =>\n props.active ? uiColors.orange : 'transparent'};\n color: ${props => (props.active ? 'white' : uiColors.raisinBlack)};\n`;\n\nconst PrivateChatContainer = styled.div<{ width: string; height: string }>`\n width: ${({ width }) => width};\n min-height: ${({ height }) => height} !important;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n height: auto;\n display: flex;\n gap: 10px;\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 ? '20%' : '30px')} !important;\n transition: width 0.3s ease-in-out;\n overflow: hidden;\n\n @media (max-width: 768px) {\n width: ${props => (props.isOpen ? '40%' : '30px')} !important;\n }\n`;\n\nconst RecentChatTopBar = styled.div<{ isOpen: boolean }>`\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 30px;\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 border: none;\n list-style: none;\n display: flex;\n opacity: ${props => (props.isOpen ? 1 : 0)};\n flex-direction: column;\n gap: 0.5rem;\n transition: opacity 0.3s ease-in-out;\n padding: 0;\n margin: 0;\n flex: 1;\n`;\n\nconst ListElementContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nconst ListElement = styled.button<{ active: boolean }>`\n margin: 0.5rem 0 !important;\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`;\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 &:hover {\n background-color: ${uiColors.white};\n color: ${uiColors.red};\n }\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","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 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 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 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 isFullScreen?: boolean;\n opacity?: number;\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 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`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.xsmall};\n width: ${(props: ICustomIconProps) => props.width};\n margin-right: 0.5rem;\n`;\n","import React from 'react';\n\ninterface IProps\n extends React.DetailedHTMLProps<\n React.InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n > {\n label: string;\n name: string;\n value: string;\n isChecked: boolean;\n onRadioSelect: (value: string) => void;\n}\n\nexport const InputRadio: React.FC<IProps> = ({\n label,\n name,\n value,\n isChecked,\n onRadioSelect,\n}) => {\n const onRadioClick = (): void => {\n onRadioSelect(value);\n };\n\n return (\n <div onPointerUp={onRadioClick}>\n <input\n className=\"rpgui-radio\"\n name={name}\n value={value}\n type=\"radio\"\n data-rpguitype=\"radio\"\n checked={isChecked}\n // rpgui breaks onChange on this input (doesn't work). That's why I had to wrap it with a div and a onClick listener.\n readOnly\n ></input>\n <label>{label}</label>\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};","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 { 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 console.log(item.attachedGems);\n\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 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, { 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 from 'react';\nimport { IPosition } from '../../../types/eventTypes';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { MobileItemTooltip } from '../Cards/MobileItemTooltip';\nimport { IContextMenuItem } from './itemContainerHelper';\n\ninterface IProps {\n isTooltipVisible: boolean;\n isFocused: boolean;\n isContextMenuVisible: boolean;\n isContextMenuDisabled: boolean;\n item: IItem | null;\n isTooltipMobileVisible: boolean;\n contextActions: IContextMenuItem[];\n contextMenuPosition: IPosition;\n dragScale: number | undefined;\n setIsContextMenuVisible: (visible: boolean) => void;\n setIsTooltipMobileVisible: (visible: boolean) => void;\n setIsTooltipVisible: (visible: boolean) => void;\n onSelected?: (optionId: string, item: IItem) => void;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n}\n\nexport const ItemSlotToolTips = ({\n isTooltipVisible,\n isFocused,\n isContextMenuVisible,\n isContextMenuDisabled,\n item,\n contextActions,\n contextMenuPosition,\n dragScale,\n setIsContextMenuVisible,\n setIsTooltipMobileVisible,\n isTooltipMobileVisible,\n onSelected,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n}: IProps): JSX.Element => {\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 setIsTooltipMobileVisible(false);\n }}\n scale={dragScale}\n options={contextActions}\n onSelected={(optionId: string) => {\n setIsContextMenuVisible(false);\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n />\n )}\n\n {!isContextMenuDisabled && isContextMenuVisible && contextActions && (\n <RelativeListMenu\n options={contextActions}\n onSelected={(optionId: string) => {\n setIsContextMenuVisible(false);\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n onOutsideClick={() => {\n setIsContextMenuVisible(false);\n }}\n pos={contextMenuPosition}\n />\n )}\n </>\n );\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React, { createContext, useContext, useState } from 'react';\n\nconst DraggingContext = createContext<{\n item: IItem | null;\n setDraggingItem: React.Dispatch<React.SetStateAction<IItem | null>>;\n}>({\n item: null,\n setDraggingItem: () => {},\n});\n\nexport const useDragging = () => useContext(DraggingContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const DraggingProvider = ({ children }: IProps) => {\n const [item, setDraggingItem] = useState<IItem | null>(null);\n\n return (\n <DraggingContext.Provider value={{ item, setDraggingItem }}>\n {children}\n </DraggingContext.Provider>\n );\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\n ItemContainerType,\n ItemSlotType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport styled from 'styled-components';\nimport { IPosition } from '../../../types/eventTypes';\nimport { rarityColor } from './ItemSlotRarity';\nimport { ItemSlotRenderer } from './ItemSlotRenderer';\nimport { ItemSlotToolTips } from './ItemSlotTooltips';\nimport { useDragging } from './context/DraggingContext';\nimport { IContextMenuItem, generateContextMenu } from './itemContainerHelper';\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 onSelected?: (selectedOption: string, item: IItem) => void;\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 onSelected,\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 equipmentSet,\n setItemShortcut,\n isDepotSystem,\n }) => {\n const [isTooltipVisible, setTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n\n const [isContextMenuVisible, setIsContextMenuVisible] = useState(false);\n const [contextMenuPosition, setContextMenuPosition] = useState({\n x: 0,\n y: 0,\n });\n\n const [isFocused, setIsFocused] = useState(false);\n const [wasDragged, setWasDragged] = useState(false);\n const [dragPosition, setDragPosition] = useState<IPosition>({ x: 0, y: 0 });\n const [dropPosition, setDropPosition] = useState<IPosition | null>(null);\n const dragContainer = useRef<HTMLDivElement>(null);\n\n const { item: draggingItem, setDraggingItem } = useDragging();\n\n const [contextActions, setContextActions] = useState<IContextMenuItem[]>(\n []\n );\n\n useEffect(() => {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n\n if (item && containerType) {\n setContextActions(\n generateContextMenu(item, containerType, isDepotSystem)\n );\n }\n }, [item, isDepotSystem]);\n\n useEffect(() => {\n if (onDrop && item && dropPosition) {\n onDrop(item, dropPosition);\n }\n }, [dropPosition]);\n\n const resetItem = () => {\n setTooltipVisible(false);\n setWasDragged(false);\n };\n\n const onSuccessfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n } else if (item) {\n onDragEnd?.(quantity);\n }\n };\n\n const onDraggableStop: DraggableEventHandler = (e, data) => {\n setDraggingItem(null);\n\n const target = e.target as HTMLElement;\n\n if (target?.id.includes('shortcutSetter') && setItemShortcut && item) {\n const index = parseInt(target.id.split('_')[1]);\n if (!isNaN(index)) {\n setItemShortcut(item, index);\n }\n }\n\n // remove the class react-draggable-dragging from the element\n // to prevent the item from being dragged again\n\n target.classList.remove('react-draggable-dragging');\n\n if (wasDragged && item && !isSelectingShortcut) {\n //@ts-ignore\n const classes: string[] = Array.from(e.target?.classList);\n\n const isOutsideDrop =\n classes.some(elm => {\n return elm.includes('rpgui-content');\n }) || classes.length === 0;\n\n if (isOutsideDrop) {\n setDropPosition({\n x: data.x,\n y: data.y,\n });\n }\n\n setWasDragged(false);\n\n const target = dragContainer.current;\n if (!target || !wasDragged) return;\n\n const style = window.getComputedStyle(target);\n const matrix = new DOMMatrixReadOnly(style.transform);\n const x = matrix.m41;\n const y = matrix.m42;\n\n setDragPosition({ x, y });\n\n setTimeout(() => {\n if (checkIfItemCanBeMoved?.()) {\n if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;\n\n if (item.stackQty && item.stackQty !== 1 && openQuantitySelector)\n openQuantitySelector(item.stackQty, onSuccessfulDrag);\n else onSuccessfulDrag(item.stackQty);\n } else {\n resetItem();\n setIsFocused(false);\n setDragPosition({ x: 0, y: 0 });\n }\n }, 50);\n } else if (item) {\n let isTouch = false;\n if (\n !isContextMenuDisabled &&\n e.type === 'touchend' &&\n !isSelectingShortcut\n ) {\n isTouch = true;\n setIsTooltipMobileVisible(true);\n }\n\n if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) {\n setIsContextMenuVisible(!isContextMenuVisible);\n const event = e as MouseEvent;\n\n if (event.clientX && event.clientY) {\n setContextMenuPosition({\n x: event.clientX - 10,\n y: event.clientY - 5,\n });\n }\n }\n\n onPointerDown(item.type, containerType ?? null, item);\n }\n };\n\n const onDraggableStart: DraggableEventHandler = () => {\n if (!item || isSelectingShortcut) {\n return;\n }\n\n if (onDragStart && containerType) {\n onDragStart(item, slotIndex, containerType);\n }\n };\n\n const onDraggableProgress: DraggableEventHandler = (_e, data) => {\n if (\n Math.abs(data.x - dragPosition.x) > 5 ||\n Math.abs(data.y - dragPosition.y) > 5\n ) {\n setWasDragged(true);\n setIsFocused(true);\n }\n\n if (!draggingItem) {\n setDraggingItem(item);\n }\n };\n\n return (\n <Container\n isDraggingItem={!!draggingItem}\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={dragPosition}\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 setTooltipVisible(true);\n }}\n onMouseLeave={() => {\n setTooltipVisible(false);\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\n <ItemSlotToolTips\n isTooltipVisible={isTooltipVisible}\n isTooltipMobileVisible={isTooltipMobileVisible}\n setIsTooltipMobileVisible={setIsTooltipMobileVisible}\n isFocused={isFocused}\n isContextMenuVisible={isContextMenuVisible}\n isContextMenuDisabled={isContextMenuDisabled}\n item={item}\n contextActions={contextActions}\n contextMenuPosition={contextMenuPosition}\n dragScale={dragScale}\n setIsContextMenuVisible={setIsContextMenuVisible}\n onSelected={(optionId: string, item: IItem) => {\n setIsContextMenuVisible(false);\n if (onSelected) onSelected(optionId, item);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n setIsTooltipVisible={setTooltipVisible}\n />\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 is 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,\n}) => `0 0 4px 3px ${rarityColor(item)}`};\n //background-color: ${({ item }) => 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, { 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 {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\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\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 modifyString = (str: string) => {\n // Split the string by \"/\" and \".\"\n let parts = str.split('/');\n let fileName = parts[parts.length - 1];\n parts = fileName.split('.');\n let name = parts[0];\n\n // Replace all occurrences of \"-\" with \" \"\n name = name.replace(/-/g, ' ');\n\n // Uppercase the first word\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 name = modifiedWords.join(' ');\n\n return name;\n };\n\n const levelInSkill =\n (skills?.[\n (recipe?.minCraftingRequirements?.[0] ?? '') as keyof ISkill\n ] as any)?.level ?? 1;\n\n return (\n <RadioOptionsWrapper>\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 <div>\n <div onPointerUp={recipe.canCraft ? handleRecipeSelect : undefined}>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={recipe.name}\n name=\"test\"\n disabled={!recipe.canCraft}\n checked={selectedCraftItemKey === recipe.key}\n onChange={handleRecipeSelect}\n />\n <label style={{ display: 'flex', alignItems: 'center' }}>\n {modifyString(recipe.name)}\n </label>\n </div>\n\n <MinCraftingRequirementsText levelIsOk={recipe?.levelIsOk ?? false}>\n {modifyString(`${recipe?.minCraftingRequirements?.[0] ?? ''}`)} lvl{' '}\n {recipe?.minCraftingRequirements?.[1] ?? 0} ({levelInSkill})\n </MinCraftingRequirementsText>\n\n {recipe.ingredients.map((ingredient, index) => {\n const itemQtyInInventory = !inventory\n ? 0\n : countItemFromInventory(ingredient.key, inventory);\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={ingredient.qty <= itemQtyInInventory}>\n {modifyString(ingredient.key)} x{ingredient.qty} (\n {itemQtyInInventory})\n </Ingredient>\n </Recipe>\n );\n })}\n </div>\n </RadioOptionsWrapper>\n );\n};\n\nconst Ingredient = styled.p<{ isQuantityOk: boolean }>`\n margin: 0;\n margin-left: 14px;\n color: ${({ isQuantityOk }) =>\n isQuantityOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nconst Recipe = styled.div`\n font-size: 0.6rem;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n margin-left: 4px;\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\n }\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 MinCraftingRequirementsText = styled.p<{ levelIsOk: boolean }>`\n font-size: 0.6rem !important;\n margin: 0 5px 0 35px;\n color: ${({ levelIsOk }) =>\n levelIsOk ? uiColors.lightGreen : uiColors.lightGray} !important;\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 styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { InputRadio } from '../InputRadio';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { CraftingRecipe } from './CraftingRecipe';\n\nexport interface IItemCraftSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onSelect: (value: string) => void;\n onCraftItem: (value: string | undefined) => 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\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\n const [isCraftingDisabled, setIsCraftingDisabled] = useState(false);\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 renderItemTypes = () => {\n const itemTypes = ['Suggested', ...Object.keys(ItemSubType)]\n .filter(type => type !== 'DeadBody')\n .sort((a, b) => {\n if (a === 'Suggested') return -1;\n if (b === 'Suggested') return 1;\n return a.localeCompare(b);\n });\n\n if (window.innerWidth > parseInt(mobilePortrait.width)) {\n return itemTypes.map(type => {\n return (\n <InputRadio\n key={type}\n value={type}\n label={type}\n name={type}\n isChecked={selectedType === type}\n onRadioSelect={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n />\n );\n });\n }\n\n const rows: JSX.Element[][] = [[], []];\n\n itemTypes.forEach((type, index) => {\n let row = 0;\n\n if (index % 2 === 1) row = 1;\n\n rows[row].push(\n <InputRadio\n key={type}\n value={type}\n label={type}\n name={type}\n isChecked={selectedType === type}\n onRadioSelect={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n />\n );\n });\n\n return rows.map((row, index) => (\n <div key={index} style={{ display: 'flex', gap: '10px' }}>\n {row}\n </div>\n ));\n };\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={() => {\n if (onClose) {\n onClose();\n }\n }}\n scale={scale}\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Craftbook</Title>\n <Subtitle>Select an item to craft</Subtitle>\n <hr className=\"golden\" />\n </div>\n\n <ContentContainer>\n <ItemTypes className=\"inputRadioCraftBook\">\n {renderItemTypes()}\n </ItemTypes>\n\n <RadioInputScroller className=\"inputRadioCraftBook\">\n {craftablesItems?.map(item => (\n <CraftingRecipe\n key={item.key}\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 ))}\n </RadioInputScroller>\n </ContentContainer>\n <ButtonWrapper>\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 onCraftItem(craftItemKey);\n setIsCraftingDisabled(true);\n\n setTimeout(() => {\n setIsCraftingDisabled(false);\n }, 2000);\n }}\n >\n Craft\n </Button>\n </ButtonWrapper>\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\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Subtitle = styled.h1`\n font-size: 0.4rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst RadioInputScroller = styled.div`\n padding-left: 15px;\n padding-top: 10px;\n margin-top: 1rem;\n align-items: center;\n align-items: flex-start;\n overflow-y: scroll;\n min-height: 0;\n flex: 1;\n margin-left: 10px;\n -webkit-overflow-scrolling: touch;\n\n @media (max-width: ${mobilePortrait.width}) {\n margin-left: 0;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: flex-end;\n margin-top: 10px;\n width: 100%;\n\n button {\n padding: 0px 50px;\n margin: 5px;\n }\n\n @media (max-width: ${mobilePortrait.width}) {\n justify-content: center;\n }\n`;\n\nconst ContentContainer = styled.div`\n display: flex;\n width: 100%;\n min-height: 0;\n flex: 1;\n\n @media (max-width: ${mobilePortrait.width}) {\n flex-direction: column;\n }\n`;\n\nconst ItemTypes = styled.div`\n display: flex;\n overflow-y: scroll;\n overflow-x: hidden;\n width: max-content;\n flex-direction: column;\n padding-right: 5px;\n\n @media (max-width: ${mobilePortrait.width}) {\n overflow-x: scroll;\n overflow-y: hidden;\n padding-right: 0;\n width: 100%;\n }\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 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 { useDragging } from './context/DraggingContext';\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 { item } = useDragging();\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\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 DraggedItem from '../Item/Inventory/DraggedItem';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { DraggingProvider } from '../Item/Inventory/context/DraggingContext';\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 onSelected={(optionId: string) => {\n if (onSelected) onSelected(optionId);\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 <DraggingProvider>\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>{onRenderEquipmentSlotRange(0, 3)}</EquipmentColumn>\n <EquipmentColumn>{onRenderEquipmentSlotRange(3, 7)}</EquipmentColumn>\n <EquipmentColumn>{onRenderEquipmentSlotRange(7, 10)}</EquipmentColumn>\n </EquipmentSetContainer>\n </DraggableContainer>\n </DraggingProvider>\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`;\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 { TableTab, 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 <TableTab\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 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 { Input } from '../../Input';\nimport {\n RPGUIContainer,\n RPGUIContainerTypes,\n} from '../../RPGUI/RPGUIContainer';\nimport { RangeSlider, RangeSliderType } from '../../RangeSlider';\n\nexport interface IItemQuantitySelectorProps {\n quantity: number;\n onConfirm: (quantity: number) => void;\n onClose: () => void;\n}\n\nexport const ItemQuantitySelector: React.FC<IItemQuantitySelectorProps> = ({\n quantity,\n onConfirm,\n onClose,\n}) => {\n const [value, setValue] = useState(quantity);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n\n const closeSelector = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose();\n }\n };\n\n document.addEventListener('keydown', closeSelector);\n\n return () => {\n document.removeEventListener('keydown', closeSelector);\n };\n }\n\n return () => {};\n }, []);\n\n return (\n <StyledContainer type={RPGUIContainerTypes.Framed} width=\"25rem\">\n <CloseButton className=\"container-close\" onPointerDown={onClose}>\n X\n </CloseButton>\n <h2>Select quantity to move</h2>\n <StyledForm\n style={{ width: '100%' }}\n onSubmit={e => {\n e.preventDefault();\n\n const numberValue = Number(value);\n\n if (Number.isNaN(numberValue)) {\n return;\n }\n\n onConfirm(Math.max(1, Math.min(quantity, numberValue)));\n }}\n noValidate\n >\n <StyledInput\n innerRef={inputRef}\n placeholder=\"Enter quantity\"\n type=\"number\"\n min={1}\n max={quantity}\n value={value}\n onChange={e => {\n if (Number(e.target.value) >= quantity) {\n setValue(quantity);\n return;\n }\n\n setValue((e.target.value as unknown) as number);\n }}\n onBlur={e => {\n const newValue = Math.max(\n 1,\n Math.min(quantity, Number(e.target.value))\n );\n\n setValue(newValue);\n }}\n />\n <RangeSlider\n type={RangeSliderType.Slider}\n valueMin={1}\n valueMax={quantity}\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 display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nconst StyledForm = styled.form`\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n`;\nconst StyledInput = styled(Input)`\n text-align: center;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n -moz-appearance: textfield;\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: 0.8rem;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemQuantitySelector } from './ItemQuantitySelector';\n\nexport interface IQuantitySelect {\n isOpen: boolean;\n maxQuantity: number;\n callback: (_quantity: number) => void;\n}\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nexport const ItemQuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps) => {\n return (\n <ModalPortal>\n <QuantitySelectorContainer>\n <ItemQuantitySelector\n quantity={quantitySelect.maxQuantity}\n onConfirm={quantity => {\n quantitySelect.callback(quantity);\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\n }}\n onClose={() => {\n quantitySelect.callback(-1);\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\n IShortcut,\n ItemContainerType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, 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 { DraggedItem } from './DraggedItem';\nimport { ItemQuantitySelectorModal } from './ItemQuantitySelectorModal';\nimport { ItemSlot } from './ItemSlot';\nimport { DraggingProvider } from './context/DraggingContext';\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> = ({\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 = (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\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('pointerup', () => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n });\n }, [handleMouseMove, onItemDragStart, stopScrolling]);\n\n const onDragEndScrollingEvents = useCallback(() => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n }, [handleMouseMove, onItemDragStart, stopScrolling]);\n\n const onDragStart: onDragStart = (item, slotIndex, itemContainerType) => {\n console.log('DRAG START');\n if (onItemDragStart) {\n onItemDragStart(item, slotIndex, itemContainerType);\n }\n\n onDragStartScrollingEvents();\n };\n\n const onDragEnd: onDragEnd = quantity => {\n console.log('DRAG END');\n if (onItemDragEnd) {\n onItemDragEnd(quantity);\n }\n onDragEndScrollingEvents();\n };\n\n const onRenderSlots = () => {\n const slots = [];\n\n for (let i = 0; i < itemContainer.slotQty; i++) {\n slots.push(\n <ItemSlot\n isContextMenuDisabled={disableContextMenu}\n key={i}\n slotIndex={i}\n item={itemContainer.slots?.[i] || null}\n itemContainerType={type}\n onMouseOver={(event, slotIndex, item) => {\n if (onMouseOver) onMouseOver(event, slotIndex, item);\n }}\n onPointerDown={(itemType, containerType, item) => {\n if (settingShortcutIndex !== -1) {\n setSettingShortcutIndex(-1);\n\n handleSetShortcut(item, settingShortcutIndex);\n } else if (onItemClick) onItemClick(item, itemType, containerType);\n }}\n onSelected={(optionId: string, item: IItem) => {\n if (onSelected) onSelected(optionId, item);\n }}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\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 ? handleSetShortcut : undefined\n }\n isDepotSystem={isDepotSystem}\n />\n );\n }\n return slots;\n };\n\n return (\n <DraggingProvider>\n <DraggedItem atlasIMG={atlasIMG} atlasJSON={atlasJSON} scale={scale} />\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 </DraggingProvider>\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: scroll;\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 { 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 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 <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 />\n </RarityContainer>\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 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';\nimport { IStyles } from '../Chat/Chat';\n\ninterface IProps {\n id: string;\n children: React.ReactNode;\n styles?: IStyles;\n}\n\nexport const TabBody: React.FC<IProps> = ({ id, children, styles }) => {\n return (\n <Container styles={styles} data-tab-id={id}>\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n styles?: IStyles;\n}\n\nconst Container = styled.div<IContainerProps>`\n width: 100%;\n height: ${props => props.styles?.height || 'auto'};\n overflow-y: auto;\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 height?: string;\n className?: string;\n title?: string;\n imgSrc?: string;\n imgWidth?: string;\n };\n}\n\nexport const TabsContainer: React.FC<ITabsContainer> = ({\n children,\n onCloseButton,\n tabs,\n type = MultitabType.Brown,\n styles = {}, // default to an empty object to avoid undefined errors\n}) => {\n const [selectedTab, setSelectedTab] = useState(tabs[0].id); // by default the first one\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 return (\n <DraggableContainer\n onCloseButton={onCloseButton}\n type={onGetContainerType()}\n cancelDrag=\".tabs-container *\" // Disable drag on all elements inside .tabs-container\n width={styles?.width} // use optional chaining\n height={styles?.height}\n className={styles?.className}\n title={styles?.title}\n imgSrc={styles?.imgSrc}\n imgWidth={styles?.imgWidth}\n >\n {onRenderTabs()}\n <BodyContainer\n selectedTab={selectedTab}\n className={`${type} tabs-container`}\n >\n {children}\n </BodyContainer>\n </DraggableContainer>\n );\n};\n\ninterface IBodyContainer {\n selectedTab: string;\n}\n\nconst BodyContainer = styled.div<IBodyContainer>`\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","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 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 React, { ReactNode, useEffect, useRef, useState } from 'react';\nimport ReactDOM from 'react-dom';\nimport styled, { keyframes } from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { RPGUIRoot } from '../RPGUI/RPGUIRoot';\n\ninterface TooltipProps {\n content: string | ReactNode;\n direction?: 'top' | 'bottom' | 'left' | 'right';\n backgroundColor?: string;\n textColor?: string;\n children: ReactNode;\n showDelay?: number;\n hideDelay?: number;\n}\n\nexport const SimpleTooltip: React.FC<TooltipProps> = ({\n content,\n direction = 'top',\n backgroundColor = uiColors.raisinBlack,\n textColor = uiColors.white,\n children,\n showDelay = 200,\n hideDelay = 200,\n}) => {\n const [visible, setVisible] = useState(false);\n const [tooltipPosition, setTooltipPosition] = useState({ top: 0, left: 0 });\n const tooltipRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const timeoutRef = useRef<NodeJS.Timeout>();\n\n const calculatePosition = () => {\n if (!triggerRef.current || !tooltipRef.current) return;\n\n const triggerRect = triggerRef.current.getBoundingClientRect();\n const tooltipRect = tooltipRef.current.getBoundingClientRect();\n\n let top, left;\n\n switch (direction) {\n case 'top':\n top = triggerRect.top - tooltipRect.height - 8;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;\n break;\n case 'bottom':\n top = triggerRect.bottom + 8;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;\n break;\n case 'left':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;\n left = triggerRect.left - tooltipRect.width - 8;\n break;\n case 'right':\n top = triggerRect.top + (triggerRect.height - tooltipRect.height) / 2;\n left = triggerRect.right + 8;\n break;\n default:\n top = triggerRect.top - tooltipRect.height - 8;\n left = triggerRect.left + (triggerRect.width - tooltipRect.width) / 2;\n }\n\n // Ensure the tooltip stays within the viewport\n if (left < 8) left = 8;\n if (left + tooltipRect.width > window.innerWidth)\n left = window.innerWidth - tooltipRect.width - 8;\n if (top < 8) top = 8;\n if (top + tooltipRect.height > window.innerHeight)\n top = window.innerHeight - tooltipRect.height - 8;\n\n setTooltipPosition({ top: Math.round(top), left: Math.round(left) });\n };\n\n const showTooltip = () => {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n setVisible(true);\n calculatePosition();\n }, showDelay);\n };\n\n const hideTooltip = () => {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = setTimeout(() => {\n setVisible(false);\n }, hideDelay);\n };\n\n useEffect(() => {\n const handleMouseMove = (event: MouseEvent) => {\n if (visible && tooltipRef.current && triggerRef.current) {\n const tooltipRect = tooltipRef.current.getBoundingClientRect();\n const triggerRect = triggerRef.current.getBoundingClientRect();\n\n const isOutsideTooltip =\n event.clientX < tooltipRect.left ||\n event.clientX > tooltipRect.right ||\n event.clientY < tooltipRect.top ||\n event.clientY > tooltipRect.bottom;\n\n const isOutsideTrigger =\n event.clientX < triggerRect.left ||\n event.clientX > triggerRect.right ||\n event.clientY < triggerRect.top ||\n event.clientY > triggerRect.bottom;\n\n if (isOutsideTooltip && isOutsideTrigger) {\n hideTooltip();\n }\n }\n };\n\n const handleScroll = () => {\n if (visible) {\n hideTooltip();\n }\n };\n\n const handleResize = () => {\n if (visible) {\n calculatePosition();\n }\n };\n\n document.addEventListener('mousemove', handleMouseMove);\n window.addEventListener('scroll', handleScroll);\n window.addEventListener('resize', handleResize);\n\n return () => {\n document.removeEventListener('mousemove', handleMouseMove);\n window.removeEventListener('scroll', handleScroll);\n window.removeEventListener('resize', handleResize);\n clearTimeout(timeoutRef.current);\n };\n }, [visible]);\n\n return (\n <TooltipContainer\n ref={triggerRef}\n onMouseEnter={showTooltip}\n onMouseLeave={hideTooltip}\n onFocus={showTooltip}\n onBlur={hideTooltip}\n >\n {children}\n {visible &&\n ReactDOM.createPortal(\n <RPGUIRoot>\n <TooltipBox\n ref={tooltipRef}\n direction={direction}\n backgroundColor={backgroundColor}\n textColor={textColor}\n style={{ top: tooltipPosition.top, left: tooltipPosition.left }}\n >\n {content}\n </TooltipBox>\n </RPGUIRoot>,\n document.body\n )}\n </TooltipContainer>\n );\n};\n\nconst TooltipContainer = styled.div`\n display: inline-block;\n cursor: inherit;\n`;\n\nconst fadeIn = keyframes`\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\ninterface TooltipBoxProps {\n direction: 'top' | 'bottom' | 'left' | 'right';\n backgroundColor: string;\n textColor: string;\n}\n\nconst TooltipBox = styled.div<TooltipBoxProps>`\n position: fixed;\n z-index: 1000;\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${({ textColor }) => textColor};\n padding: 8px;\n border-radius: 4px;\n font-size: 0.65rem;\n max-width: 250px;\n box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);\n animation: ${fadeIn} 0.2s ease-out;\n line-height: 1.3;\n`;\n","import {\n IQuest,\n IQuestObjectiveInteraction,\n IQuestObjectiveKill,\n QuestStatus,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../constants/uiColors';\nimport { Table, TableCell, TableHeader, TableRow } from './Table/Table';\nimport { Ellipsis } from './shared/Ellipsis';\nimport { SimpleTooltip } from './shared/SimpleTooltip';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests }) => {\n return (\n <QuestListContainer>\n {quests && quests.length > 0 ? (\n <>\n <Table>\n <thead>\n <TableRow>\n <TableHeader>Status</TableHeader>\n <TableHeader>Title</TableHeader>\n <TableHeader>Description</TableHeader>\n <TableHeader>Objectives</TableHeader>\n <TableHeader>Rewards</TableHeader>\n </TableRow>\n </thead>\n <tbody>\n {quests.map((quest, i) => (\n <TableRow key={i}>\n <TableCell style={{ color: getStatusColor(quest.status) }}>\n {quest.status ?? 'Unknown'}\n </TableCell>\n <TableCell>\n <SimpleTooltip\n content={formatText(quest.title)}\n direction=\"bottom\"\n >\n <Ellipsis maxWidth=\"300px\">\n {formatText(quest.title)}\n </Ellipsis>\n </SimpleTooltip>\n </TableCell>\n <TableCell>\n <SimpleTooltip\n content={quest.description}\n direction=\"bottom\"\n >\n <Ellipsis maxWidth=\"300px\">{quest.description}</Ellipsis>\n </SimpleTooltip>\n </TableCell>\n <TableCell>\n <SimpleTooltip\n content={formatObjectives(quest.objectives)}\n direction=\"bottom\"\n >\n <Ellipsis maxWidth=\"300px\">\n {formatObjectives(quest.objectives)}\n </Ellipsis>\n </SimpleTooltip>\n </TableCell>\n <TableCell>\n <SimpleTooltip\n content={formatRewards(quest.rewards)}\n direction=\"bottom\"\n >\n <Ellipsis maxWidth=\"200px\">\n {formatRewards(quest.rewards)}\n </Ellipsis>\n </SimpleTooltip>\n </TableCell>\n </TableRow>\n ))}\n </tbody>\n </Table>\n </>\n ) : (\n <NoQuestContainer>\n <p>There are no ongoing quests</p>\n </NoQuestContainer>\n )}\n </QuestListContainer>\n );\n};\n\n// Updated helper function to format objectives\nconst formatObjectives = (\n objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]\n) => {\n try {\n if (!objectives || !Array.isArray(objectives)) return 'No objectives';\n return objectives\n .map(objective => {\n if ('killCountTarget' in objective) {\n const killObjective = objective as IQuestObjectiveKill;\n return `Kill ${formatText(\n killObjective.creatureKeys?.join(', ') ?? 'Unknown'\n )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??\n 0}`;\n } else if ('targetNPCkey' in objective) {\n const interactionObjective = objective as IQuestObjectiveInteraction;\n return `Interact with NPC: ${formatText(\n interactionObjective.targetNPCkey ?? 'Unknown'\n )}`;\n } else {\n return 'Unknown objective';\n }\n })\n .join('; ');\n } catch (error) {\n console.error('Error formatting objectives:', error);\n return 'Error formatting objectives';\n }\n};\n\n// Updated helper function to format rewards\nconst formatRewards = (rewards: IQuest['rewards']) => {\n try {\n if (!rewards || !Array.isArray(rewards)) return 'No rewards';\n\n return rewards\n .map(reward => {\n const itemKeysFormatted = reward?.itemKeys\n ?.map(itemKey =>\n itemKey && reward?.qty !== undefined\n ? `${itemKey} x${reward.qty}`\n : ''\n )\n .filter(Boolean)\n .join(', ');\n\n const spellKeysFormatted = reward?.spellKeys\n ?.filter(Boolean)\n .join(', ');\n\n const formattedReward = itemKeysFormatted\n ? `${formatText(itemKeysFormatted)}`\n : '';\n\n if (spellKeysFormatted) {\n return formattedReward\n ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`\n : `Spells: ${formatText(spellKeysFormatted)}`;\n }\n\n return formattedReward || 'No rewards';\n })\n .filter(Boolean)\n .join('; ');\n } catch (error) {\n console.error(\n `Error formatting rewards: ${JSON.stringify(rewards)}:`,\n error\n );\n return 'Error on rewards';\n }\n};\n\nconst formatText = (text: string) => {\n return text\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n};\n\nconst getStatusColor = (status?: QuestStatus) => {\n switch (status) {\n case QuestStatus.Pending:\n return uiColors.orange; // Orange\n case QuestStatus.InProgress:\n return uiColors.blue; // Deep Sky Blue\n case QuestStatus.Completed:\n return uiColors.lightGreen; // Lime Green\n default:\n return uiColors.white; // Default to white\n }\n};\n\nconst QuestListContainer = styled.div`\n margin-top: 20px;\n margin-bottom: 40px;\n overflow-y: auto;\n max-height: 400px;\n background-color: ${uiColors.darkGray};\n padding: 20px;\n border-radius: 10px;\n border: 1px solid ${uiColors.gray};\n font-size: 0.7rem;\n`;\n\nconst NoQuestContainer = styled.div`\n text-align: center;\n p {\n margin-top: 5px;\n color: ${uiColors.lightGray};\n }\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 {\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 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>(+{buffAndDebuff}%)</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>({buffAndDebuff}%)</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, { 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}\n\nexport const SpellInfoWrapper: React.FC<ISpellInfoWrapperProps> = ({\n children,\n spell,\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 <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};\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, { 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 TableTab: 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';\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 scale={scale}>\n <WidgetContainer>\n <CloseButton onPointerDown={onClose}>X</CloseButton>\n <DayNightContainer>\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 {\n getItemTextureKeyPath,\n IEquipmentSet,\n ITradeResponseItem,\n UserAccountTypes,\n} from '@rpg-engine/shared';\nimport capitalize from 'lodash/capitalize';\nimport React 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';\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 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 if (accountType !== UserAccountTypes.Free) {\n let backgroundColor;\n let textColor = 'black';\n\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n backgroundColor = '#CD7F32';\n break;\n case UserAccountTypes.PremiumSilver:\n backgroundColor = '#C0C0C0';\n break;\n case UserAccountTypes.PremiumGold:\n backgroundColor = '#FFD700';\n break;\n case UserAccountTypes.PremiumUltimate:\n backgroundColor = '#002E99';\n break;\n default:\n return null;\n }\n\n return (\n <PremiumLabel\n backgroundColor={backgroundColor}\n textColor={textColor}\n key={accountType}\n >\n {capitalize(accountType) + ' PA'}\n </PremiumLabel>\n );\n }\n return null;\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.5}\n />\n </ItemInfoWrapper>\n </SpriteContainer>\n </ItemIconContainer>\n\n <ItemNameContainer>\n <NameValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"250px\">\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={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={onLeftClick.bind(null, outerQty)}\n />\n <StyledArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={onLeftClick}\n />\n <QuantityDisplay>\n <TextOverlay>\n <Item>{selectedQty}</Item>\n </TextOverlay>\n </QuantityDisplay>\n <StyledArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={onRightClick}\n />\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={onRightClick.bind(null, outerQty)}\n />\n </QuantityContainer>\n </ItemWrapper>\n );\n};\n\nconst PremiumLabel = styled.span<{\n backgroundColor: string;\n textColor: string;\n}>`\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${({ textColor }) => textColor};\n font-weight: bold;\n padding: 2px 5px;\n border-radius: 5px;\n margin-right: 5px;\n margin-bottom: 5px;\n display: inline-block;\n`;\n\nconst StyledArrow = styled(SelectArrow)`\n margin: 40px;\n`;\n\nconst ItemWrapper = styled.div`\n width: 100%;\n margin: auto;\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n padding: 0.5rem;\n`;\n\nconst ItemNameContainer = styled.div`\n flex: 60%;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n\n flex: 0 0 58px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0.5rem;\n`;\n\nconst NameValue = styled.div`\n p {\n font-size: 0.75rem;\n margin: 0;\n }\n`;\n\nconst Item = styled.span`\n color: white;\n text-align: center;\n z-index: 1;\n\n width: 100%;\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 QuantityContainer = styled.div<IContainerProps>`\n position: relative;\n display: flex;\n\n min-width: 100px;\n width: 40%;\n justify-content: center;\n align-items: center;\n\n flex: 40%;\n`;\n\nconst QuantityDisplay = styled.div`\n font-size: ${uiFonts.size.small};\n`;\n","import {\n IEquipmentSet,\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport React, { useState } 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';\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 [sum, setSum] = useState(0);\n const [qtyMap, setQtyMap] = useState(new Map());\n\n const onQuantityChange = (item: ITradeResponseItem, selectedQty: number) => {\n setQtyMap(new Map(qtyMap.set(item.key, selectedQty)));\n\n let newSum = 0;\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) newSum += qty * item.price;\n setSum(newSum);\n });\n };\n\n const isBuy = () => {\n return type == 'buy';\n };\n\n const hasGoldForSale = () => {\n if (isBuy()) {\n return !(sum > characterAvailableGold);\n }\n return true;\n };\n\n const getFinalGold = () => {\n if (isBuy()) {\n return characterAvailableGold - sum;\n } else {\n return characterAvailableGold + sum;\n }\n };\n\n const Capitalize = (word: string) => {\n return word[0].toUpperCase() + word.substring(1);\n };\n\n const onConfirmClick = () => {\n const items: ITradeRequestItem[] = [];\n\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) {\n items.push(Object.assign({}, item, { qty: qty }));\n }\n });\n\n onConfirm(items);\n };\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"600px\"\n cancelDrag=\"#TraderContainer\"\n scale={scale}\n >\n <>\n <div style={{ width: '100%' }}>\n <Title>{Capitalize(type)} Menu</Title>\n <hr className=\"golden\" />\n </div>\n <TradingComponentScrollWrapper id=\"TraderContainer\">\n {traderItems.map((tradeItem, index) => (\n <ItemWrapper key={`${tradeItem.key}_${index}`}>\n <TradingItemRow\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onQuantityChange={onQuantityChange}\n traderItem={tradeItem}\n selectedQty={qtyMap.get(tradeItem.key) ?? 0}\n equipmentSet={equipmentSet}\n scale={scale}\n isBuy={isBuy()}\n />\n </ItemWrapper>\n ))}\n </TradingComponentScrollWrapper>\n <GoldWrapper>\n <p>Available Gold:</p>\n <p>${characterAvailableGold.toFixed(2)}</p>\n </GoldWrapper>\n <TotalWrapper>\n <p>Total:</p>\n <p>${sum}</p>\n </TotalWrapper>\n {!hasGoldForSale() ? (\n <AlertWrapper>\n <p> Sorry, not enough money.</p>\n </AlertWrapper>\n ) : (\n <GoldWrapper>\n <p>Final Gold:</p>\n <p>${getFinalGold().toFixed(2)}</p>\n </GoldWrapper>\n )}\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onPointerDown={() => onConfirmClick()}\n >\n Confirm\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => onClose()}\n >\n Cancel\n </Button>\n </ButtonWrapper>\n </>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n z-index: 22;\n font-size: 0.6rem;\n color: yellow !important;\n`;\n\nconst TradingComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n`;\n\nconst ItemWrapper = styled.div`\n margin: auto;\n display: flex;\n justify-content: space-between;\n`;\n\nconst TotalWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n justify-content: space-between;\n height: 20px;\n p {\n color: white !important;\n }\n width: 100%;\n margin-left: 0.8rem;\n`;\n\nconst GoldWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n justify-content: space-between;\n height: 20px;\n p {\n color: yellow !important;\n }\n width: 100%;\n margin-left: 0.8rem;\n`;\n\nconst AlertWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n width: 100%;\n justify-content: center;\n height: 20px;\n p {\n color: red !important;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n padding-top: 20px;\n width: 100%;\n margin-top: 1rem;\n button {\n padding: 0px 50px;\n }\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":["uiColors","lightGray","gray","darkGray","darkYellow","yellow","orange","cardinal","red","darkRed","raisinBlack","navyBlue","purple","darkPurple","blue","darkBlue","brown","lightGreen","brownGreen","white","AsyncDropdown","_ref","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","React","Container","onMouseLeave","DropdownSelect","id","className","onPointerUp","prev","DropdownDisplay","DropdownLabel","BeatLoader","size","color","DropdownOptions","map","key","styled","span","withConfig","displayName","componentId","label","div","props","p","ul","uiFonts","xxsmall","xsmall","small","medium","large","xLarge","xxLarge","xxxLarge","ButtonTypes","Button","disabled","_ref$disabled","children","buttonType","onPointerDown","_objectWithoutPropertiesLoose","_excluded","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","scale","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","SelectArrow","direction","_ref$direction","LeftArrow","RightArrow","LeftArrowIcon","LeftArrowClickIcon","RightArrowIcon","RightArrowClickIcon","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","Column","flex","flexWrap","justifyContent","Chat","chatMessages","onSendChatMessage","onFocus","onBlur","_ref$styles","styles","textColor","buttonColor","buttonBackgroundColor","message","setMessage","scrollChatToBottom","scrollingElement","document","querySelector","scrollTop","scrollHeight","handleSubmit","event","preventDefault","trim","getInputValue","onRenderMessageLines","emitter","createdAt","dayjs","Date","format","onRenderChatMessages","chatMessage","Message","_id","ChatContainer","fallback","MessagesContainer","Form","onSubmit","TextField","e","target","type","autoComplete","autoFocus","RxPaperPlane","input","_ref2","form","_ref3","_ref4","Input","_extends","_objectDestructuringEmpty","rest","ref","innerRef","RPGUIContainerTypes","RPGUIContainer","ChatDeprecated","onCloseButton","MessageText","CustomContainer","FramedGrey","CloseButton","CustomInput","RPGUIButton","SearchCharacter","onChangeCharacterName","recentCharacters","hideSearchCharacterUI","onCharacterClick","characterName","setCharacterName","searchCharacterRef","useRef","timer","setTimeout","current","focus","clearTimeout","handleCharacterClick","character","SearchContainer","placeholder","SearchButton","RxMagnifyingGlass","ListContainer","ListElement","li","ChatRevamp","onSendGlobalChatMessage","tabs","onChangeTab","activeTab","privateChatCharacters","onSendPrivateChatMessage","recentChatCharacters","_ref$recentSelectedCh","recentSelectedChatCharacterId","onPreviousChatCharacterClick","onRemoveRecentChatCharacter","_ref$unseenMessageCha","unseenMessageCharacterIds","onSendTradeMessage","searchCharacterUI","showSearchCharacterUI","showRecentChats","setShowRecentChats","isPrivate","isTrade","handlePreviousChatCharacterClick","TabContainer","tab","Tab","active","PrivateChatContainer","RecentChatTabContainer","isOpen","RecentChatTopBar","BurgerIconContainer","t","hasUnseenMessages","BurgerLineIcon","RecentChatLogContainer","ListElementContainer","StatusDot","isUnseen","includes","RxCross2","sendMessage","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","useOutsideClick","handleClickOutside","contains","CustomEvent","detail","dispatchEvent","addEventListener","removeEventListener","DraggableContainer","_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","css","h1","img","InputRadio","isChecked","onRadioSelect","onRadioClick","countItemFromInventory","itemKey","itemsFromInventory","modalRoot","getElementById","ModalPortal","ReactDOM","createPortal","rarityColor","rarity","ItemRarities","Uncommon","Rare","Epic","Legendary","gemColors","defaultColor","onRenderGems","gemQty","_item$attachedGems","attachedGems","ItemSlotQty","undefined","log","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","RelativeListMenu","onSelected","_ref$fontSize","pos","overflow","params","text","MobileItemTooltip","closeTooltip","equipmentSet","_ref$scale","handleFadeOut","_ref$current","ItemInfoDisplay","isMobile","OptionsContainer","Option","ItemSlotToolTips","isTooltipVisible","isFocused","isContextMenuVisible","isContextMenuDisabled","contextActions","contextMenuPosition","dragScale","setIsContextMenuVisible","setIsTooltipMobileVisible","isTooltipMobileVisible","ItemTooltip","optionId","DraggingContext","createContext","setDraggingItem","useDragging","useContext","DraggingProvider","Provider","generateContextMenuListOptions","actionsByTypeList","contextMenu","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","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","RightHand","ItemSlot","observer","slotIndex","onMouseOver","onMouseOut","_ref$isContextMenuDis","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","isSelectingShortcut","setItemShortcut","setTooltipVisible","_useState4","setContextMenuPosition","_useState5","setIsFocused","_useState6","wasDragged","setWasDragged","_useState7","dragPosition","setDragPosition","_useState8","dropPosition","setDropPosition","dragContainer","_useDragging","draggingItem","_useState9","setContextActions","resetItem","onSuccessfulDrag","quantity","onDraggableStop","isNaN","_e$target","classes","isOutsideDrop","some","elm","window","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","isTouch","clientX","clientY","onDraggableStart","onDraggableProgress","abs","isDraggingItem","onMouseUp","_e$changedTouches$","changedTouches","simulatedEvent","MouseEvent","bubbles","_document$elementFrom","elementFromPoint","subType","ItemSubType","Seed","axis","defaultClassName","position","bounds","ItemContainer","onMouseEnter","setIsTooltipVisible","_ref5","_ref6","statisticsToDisplay","higherIsWorse","ItemInfo","itemToCompare","renderStatistics","statistics","_i","_statisticsToDisplay","stat","itemStatistic","_itemToCompare$stat$k","_itemToCompare$stat$k2","toUpperCase","slice","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","useMemo","_item$allowedEquipSlo","allowedSlotTypeCamelCase","camelCase","itemSubTypeCamelCase","itemSubTypeFromEquipment","values","_item$subType","itemFromEquipment","Flex","CompareContainer","Equipped","$isMobile","offset","handleMouseMove","rect","getBoundingClientRect","tooltipWidth","tooltipHeight","isOffScreenRight","innerWidth","isOffScreenBottom","innerHeight","ItemInfoWrapper","CraftingRecipe","recipe","handleRecipeSelect","selectedCraftItemKey","skills","modifyString","str","parts","fileName","replace","words","firstWord","modifiedWords","join","levelInSkill","_skills$level","_skills","_recipe$minCraftingRe","_recipe$minCraftingRe2","minCraftingRequirements","RadioOptionsWrapper","SpriteAtlasWrapper","canCraft","MinCraftingRequirementsText","levelIsOk","_recipe$levelIsOk","_recipe$minCraftingRe3","_recipe$minCraftingRe4","_recipe$minCraftingRe5","_recipe$minCraftingRe6","ingredients","ingredient","itemQtyInInventory","Recipe","Ingredient","isQuantityOk","qty","desktop","mobileLanscape","mobilePortrait","CraftBook","onClose","onSelect","onCraftItem","craftablesItems","savedSelectedType","craftItemKey","setCraftItemKey","selectedType","setSelectedType","setSize","isCraftingDisabled","setIsCraftingDisabled","handleResize","renderItemTypes","itemTypes","filter","sort","a","b","localeCompare","rows","row","gap","Framed","Wrapper","Subtitle","ContentContainer","ItemTypes","RadioInputScroller","ButtonWrapper","Dropdown","firstOption","change","o","DropdownSelectorContainer","details","Details","useCursorPosition","setPosition","scalePosition","useCallback","setFromEvent","touches","scaledPosition","cleanup","handleEvent","CONTAINER_SIZE","OFFSET","DraggedItem","_useCursorPosition","centeredX","centeredY","stackInfo","_item$_id","SpriteContainer","pulse","attrs","top","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","TableTab","activeTextColor","inactiveColor","borderColor","ListItem","CharacterName","onClick","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","floor","linesPerDiv","textChunks","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","hasNextChunk","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","right","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","isSelected","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","SlotsContainer","useScrollOnDrag","containerRef","threshold","scrollStep","animationFrameId","startScrolling","scroll","_containerRef$current","bottom","maxScrollTop","clientHeight","distanceFromTop","distanceFromBottom","requestAnimationFrame","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","max","typeClass","GoldSlider","handleChange","Number","min","ItemQuantitySelector","onConfirm","setValue","inputRef","select","closeSelector","StyledContainer","StyledForm","numberValue","noValidate","StyledInput","newValue","Slider","ItemQuantitySelectorModal","quantitySelect","setQuantitySelect","QuantitySelectorContainer","maxQuantity","callback","MIN_SLOTS_FOR_SCROLL","_ref$disableContextMe","disableContextMenu","_quantity","_useScrollOnDrag","handleSetShortcut","onDragStartScrollingEvents","onDragEndScrollingEvents","onRenderSlots","slotQty","_itemContainer$slots","ItemsContainer","isScrollable","_ref7","ItemSelector","elementValue","imageKey","LeaderboardTable","rankType","isTopSkillEntry","entry","TableRowWrapper","TableRowValue","Leaderboard","onChangeRankType","onChangeClassType","skillOptions","onChangeSkillType","classOptions","rankOptions","itemsContainer","_itemsContainer$curre","scrollTo","rankTypeOptions","skillTypeOptions","classTypeOptions","WrapperContainer","StyledDropdown","ItemComponentScrollWrapper","TableWrapper","ListMenu","Pager","totalItems","currentPage","itemsPerPage","onPageChange","totalPages","ceil","PagerContainer","ConfirmModal","Background","stopPropagation","ButtonsWrapper","MarketplaceRows","itemPrice","onMarketPlaceItemBuy","onMarketPlaceItemRemove","MarketplaceWrapper","ItemIconContainer","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","_props$styles","CustomTab","MultitabType","TabsContainer","Brown","selectedTab","setSelectedTab","onRenderTabs","onGetContainerType","Gray","BodyContainer","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","minWidth","mobileScale","calculatePercentageValue","ProgressBarText","QuestInfo","quests","buttons","onChangeQuest","questsLength","QuestDraggableContainer","QuestsContainer","QuestContainer","Thumbnail","thumbnail","thumbnailDefault","QuestSplitDiv","Content","QuestColumn","npcId","RPGUIScrollbar","RPGUIOverrides","_RPGUI","RPGUI","RPGUIRoot","SimpleTooltip","_ref$backgroundColor","backgroundColor","_ref$textColor","_ref$showDelay","showDelay","_ref$hideDelay","hideDelay","visible","setVisible","tooltipPosition","setTooltipPosition","tooltipRef","triggerRef","timeoutRef","calculatePosition","triggerRect","tooltipRect","showTooltip","hideTooltip","isOutsideTooltip","isOutsideTrigger","handleScroll","TooltipContainer","TooltipBox","body","QuestList","QuestListContainer","quest","_quest$status","getStatusColor","status","formatText","formatObjectives","objectives","formatRewards","rewards","NoQuestContainer","isArray","objective","_killObjective$creatu","_killObjective$creatu2","_killObjective$killCo","_killObjective$killCo2","killObjective","creatureKeys","killCount","killCountTarget","_interactionObjective","interactionObjective","targetNPCkey","reward","itemKeysFormatted","_reward$itemKeys","itemKeys","Boolean","spellKeysFormatted","_reward$spellKeys","spellKeys","formattedReward","QuestStatus","Pending","InProgress","Completed","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","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","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","_ref$activeColor","activeColor","_ref$activeTextColor","_ref$inactiveColor","_ref$borderColor","_ref$hoverColor","hoverColor","setActiveTab","TabHeader","TabButton","ContentWrapper","_tabs$find","TextArea","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","_periodOfDaySrcFiles","PeriodOfDay","Morning","MorningGif","Afternoon","AfternoonGif","Night","NightGif","GifContainer","TimeWidget","TimeClock","WidgetContainer","DayNightContainer","Time","ClockWidgetImg","outerQty","TradingItemRow","onQuantityChange","traderItem","selectedQty","isBuy","_traderItem$stackQty","renderAccountTypeIndicator","canBePurchasedOnlyByPremiumPlans","accountType","UserAccountTypes","Free","PremiumBronze","PremiumSilver","PremiumGold","PremiumUltimate","PremiumLabel","capitalize","ItemWrapper","ItemNameContainer","NameValue","StyledArrow","QuantityDisplay","TradingMenu","traderItems","characterAvailableGold","sum","setSum","Map","qtyMap","setQtyMap","set","newSum","get","hasGoldForSale","getFinalGold","Capitalize","onConfirmClick","assign","TradingComponentScrollWrapper","tradeItem","_qtyMap$get","GoldWrapper","TotalWrapper","AlertWrapper","Truncate","ZoomableImage","isZoomed","setIsZoomed","zoomPosition","setZoomPosition","_e$currentTarget$getB","currentTarget","handleTouchMove","_e$currentTarget$getB2","touch","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":";;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtBC,SAAS,EAAE,MAAM;EACjBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,UAAU,EAAE,SAAS;EACrBC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE,SAAS;EACjBC,QAAQ,EAAE,SAAS;EACnBC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,KAAK,EAAE,SAAS;EAChBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,KAAK,EAAE;CACR;;ICAYC,aAAa,GAAkC,SAA/CA,aAAaA,CAAAC,IAAA;;MACxBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,YAAA,GAAAL,IAAA,CACZM,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,KAAK,GAAAA,YAAA;EAEf,IAAME,UAAU,GAAGC,OAAM,EAAE;EAE3B,IAAAC,SAAA,GAA0CC,cAAQ,CAChDN,YAAY,KAAIH,OAAO,qBAAAU,SAAA,GAAPV,OAAO,CAAG,CAAC,CAAC,qBAAZU,SAAA,CAAcC,KAAK,EACpC;IAFMC,aAAa,GAAAJ,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gBAAG/kD,eAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,QAAE;AAE/B,IAAMnB,WAAS,gBAAGe,eAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sEAO3B;AAED,IAAM0kD,YAAY,gBAAG9kD,eAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wBAE9B;AAED,IAAMskD,WAAW,gBAAG1kD,eAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,wKAc7B;AAED,IAAMokD,WAAW,gBAAGxkD,eAAM,CAACkY,EAAE,CAAAhY,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,2DAClBtE,QAAQ,CAACK,MAAM,CAEzB;AAED,IAAMooD,eAAe,gBAAGvkD,eAAM,CAACM,GAAG,CAAAJ,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,yHAUjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"long-bow.cjs.development.js","sources":["../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/Arrow/SelectArrow.tsx","../src/components/shared/Ellipsis.tsx","../src/components/PropertySelect/PropertySelect.tsx","../src/components/Character/CharacterSelection.tsx","../src/components/shared/Column.tsx","../src/components/Chat/Chat.tsx","../src/components/Input.tsx","../src/components/RPGUI/RPGUIContainer.tsx","../src/components/Chatdeprecated/ChatDeprecated.tsx","../src/components/ChatRevamp/SearchCharacter.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/useOutsideAlerter.ts","../src/components/DraggableContainer.tsx","../src/components/InputRadio.tsx","../src/libs/itemCounter.ts","../src/components/Abstractions/ModalPortal.tsx","../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/RelativeListMenu.tsx","../src/components/Item/Cards/MobileItemTooltip.tsx","../src/components/Item/Inventory/ItemSlotTooltips.tsx","../src/components/Item/Inventory/context/DraggingContext.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../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/ItemInfoWrapper.tsx","../src/components/CraftBook/CraftingRecipe.tsx","../src/components/CraftBook/CraftBook.tsx","../src/components/Dropdown.tsx","../src/components/DropdownSelectorContainer.tsx","../src/hooks/useCursorPosition.ts","../src/components/Item/Inventory/DraggedItem.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/Abstractions/SlotsContainer.tsx","../src/hooks/useScrollOnDrag.ts","../src/components/Shortcuts/ShortcutsSetter.tsx","../src/components/RangeSlider.tsx","../src/components/Item/Inventory/ItemQuantitySelector.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/TableTab/TableTab.tsx","../src/components/TextArea.tsx","../src/components/TimeWidget/DayNightPeriod/DayNightPeriod.tsx","../src/components/TimeWidget/TimeWidget.tsx","../src/components/TradingMenu/TradingItemRow.tsx","../src/components/TradingMenu/TradingMenu.tsx","../src/components/Truncate.tsx","../src/components/Image/ZoomableImage.tsx","../src/components/Tutorial/TutorialStepper.tsx"],"sourcesContent":["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';\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}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n onPointerDown,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow\n size={size}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n onPointerDown={() => onPointerDown()}\n {...props}\n ></RightArrow>\n )}\n </>\n );\n};\n\ninterface IArrowProps {\n size?: 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 :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 :active {\n background-image: url(${RightArrowClickIcon});\n }\n z-index: 2;\n`;\n\nexport default SelectArrow;\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 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 dayjs from 'dayjs';\nimport React, { useEffect, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { RxPaperPlane } from 'react-icons/rx';\nimport styled from 'styled-components';\nimport { ChatMessage } from '../ChatRevamp/ChatRevamp';\nimport { Column } from '../shared/Column';\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}\n\nexport const Chat: React.FC<IChatProps> = ({\n chatMessages,\n onSendChatMessage,\n onFocus,\n onBlur,\n styles = {\n textColor: '#c65102',\n buttonColor: '#005b96',\n buttonBackgroundColor: 'rgba(0,0,0,.2)',\n width: '80%',\n height: 'auto',\n },\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 if (!message || message.trim() === '') return;\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: ChatMessage[]) => {\n return chatMessages?.length ? (\n chatMessages?.map((chatMessage, index) => (\n <Message\n color={styles?.textColor || '#c65102'}\n key={`${chatMessage._id}_${index}`}\n >\n {onRenderMessageLines(\n chatMessage.emitter,\n chatMessage.createdAt as string,\n chatMessage.message\n )}\n </Message>\n ))\n ) : (\n <Message color={styles?.textColor || '#c65102'}>\n No messages available.\n </Message>\n );\n };\n\n return (\n <ChatContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n >\n <ErrorBoundary fallback={<p>Oops! Your chat has crashed.</p>}>\n <MessagesContainer className=\"chat-body\">\n {onRenderChatMessages(chatMessages)}\n </MessagesContainer>\n\n <Form onSubmit={handleSubmit}>\n <Column flex={70}>\n <TextField\n value={message}\n id=\"inputMessage\"\n onChange={e => getInputValue(e.target.value)}\n height={20}\n type=\"text\"\n autoComplete=\"off\"\n onFocus={onFocus}\n onBlur={onBlur}\n onPointerDown={onFocus}\n autoFocus\n />\n </Column>\n <Column justifyContent=\"flex-end\">\n <Button\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 <RxPaperPlane size={15} />\n </Button>\n </Column>\n </Form>\n </ErrorBoundary>\n </ChatContainer>\n );\n};\n\ninterface IContainerProps {\n width: string;\n height: string;\n}\n\ninterface IMessageProps {\n color: string;\n}\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst ChatContainer = styled.div<IContainerProps>`\n height: ${props => props.height} !important;\n width: 100%;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n height: auto;\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 MessagesContainer = styled.div`\n height: 70%;\n margin-bottom: 10px;\n overflow-y: auto;\n`;\n\nconst Message = styled.div<IMessageProps>`\n margin-bottom: 8px;\n color: ${({ color }) => color};\n`;\n\nconst Form = styled.form`\n display: flex;\n width: 100%;\n justify-content: center;\n align-items: center;\n`;\n\nconst Button = styled.button<IButtonProps>`\n color: ${({ buttonColor }) => buttonColor};\n background-color: ${({ buttonBackgroundColor }) => buttonBackgroundColor};\n width: 28px;\n height: 28px;\n border: none !important;\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 { IChatMessage } 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: IChatMessage[];\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: IChatMessage[]) => {\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 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 type { PrivateChatCharacter } from './ChatRevamp';\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 = (\n character: PrivateChatCharacter\n ) => {\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 onPointerDown={() => handleCharacterClick(character)} key={character._id}>\n {character.name}\n </ListElement>\n ))}\n </ListContainer>\n )}\n </SearchContainer>\n );\n};\n\n\ninterface IButtonProps {\n buttonColor: string;\n buttonBackgroundColor: string;\n}\n\nconst SearchContainer = styled.div`\nwidth: 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\n\n","import {\n ICharacter,\n IChatMessage,\n IPrivateChatMessage,\n ITradeChatMessage,\n} from '@rpg-engine/shared';\nimport React, { useState } 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 { Chat, IStyles } from '../Chat/Chat';\nimport { SearchCharacter } from './SearchCharacter';\n\nexport type PrivateChatCharacter = Pick<ICharacter, '_id' | 'name'>;\n\nexport type ChatMessage =\n | IChatMessage\n | IPrivateChatMessage\n | ITradeChatMessage;\nexport interface IChatRevampProps {\n chatMessages: ChatMessage[];\n onSendGlobalChatMessage: (message: string) => void;\n onCloseButton: () => void;\n onFocus?: () => void;\n onBlur?: () => void;\n styles?: IStyles;\n tabs: { label: string; id: string }[];\n activeTab: string;\n onChangeTab: (tabId: string) => void;\n privateChatCharacters?: PrivateChatCharacter[];\n onChangeCharacterName: (characterName: string) => void;\n onCharacterClick?: (character: PrivateChatCharacter) => void;\n onSendPrivateChatMessage: (message: string) => void;\n recentChatCharacters?: PrivateChatCharacter[];\n recentSelectedChatCharacterId?: string;\n onPreviousChatCharacterClick?: (character: PrivateChatCharacter) => void;\n onRemoveRecentChatCharacter?: (character: PrivateChatCharacter) => void;\n unseenMessageCharacterIds?: string[];\n onSendTradeMessage: (message: string) => void;\n searchCharacterUI: boolean;\n hideSearchCharacterUI: () => void;\n showSearchCharacterUI: () => void;\n}\n\nexport const ChatRevamp = ({\n chatMessages,\n onSendGlobalChatMessage,\n onChangeCharacterName,\n onFocus,\n onBlur,\n onCloseButton,\n styles,\n tabs,\n onChangeTab,\n activeTab,\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}: IChatRevampProps) => {\n const [showRecentChats, setShowRecentChats] = useState(false);\n\n const isPrivate = activeTab === 'private';\n const isTrade = activeTab === 'trade';\n\n const handlePreviousChatCharacterClick = (\n character: PrivateChatCharacter\n ) => {\n if (!onPreviousChatCharacterClick) return;\n onPreviousChatCharacterClick(character);\n hideSearchCharacterUI();\n };\n\n return (\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 <PrivateChatContainer\n width={styles?.width || '80%'}\n height={styles?.height || 'auto'}\n >\n <RecentChatTabContainer isPrivate={isPrivate} isOpen={showRecentChats}>\n <RecentChatTopBar isOpen={showRecentChats}>\n <BurgerIconContainer\n onPointerDown={() => setShowRecentChats(t => !t)}\n hasUnseenMessages={unseenMessageCharacterIds?.length > 0 || false}\n >\n <BurgerLineIcon></BurgerLineIcon>\n <BurgerLineIcon></BurgerLineIcon>\n <BurgerLineIcon></BurgerLineIcon>\n </BurgerIconContainer>\n {showRecentChats && (\n <SearchButton onPointerDown={() => showSearchCharacterUI()}>\n <RxMagnifyingGlass size={16} color={uiColors.white} />\n </SearchButton>\n )}\n </RecentChatTopBar>\n\n <RecentChatLogContainer isOpen={showRecentChats}>\n {recentChatCharacters?.map(character => (\n <ListElementContainer key={character._id}>\n <ListElement\n active={character._id === recentSelectedChatCharacterId}\n onPointerDown={() =>\n handlePreviousChatCharacterClick(character)\n }\n >\n <StatusDot\n isUnseen={\n unseenMessageCharacterIds?.includes(character._id) ||\n false\n }\n />\n {character.name}\n </ListElement>\n <CloseButton\n onPointerDown={() => onRemoveRecentChatCharacter?.(character)}\n >\n <RxCross2 size={16} />\n </CloseButton>\n </ListElementContainer>\n ))}\n </RecentChatLogContainer>\n </RecentChatTabContainer>\n {isPrivate && searchCharacterUI ? (\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 <Chat\n chatMessages={chatMessages}\n onSendChatMessage={\n isPrivate\n ? onSendPrivateChatMessage\n : isTrade\n ? onSendTradeMessage\n : onSendGlobalChatMessage\n }\n sendMessage={true}\n onCloseButton={onCloseButton}\n styles={styles}\n onFocus={onFocus}\n onBlur={onBlur}\n />\n )}\n </PrivateChatContainer>\n </>\n );\n};\n\nconst TabContainer = styled.div`\n width: 100%;\n display: flex;\n gap: 10px;\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\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 => (props.active ? '#c65102' : uiColors.gray)};\n\n background-color: ${props =>\n props.active ? uiColors.orange : 'transparent'};\n color: ${props => (props.active ? 'white' : uiColors.raisinBlack)};\n`;\n\nconst PrivateChatContainer = styled.div<{ width: string; height: string }>`\n width: ${({ width }) => width};\n min-height: ${({ height }) => height} !important;\n padding: 10px;\n background-color: rgba(0, 0, 0, 0.2);\n height: auto;\n display: flex;\n gap: 10px;\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 ? '20%' : '30px')} !important;\n transition: width 0.3s ease-in-out;\n overflow: hidden;\n\n @media (max-width: 768px) {\n width: ${props => (props.isOpen ? '40%' : '30px')} !important;\n }\n`;\n\nconst RecentChatTopBar = styled.div<{ isOpen: boolean }>`\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 30px;\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 border: none;\n list-style: none;\n display: flex;\n opacity: ${props => (props.isOpen ? 1 : 0)};\n flex-direction: column;\n gap: 0.5rem;\n transition: opacity 0.3s ease-in-out;\n padding: 0;\n margin: 0;\n flex: 1;\n`;\n\nconst ListElementContainer = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n`;\n\nconst ListElement = styled.button<{ active: boolean }>`\n margin: 0.5rem 0 !important;\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`;\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 &:hover {\n background-color: ${uiColors.white};\n color: ${uiColors.red};\n }\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","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 from 'react';\n\ninterface IProps\n extends React.DetailedHTMLProps<\n React.InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n > {\n label: string;\n name: string;\n value: string;\n isChecked: boolean;\n onRadioSelect: (value: string) => void;\n}\n\nexport const InputRadio: React.FC<IProps> = ({\n label,\n name,\n value,\n isChecked,\n onRadioSelect,\n}) => {\n const onRadioClick = (): void => {\n onRadioSelect(value);\n };\n\n return (\n <div onPointerUp={onRadioClick}>\n <input\n className=\"rpgui-radio\"\n name={name}\n value={value}\n type=\"radio\"\n data-rpguitype=\"radio\"\n checked={isChecked}\n // rpgui breaks onChange on this input (doesn't work). That's why I had to wrap it with a div and a onClick listener.\n readOnly\n ></input>\n <label>{label}</label>\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};","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 { 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 console.log(item.attachedGems);\n\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 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, { 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 from 'react';\nimport { IPosition } from '../../../types/eventTypes';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { MobileItemTooltip } from '../Cards/MobileItemTooltip';\nimport { IContextMenuItem } from './itemContainerHelper';\n\ninterface IProps {\n isTooltipVisible: boolean;\n isFocused: boolean;\n isContextMenuVisible: boolean;\n isContextMenuDisabled: boolean;\n item: IItem | null;\n isTooltipMobileVisible: boolean;\n contextActions: IContextMenuItem[];\n contextMenuPosition: IPosition;\n dragScale: number | undefined;\n setIsContextMenuVisible: (visible: boolean) => void;\n setIsTooltipMobileVisible: (visible: boolean) => void;\n setIsTooltipVisible: (visible: boolean) => void;\n onSelected?: (optionId: string, item: IItem) => void;\n atlasIMG: any;\n atlasJSON: any;\n equipmentSet?: IEquipmentSet | null;\n}\n\nexport const ItemSlotToolTips = ({\n isTooltipVisible,\n isFocused,\n isContextMenuVisible,\n isContextMenuDisabled,\n item,\n contextActions,\n contextMenuPosition,\n dragScale,\n setIsContextMenuVisible,\n setIsTooltipMobileVisible,\n isTooltipMobileVisible,\n onSelected,\n atlasIMG,\n atlasJSON,\n equipmentSet,\n}: IProps): JSX.Element => {\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 setIsTooltipMobileVisible(false);\n }}\n scale={dragScale}\n options={contextActions}\n onSelected={(optionId: string) => {\n setIsContextMenuVisible(false);\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n />\n )}\n\n {!isContextMenuDisabled && isContextMenuVisible && contextActions && (\n <RelativeListMenu\n options={contextActions}\n onSelected={(optionId: string) => {\n setIsContextMenuVisible(false);\n if (item) {\n onSelected?.(optionId, item);\n }\n }}\n onOutsideClick={() => {\n setIsContextMenuVisible(false);\n }}\n pos={contextMenuPosition}\n />\n )}\n </>\n );\n};\n","import { IItem } from '@rpg-engine/shared';\nimport React, { createContext, useContext, useState } from 'react';\n\nconst DraggingContext = createContext<{\n item: IItem | null;\n setDraggingItem: React.Dispatch<React.SetStateAction<IItem | null>>;\n}>({\n item: null,\n setDraggingItem: () => {},\n});\n\nexport const useDragging = () => useContext(DraggingContext);\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport const DraggingProvider = ({ children }: IProps) => {\n const [item, setDraggingItem] = useState<IItem | null>(null);\n\n return (\n <DraggingContext.Provider value={{ item, setDraggingItem }}>\n {children}\n </DraggingContext.Provider>\n );\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\n ItemContainerType,\n ItemSlotType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Draggable, { DraggableEventHandler } from 'react-draggable';\nimport styled from 'styled-components';\nimport { IPosition } from '../../../types/eventTypes';\nimport { rarityColor } from './ItemSlotRarity';\nimport { ItemSlotRenderer } from './ItemSlotRenderer';\nimport { ItemSlotToolTips } from './ItemSlotTooltips';\nimport { useDragging } from './context/DraggingContext';\nimport { IContextMenuItem, generateContextMenu } from './itemContainerHelper';\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 onSelected?: (selectedOption: string, item: IItem) => void;\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 onSelected,\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 equipmentSet,\n setItemShortcut,\n isDepotSystem,\n }) => {\n const [isTooltipVisible, setTooltipVisible] = useState(false);\n const [isTooltipMobileVisible, setIsTooltipMobileVisible] = useState(false);\n\n const [isContextMenuVisible, setIsContextMenuVisible] = useState(false);\n const [contextMenuPosition, setContextMenuPosition] = useState({\n x: 0,\n y: 0,\n });\n\n const [isFocused, setIsFocused] = useState(false);\n const [wasDragged, setWasDragged] = useState(false);\n const [dragPosition, setDragPosition] = useState<IPosition>({ x: 0, y: 0 });\n const [dropPosition, setDropPosition] = useState<IPosition | null>(null);\n const dragContainer = useRef<HTMLDivElement>(null);\n\n const { item: draggingItem, setDraggingItem } = useDragging();\n\n const [contextActions, setContextActions] = useState<IContextMenuItem[]>(\n []\n );\n\n useEffect(() => {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n\n if (item && containerType) {\n setContextActions(\n generateContextMenu(item, containerType, isDepotSystem)\n );\n }\n }, [item, isDepotSystem]);\n\n useEffect(() => {\n if (onDrop && item && dropPosition) {\n onDrop(item, dropPosition);\n }\n }, [dropPosition]);\n\n const resetItem = () => {\n setTooltipVisible(false);\n setWasDragged(false);\n };\n\n const onSuccessfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n } else if (item) {\n onDragEnd?.(quantity);\n }\n };\n\n const onDraggableStop: DraggableEventHandler = (e, data) => {\n setDraggingItem(null);\n\n const target = e.target as HTMLElement;\n\n if (target?.id.includes('shortcutSetter') && setItemShortcut && item) {\n const index = parseInt(target.id.split('_')[1]);\n if (!isNaN(index)) {\n setItemShortcut(item, index);\n }\n }\n\n // remove the class react-draggable-dragging from the element\n // to prevent the item from being dragged again\n\n target.classList.remove('react-draggable-dragging');\n\n if (wasDragged && item && !isSelectingShortcut) {\n //@ts-ignore\n const classes: string[] = Array.from(e.target?.classList);\n\n const isOutsideDrop =\n classes.some(elm => {\n return elm.includes('rpgui-content');\n }) || classes.length === 0;\n\n if (isOutsideDrop) {\n setDropPosition({\n x: data.x,\n y: data.y,\n });\n }\n\n setWasDragged(false);\n\n const target = dragContainer.current;\n if (!target || !wasDragged) return;\n\n const style = window.getComputedStyle(target);\n const matrix = new DOMMatrixReadOnly(style.transform);\n const x = matrix.m41;\n const y = matrix.m42;\n\n setDragPosition({ x, y });\n\n setTimeout(() => {\n if (checkIfItemCanBeMoved?.()) {\n if (checkIfItemShouldDragEnd && !checkIfItemShouldDragEnd()) return;\n\n if (item.stackQty && item.stackQty !== 1 && openQuantitySelector)\n openQuantitySelector(item.stackQty, onSuccessfulDrag);\n else onSuccessfulDrag(item.stackQty);\n } else {\n resetItem();\n setIsFocused(false);\n setDragPosition({ x: 0, y: 0 });\n }\n }, 50);\n } else if (item) {\n let isTouch = false;\n if (\n !isContextMenuDisabled &&\n e.type === 'touchend' &&\n !isSelectingShortcut\n ) {\n isTouch = true;\n setIsTooltipMobileVisible(true);\n }\n\n if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) {\n setIsContextMenuVisible(!isContextMenuVisible);\n const event = e as MouseEvent;\n\n if (event.clientX && event.clientY) {\n setContextMenuPosition({\n x: event.clientX - 10,\n y: event.clientY - 5,\n });\n }\n }\n\n onPointerDown(item.type, containerType ?? null, item);\n }\n };\n\n const onDraggableStart: DraggableEventHandler = () => {\n if (!item || isSelectingShortcut) {\n return;\n }\n\n if (onDragStart && containerType) {\n onDragStart(item, slotIndex, containerType);\n }\n };\n\n const onDraggableProgress: DraggableEventHandler = (_e, data) => {\n if (\n Math.abs(data.x - dragPosition.x) > 5 ||\n Math.abs(data.y - dragPosition.y) > 5\n ) {\n setWasDragged(true);\n setIsFocused(true);\n }\n\n if (!draggingItem) {\n setDraggingItem(item);\n }\n };\n\n return (\n <Container\n isDraggingItem={!!draggingItem}\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={dragPosition}\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 setTooltipVisible(true);\n }}\n onMouseLeave={() => {\n setTooltipVisible(false);\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\n <ItemSlotToolTips\n isTooltipVisible={isTooltipVisible}\n isTooltipMobileVisible={isTooltipMobileVisible}\n setIsTooltipMobileVisible={setIsTooltipMobileVisible}\n isFocused={isFocused}\n isContextMenuVisible={isContextMenuVisible}\n isContextMenuDisabled={isContextMenuDisabled}\n item={item}\n contextActions={contextActions}\n contextMenuPosition={contextMenuPosition}\n dragScale={dragScale}\n setIsContextMenuVisible={setIsContextMenuVisible}\n onSelected={(optionId: string, item: IItem) => {\n setIsContextMenuVisible(false);\n if (onSelected) onSelected(optionId, item);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n equipmentSet={equipmentSet}\n setIsTooltipVisible={setTooltipVisible}\n />\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 is 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,\n}) => `0 0 4px 3px ${rarityColor(item)}`};\n //background-color: ${({ item }) => 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, { 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 {\n ICraftableItem,\n IEquipmentSet,\n IItemContainer,\n ISkill,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { countItemFromInventory } from '../../libs/itemCounter';\nimport { ItemInfoWrapper } from '../Item/Cards/ItemInfoWrapper';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\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\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 modifyString = (str: string) => {\n // Split the string by \"/\" and \".\"\n let parts = str.split('/');\n let fileName = parts[parts.length - 1];\n parts = fileName.split('.');\n let name = parts[0];\n\n // Replace all occurrences of \"-\" with \" \"\n name = name.replace(/-/g, ' ');\n\n // Uppercase the first word\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 name = modifiedWords.join(' ');\n\n return name;\n };\n\n const levelInSkill =\n (skills?.[\n (recipe?.minCraftingRequirements?.[0] ?? '') as keyof ISkill\n ] as any)?.level ?? 1;\n\n return (\n <RadioOptionsWrapper>\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 <div>\n <div onPointerUp={recipe.canCraft ? handleRecipeSelect : undefined}>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={recipe.name}\n name=\"test\"\n disabled={!recipe.canCraft}\n checked={selectedCraftItemKey === recipe.key}\n onChange={handleRecipeSelect}\n />\n <label style={{ display: 'flex', alignItems: 'center' }}>\n {modifyString(recipe.name)}\n </label>\n </div>\n\n <MinCraftingRequirementsText levelIsOk={recipe?.levelIsOk ?? false}>\n {modifyString(`${recipe?.minCraftingRequirements?.[0] ?? ''}`)} lvl{' '}\n {recipe?.minCraftingRequirements?.[1] ?? 0} ({levelInSkill})\n </MinCraftingRequirementsText>\n\n {recipe.ingredients.map((ingredient, index) => {\n const itemQtyInInventory = !inventory\n ? 0\n : countItemFromInventory(ingredient.key, inventory);\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={ingredient.qty <= itemQtyInInventory}>\n {modifyString(ingredient.key)} x{ingredient.qty} (\n {itemQtyInInventory})\n </Ingredient>\n </Recipe>\n );\n })}\n </div>\n </RadioOptionsWrapper>\n );\n};\n\nconst Ingredient = styled.p<{ isQuantityOk: boolean }>`\n margin: 0;\n margin-left: 14px;\n color: ${({ isQuantityOk }) =>\n isQuantityOk ? uiColors.lightGreen : uiColors.lightGray} !important;\n`;\n\nconst Recipe = styled.div`\n font-size: 0.6rem;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n margin-left: 4px;\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\n }\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 MinCraftingRequirementsText = styled.p<{ levelIsOk: boolean }>`\n font-size: 0.6rem !important;\n margin: 0 5px 0 35px;\n color: ${({ levelIsOk }) =>\n levelIsOk ? uiColors.lightGreen : uiColors.lightGray} !important;\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 styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { InputRadio } from '../InputRadio';\nimport { RPGUIContainerTypes } from '../RPGUI/RPGUIContainer';\nimport { CraftingRecipe } from './CraftingRecipe';\n\nexport interface IItemCraftSelectorProps {\n atlasJSON: any;\n atlasIMG: any;\n onClose: () => void;\n onSelect: (value: string) => void;\n onCraftItem: (value: string | undefined) => 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\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\n const [isCraftingDisabled, setIsCraftingDisabled] = useState(false);\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 renderItemTypes = () => {\n const itemTypes = ['Suggested', ...Object.keys(ItemSubType)]\n .filter(type => type !== 'DeadBody')\n .sort((a, b) => {\n if (a === 'Suggested') return -1;\n if (b === 'Suggested') return 1;\n return a.localeCompare(b);\n });\n\n if (window.innerWidth > parseInt(mobilePortrait.width)) {\n return itemTypes.map(type => {\n return (\n <InputRadio\n key={type}\n value={type}\n label={type}\n name={type}\n isChecked={selectedType === type}\n onRadioSelect={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n />\n );\n });\n }\n\n const rows: JSX.Element[][] = [[], []];\n\n itemTypes.forEach((type, index) => {\n let row = 0;\n\n if (index % 2 === 1) row = 1;\n\n rows[row].push(\n <InputRadio\n key={type}\n value={type}\n label={type}\n name={type}\n isChecked={selectedType === type}\n onRadioSelect={value => {\n setSelectedType(value);\n onSelect(value);\n }}\n />\n );\n });\n\n return rows.map((row, index) => (\n <div key={index} style={{ display: 'flex', gap: '10px' }}>\n {row}\n </div>\n ));\n };\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={() => {\n if (onClose) {\n onClose();\n }\n }}\n scale={scale}\n >\n <Wrapper>\n <div style={{ width: '100%' }}>\n <Title>Craftbook</Title>\n <Subtitle>Select an item to craft</Subtitle>\n <hr className=\"golden\" />\n </div>\n\n <ContentContainer>\n <ItemTypes className=\"inputRadioCraftBook\">\n {renderItemTypes()}\n </ItemTypes>\n\n <RadioInputScroller className=\"inputRadioCraftBook\">\n {craftablesItems?.map(item => (\n <CraftingRecipe\n key={item.key}\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 ))}\n </RadioInputScroller>\n </ContentContainer>\n <ButtonWrapper>\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 onCraftItem(craftItemKey);\n setIsCraftingDisabled(true);\n\n setTimeout(() => {\n setIsCraftingDisabled(false);\n }, 2000);\n }}\n >\n Craft\n </Button>\n </ButtonWrapper>\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\nconst Title = styled.h1`\n font-size: 0.6rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Subtitle = styled.h1`\n font-size: 0.4rem;\n color: ${uiColors.yellow} !important;\n`;\n\nconst RadioInputScroller = styled.div`\n padding-left: 15px;\n padding-top: 10px;\n margin-top: 1rem;\n align-items: center;\n align-items: flex-start;\n overflow-y: scroll;\n min-height: 0;\n flex: 1;\n margin-left: 10px;\n -webkit-overflow-scrolling: touch;\n\n @media (max-width: ${mobilePortrait.width}) {\n margin-left: 0;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: flex-end;\n margin-top: 10px;\n width: 100%;\n\n button {\n padding: 0px 50px;\n margin: 5px;\n }\n\n @media (max-width: ${mobilePortrait.width}) {\n justify-content: center;\n }\n`;\n\nconst ContentContainer = styled.div`\n display: flex;\n width: 100%;\n min-height: 0;\n flex: 1;\n\n @media (max-width: ${mobilePortrait.width}) {\n flex-direction: column;\n }\n`;\n\nconst ItemTypes = styled.div`\n display: flex;\n overflow-y: scroll;\n overflow-x: hidden;\n width: max-content;\n flex-direction: column;\n padding-right: 5px;\n\n @media (max-width: ${mobilePortrait.width}) {\n overflow-x: scroll;\n overflow-y: hidden;\n padding-right: 0;\n width: 100%;\n }\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 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 { useDragging } from './context/DraggingContext';\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 { item } = useDragging();\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\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 DraggedItem from '../Item/Inventory/DraggedItem';\nimport { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { DraggingProvider } from '../Item/Inventory/context/DraggingContext';\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 onSelected={(optionId: string) => {\n if (onSelected) onSelected(optionId);\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 <DraggingProvider>\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>{onRenderEquipmentSlotRange(0, 3)}</EquipmentColumn>\n <EquipmentColumn>{onRenderEquipmentSlotRange(3, 7)}</EquipmentColumn>\n <EquipmentColumn>{onRenderEquipmentSlotRange(7, 10)}</EquipmentColumn>\n </EquipmentSetContainer>\n </DraggableContainer>\n </DraggingProvider>\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`;\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 { TableTab, 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 <TableTab\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 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 { Input } from '../../Input';\nimport {\n RPGUIContainer,\n RPGUIContainerTypes,\n} from '../../RPGUI/RPGUIContainer';\nimport { RangeSlider, RangeSliderType } from '../../RangeSlider';\n\nexport interface IItemQuantitySelectorProps {\n quantity: number;\n onConfirm: (quantity: number) => void;\n onClose: () => void;\n}\n\nexport const ItemQuantitySelector: React.FC<IItemQuantitySelectorProps> = ({\n quantity,\n onConfirm,\n onClose,\n}) => {\n const [value, setValue] = useState(quantity);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.select();\n\n const closeSelector = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n onClose();\n }\n };\n\n document.addEventListener('keydown', closeSelector);\n\n return () => {\n document.removeEventListener('keydown', closeSelector);\n };\n }\n\n return () => {};\n }, []);\n\n return (\n <StyledContainer type={RPGUIContainerTypes.Framed} width=\"25rem\">\n <CloseButton className=\"container-close\" onPointerDown={onClose}>\n X\n </CloseButton>\n <h2>Select quantity to move</h2>\n <StyledForm\n style={{ width: '100%' }}\n onSubmit={e => {\n e.preventDefault();\n\n const numberValue = Number(value);\n\n if (Number.isNaN(numberValue)) {\n return;\n }\n\n onConfirm(Math.max(1, Math.min(quantity, numberValue)));\n }}\n noValidate\n >\n <StyledInput\n innerRef={inputRef}\n placeholder=\"Enter quantity\"\n type=\"number\"\n min={1}\n max={quantity}\n value={value}\n onChange={e => {\n if (Number(e.target.value) >= quantity) {\n setValue(quantity);\n return;\n }\n\n setValue((e.target.value as unknown) as number);\n }}\n onBlur={e => {\n const newValue = Math.max(\n 1,\n Math.min(quantity, Number(e.target.value))\n );\n\n setValue(newValue);\n }}\n />\n <RangeSlider\n type={RangeSliderType.Slider}\n valueMin={1}\n valueMax={quantity}\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 display: flex;\n flex-direction: column;\n align-items: center;\n`;\n\nconst StyledForm = styled.form`\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n`;\nconst StyledInput = styled(Input)`\n text-align: center;\n\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n &[type='number'] {\n -moz-appearance: textfield;\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: 0.8rem;\n`;\n","import React from 'react';\nimport styled from 'styled-components';\nimport ModalPortal from '../../Abstractions/ModalPortal';\nimport { ItemQuantitySelector } from './ItemQuantitySelector';\n\nexport interface IQuantitySelect {\n isOpen: boolean;\n maxQuantity: number;\n callback: (_quantity: number) => void;\n}\n\ninterface IProps {\n quantitySelect: IQuantitySelect;\n setQuantitySelect: React.Dispatch<React.SetStateAction<IQuantitySelect>>;\n}\n\nexport const ItemQuantitySelectorModal = ({\n quantitySelect,\n setQuantitySelect,\n}: IProps) => {\n return (\n <ModalPortal>\n <QuantitySelectorContainer>\n <ItemQuantitySelector\n quantity={quantitySelect.maxQuantity}\n onConfirm={quantity => {\n quantitySelect.callback(quantity);\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\n }}\n onClose={() => {\n quantitySelect.callback(-1);\n setQuantitySelect({\n isOpen: false,\n maxQuantity: 1,\n callback: () => {},\n });\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 {\n IEquipmentSet,\n IItem,\n IItemContainer,\n IShortcut,\n ItemContainerType,\n ItemSubType,\n ItemType,\n} from '@rpg-engine/shared';\nimport React, { useCallback, 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 { DraggedItem } from './DraggedItem';\nimport { ItemQuantitySelectorModal } from './ItemQuantitySelectorModal';\nimport { ItemSlot } from './ItemSlot';\nimport { DraggingProvider } from './context/DraggingContext';\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> = ({\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 = (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\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('pointerup', () => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n });\n }, [handleMouseMove, onItemDragStart, stopScrolling]);\n\n const onDragEndScrollingEvents = useCallback(() => {\n stopScrolling();\n document.removeEventListener('pointermove', handleMouseMove);\n }, [handleMouseMove, onItemDragStart, stopScrolling]);\n\n const onDragStart: onDragStart = (item, slotIndex, itemContainerType) => {\n console.log('DRAG START');\n if (onItemDragStart) {\n onItemDragStart(item, slotIndex, itemContainerType);\n }\n\n onDragStartScrollingEvents();\n };\n\n const onDragEnd: onDragEnd = quantity => {\n console.log('DRAG END');\n if (onItemDragEnd) {\n onItemDragEnd(quantity);\n }\n onDragEndScrollingEvents();\n };\n\n const onRenderSlots = () => {\n const slots = [];\n\n for (let i = 0; i < itemContainer.slotQty; i++) {\n slots.push(\n <ItemSlot\n isContextMenuDisabled={disableContextMenu}\n key={i}\n slotIndex={i}\n item={itemContainer.slots?.[i] || null}\n itemContainerType={type}\n onMouseOver={(event, slotIndex, item) => {\n if (onMouseOver) onMouseOver(event, slotIndex, item);\n }}\n onPointerDown={(itemType, containerType, item) => {\n if (settingShortcutIndex !== -1) {\n setSettingShortcutIndex(-1);\n\n handleSetShortcut(item, settingShortcutIndex);\n } else if (onItemClick) onItemClick(item, itemType, containerType);\n }}\n onSelected={(optionId: string, item: IItem) => {\n if (onSelected) onSelected(optionId, item);\n }}\n onDragStart={onDragStart}\n onDragEnd={onDragEnd}\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 ? handleSetShortcut : undefined\n }\n isDepotSystem={isDepotSystem}\n />\n );\n }\n return slots;\n };\n\n return (\n <DraggingProvider>\n <DraggedItem atlasIMG={atlasIMG} atlasJSON={atlasJSON} scale={scale} />\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 </DraggingProvider>\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: scroll;\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 { 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 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 <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 />\n </RarityContainer>\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 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';\nimport { IStyles } from '../Chat/Chat';\n\ninterface IProps {\n id: string;\n children: React.ReactNode;\n styles?: IStyles;\n}\n\nexport const TabBody: React.FC<IProps> = ({ id, children, styles }) => {\n return (\n <Container styles={styles} data-tab-id={id}>\n {children}\n </Container>\n );\n};\n\ninterface IContainerProps {\n styles?: IStyles;\n}\n\nconst Container = styled.div<IContainerProps>`\n width: 100%;\n height: ${props => props.styles?.height || 'auto'};\n overflow-y: auto;\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}\n\nexport const TabsContainer: React.FC<ITabsContainer> = ({\n children,\n onCloseButton,\n tabs,\n type = MultitabType.Brown,\n styles = {}, // default to an empty object to avoid undefined errors\n}) => {\n const [selectedTab, setSelectedTab] = useState(tabs[0].id); // by default the first one\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 return (\n <DraggableContainer\n onCloseButton={onCloseButton}\n type={onGetContainerType()}\n cancelDrag=\".tabs-container *\" // Disable drag on all elements inside .tabs-container\n width={styles?.width} // use optional chaining\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 {onRenderTabs()}\n <BodyContainer\n selectedTab={selectedTab}\n className={`${type} tabs-container`}\n >\n {children}\n </BodyContainer>\n </DraggableContainer>\n );\n};\n\ninterface IBodyContainer {\n selectedTab: string;\n}\n\nconst BodyContainer = styled.div<IBodyContainer>`\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","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 {\n IQuest,\n IQuestObjectiveInteraction,\n IQuestObjectiveKill,\n QuestStatus,\n} from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiColors } from '../../constants/uiColors';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests }) => {\n return (\n <QuestListContainer>\n {quests && quests.length > 0 ? (\n quests.map((quest, i) => (\n <QuestCard key={i}>\n <QuestItem>\n <Label>Title:</Label>\n <Value>{formatText(quest.title)}</Value>\n </QuestItem>\n <QuestItem>\n <Label>Status:</Label>\n <Value style={{ color: getStatusColor(quest.status) }}>\n {formatStatus(quest.status) ?? 'Unknown'}\n </Value>\n </QuestItem>\n <QuestItem>\n <Label>Description:</Label>\n <Value>{quest.description}</Value>\n </QuestItem>\n <QuestItem>\n <Label>Objectives:</Label>\n <Value>{formatObjectives(quest.objectives)}</Value>\n </QuestItem>\n <QuestItem>\n <Label>Rewards:</Label>\n <Value>{formatRewards(quest.rewards)}</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 margin-top: 20px;\n margin-bottom: 40px;\n overflow-y: auto;\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\nconst formatObjectives = (\n objectives: (IQuestObjectiveKill | IQuestObjectiveInteraction)[]\n) => {\n try {\n if (!objectives || !Array.isArray(objectives)) return 'No objectives';\n return objectives\n .map(objective => {\n if ('killCountTarget' in objective) {\n const killObjective = objective as IQuestObjectiveKill;\n return `Kill ${formatText(\n killObjective.creatureKeys?.join(', ') ?? 'Unknown'\n )}: ${killObjective.killCount ?? 0}/${killObjective.killCountTarget ??\n 0}`;\n } else if ('targetNPCkey' in objective) {\n const interactionObjective = objective as IQuestObjectiveInteraction;\n return `Interact with NPC: ${formatText(\n interactionObjective.targetNPCkey ?? 'Unknown'\n )}`;\n } else {\n return 'Unknown objective';\n }\n })\n .join('; ');\n } catch (error) {\n console.error('Error formatting objectives:', error);\n return 'Error formatting objectives';\n }\n};\n\nconst formatRewards = (rewards: IQuest['rewards']) => {\n try {\n if (!rewards || !Array.isArray(rewards)) return 'No rewards';\n\n return rewards\n .map(reward => {\n const itemKeysFormatted = reward?.itemKeys\n ?.map(itemKey =>\n itemKey && reward?.qty !== undefined\n ? `${itemKey} x${reward.qty}`\n : ''\n )\n .filter(Boolean)\n .join(', ');\n\n const spellKeysFormatted = reward?.spellKeys\n ?.filter(Boolean)\n .join(', ');\n\n const formattedReward = itemKeysFormatted\n ? `${formatText(itemKeysFormatted)}`\n : '';\n\n if (spellKeysFormatted) {\n return formattedReward\n ? `${formattedReward}, Spells: ${formatText(spellKeysFormatted)}`\n : `Spells: ${formatText(spellKeysFormatted)}`;\n }\n\n return formattedReward || 'No rewards';\n })\n .filter(Boolean)\n .join('; ');\n } catch (error) {\n console.error(\n `Error formatting rewards: ${JSON.stringify(rewards)}:`,\n error\n );\n return 'Error on rewards';\n }\n};\n\nconst formatText = (text: string) => {\n if (!text) return 'Unknown';\n return text\n .split('-')\n .map(word => word.charAt(0).toUpperCase() + word.slice(1))\n .join(' ');\n};\n\nconst getStatusColor = (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\nconst formatStatus = (status?: QuestStatus) => {\n if (!status) return 'Unknown';\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 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>(+{buffAndDebuff}%)</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>({buffAndDebuff}%)</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, { 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}\n\nexport const SpellInfoWrapper: React.FC<ISpellInfoWrapperProps> = ({\n children,\n spell,\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 <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};\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, { 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 TableTab: 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';\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 scale={scale}>\n <WidgetContainer>\n <CloseButton onPointerDown={onClose}>X</CloseButton>\n <DayNightContainer>\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 {\n getItemTextureKeyPath,\n IEquipmentSet,\n ITradeResponseItem,\n UserAccountTypes,\n} from '@rpg-engine/shared';\nimport capitalize from 'lodash/capitalize';\nimport React 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';\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 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 if (accountType !== UserAccountTypes.Free) {\n let backgroundColor;\n let textColor = 'black';\n\n switch (accountType) {\n case UserAccountTypes.PremiumBronze:\n backgroundColor = '#CD7F32';\n break;\n case UserAccountTypes.PremiumSilver:\n backgroundColor = '#C0C0C0';\n break;\n case UserAccountTypes.PremiumGold:\n backgroundColor = '#FFD700';\n break;\n case UserAccountTypes.PremiumUltimate:\n backgroundColor = '#002E99';\n break;\n default:\n return null;\n }\n\n return (\n <PremiumLabel\n backgroundColor={backgroundColor}\n textColor={textColor}\n key={accountType}\n >\n {capitalize(accountType) + ' PA'}\n </PremiumLabel>\n );\n }\n return null;\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.5}\n />\n </ItemInfoWrapper>\n </SpriteContainer>\n </ItemIconContainer>\n\n <ItemNameContainer>\n <NameValue>\n <p>\n <Ellipsis maxLines={1} maxWidth=\"250px\">\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={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={onLeftClick.bind(null, outerQty)}\n />\n <StyledArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onPointerDown={onLeftClick}\n />\n <QuantityDisplay>\n <TextOverlay>\n <Item>{selectedQty}</Item>\n </TextOverlay>\n </QuantityDisplay>\n <StyledArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={onRightClick}\n />\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onPointerDown={onRightClick.bind(null, outerQty)}\n />\n </QuantityContainer>\n </ItemWrapper>\n );\n};\n\nconst PremiumLabel = styled.span<{\n backgroundColor: string;\n textColor: string;\n}>`\n background-color: ${({ backgroundColor }) => backgroundColor};\n color: ${({ textColor }) => textColor};\n font-weight: bold;\n padding: 2px 5px;\n border-radius: 5px;\n margin-right: 5px;\n margin-bottom: 5px;\n display: inline-block;\n`;\n\nconst StyledArrow = styled(SelectArrow)`\n margin: 40px;\n`;\n\nconst ItemWrapper = styled.div`\n width: 100%;\n margin: auto;\n display: flex;\n justify-content: space-between;\n margin-bottom: 1rem;\n\n &:hover {\n background-color: ${uiColors.darkGray};\n }\n padding: 0.5rem;\n`;\n\nconst ItemNameContainer = styled.div`\n flex: 60%;\n`;\n\nconst ItemIconContainer = styled.div`\n display: flex;\n justify-content: flex-start;\n align-items: center;\n\n flex: 0 0 58px;\n`;\n\nconst SpriteContainer = styled.div`\n position: relative;\n top: -0.5rem;\n left: 0.5rem;\n`;\n\nconst NameValue = styled.div`\n p {\n font-size: 0.75rem;\n margin: 0;\n }\n`;\n\nconst Item = styled.span`\n color: white;\n text-align: center;\n z-index: 1;\n\n width: 100%;\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 QuantityContainer = styled.div<IContainerProps>`\n position: relative;\n display: flex;\n\n min-width: 100px;\n width: 40%;\n justify-content: center;\n align-items: center;\n\n flex: 40%;\n`;\n\nconst QuantityDisplay = styled.div`\n font-size: ${uiFonts.size.small};\n`;\n","import {\n IEquipmentSet,\n ITradeRequestItem,\n ITradeResponseItem,\n TradeTransactionType,\n} from '@rpg-engine/shared';\nimport React, { useState } 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';\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 [sum, setSum] = useState(0);\n const [qtyMap, setQtyMap] = useState(new Map());\n\n const onQuantityChange = (item: ITradeResponseItem, selectedQty: number) => {\n setQtyMap(new Map(qtyMap.set(item.key, selectedQty)));\n\n let newSum = 0;\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) newSum += qty * item.price;\n setSum(newSum);\n });\n };\n\n const isBuy = () => {\n return type == 'buy';\n };\n\n const hasGoldForSale = () => {\n if (isBuy()) {\n return !(sum > characterAvailableGold);\n }\n return true;\n };\n\n const getFinalGold = () => {\n if (isBuy()) {\n return characterAvailableGold - sum;\n } else {\n return characterAvailableGold + sum;\n }\n };\n\n const Capitalize = (word: string) => {\n return word[0].toUpperCase() + word.substring(1);\n };\n\n const onConfirmClick = () => {\n const items: ITradeRequestItem[] = [];\n\n traderItems.forEach(item => {\n const qty = qtyMap.get(item.key);\n if (qty) {\n items.push(Object.assign({}, item, { qty: qty }));\n }\n });\n\n onConfirm(items);\n };\n\n return (\n <DraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"600px\"\n cancelDrag=\"#TraderContainer\"\n scale={scale}\n >\n <>\n <div style={{ width: '100%' }}>\n <Title>{Capitalize(type)} Menu</Title>\n <hr className=\"golden\" />\n </div>\n <TradingComponentScrollWrapper id=\"TraderContainer\">\n {traderItems.map((tradeItem, index) => (\n <ItemWrapper key={`${tradeItem.key}_${index}`}>\n <TradingItemRow\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n onQuantityChange={onQuantityChange}\n traderItem={tradeItem}\n selectedQty={qtyMap.get(tradeItem.key) ?? 0}\n equipmentSet={equipmentSet}\n scale={scale}\n isBuy={isBuy()}\n />\n </ItemWrapper>\n ))}\n </TradingComponentScrollWrapper>\n <GoldWrapper>\n <p>Available Gold:</p>\n <p>${characterAvailableGold.toFixed(2)}</p>\n </GoldWrapper>\n <TotalWrapper>\n <p>Total:</p>\n <p>${sum}</p>\n </TotalWrapper>\n {!hasGoldForSale() ? (\n <AlertWrapper>\n <p> Sorry, not enough money.</p>\n </AlertWrapper>\n ) : (\n <GoldWrapper>\n <p>Final Gold:</p>\n <p>${getFinalGold().toFixed(2)}</p>\n </GoldWrapper>\n )}\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onPointerDown={() => onConfirmClick()}\n >\n Confirm\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onPointerDown={() => onClose()}\n >\n Cancel\n </Button>\n </ButtonWrapper>\n </>\n </DraggableContainer>\n );\n};\n\nconst Title = styled.h1`\n z-index: 22;\n font-size: 0.6rem;\n color: yellow !important;\n`;\n\nconst TradingComponentScrollWrapper = styled.div`\n overflow-y: scroll;\n height: 390px;\n width: 100%;\n margin-top: 1rem;\n`;\n\nconst ItemWrapper = styled.div`\n margin: auto;\n display: flex;\n justify-content: space-between;\n`;\n\nconst TotalWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n justify-content: space-between;\n height: 20px;\n p {\n color: white !important;\n }\n width: 100%;\n margin-left: 0.8rem;\n`;\n\nconst GoldWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n justify-content: space-between;\n height: 20px;\n p {\n color: yellow !important;\n }\n width: 100%;\n margin-left: 0.8rem;\n`;\n\nconst AlertWrapper = styled.div`\n margin-top: 1rem;\n display: flex;\n width: 100%;\n justify-content: center;\n height: 20px;\n p {\n color: red !important;\n }\n`;\n\nconst ButtonWrapper = styled.div`\n display: flex;\n justify-content: space-around;\n padding-top: 20px;\n width: 100%;\n margin-top: 1rem;\n button {\n padding: 0px 50px;\n }\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":["uiColors","lightGray","gray","darkGray","darkYellow","yellow","orange","cardinal","red","darkRed","raisinBlack","navyBlue","purple","darkPurple","blue","darkBlue","brown","lightGreen","brownGreen","white","AsyncDropdown","_ref","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","React","Container","onMouseLeave","DropdownSelect","id","className","onPointerUp","prev","DropdownDisplay","DropdownLabel","BeatLoader","size","color","DropdownOptions","map","key","styled","span","withConfig","displayName","componentId","label","div","props","p","ul","uiFonts","xxsmall","xsmall","small","medium","large","xLarge","xxLarge","xxxLarge","ButtonTypes","Button","disabled","_ref$disabled","children","buttonType","onPointerDown","_objectWithoutPropertiesLoose","_excluded","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","scale","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","SelectArrow","direction","_ref$direction","LeftArrow","RightArrow","LeftArrowIcon","LeftArrowClickIcon","RightArrowIcon","RightArrowClickIcon","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","Column","flex","flexWrap","justifyContent","Chat","chatMessages","onSendChatMessage","onFocus","onBlur","_ref$styles","styles","textColor","buttonColor","buttonBackgroundColor","message","setMessage","scrollChatToBottom","scrollingElement","document","querySelector","scrollTop","scrollHeight","handleSubmit","event","preventDefault","trim","getInputValue","onRenderMessageLines","emitter","createdAt","dayjs","Date","format","onRenderChatMessages","chatMessage","Message","_id","ChatContainer","fallback","MessagesContainer","Form","onSubmit","TextField","e","target","type","autoComplete","autoFocus","RxPaperPlane","input","_ref2","form","_ref3","_ref4","Input","_extends","_objectDestructuringEmpty","rest","ref","innerRef","RPGUIContainerTypes","RPGUIContainer","ChatDeprecated","onCloseButton","MessageText","CustomContainer","FramedGrey","CloseButton","CustomInput","RPGUIButton","SearchCharacter","onChangeCharacterName","recentCharacters","hideSearchCharacterUI","onCharacterClick","characterName","setCharacterName","searchCharacterRef","useRef","timer","setTimeout","current","focus","clearTimeout","handleCharacterClick","character","SearchContainer","placeholder","SearchButton","RxMagnifyingGlass","ListContainer","ListElement","li","ChatRevamp","onSendGlobalChatMessage","tabs","onChangeTab","activeTab","privateChatCharacters","onSendPrivateChatMessage","recentChatCharacters","_ref$recentSelectedCh","recentSelectedChatCharacterId","onPreviousChatCharacterClick","onRemoveRecentChatCharacter","_ref$unseenMessageCha","unseenMessageCharacterIds","onSendTradeMessage","searchCharacterUI","showSearchCharacterUI","showRecentChats","setShowRecentChats","isPrivate","isTrade","handlePreviousChatCharacterClick","TabContainer","tab","Tab","active","PrivateChatContainer","RecentChatTabContainer","isOpen","RecentChatTopBar","BurgerIconContainer","t","hasUnseenMessages","BurgerLineIcon","RecentChatLogContainer","ListElementContainer","StatusDot","isUnseen","includes","RxCross2","sendMessage","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","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","InputRadio","isChecked","onRadioSelect","onRadioClick","countItemFromInventory","itemKey","itemsFromInventory","modalRoot","getElementById","ModalPortal","ReactDOM","createPortal","rarityColor","rarity","ItemRarities","Uncommon","Rare","Epic","Legendary","gemColors","defaultColor","onRenderGems","gemQty","_item$attachedGems","attachedGems","ItemSlotQty","undefined","log","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","RelativeListMenu","onSelected","_ref$fontSize","pos","overflow","params","text","MobileItemTooltip","closeTooltip","equipmentSet","_ref$scale","handleFadeOut","_ref$current","ItemInfoDisplay","isMobile","OptionsContainer","Option","ItemSlotToolTips","isTooltipVisible","isFocused","isContextMenuVisible","isContextMenuDisabled","contextActions","contextMenuPosition","dragScale","setIsContextMenuVisible","setIsTooltipMobileVisible","isTooltipMobileVisible","ItemTooltip","optionId","DraggingContext","createContext","setDraggingItem","useDragging","useContext","DraggingProvider","Provider","generateContextMenuListOptions","actionsByTypeList","contextMenu","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","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","RightHand","ItemSlot","observer","slotIndex","onMouseOver","onMouseOut","_ref$isContextMenuDis","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","isSelectingShortcut","setItemShortcut","setTooltipVisible","_useState4","setContextMenuPosition","_useState5","setIsFocused","_useState6","wasDragged","setWasDragged","_useState7","dragPosition","setDragPosition","_useState8","dropPosition","setDropPosition","dragContainer","_useDragging","draggingItem","_useState9","setContextActions","resetItem","onSuccessfulDrag","quantity","onDraggableStop","isNaN","_e$target","classes","isOutsideDrop","some","elm","window","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","isTouch","clientX","clientY","onDraggableStart","onDraggableProgress","abs","isDraggingItem","onMouseUp","_e$changedTouches$","changedTouches","simulatedEvent","MouseEvent","bubbles","_document$elementFrom","elementFromPoint","subType","ItemSubType","Seed","axis","defaultClassName","position","bounds","ItemContainer","onMouseEnter","setIsTooltipVisible","statisticsToDisplay","higherIsWorse","ItemInfo","itemToCompare","renderStatistics","statistics","_i","_statisticsToDisplay","stat","itemStatistic","_itemToCompare$stat$k","_itemToCompare$stat$k2","toUpperCase","slice","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","useMemo","_item$allowedEquipSlo","allowedSlotTypeCamelCase","camelCase","itemSubTypeCamelCase","itemSubTypeFromEquipment","values","_item$subType","itemFromEquipment","Flex","CompareContainer","Equipped","$isMobile","offset","handleMouseMove","rect","getBoundingClientRect","tooltipWidth","tooltipHeight","isOffScreenRight","innerWidth","isOffScreenBottom","innerHeight","ItemInfoWrapper","CraftingRecipe","recipe","handleRecipeSelect","selectedCraftItemKey","skills","modifyString","str","parts","fileName","replace","words","firstWord","modifiedWords","join","levelInSkill","_skills$level","_skills","_recipe$minCraftingRe","_recipe$minCraftingRe2","minCraftingRequirements","RadioOptionsWrapper","SpriteAtlasWrapper","canCraft","MinCraftingRequirementsText","levelIsOk","_recipe$levelIsOk","_recipe$minCraftingRe3","_recipe$minCraftingRe4","_recipe$minCraftingRe5","_recipe$minCraftingRe6","ingredients","ingredient","itemQtyInInventory","Recipe","Ingredient","isQuantityOk","qty","desktop","mobileLanscape","mobilePortrait","CraftBook","onClose","onSelect","onCraftItem","craftablesItems","savedSelectedType","craftItemKey","setCraftItemKey","selectedType","setSelectedType","setSize","isCraftingDisabled","setIsCraftingDisabled","handleResize","renderItemTypes","itemTypes","filter","sort","a","b","localeCompare","rows","row","gap","Framed","Wrapper","Subtitle","ContentContainer","ItemTypes","RadioInputScroller","ButtonWrapper","Dropdown","firstOption","change","o","DropdownSelectorContainer","details","Details","useCursorPosition","setPosition","scalePosition","useCallback","setFromEvent","touches","scaledPosition","cleanup","handleEvent","CONTAINER_SIZE","OFFSET","DraggedItem","_useCursorPosition","centeredX","centeredY","stackInfo","_item$_id","SpriteContainer","pulse","attrs","top","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","TableTab","activeTextColor","inactiveColor","borderColor","ListItem","CharacterName","onClick","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","floor","linesPerDiv","textChunks","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","hasNextChunk","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","right","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","isSelected","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","SlotsContainer","useScrollOnDrag","containerRef","threshold","scrollStep","animationFrameId","startScrolling","scroll","_containerRef$current","bottom","maxScrollTop","clientHeight","distanceFromTop","distanceFromBottom","requestAnimationFrame","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","max","typeClass","GoldSlider","handleChange","Number","min","ItemQuantitySelector","onConfirm","setValue","inputRef","select","closeSelector","StyledContainer","StyledForm","numberValue","noValidate","StyledInput","newValue","Slider","ItemQuantitySelectorModal","quantitySelect","setQuantitySelect","QuantitySelectorContainer","maxQuantity","callback","MIN_SLOTS_FOR_SCROLL","_ref$disableContextMe","disableContextMenu","_quantity","_useScrollOnDrag","handleSetShortcut","onDragStartScrollingEvents","onDragEndScrollingEvents","onRenderSlots","slotQty","_itemContainer$slots","ItemsContainer","isScrollable","ItemSelector","elementValue","imageKey","LeaderboardTable","rankType","isTopSkillEntry","entry","TableRowWrapper","TableRowValue","Leaderboard","onChangeRankType","onChangeClassType","skillOptions","onChangeSkillType","classOptions","rankOptions","itemsContainer","_itemsContainer$curre","scrollTo","rankTypeOptions","skillTypeOptions","classTypeOptions","WrapperContainer","StyledDropdown","ItemComponentScrollWrapper","TableWrapper","ListMenu","Pager","totalItems","currentPage","itemsPerPage","onPageChange","totalPages","ceil","PagerContainer","ConfirmModal","Background","stopPropagation","ButtonsWrapper","MarketplaceRows","itemPrice","onMarketPlaceItemBuy","onMarketPlaceItemRemove","MarketplaceWrapper","ItemIconContainer","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","_props$styles","CustomTab","MultitabType","TabsContainer","Brown","selectedTab","setSelectedTab","onRenderTabs","onGetContainerType","Gray","BodyContainer","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","quest","_formatStatus","QuestCard","QuestItem","Label","Value","formatText","getStatusColor","status","formatStatus","formatObjectives","objectives","formatRewards","rewards","NoQuestContainer","isArray","objective","_killObjective$creatu","_killObjective$creatu2","_killObjective$killCo","_killObjective$killCo2","killObjective","creatureKeys","killCount","killCountTarget","_interactionObjective","interactionObjective","targetNPCkey","reward","itemKeysFormatted","_reward$itemKeys","itemKeys","Boolean","spellKeysFormatted","_reward$spellKeys","spellKeys","formattedReward","QuestStatus","Pending","InProgress","Completed","c","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","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","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","_ref$activeColor","activeColor","_ref$activeTextColor","_ref$inactiveColor","_ref$borderColor","_ref$hoverColor","hoverColor","setActiveTab","TabHeader","TabButton","ContentWrapper","_tabs$find","TextArea","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","_periodOfDaySrcFiles","PeriodOfDay","Morning","MorningGif","Afternoon","AfternoonGif","Night","NightGif","GifContainer","TimeWidget","TimeClock","WidgetContainer","DayNightContainer","Time","ClockWidgetImg","outerQty","TradingItemRow","onQuantityChange","traderItem","selectedQty","isBuy","_traderItem$stackQty","renderAccountTypeIndicator","canBePurchasedOnlyByPremiumPlans","accountType","UserAccountTypes","Free","backgroundColor","PremiumBronze","PremiumSilver","PremiumGold","PremiumUltimate","PremiumLabel","capitalize","ItemWrapper","ItemNameContainer","NameValue","StyledArrow","QuantityDisplay","TradingMenu","traderItems","characterAvailableGold","sum","setSum","Map","qtyMap","setQtyMap","set","newSum","get","hasGoldForSale","getFinalGold","Capitalize","onConfirmClick","assign","TradingComponentScrollWrapper","tradeItem","_qtyMap$get","GoldWrapper","TotalWrapper","AlertWrapper","Truncate","ZoomableImage","isZoomed","setIsZoomed","zoomPosition","setZoomPosition","_e$currentTarget$getB","currentTarget","handleTouchMove","_e$currentTarget$getB2","touch","handleZoomToggle","onMouseMove","onTouchMove","objectFit","transformOrigin","transition","cursor","TutorialStepper","lessons","onLessonFinish","imageStyle","generateLessons","lesson","LessonContainer","LessonTitle","LessonImageWrapper","LessonImage","imageUrl","href","rel","LessonFooter","body","LessonBody","dangerouslySetInnerHTML","__html"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAO,IAAMA,QAAQ,GAAG;EACtBC,SAAS,EAAE,MAAM;EACjBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,UAAU,EAAE,SAAS;EACrBC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE,SAAS;EACjBC,QAAQ,EAAE,SAAS;EACnBC,GAAG,EAAE,SAAS;EACdC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,QAAQ,EAAE,SAAS;EACnBC,MAAM,EAAE,SAAS;EACjBC,UAAU,EAAE,SAAS;EACrBC,IAAI,EAAE,SAAS;EACfC,QAAQ,EAAE,SAAS;EACnBC,KAAK,EAAE,SAAS;EAChBC,UAAU,EAAE,SAAS;EACrBC,UAAU,EAAE,SAAS;EACrBC,KAAK,EAAE;CACR;;ICAYC,aAAa,GAAkC,SAA/CA,aAAaA,CAAAC,IAAA;;MACxBC,OAAO,GAAAD,IAAA,CAAPC,OAAO;IACPC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IAAAC,YAAA,GAAAL,IAAA,CACZM,OAAO;IAAPA,OAAO,GAAAD,YAAA,cAAG,KAAK,GAAAA,YAAA;EAEf,IAAME,UAAU,GAAGC,OAAM,EAAE;EAE3B,IAAAC,SAAA,GAA0CC,cAAQ,CAChDN,YAAY,KAAIH,OAAO,qBAAAU,SAAA,GAAPV,OAAO,CAAG,CAAC,CAAC,qBAAZU,SAAA,CAAcC,KAAK,EACpC;IAFMC,aAAa,GAAAJ,SAAA;IAAEK,gBAAgB,GAAAL,S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