@rpg-engine/long-bow 0.3.29 → 0.3.30

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.production.min.js","sources":["../src/constants/uiFonts.ts","../src/components/Button.tsx","../src/components/RPGUIContainer.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/Chatdeprecated/ChatDeprecated.tsx","../src/constants/uiColors.ts","../src/hooks/useOutsideAlerter.ts","../src/components/NPCDialog/NPCDialog.tsx","../src/components/DraggableContainer.tsx","../src/components/Dropdown.tsx","../src/components/CraftBook/CraftBook.tsx","../src/components/DropdownSelectorContainer.tsx","../src/components/RelativeListMenu.tsx","../src/components/Item/Cards/ItemTooltip.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../src/components/Item/Inventory/ItemSlot.tsx","../src/components/Equipment/EquipmentSet.tsx","../src/constants/uiDevices.ts","../src/components/typography/DynamicText.tsx","../src/components/NPCDialog/NPCDialogText.tsx","../src/libs/StringHelpers.ts","../src/hooks/useEventListener.ts","../src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx","../src/components/NPCDialog/NPCMultiDialog.tsx","../src/components/RangeSlider.tsx","../src/components/HistoryDialog.tsx","../src/components/Abstractions/SlotsContainer.tsx","../src/components/Item/Inventory/ItemQuantitySelector.tsx","../src/components/Item/Inventory/ItemContainer.tsx","../src/components/itemSelector/ItemSelector.tsx","../src/components/ListMenu.tsx","../src/components/ProgressBar.tsx","../src/components/QuestInfo/QuestInfo.tsx","../src/components/QuestList.tsx","../src/components/RPGUIRoot.tsx","../src/components/SimpleProgressBar.tsx","../src/components/SkillProgressBar.tsx","../src/components/SkillsContainer.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/CheckButton.tsx","../src/components/RadioButton.tsx","../src/components/TextArea.tsx"],"sourcesContent":["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 onClick?: (e: any) => void;\n}\n\nexport const Button = ({\n disabled = false,\n children,\n buttonType,\n onClick,\n ...props\n}: IButtonProps) => {\n return (\n <ButtonContainer\n className={`${buttonType}`}\n disabled={disabled}\n {...props}\n onTouchStart={onClick}\n onClick={onClick}\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 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 { 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 onClick?: () => void;\n containerStyle?: any;\n imgStyle?: any;\n imgScale?: number;\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 onClick,\n containerStyle,\n grayScale = false,\n opacity = 1,\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] || atlasJSON.frames['others/no-image.png'];\n\n if (!spriteData) throw new Error(`Sprite ${spriteKey} not found in atlas!`);\n\n return (\n <Container\n width={width}\n height={height}\n hasHover={grayScale}\n onClick={onClick}\n style={containerStyle}\n >\n <ImgSprite\n className=\"sprite-from-atlas-img\"\n atlasIMG={atlasIMG}\n frame={spriteData.frame}\n scale={imgScale}\n grayScale={grayScale}\n opacity={opacity}\n style={imgStyle}\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}\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: 8px;\n left: 8px;\n filter: ${props => (props.grayScale ? 'grayscale(100%)' : 'none')};\n opacity: ${props => props.opacity};\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 onClick: () => void;\n size?: number;\n}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n onClick,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow size={size} onClick={() => onClick()} {...props}></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n onClick={() => onClick()}\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,\n maxWidth,\n fontSize,\n center,\n}: IProps) => {\n return (\n <Container maxWidth={maxWidth} fontSize={fontSize} center={center}>\n <div className={`ellipsis-${maxLines}-lines`}>{children}</div>\n </Container>\n );\n};\n\ninterface IContainerProps {\n maxWidth?: string;\n fontSize?: string;\n center?: boolean;\n}\n\nconst Container = styled.div<IContainerProps>`\n .ellipsis-1-lines {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n max-width: ${props => props.maxWidth};\n\n ${props => props.center && `margin: 0 auto;`}\n }\n .ellipsis-2-lines {\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 }\n .ellipsis-3-lines {\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 }\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\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n <SelectArrow\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={onRightClick}\n ></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 entitiesJSON from '../../mocks/atlas/entities/entities.json';\nimport entitiesIMG from '../../mocks/atlas/entities/entities.png';\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 onChange: (textureKey: string) => void;\n}\n\nexport const CharacterSelection: React.FC<ICharacterSelectionProps> = ({\n availableCharacters,\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 && (\n <ErrorBoundary>\n <SpriteFromAtlas\n spriteKey={selectedSpriteKey}\n atlasIMG={entitiesIMG}\n atlasJSON={entitiesJSON}\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 { IChatMessage } from '@rpg-engine/shared';\nimport dayjs from 'dayjs';\nimport React, { useEffect, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { CiPaperplane } from 'react-icons/ci';\nimport styled from 'styled-components';\nimport { Column } from '../shared/Column';\n\ninterface IEmitter {\n _id: string;\n name: string;\n}\n\nexport interface IChatProps {\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 sendMessage: boolean;\n color?: string;\n buttonColor?: string;\n buttonBackgroundColor?: string;\n}\n\nexport const Chat: React.FC<IChatProps> = ({\n chatMessages,\n onSendChatMessage,\n width = '80%',\n height = 'auto',\n onFocus,\n onBlur,\n color = '#c65102',\n buttonColor = '#005b96',\n buttonBackgroundColor = '#FFF',\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 <Message color={color} key={`${_id}_${index}`}>\n {onRenderMessageLines(emitter, createdAt, message)}\n </Message>\n ))\n ) : (\n <Message color={color}>No messages available.</Message>\n );\n };\n\n return (\n <ChatContainer width={width} height={height}>\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 />\n </Column>\n <Column justifyContent=\"flex-end\">\n <Button\n buttonColor={buttonColor}\n buttonBackgroundColor={buttonBackgroundColor}\n id=\"chat-send-button\"\n style={{ borderRadius: '20%' }}\n >\n <CiPaperplane 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};\n width: ${({ width }) => width};\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 .chat-body {\n max-height: auto;\n overflow-y: auto;\n }\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 { 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 '../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, 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 onClick={onCloseButton} onTouchStart={onCloseButton}>\n X\n </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","export const uiColors = {\n lightGray: '#757161',\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: '#6DAA2C',\n brownGreen: '#346524',\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 from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../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 <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\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, useRef } from 'react';\nimport Draggable, { DraggableData } from 'react-draggable';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport { IPosition } from '../types/eventTypes';\nimport { RPGUIContainerTypes } from './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 onOutsideClick?: () => void;\n initialPosition?: IPosition;\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 onOutsideClick,\n initialPosition = { x: 0, y: 0 },\n}) => {\n const draggableRef = useRef(null);\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,${cancelDrag}`}\n onDrag={(_e, data: DraggableData) => {\n if (onPositionChange) {\n onPositionChange({\n x: data.x,\n y: data.y,\n });\n }\n }}\n defaultPosition={initialPosition}\n >\n <Container\n ref={draggableRef}\n width={width}\n height={height || 'auto'}\n className={`rpgui-container ${type} ${className}`}\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 onClick={onCloseButton}\n onTouchStart={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}\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 &.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.1rem;\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`;\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, { 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;\n}\n\nexport interface IDropdownProps {\n options: IOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n}\n\nexport const Dropdown: React.FC<IDropdownProps> = ({\n options,\n width,\n onChange,\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>('');\n const [selectedOption, setSelectedOption] = useState<string>('');\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n const firstOption = options[0];\n\n if (firstOption && !selectedValue) {\n setSelectedValue(firstOption.value);\n setSelectedOption(firstOption.option);\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 onClick={() => setOpened(prev => !prev)}\n >\n <label>▼</label> {selectedOption}\n </DropdownSelect>\n\n <DropdownOptions className=\"rpgui-dropdown-imp\" opened={opened}>\n {options.map(option => {\n return (\n <li\n key={option.id}\n onClick={() => {\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\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n}>`\n position: absolute;\n width: 100%;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n`;\n","import { ICraftableItem, ItemSubType } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { RPGUIContainerTypes } from '../RPGUIContainer';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\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}\n\nexport interface ShowMessage {\n show: boolean;\n index: number;\n}\n\nexport const CraftBook: React.FC<IItemCraftSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n onClose,\n onSelect,\n onCraftItem,\n craftablesItems,\n}) => {\n let optionsId: number = 0;\n const [isShown, setIsShown] = useState<ShowMessage>({\n show: false,\n index: 200,\n });\n const [craftItem, setCraftItem] = useState<string>();\n\n const getDropdownOptions = () => {\n const options: IOptionsProps[] = [];\n\n Object.keys(ItemSubType).forEach(key => {\n if (key === 'CraftingResource' || key === 'DeadBody') {\n return; // we can't craft crafting resouces...\n }\n\n options.push({\n id: optionsId,\n value: key,\n option: key,\n });\n optionsId += 1;\n });\n\n return options;\n };\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 handleClick = (value: string) => {\n setCraftItem(value);\n };\n\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>{'Craftbook'}</Title>\n <Subtitle>{'Select an item to craft'}</Subtitle>\n <hr className=\"golden\" />\n </div>\n <Dropdown\n options={getDropdownOptions()}\n onChange={value => onSelect(value)}\n />\n <RadioInputScroller>\n {craftablesItems?.map((option, index) => (\n <RadioOptionsWrapper key={index}>\n <SpriteAtlasWrapper>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.texturePath}\n imgScale={3}\n grayScale={!option.canCraft}\n />\n </SpriteAtlasWrapper>\n <div>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={option.name}\n name=\"test\"\n disabled={!option.canCraft}\n checked={craftItem === option.key}\n onChange={() => handleClick(option.key)}\n />\n <label\n onClick={() => handleClick(option.key)}\n style={{ display: 'flex', alignItems: 'center' }}\n onMouseEnter={() => setIsShown({ show: true, index: index })}\n onMouseLeave={() => setIsShown({ show: false, index: index })}\n >\n {modifyString(option.name)}\n </label>\n\n {isShown &&\n isShown.index === index &&\n option.ingredients.map((option, index) => (\n <Recipes key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.texturePath}\n imgScale={1}\n />\n <StyledItem>\n {modifyString(option.key)} ({option.qty}x)\n </StyledItem>\n </Recipes>\n ))}\n </div>\n </RadioOptionsWrapper>\n ))}\n </RadioInputScroller>\n <ButtonWrapper>\n <Button buttonType={ButtonTypes.RPGUIButton} onClick={onClose}>\n Cancel\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => onCraftItem(craftItem)}\n >\n Craft\n </Button>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst StyledItem = styled.div`\n margin-left: 10px;\n`;\n\nconst Recipes = styled.div`\n font-size: 0.6rem;\n color: yellow !important;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\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 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 React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\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}\n\nexport const RelativeListMenu: React.FC<IRelativeMenuProps> = ({\n options,\n onSelected,\n onOutsideClick,\n fontSize = 0.8,\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 <Container fontSize={fontSize} ref={ref}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onClick={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n );\n};\n\ninterface IContainerProps {\n fontSize?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: absolute;\n top: 1rem;\n left: 4rem;\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 React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../../constants/uiFonts';\n\ninterface IProps {\n label: string;\n}\n\nexport const ItemTooltip: React.FC<IProps> = ({ label }) => {\n return (\n <Container>\n <div>{label}</div>\n </Container>\n );\n};\n\nconst Container = styled.div`\n z-index: 2;\n position: absolute;\n top: 1rem;\n left: 4rem;\n\n font-size: ${uiFonts.size.xxsmall};\n color: white;\n background-color: black;\n border-radius: 5px;\n padding: 0.5rem;\n min-width: 20px;\n width: 100%;\n text-align: center;\n\n opacity: 0.75;\n`;\n","import {\n ActionsForEquipmentSet,\n ActionsForInventory,\n ActionsForLoot,\n ActionsForMapContainer,\n IItem,\n ItemContainerType,\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) => {\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 (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\n return contextActionMenu;\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n ItemContainerType,\n ItemSlotType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Draggable from 'react-draggable';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { IPosition } from '../../../types/eventTypes';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { Ellipsis } from '../../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { generateContextMenu, IContextMenuItem } from './itemContainerHelper';\n\nconst 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 onClick: (\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 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}\n\nexport const ItemSlot: React.FC<IProps> = observer(\n ({\n slotIndex,\n item,\n itemContainerType: containerType,\n slotSpriteMask,\n onMouseOver,\n onMouseOut,\n onClick,\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 }) => {\n const [isTooltipVisible, setTooltipVisible] = useState(false);\n\n const [isContextMenuVisible, setIsContextMenuVisible] = useState(false);\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 [contextActions, setContextActions] = useState<IContextMenuItem[]>(\n []\n );\n\n useEffect(() => {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n\n if (item) {\n setContextActions(generateContextMenu(item, containerType));\n }\n }, [item]);\n\n useEffect(() => {\n if (onDrop && item && dropPosition) {\n onDrop(item, dropPosition);\n }\n }, [dropPosition]);\n\n const getStackInfo = (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 <ItemQtyContainer key={`qty-${itemId}`}>\n <Ellipsis maxLines={1} maxWidth=\"48px\">\n <ItemQty className={qtyClassName}> {stackQty} </ItemQty>\n </Ellipsis>\n </ItemQtyContainer>\n );\n }\n return undefined;\n };\n\n const renderItem = (itemToRender: IItem | null) => {\n const element = [];\n\n if (itemToRender?.texturePath) {\n element.push(\n <ErrorBoundary key={itemToRender._id}>\n <SpriteFromAtlas\n key={itemToRender._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: itemToRender.texturePath,\n texturePath: itemToRender.texturePath,\n stackQty: itemToRender.stackQty || 1,\n },\n atlasJSON\n )}\n imgScale={3}\n />\n </ErrorBoundary>\n );\n }\n const stackInfo = getStackInfo(\n itemToRender?._id ?? '',\n itemToRender?.stackQty ?? 0\n );\n if (stackInfo) {\n element.push(stackInfo);\n }\n\n return element;\n };\n\n const renderEquipment = (itemToRender: IItem | null) => {\n if (\n itemToRender?.texturePath &&\n itemToRender.allowedEquipSlotType?.includes(slotSpriteMask!)\n ) {\n const element = [];\n\n element.push(\n <ErrorBoundary key={itemToRender._id}>\n <SpriteFromAtlas\n key={itemToRender._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: itemToRender.texturePath,\n texturePath: itemToRender.texturePath,\n stackQty: itemToRender.stackQty || 1,\n },\n atlasJSON\n )}\n imgScale={3}\n />\n </ErrorBoundary>\n );\n const stackInfo = getStackInfo(\n itemToRender?._id ?? '',\n itemToRender?.stackQty ?? 0\n );\n if (stackInfo) {\n element.push(stackInfo);\n }\n return element;\n } else {\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 />\n </ErrorBoundary>\n );\n }\n };\n\n const onRenderSlot = (itemToRender: IItem | null) => {\n switch (containerType) {\n case ItemContainerType.Equipment:\n return renderEquipment(itemToRender);\n case ItemContainerType.Inventory:\n return renderItem(itemToRender);\n default:\n return renderItem(itemToRender);\n }\n };\n\n const resetItem = () => {\n setTooltipVisible(false);\n setWasDragged(false);\n };\n\n const onSuccesfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) setDragPosition({ x: 0, y: 0 });\n else if (item) {\n onDragEnd(quantity);\n resetItem();\n }\n };\n\n return (\n <Container\n className=\"rpgui-icon empty-slot\"\n onMouseUp={() => {\n const data = item ? item : null;\n if (onPlaceDrop) 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 >\n <Draggable\n defaultClassName={item ? 'draggable' : 'empty-slot'}\n onStop={(e, data) => {\n if (wasDragged && item) {\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())\n return;\n\n if (\n item.stackQty &&\n item.stackQty !== 1 &&\n openQuantitySelector\n )\n openQuantitySelector(item.stackQty, onSuccesfulDrag);\n else onSuccesfulDrag(item.stackQty);\n } else {\n resetItem();\n setIsFocused(false);\n setDragPosition({ x: 0, y: 0 });\n }\n }, 100);\n } else if (item) {\n if (!isContextMenuDisabled)\n setIsContextMenuVisible(!isContextMenuVisible);\n\n onClick(item.type, containerType, item);\n }\n }}\n onStart={() => {\n if (!item) {\n return;\n }\n\n if (onDragStart) {\n onDragStart(item, slotIndex, containerType);\n }\n }}\n onDrag={() => {\n setWasDragged(true);\n setIsFocused(true);\n }}\n position={dragPosition}\n cancel=\".empty-slot\"\n >\n <ItemContainer\n ref={dragContainer}\n isFocused={isFocused}\n onMouseOver={event => {\n onMouseOver(event, slotIndex, item, event.clientX, event.clientY);\n }}\n onMouseOut={() => {\n if (onMouseOut) onMouseOut();\n }}\n onMouseEnter={() => {\n setTooltipVisible(true);\n }}\n onMouseLeave={() => {\n setTooltipVisible(false);\n }}\n >\n {onRenderSlot(item)}\n </ItemContainer>\n </Draggable>\n\n {isTooltipVisible && item && !isFocused && (\n <ItemTooltip label={item.name} />\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 />\n )}\n </Container>\n );\n }\n);\n\nconst Container = styled.div`\n margin: 0.1rem;\n .sprite-from-atlas-img {\n position: relative;\n top: 1.5rem;\n left: 1.5rem;\n }\n position: relative;\n`;\n\nconst ItemContainer = styled.div<{ isFocused?: boolean }>`\n width: 100%;\n height: 100%;\n position: relative;\n\n ${props => props.isFocused && 'z-index: 100; pointer-events: none;'}\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 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 { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { RPGUIContainerTypes } from '../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 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}\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}) => {\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 onClick={(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 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 <DraggableContainer\n title={'Equipments'}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"330px\"\n cancelDrag=\".equipment-container-body\"\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 );\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 isMobile from 'is-mobile';\n\nexport const IS_MOBILE_OR_TABLET = isMobile({\n tablet: true,\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 }, 50);\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 onClick={() => {\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","export const chunkString = (str: string, length: number) => {\n return str.match(new RegExp('.{1,' + length + '}', 'g'));\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 onClick={() => 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, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUIContainer';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\nimport pressSpaceGif from './img/space.gif';\nimport { NPCDialogText } from './NPCDialogText';\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, 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}\n\nexport const RangeSlider: React.FC<IRangeSliderProps> = ({\n type,\n valueMin,\n valueMax,\n width,\n onChange,\n value,\n}) => {\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)) * (calculatedWidth - 35) +\n 10\n )\n );\n }, [value, valueMin, valueMax]);\n\n const typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';\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 onChange={e => onChange(Number(e.target.value))}\n value={value}\n className=\"rpgui-cursor-point\"\n />\n </div>\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, 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 from 'react';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUIContainer';\n\ninterface IProps {\n children: React.ReactNode;\n title: string;\n onClose?: () => void;\n onPositionChange?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n}\n\nexport const SlotsContainer: React.FC<IProps> = ({\n children,\n title,\n onClose,\n onPositionChange,\n onOutsideClick,\n initialPosition,\n}) => {\n return (\n <DraggableContainer\n title={title}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n width=\"330px\"\n cancelDrag=\".item-container-body\"\n onPositionChange={({ x, y }) => {\n if (onPositionChange) {\n onPositionChange({ x, y });\n }\n }}\n onOutsideClick={onOutsideClick}\n initialPosition={initialPosition}\n >\n {children}\n </DraggableContainer>\n );\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../../Button';\nimport { Input } from '../../Input';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../../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\n className=\"container-close\"\n onClick={onClose}\n onTouchStart={onClose}\n >\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 { IItem, IItemContainer, ItemContainerType } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { SlotsContainer } from '../../Abstractions/SlotsContainer';\nimport { ItemQuantitySelector } from './ItemQuantitySelector';\n\nimport { IPosition } from '../../../types/eventTypes';\nimport { ItemSlot } from './ItemSlot';\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 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}\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}) => {\n const [quantitySelect, setQuantitySelect] = useState({\n isOpen: false,\n maxQuantity: 1,\n callback: (_quantity: number) => {},\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 onClick={(ItemType, ContainerType, item) => {\n if (onItemClick) onItemClick(item, ItemType, ContainerType);\n }}\n onSelected={(optionId: string, item: IItem) => {\n if (onSelected) onSelected(optionId, item);\n }}\n onDragStart={(item, slotIndex, itemContainerType) => {\n if (onItemDragStart)\n onItemDragStart(item, slotIndex, itemContainerType);\n }}\n onDragEnd={quantity => {\n if (onItemDragEnd) onItemDragEnd(quantity);\n }}\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 onOutsideDrop={(item, position) => {\n if (onOutsideDrop) onOutsideDrop(item, position);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n }\n return slots;\n };\n\n return (\n <>\n <SlotsContainer\n title={itemContainer.name || 'Container'}\n onClose={onClose}\n initialPosition={initialPosition}\n >\n <ItemsContainer className=\"item-container-body\">\n {onRenderSlots()}\n </ItemsContainer>\n </SlotsContainer>\n {quantitySelect.isOpen && (\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 )}\n </>\n );\n};\n\nconst ItemsContainer = styled.div`\n max-width: 280px;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n`;\n\nconst QuantitySelectorContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../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 onClick={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} onClick={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 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 onClick={() => {\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 { 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}\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}) => {\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 >\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}\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`;\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 '../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}\n\nexport const QuestInfo: React.FC<IQuestInfoProps> = ({\n quests,\n onClose,\n buttons,\n onChangeQuest,\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 >\n {quests.length >= 2 ? (\n <QuestsContainer>\n {currentIndex !== 0 && (\n <SelectArrow\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n )}\n {currentIndex !== quests.length - 1 && (\n <SelectArrow\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={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 onClick={() =>\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 onClick={() =>\n button.onClick(quests[0]._id, quests[0].npcId)\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n )}\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 600px;\n padding: 0 0 0 0 !important;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n height: auto;\n }\n .container-close {\n position: absolute;\n margin-left: auto;\n top: 20px;\n padding-right: 5px;\n }\n img {\n display: inline-block;\n vertical-align: middle;\n line-height: normal;\n }\n`;\n\nconst QuestContainer = styled.div`\n margin-right: 40px;\n margin-left: 40px;\n`;\n\nconst QuestsContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Content = styled.div`\n padding: 18px;\n h1 {\n text-align: left;\n margin: 14px 0px;\n }\n`;\n\nconst QuestSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n margin-bottom: 10px;\n hr {\n margin: 0px;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst QuestColumn = styled(Column)`\n padding-top: 5px;\n margin-bottom: 20px;\n display: flex;\n justify-content: space-evenly;\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 1rem;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Thumbnail = styled.img`\n color: white;\n z-index: 22;\n width: 32px * 1.5;\n margin-right: 0.5rem;\n position: relative;\n top: -4px;\n`;\n","import { IQuest } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { DraggableContainer } from './DraggableContainer';\nimport { RPGUIContainerTypes } from './RPGUIContainer';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n onClose: () => void;\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests, onClose }) => {\n return (\n <QuestDraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"520px\"\n >\n <div style={{ width: '100%' }}>\n <Title>Quests</Title>\n <hr className=\"golden\" />\n\n <QuestListContainer>\n {quests ? (\n quests.map((quest, i) => (\n <div className=\"quest-item\" key={i}>\n <span className=\"quest-number\">{i + 1}</span>\n <div className=\"quest-detail\">\n <p className=\"quest-detail__title\">{quest.title}</p>\n <p className=\"quest-detail__description\">\n {quest.description}\n </p>\n </div>\n </div>\n ))\n ) : (\n <NoQuestContainer>\n <p>There are no ongoing quests</p>\n </NoQuestContainer>\n )}\n </QuestListContainer>\n </div>\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n .container-close {\n top: 10px;\n right: 10px;\n }\n\n .quest-title {\n text-align: left;\n margin-left: 44px;\n margin-top: 20px;\n color: yellow;\n }\n\n .quest-desc {\n margin-top: 12px;\n margin-left: 44px;\n }\n\n .rpgui-progress {\n min-width: 80%;\n margin: 0 auto;\n }\n`;\n\nconst Title = styled.h1`\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: yellow !important;\n`;\n\nconst QuestListContainer = styled.div`\n margin-top: 20px;\n margin-bottom: 40px;\n overflow-y: auto;\n max-height: 400px;\n\n .quest-item {\n display: flex;\n align-items: flex-start;\n margin-bottom: 12px;\n }\n\n .quest-number {\n border-radius: 50%;\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n background-color: brown;\n flex-shrink: 0;\n }\n\n .quest-number.completed {\n background-color: yellow;\n }\n\n p {\n margin: 0;\n }\n\n .quest-detail__title {\n color: yellow;\n }\n\n .quest-detail__description {\n margin-top: 5px;\n }\n .Noquest-detail__description {\n margin-top: 5px;\n margin: auto;\n }\n`;\nconst NoQuestContainer = styled.div`\n text-align: center;\n p {\n margin-top: 5px;\n }\n`;\n","import React from 'react';\nimport 'rpgui/rpgui.min.css';\nimport 'rpgui/rpgui.min.js';\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 <div className=\"rpgui-content\">{children}</div>;\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 return (\n <Container className=\"simple-progress-bar\">\n <ProgressBarContainer margin={margin}>\n <BackgroundBar>\n <Progress value={value} 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 ISimpleProgressBarThemeProps {\n value: number;\n bgColor: string;\n}\n\nconst Progress = styled.span`\n background-color: ${(props: ISimpleProgressBarThemeProps) => props.bgColor};\n width: ${(props: ISimpleProgressBarThemeProps) => props.value}%;\n`;\n\ninterface ISimpleProgressBarTheme2Props {\n margin: number;\n}\n\nconst ProgressBarContainer = styled.div`\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: ISimpleProgressBarTheme2Props) => props.margin}px;\n`;\n","import { getSPForLevel } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { ErrorBoundary } from './Item/Inventory/ErrorBoundary';\nimport { SpriteFromAtlas } from './shared/SpriteFromAtlas';\nimport { SimpleProgressBar } from './SimpleProgressBar';\n\nexport interface ISkillProgressBarProps {\n skillName: string;\n bgColor: string;\n level: number;\n skillPoints: number;\n skillPointsToNextLevel?: number;\n texturePath: string;\n showSkillPoints?: boolean;\n atlasJSON: any;\n atlasIMG: any;\n}\n\nexport const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({\n bgColor,\n skillName,\n level,\n skillPoints,\n skillPointsToNextLevel,\n texturePath,\n showSkillPoints = true,\n atlasIMG,\n atlasJSON,\n}) => {\n if (!skillPointsToNextLevel) {\n skillPointsToNextLevel = getSPForLevel(level + 1);\n }\n\n const nextLevelSPWillbe = skillPoints + skillPointsToNextLevel;\n\n const ratio = (skillPoints / nextLevelSPWillbe) * 100;\n\n return (\n <>\n <ProgressTitle>\n <TitleName>{skillName}</TitleName>\n <ValueDisplay>lv {level}</ValueDisplay>\n </ProgressTitle>\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 <ProgressBarContainer>\n <SimpleProgressBar value={ratio} bgColor={bgColor} />\n </ProgressBarContainer>\n </ProgressBody>\n {showSkillPoints && (\n <SkillDisplayContainer>\n <SkillPointsDisplay>\n {skillPoints}/{nextLevelSPWillbe}\n </SkillPointsDisplay>\n </SkillDisplayContainer>\n )}\n </>\n );\n};\n\nconst ProgressBarContainer = styled.div`\n position: relative;\n top: 8px;\n width: 100%;\n height: auto;\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.6rem !important;\n font-weight: bold;\n text-align: center;\n`;\n\nconst TitleName = styled.span`\n margin-left: 5px;\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: row;\n justify-content: space-between;\n span {\n font-size: 0.6rem;\n }\n`;\n","import { ISkill, ISkillDetails } from '@rpg-engine/shared';\nimport _ from 'lodash';\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}\n\nconst skillProps = {\n attributes: {\n color: uiColors.purple,\n values: {\n stamina: 'spell-icons/regenerate.png',\n magic: 'spell-icons/fireball.png',\n magicResistance: 'spell-icons/freeze.png',\n strength: 'spell-icons/enchanted-blow.png',\n resistance: 'spell-icons/magic-shield.png',\n dexterity: 'spell-icons/haste.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 mining: 'crafting-resources/iron-ingot.png',\n lumberjacking: 'crafting-resources/greater-wooden-log.png',\n cooking: 'foods/chickens-meat.png',\n alchemy: 'potions/greater-mana-potion.png',\n },\n },\n};\n\nexport const SkillsContainer: React.FC<ISkillContainerProps> = ({\n onCloseButton,\n skill,\n atlasIMG,\n atlasJSON,\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 //@ts-ignore\n const skillDetails = (skill[key] as unknown) as ISkillDetails;\n\n output.push(\n <SkillProgressBar\n key={key}\n skillName={_.capitalize(key)}\n bgColor={skillCategoryColor}\n level={skillDetails.level || 0}\n skillPoints={Math.round(skillDetails.skillPoints) || 0}\n skillPointsToNextLevel={\n Math.round(skillDetails.skillPointsToNextLevel) || 0\n }\n texturePath={value}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n }\n\n return output;\n };\n\n return (\n <SkillsDraggableContainer title=\"Skills\">\n {onCloseButton && (\n <CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>\n X\n </CloseButton>\n )}\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={Math.round(skill.xpToNextLevel) || 0}\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 </SkillsDraggableContainer>\n );\n};\n\nconst SkillsDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 400px;\n height: 90%;\n overflow-y: scroll;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n width: auto;\n height: auto;\n }\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","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}\n\nexport const TimeWidget: React.FC<IClockWidgetProps> = ({\n onClose,\n TimeClock,\n periodOfDay,\n}) => {\n return (\n <Draggable>\n <WidgetContainer>\n <CloseButton onClick={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 { ITradeResponseItem, getItemTextureKeyPath } 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 { 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}\n\nexport const TradingItemRow: React.FC<ITradeComponentProps> = ({\n atlasIMG,\n atlasJSON,\n onQuantityChange,\n traderItem,\n selectedQty,\n}) => {\n const onLeftClick = () => {\n if (selectedQty > 0) {\n const newQuantity = selectedQty - 1;\n onQuantityChange(traderItem, newQuantity);\n }\n };\n const onRightClick = () => {\n if (selectedQty < (traderItem.qty ?? 999)) {\n const newQuantity = selectedQty + 1;\n onQuantityChange(traderItem, newQuantity);\n }\n };\n\n return (\n <ItemWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: traderItem.key,\n stackQty: traderItem.qty || 1,\n texturePath: traderItem.texturePath,\n },\n atlasJSON\n )}\n imgScale={2.5}\n />\n </SpriteContainer>\n </ItemIconContainer>\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 </NameValue>\n </ItemNameContainer>\n\n <QuantityContainer>\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n <QuantityDisplay>\n <TextOverlay>\n <Item>{selectedQty}</Item>\n </TextOverlay>\n </QuantityDisplay>\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={onRightClick}\n ></SelectArrow>\n </QuantityContainer>\n </ItemWrapper>\n );\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: 20%;\n`;\n\nconst QuantityDisplay = styled.div`\n font-size: ${uiFonts.size.small};\n`;\n","import { ITradeResponseItem, TradeTransactionType } 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 '../RPGUIContainer';\nimport { TradingItemRow } from './TradingItemRow';\nexport interface ITrandingMenu {\n traderItems: ITradeResponseItem[];\n onClose: () => void;\n onConfirm: (items: ITradeResponseItem[]) => void;\n type: TradeTransactionType;\n atlasJSON: any;\n atlasIMG: any;\n characterAvailableGold: number;\n}\n\nexport const TradingMenu: React.FC<ITrandingMenu> = ({\n traderItems,\n onClose,\n type,\n atlasJSON,\n atlasIMG,\n characterAvailableGold,\n onConfirm,\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: ITradeResponseItem[] = [];\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=\"500px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n >\n <>\n <div style={{ width: '100%' }}>\n <Title>{Capitalize(type)} Menu</Title>\n <hr className=\"golden\" />\n </div>\n <TradingComponentScrollWrapper>\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 />\n </ItemWrapper>\n ))}\n </TradingComponentScrollWrapper>\n <GoldWrapper>\n <p>Available Gold:</p>\n <p>${characterAvailableGold}</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()}</p>\n </GoldWrapper>\n )}\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onClick={() => onConfirmClick()}\n >\n Confirm\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => 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`;\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, { 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 onClick={() => handleClick(element.label)}>\n {element.label}\n </label>\n <br />\n </div>\n );\n })}\n </div>\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 onClick={handleClick}>{element.label}</label>\n <br />\n </>\n );\n })}\n </div>\n );\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"],"names":["ButtonTypes","RPGUIContainerTypes","Button","disabled","children","buttonType","onClick","props","React","ButtonContainer","className","onTouchStart","styled","button","displayName","componentId","SpriteFromAtlas","atlasJSON","atlasIMG","spriteKey","_ref$width","width","GRID_WIDTH","_ref$height","height","GRID_HEIGHT","_ref$imgScale","imgScale","imgStyle","containerStyle","_ref$grayScale","grayScale","_ref$opacity","opacity","spriteData","frames","Error","Container","hasHover","style","ImgSprite","frame","scale","div","w","h","x","y","ErrorBoundary","args","_this","state","hasError","getDerivedStateFromError","_","_proto","componentDidCatch","error","errorInfo","console","render","this","Component","SelectArrow","direction","size","LeftArrow","RightArrow","span","Ellipsis","maxWidth","fontSize","center","maxLines","PropertySelect","item","availableProperties","onChange","useState","currentIndex","setCurrentIndex","propertiesLength","length","onLeftClick","index","onRightClick","useEffect","JSON","stringify","TextOverlay","Item","name","Column","flex","flexWrap","alignItems","justifyContent","ChatContainer","TextField","input","MessagesContainer","Message","color","Form","form","buttonColor","buttonBackgroundColor","Input","rest","ref","innerRef","RPGUIContainer","type","CloseButton","CustomInput","CustomContainer","MessageText","p","useOutsideClick","id","handleClickOutside","event","current","contains","target","CustomEvent","detail","document","dispatchEvent","addEventListener","removeEventListener","NPCDialogType","DraggableContainer","_ref$type","FramedGold","onCloseButton","title","imgSrc","_ref$imgWidth","imgWidth","cancelDrag","onPositionChange","onOutsideClick","_ref$initialPosition","initialPosition","draggableRef","useRef","_e","Draggable","cancel","onDrag","data","defaultPosition","TitleContainer","Title","Icon","src","h1","img","Dropdown","options","dropdownId","uuidv4","selectedValue","setSelectedValue","selectedOption","setSelectedOption","opened","setOpened","firstOption","value","option","onMouseLeave","DropdownSelect","prev","DropdownOptions","map","key","ul","StyledItem","Recipes","Subtitle","RadioInputScroller","SpriteAtlasWrapper","RadioOptionsWrapper","ButtonWrapper","Details","RelativeListMenu","onSelected","_ref$fontSize","overflow","params","ListElement","text","li","ItemTooltip","label","generateContextMenuListOptions","actionsByTypeList","action","ItemSocketEventsDisplayLabels","EquipmentSlotSpriteByType","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","Inventory","RightHand","Accessory","ItemSlot","observer","slotIndex","containerType","itemContainerType","slotSpriteMask","onMouseOver","onMouseOut","_ref$isContextMenuDis","isContextMenuDisabled","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","isTooltipVisible","setTooltipVisible","isContextMenuVisible","setIsContextMenuVisible","isFocused","setIsFocused","wasDragged","setWasDragged","dragPosition","setDragPosition","dropPosition","setDropPosition","dragContainer","contextActions","setContextActions","contextActionMenu","ItemContainerType","ItemType","Weapon","Armor","Jewelry","ActionsForInventory","Equipment","Consumable","CraftingResource","Tool","Other","ActionsForEquipmentSet","Loot","ActionsForLoot","MapContainer","ActionsForMapContainer","contextActionMenuDontHaveUseWith","find","toLowerCase","includes","hasUseWith","push","generateContextMenu","getStackInfo","itemId","stackQty","qtyClassName","ItemQtyContainer","ItemQty","resetItem","onSuccesfulDrag","quantity","onMouseUp","onTouchEnd","e","changedTouches","clientX","clientY","simulatedEvent","MouseEvent","bubbles","elementFromPoint","_document$elementFrom","defaultClassName","onStop","classes","Array","from","_e$target","classList","some","elm","window","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","setTimeout","onStart","position","ItemContainer","onMouseEnter","itemToRender","texturePath","allowedEquipSlotType","_itemToRender$allowed","element","_id","getItemTextureKeyPath","stackInfo","renderEquipment","renderItem","onRenderSlot","optionId","EquipmentSetContainer","EquipmentColumn","IS_MOBILE_OR_TABLET","isMobile","tablet","DynamicText","onFinish","textState","setTextState","i","interval","setInterval","substring","clearInterval","TextContainer","NPCDialogText","str","charactersPerLine","linesPerDiv","onClose","onEndStep","onStartStep","windowSize","innerWidth","innerHeight","textChunks","Math","floor","round","match","RegExp","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","right","TextOnly","pressSpaceGif","useEventListener","handler","el","savedHandler","listener","QuestionDialog","questions","answers","currentQuestion","setCurrentQuestion","canShowAnswers","setCanShowAnswers","onGetFirstAnswer","answerIds","firstAnswerId","answer","currentAnswer","setCurrentAnswer","onGetAnswers","answerId","nextAnswerIndex","findIndex","nextAnswerID","nextAnswer","previousAnswerIndex","previousAnswerID","previousAnswer","pop","nextQuestionId","question","QuestionContainer","AnswersContainer","isSelected","selectedColor","AnswerRow","AnswerSelectedIcon","Answer","onAnswerClick","onRenderCurrentAnswers","ImgSide","NPCDialog","imagePath","_ref$isQuestionDialog","isQuestionDialog","TextAndThumbnail","ThumbnailContainer","NPCThumbnail","aliceDefaultThumbnail","RangeSliderType","NPCMultiDialog","textAndTypeArray","slide","setSlide","_textAndTypeArray$sli","imageSide","BackgroundContainer","imgPath","DialogContainer","SlotsContainer","Framed","RangeSlider","valueMin","valueMax","sliderId","containerRef","left","setLeft","calculatedWidth","_containerRef$current","clientWidth","max","typeClass","GoldSlider","pointerEvents","min","Number","ItemQuantitySelector","onConfirm","setValue","inputRef","focus","select","closeSelector","StyledContainer","StyledForm","onSubmit","preventDefault","numberValue","isNaN","noValidate","StyledInput","placeholder","onBlur","newValue","Slider","RPGUIButton","ItemsContainer","QuantitySelectorContainer","ProgressBarText","minWidth","percentageWidth","QuestDraggableContainer","QuestContainer","QuestsContainer","Content","QuestSplitDiv","QuestColumn","Thumbnail","QuestListContainer","NoQuestContainer","_RPGUI","RPGUI","SimpleProgressBar","_ref$bgColor","bgColor","_ref$margin","margin","ProgressBarContainer","BackgroundBar","Progress","SkillProgressBar","skillName","level","skillPoints","skillPointsToNextLevel","_ref$showSkillPoints","showSkillPoints","getSPForLevel","nextLevelSPWillbe","ratio","ProgressTitle","TitleName","ValueDisplay","ProgressBody","ProgressIconContainer","SpriteContainer","SkillDisplayContainer","SkillPointsDisplay","skillProps","attributes","values","stamina","magic","magicResistance","strength","resistance","dexterity","combat","first","club","sword","axe","distance","shielding","dagger","crafting","fishing","mining","lumberjacking","cooking","alchemy","SkillsDraggableContainer","SkillSplitDiv","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","PeriodOfDay","Morning","Afternoon","Night","GifContainer","WidgetContainer","Time","DayNightContainer","TradingItemRow","onQuantityChange","traderItem","selectedQty","qty","ItemWrapper","ItemIconContainer","ItemNameContainer","NameValue","capitalize","price","QuantityContainer","QuantityDisplay","TradingComponentScrollWrapper","TotalWrapper","GoldWrapper","AlertWrapper","availableCharacters","propertySelectValues","textureKey","selectedSpriteKey","setSelectedSpriteKey","entitiesJSON","display","paddingBottom","chatMessages","onSendChatMessage","onFocus","_ref$color","_ref$buttonColor","_ref$buttonBackground","message","setMessage","scrollChatToBottom","scrollingElement","querySelector","scrollTop","scrollHeight","fallback","emitter","createdAt","dayjs","Date","format","onRenderMessageLines","onRenderChatMessages","autoComplete","borderRadius","CiPaperplane","FramedGrey","items","selectedValues","forEach","generateSelectedValuesList","setSelectedValues","checked","onSelect","onCraftItem","craftablesItems","optionsId","show","isShown","setIsShown","craftItem","setCraftItem","modifyString","parts","split","words","replace","slice","toUpperCase","concat","join","handleClick","Object","keys","ItemSubType","canCraft","ingredients","details","equipmentSet","onItemClick","onItemDragEnd","onItemDragStart","onItemPlaceDrop","onItemOutsideDrop","equipmentData","neck","leftHand","ring","head","armor","legs","boot","inventory","rightHand","accessory","equipmentMaskSlots","ItemSlotType","onRenderEquipmentSlotRange","start","end","equipmentRange","slotMaksRange","itemContainer","itemType","ContainerType","backgroundImgPath","fullCoverBackground","setImage","fullImg","_ref$disableContextMe","disableContextMenu","isOpen","maxQuantity","callback","_quantity","quantitySelect","setQuantitySelect","slots","slotQty","_itemContainer$slots","onRenderSlots","imageKey","description","_ref$displayText","displayText","_ref$percentageWidth","_ref$minWidth","calculatePercentageValue","quests","buttons","onChangeQuest","questsLength","thumbnail","thumbnailDefault","npcId","quest","skill","onRenderSkillCategory","category","skillCategory","skillCategoryColor","output","entries","skillDetails","experience","xpToNextLevel","TimeClock","word","traderItems","characterAvailableGold","sum","setSum","Map","qtyMap","setQtyMap","set","newSum","get","isBuy","hasGoldForSale","tradeItem","assign"],"mappings":"skCAAO,ICIKA,oDAAAA,EAAAA,sBAAAA,oDAEVA,4CCHUC,EDcCC,EAAS,oBACpBC,SAAAA,gBACAC,IAAAA,SACAC,IAAAA,WACAC,IAAAA,QACGC,SAEH,OACEC,gBAACC,iBACCC,aAAcL,EACdF,SAAUA,GACNI,GACJI,aAAcL,EACdA,QAASA,IAETE,yBAAIJ,KAKJK,EAAkBG,EAAOC,mBAAMC,sCAAAC,2BAAbH,gCDjCb,QGcEI,EAAoC,gBAC/CC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,UAASC,IACTC,MAAAA,aAAQC,eAAUC,IAClBC,OAAAA,aAASC,gBAAWC,IACpBC,SAAAA,aAAW,IACXC,IAAAA,SACAtB,IAAAA,QACAuB,IAAAA,eAAcC,IACdC,UAAAA,gBAAiBC,IACjBC,QAAAA,aAAU,IAKJC,EACJjB,EAAUkB,OAAOhB,IAAcF,EAAUkB,OAAO,uBAElD,IAAKD,EAAY,MAAM,IAAIE,gBAAgBjB,0BAE3C,OACEX,gBAAC6B,GACChB,MAAO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A,EAClBC,WAAYiK,EACZhK,qBAAayJ,EAAOI,IAAIG,EAAU5gB,QAAQ,SAKlDzK,gBAACiiB,QACCjiB,4CACAA,6BAAK0qB,IAEP1qB,gBAACgiB,QACChiB,mCACAA,6BAAK2qB,IAELS,IAKAprB,gBAACiiB,QACCjiB,wCACAA,6BAlEJmrB,IACKT,EAAyBC,EAEzBD,EAAyBC,IAyD5B3qB,gBAACkiB,QACCliB,uDASJA,gBAACiL,QACCjL,gBAACN,GACCG,WAAYL,oBAAY2c,YACxBxc,UAAWyrB,IACXtrB,QAAS,WAAA,OA9DXskB,EAA8B,GAEpCqG,EAAYnG,SAAQ,SAAAngB,GAClB,IAAMmd,EAAMwJ,EAAOI,IAAI/mB,EAAKsG,KACxB6W,GACF8C,EAAMjU,KAAK0V,OAAOyF,OAAO,GAAInnB,EAAM,CAAEmd,IAAKA,aAI9CrG,EAAUmJ,GAVW,IACfA,eAkEApkB,gBAACN,GACCG,WAAYL,oBAAY2c,YACxBrc,QAAS,WAAA,OAAM+U,qCC3He,oBAAG5Q,SAC3C,OAAOjE,gBAAC6B,IAAUoC,oBADoC,OAAGrE"}
1
+ {"version":3,"file":"long-bow.cjs.production.min.js","sources":["../src/constants/uiFonts.ts","../src/components/Button.tsx","../src/components/RPGUIContainer.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/Chatdeprecated/ChatDeprecated.tsx","../src/constants/uiColors.ts","../src/hooks/useOutsideAlerter.ts","../src/components/NPCDialog/NPCDialog.tsx","../src/components/DraggableContainer.tsx","../src/components/Dropdown.tsx","../src/components/CraftBook/CraftBook.tsx","../src/components/DropdownSelectorContainer.tsx","../src/components/RelativeListMenu.tsx","../src/components/Item/Cards/ItemTooltip.tsx","../src/components/Item/Inventory/itemContainerHelper.ts","../src/components/Item/Inventory/ItemSlot.tsx","../src/components/Equipment/EquipmentSet.tsx","../src/constants/uiDevices.ts","../src/components/typography/DynamicText.tsx","../src/components/NPCDialog/NPCDialogText.tsx","../src/libs/StringHelpers.ts","../src/hooks/useEventListener.ts","../src/components/NPCDialog/QuestionDialog/QuestionDialog.tsx","../src/components/NPCDialog/NPCMultiDialog.tsx","../src/components/RangeSlider.tsx","../src/components/HistoryDialog.tsx","../src/components/Abstractions/SlotsContainer.tsx","../src/components/Item/Inventory/ItemQuantitySelector.tsx","../src/components/Item/Inventory/ItemContainer.tsx","../src/components/itemSelector/ItemSelector.tsx","../src/components/ListMenu.tsx","../src/components/ProgressBar.tsx","../src/components/QuestInfo/QuestInfo.tsx","../src/components/QuestList.tsx","../src/components/RPGUIRoot.tsx","../src/components/SimpleProgressBar.tsx","../src/components/SkillProgressBar.tsx","../src/components/SkillsContainer.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/CheckButton.tsx","../src/components/RadioButton.tsx","../src/components/TextArea.tsx"],"sourcesContent":["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 onClick?: (e: any) => void;\n}\n\nexport const Button = ({\n disabled = false,\n children,\n buttonType,\n onClick,\n ...props\n}: IButtonProps) => {\n return (\n <ButtonContainer\n className={`${buttonType}`}\n disabled={disabled}\n {...props}\n onTouchStart={onClick}\n onClick={onClick}\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 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 { 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 onClick?: () => void;\n containerStyle?: any;\n imgStyle?: any;\n imgScale?: number;\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 onClick,\n containerStyle,\n grayScale = false,\n opacity = 1,\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] || atlasJSON.frames['others/no-image.png'];\n\n if (!spriteData) throw new Error(`Sprite ${spriteKey} not found in atlas!`);\n\n return (\n <Container\n width={width}\n height={height}\n hasHover={grayScale}\n onClick={onClick}\n style={containerStyle}\n >\n <ImgSprite\n className=\"sprite-from-atlas-img\"\n atlasIMG={atlasIMG}\n frame={spriteData.frame}\n scale={imgScale}\n grayScale={grayScale}\n opacity={opacity}\n style={imgStyle}\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}\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: 8px;\n left: 8px;\n filter: ${props => (props.grayScale ? 'grayscale(100%)' : 'none')};\n opacity: ${props => props.opacity};\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 onClick: () => void;\n size?: number;\n}\n\nexport const SelectArrow: React.FC<ArrowBarProps> = ({\n direction = 'left',\n size,\n onClick,\n ...props\n}) => {\n return (\n <>\n {direction === 'left' ? (\n <LeftArrow size={size} onClick={() => onClick()} {...props}></LeftArrow>\n ) : (\n <RightArrow\n size={size}\n onClick={() => onClick()}\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,\n maxWidth,\n fontSize,\n center,\n}: IProps) => {\n return (\n <Container maxWidth={maxWidth} fontSize={fontSize} center={center}>\n <div className={`ellipsis-${maxLines}-lines`}>{children}</div>\n </Container>\n );\n};\n\ninterface IContainerProps {\n maxWidth?: string;\n fontSize?: string;\n center?: boolean;\n}\n\nconst Container = styled.div<IContainerProps>`\n .ellipsis-1-lines {\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n max-width: ${props => props.maxWidth};\n\n ${props => props.center && `margin: 0 auto;`}\n }\n .ellipsis-2-lines {\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 }\n .ellipsis-3-lines {\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 }\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\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n <SelectArrow\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={onRightClick}\n ></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 entitiesJSON from '../../mocks/atlas/entities/entities.json';\nimport entitiesIMG from '../../mocks/atlas/entities/entities.png';\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 onChange: (textureKey: string) => void;\n}\n\nexport const CharacterSelection: React.FC<ICharacterSelectionProps> = ({\n availableCharacters,\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 && (\n <ErrorBoundary>\n <SpriteFromAtlas\n spriteKey={selectedSpriteKey}\n atlasIMG={entitiesIMG}\n atlasJSON={entitiesJSON}\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 { IChatMessage } from '@rpg-engine/shared';\nimport 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 { Column } from '../shared/Column';\n\ninterface IEmitter {\n _id: string;\n name: string;\n}\n\ninterface IStyles {\n textColor?: string;\n buttonColor?: string;\n buttonBackgroundColor?: string;\n width?: string;\n height?: string;\n}\n\nexport interface IChatProps {\n chatMessages: IChatMessage[];\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 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 <Message color={styles?.textColor || '#c65102'} key={`${_id}_${index}`}>\n {onRenderMessageLines(emitter, createdAt as string, message)}\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 onTouchStart={onFocus}\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};\n width: ${({ width }) => width};\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 .chat-body {\n max-height: auto;\n overflow-y: auto;\n }\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 { 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 '../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 onClick={onCloseButton} onTouchStart={onCloseButton}>\n X\n </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","export const uiColors = {\n lightGray: '#757161',\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: '#6DAA2C',\n brownGreen: '#346524',\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 from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../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 <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\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, useRef } from 'react';\nimport Draggable, { DraggableData } from 'react-draggable';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\nimport { IPosition } from '../types/eventTypes';\nimport { RPGUIContainerTypes } from './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 onOutsideClick?: () => void;\n initialPosition?: IPosition;\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 onOutsideClick,\n initialPosition = { x: 0, y: 0 },\n}) => {\n const draggableRef = useRef(null);\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,${cancelDrag}`}\n onDrag={(_e, data: DraggableData) => {\n if (onPositionChange) {\n onPositionChange({\n x: data.x,\n y: data.y,\n });\n }\n }}\n defaultPosition={initialPosition}\n >\n <Container\n ref={draggableRef}\n width={width}\n height={height || 'auto'}\n className={`rpgui-container ${type} ${className}`}\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 onClick={onCloseButton}\n onTouchStart={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}\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 &.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.1rem;\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`;\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, { 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;\n}\n\nexport interface IDropdownProps {\n options: IOptionsProps[];\n width?: string;\n onChange: (value: string) => void;\n}\n\nexport const Dropdown: React.FC<IDropdownProps> = ({\n options,\n width,\n onChange,\n}) => {\n const dropdownId = uuidv4();\n\n const [selectedValue, setSelectedValue] = useState<string>('');\n const [selectedOption, setSelectedOption] = useState<string>('');\n const [opened, setOpened] = useState<boolean>(false);\n\n useEffect(() => {\n const firstOption = options[0];\n\n if (firstOption && !selectedValue) {\n setSelectedValue(firstOption.value);\n setSelectedOption(firstOption.option);\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 onClick={() => setOpened(prev => !prev)}\n >\n <label>▼</label> {selectedOption}\n </DropdownSelect>\n\n <DropdownOptions className=\"rpgui-dropdown-imp\" opened={opened}>\n {options.map(option => {\n return (\n <li\n key={option.id}\n onClick={() => {\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\nconst DropdownOptions = styled.ul<{\n opened: boolean;\n}>`\n position: absolute;\n width: 100%;\n display: ${props => (props.opened ? 'block' : 'none')};\n box-sizing: border-box;\n`;\n","import { ICraftableItem, ItemSubType } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { Dropdown, IOptionsProps } from '../Dropdown';\nimport { RPGUIContainerTypes } from '../RPGUIContainer';\nimport { SpriteFromAtlas } from '../shared/SpriteFromAtlas';\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}\n\nexport interface ShowMessage {\n show: boolean;\n index: number;\n}\n\nexport const CraftBook: React.FC<IItemCraftSelectorProps> = ({\n atlasIMG,\n atlasJSON,\n onClose,\n onSelect,\n onCraftItem,\n craftablesItems,\n}) => {\n let optionsId: number = 0;\n const [isShown, setIsShown] = useState<ShowMessage>({\n show: false,\n index: 200,\n });\n const [craftItem, setCraftItem] = useState<string>();\n\n const getDropdownOptions = () => {\n const options: IOptionsProps[] = [];\n\n Object.keys(ItemSubType).forEach(key => {\n if (key === 'CraftingResource' || key === 'DeadBody') {\n return; // we can't craft crafting resouces...\n }\n\n options.push({\n id: optionsId,\n value: key,\n option: key,\n });\n optionsId += 1;\n });\n\n return options;\n };\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 handleClick = (value: string) => {\n setCraftItem(value);\n };\n\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>{'Craftbook'}</Title>\n <Subtitle>{'Select an item to craft'}</Subtitle>\n <hr className=\"golden\" />\n </div>\n <Dropdown\n options={getDropdownOptions()}\n onChange={value => onSelect(value)}\n />\n <RadioInputScroller>\n {craftablesItems?.map((option, index) => (\n <RadioOptionsWrapper key={index}>\n <SpriteAtlasWrapper>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.texturePath}\n imgScale={3}\n grayScale={!option.canCraft}\n />\n </SpriteAtlasWrapper>\n <div>\n <input\n className=\"rpgui-radio\"\n type=\"radio\"\n value={option.name}\n name=\"test\"\n disabled={!option.canCraft}\n checked={craftItem === option.key}\n onChange={() => handleClick(option.key)}\n />\n <label\n onClick={() => handleClick(option.key)}\n style={{ display: 'flex', alignItems: 'center' }}\n onMouseEnter={() => setIsShown({ show: true, index: index })}\n onMouseLeave={() => setIsShown({ show: false, index: index })}\n >\n {modifyString(option.name)}\n </label>\n\n {isShown &&\n isShown.index === index &&\n option.ingredients.map((option, index) => (\n <Recipes key={index}>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={option.texturePath}\n imgScale={1}\n />\n <StyledItem>\n {modifyString(option.key)} ({option.qty}x)\n </StyledItem>\n </Recipes>\n ))}\n </div>\n </RadioOptionsWrapper>\n ))}\n </RadioInputScroller>\n <ButtonWrapper>\n <Button buttonType={ButtonTypes.RPGUIButton} onClick={onClose}>\n Cancel\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => onCraftItem(craftItem)}\n >\n Craft\n </Button>\n </ButtonWrapper>\n </DraggableContainer>\n );\n};\n\nconst StyledItem = styled.div`\n margin-left: 10px;\n`;\n\nconst Recipes = styled.div`\n font-size: 0.6rem;\n color: yellow !important;\n margin-bottom: 3px;\n display: flex;\n align-items: center;\n\n .sprite-from-atlas-img {\n top: 0px;\n left: 0px;\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 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 React, { useEffect, useRef } from 'react';\nimport styled from 'styled-components';\nimport { useOutsideClick } from '../hooks/useOutsideAlerter';\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}\n\nexport const RelativeListMenu: React.FC<IRelativeMenuProps> = ({\n options,\n onSelected,\n onOutsideClick,\n fontSize = 0.8,\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 <Container fontSize={fontSize} ref={ref}>\n <ul className=\"rpgui-list-imp\" style={{ overflow: 'hidden' }}>\n {options.map((params, index) => (\n <ListElement\n key={params?.id || index}\n onClick={() => {\n onSelected(params?.id);\n }}\n >\n {params?.text || 'No text'}\n </ListElement>\n ))}\n </ul>\n </Container>\n );\n};\n\ninterface IContainerProps {\n fontSize?: number;\n}\n\nconst Container = styled.div<IContainerProps>`\n position: absolute;\n top: 1rem;\n left: 4rem;\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 React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../../../constants/uiFonts';\n\ninterface IProps {\n label: string;\n}\n\nexport const ItemTooltip: React.FC<IProps> = ({ label }) => {\n return (\n <Container>\n <div>{label}</div>\n </Container>\n );\n};\n\nconst Container = styled.div`\n z-index: 2;\n position: absolute;\n top: 1rem;\n left: 4rem;\n\n font-size: ${uiFonts.size.xxsmall};\n color: white;\n background-color: black;\n border-radius: 5px;\n padding: 0.5rem;\n min-width: 20px;\n width: 100%;\n text-align: center;\n\n opacity: 0.75;\n`;\n","import {\n ActionsForEquipmentSet,\n ActionsForInventory,\n ActionsForLoot,\n ActionsForMapContainer,\n IItem,\n ItemContainerType,\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) => {\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 (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\n return contextActionMenu;\n};\n","import {\n getItemTextureKeyPath,\n IItem,\n IItemContainer,\n ItemContainerType,\n ItemSlotType,\n ItemType,\n} from '@rpg-engine/shared';\n\nimport { observer } from 'mobx-react-lite';\nimport React, { useEffect, useRef, useState } from 'react';\nimport Draggable from 'react-draggable';\nimport styled from 'styled-components';\nimport { v4 as uuidv4 } from 'uuid';\nimport { uiFonts } from '../../../constants/uiFonts';\nimport { IPosition } from '../../../types/eventTypes';\nimport { RelativeListMenu } from '../../RelativeListMenu';\nimport { Ellipsis } from '../../shared/Ellipsis';\nimport { SpriteFromAtlas } from '../../shared/SpriteFromAtlas';\nimport { ItemTooltip } from '../Cards/ItemTooltip';\nimport { ErrorBoundary } from './ErrorBoundary';\nimport { generateContextMenu, IContextMenuItem } from './itemContainerHelper';\n\nconst 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 onClick: (\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}\n\nexport const ItemSlot: React.FC<IProps> = observer(\n ({\n slotIndex,\n item,\n itemContainerType: containerType,\n slotSpriteMask,\n onMouseOver,\n onMouseOut,\n onClick,\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 }) => {\n const [isTooltipVisible, setTooltipVisible] = useState(false);\n\n const [isContextMenuVisible, setIsContextMenuVisible] = useState(false);\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 [contextActions, setContextActions] = useState<IContextMenuItem[]>(\n []\n );\n\n useEffect(() => {\n setDragPosition({ x: 0, y: 0 });\n setIsFocused(false);\n\n if (item) {\n setContextActions(generateContextMenu(item, containerType));\n }\n }, [item]);\n\n useEffect(() => {\n if (onDrop && item && dropPosition) {\n onDrop(item, dropPosition);\n }\n }, [dropPosition]);\n\n const getStackInfo = (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 <ItemQtyContainer key={`qty-${itemId}`}>\n <Ellipsis maxLines={1} maxWidth=\"48px\">\n <ItemQty className={qtyClassName}> {stackQty} </ItemQty>\n </Ellipsis>\n </ItemQtyContainer>\n );\n }\n return undefined;\n };\n\n const renderItem = (itemToRender: IItem | null) => {\n const element = [];\n\n if (itemToRender?.texturePath) {\n element.push(\n <ErrorBoundary key={itemToRender._id}>\n <SpriteFromAtlas\n key={itemToRender._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: itemToRender.texturePath,\n texturePath: itemToRender.texturePath,\n stackQty: itemToRender.stackQty || 1,\n },\n atlasJSON\n )}\n imgScale={3}\n />\n </ErrorBoundary>\n );\n }\n const stackInfo = getStackInfo(\n itemToRender?._id ?? '',\n itemToRender?.stackQty ?? 0\n );\n if (stackInfo) {\n element.push(stackInfo);\n }\n\n return element;\n };\n\n const renderEquipment = (itemToRender: IItem | null) => {\n if (\n itemToRender?.texturePath &&\n itemToRender.allowedEquipSlotType?.includes(slotSpriteMask!)\n ) {\n const element = [];\n\n element.push(\n <ErrorBoundary key={itemToRender._id}>\n <SpriteFromAtlas\n key={itemToRender._id}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: itemToRender.texturePath,\n texturePath: itemToRender.texturePath,\n stackQty: itemToRender.stackQty || 1,\n },\n atlasJSON\n )}\n imgScale={3}\n />\n </ErrorBoundary>\n );\n const stackInfo = getStackInfo(\n itemToRender?._id ?? '',\n itemToRender?.stackQty ?? 0\n );\n if (stackInfo) {\n element.push(stackInfo);\n }\n return element;\n } else {\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 />\n </ErrorBoundary>\n );\n }\n };\n\n const onRenderSlot = (itemToRender: IItem | null) => {\n switch (containerType) {\n case ItemContainerType.Equipment:\n return renderEquipment(itemToRender);\n case ItemContainerType.Inventory:\n return renderItem(itemToRender);\n default:\n return renderItem(itemToRender);\n }\n };\n\n const resetItem = () => {\n setTooltipVisible(false);\n setWasDragged(false);\n };\n\n const onSuccesfulDrag = (quantity?: number) => {\n resetItem();\n\n if (quantity === -1) setDragPosition({ x: 0, y: 0 });\n else if (item) {\n onDragEnd(quantity);\n resetItem();\n }\n };\n\n return (\n <Container\n className=\"rpgui-icon empty-slot\"\n onMouseUp={() => {\n const data = item ? item : null;\n if (onPlaceDrop) 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 >\n <Draggable\n defaultClassName={item ? 'draggable' : 'empty-slot'}\n scale={dragScale}\n onStop={(e, data) => {\n if (wasDragged && item) {\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())\n return;\n\n if (\n item.stackQty &&\n item.stackQty !== 1 &&\n openQuantitySelector\n )\n openQuantitySelector(item.stackQty, onSuccesfulDrag);\n else onSuccesfulDrag(item.stackQty);\n } else {\n resetItem();\n setIsFocused(false);\n setDragPosition({ x: 0, y: 0 });\n }\n }, 100);\n } else if (item) {\n if (!isContextMenuDisabled)\n setIsContextMenuVisible(!isContextMenuVisible);\n\n onClick(item.type, containerType, item);\n }\n }}\n onStart={() => {\n if (!item) {\n return;\n }\n\n if (onDragStart) {\n onDragStart(item, slotIndex, containerType);\n }\n }}\n onDrag={() => {\n setWasDragged(true);\n setIsFocused(true);\n }}\n position={dragPosition}\n cancel=\".empty-slot\"\n >\n <ItemContainer\n ref={dragContainer}\n isFocused={isFocused}\n onMouseOver={event => {\n onMouseOver(event, slotIndex, item, event.clientX, event.clientY);\n }}\n onMouseOut={() => {\n if (onMouseOut) onMouseOut();\n }}\n onMouseEnter={() => {\n setTooltipVisible(true);\n }}\n onMouseLeave={() => {\n setTooltipVisible(false);\n }}\n >\n {onRenderSlot(item)}\n </ItemContainer>\n </Draggable>\n\n {isTooltipVisible && item && !isFocused && (\n <ItemTooltip label={item.name} />\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 />\n )}\n </Container>\n );\n }\n);\n\nconst Container = styled.div`\n margin: 0.1rem;\n .sprite-from-atlas-img {\n position: relative;\n top: 1.5rem;\n left: 1.5rem;\n }\n position: relative;\n`;\n\nconst ItemContainer = styled.div<{ isFocused?: boolean }>`\n width: 100%;\n height: 100%;\n position: relative;\n\n ${props => props.isFocused && 'z-index: 100; pointer-events: none;'}\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 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 { ItemSlot } from '../Item/Inventory/ItemSlot';\nimport { RPGUIContainerTypes } from '../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 dragScale?: 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}\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 dragScale,\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 onClick={(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={dragScale}\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 <DraggableContainer\n title={'Equipments'}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"330px\"\n cancelDrag=\".equipment-container-body\"\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 );\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 isMobile from 'is-mobile';\n\nexport const IS_MOBILE_OR_TABLET = isMobile({\n tablet: true,\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 }, 50);\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 onClick={() => {\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","export const chunkString = (str: string, length: number) => {\n return str.match(new RegExp('.{1,' + length + '}', 'g'));\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 onClick={() => 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, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../RPGUIContainer';\nimport aliceDefaultThumbnail from './img/npcDialog/npcThumbnails/alice.png';\nimport pressSpaceGif from './img/space.gif';\nimport { NPCDialogText } from './NPCDialogText';\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, 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}\n\nexport const RangeSlider: React.FC<IRangeSliderProps> = ({\n type,\n valueMin,\n valueMax,\n width,\n onChange,\n value,\n}) => {\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)) * (calculatedWidth - 35) +\n 10\n )\n );\n }, [value, valueMin, valueMax]);\n\n const typeClass = type === RangeSliderType.GoldSlider ? 'golden' : '';\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 onChange={e => onChange(Number(e.target.value))}\n value={value}\n className=\"rpgui-cursor-point\"\n />\n </div>\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, 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 from 'react';\nimport { IPosition } from '../../types/eventTypes';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../RPGUIContainer';\n\ninterface IProps {\n children: React.ReactNode;\n title: string;\n onClose?: () => void;\n onPositionChange?: (position: IPosition) => void;\n onOutsideClick?: () => void;\n initialPosition?: IPosition;\n}\n\nexport const SlotsContainer: React.FC<IProps> = ({\n children,\n title,\n onClose,\n onPositionChange,\n onOutsideClick,\n initialPosition,\n}) => {\n return (\n <DraggableContainer\n title={title}\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) {\n onClose();\n }\n }}\n width=\"330px\"\n cancelDrag=\".item-container-body\"\n onPositionChange={({ x, y }) => {\n if (onPositionChange) {\n onPositionChange({ x, y });\n }\n }}\n onOutsideClick={onOutsideClick}\n initialPosition={initialPosition}\n >\n {children}\n </DraggableContainer>\n );\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../../Button';\nimport { Input } from '../../Input';\nimport { RPGUIContainer, RPGUIContainerTypes } from '../../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\n className=\"container-close\"\n onClick={onClose}\n onTouchStart={onClose}\n >\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 { IItem, IItemContainer, ItemContainerType } from '@rpg-engine/shared';\nimport React, { useState } from 'react';\nimport styled from 'styled-components';\nimport { SlotsContainer } from '../../Abstractions/SlotsContainer';\nimport { ItemQuantitySelector } from './ItemQuantitySelector';\n\nimport { IPosition } from '../../../types/eventTypes';\nimport { ItemSlot } from './ItemSlot';\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 dragScale?: 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}\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 dragScale,\n}) => {\n const [quantitySelect, setQuantitySelect] = useState({\n isOpen: false,\n maxQuantity: 1,\n callback: (_quantity: number) => {},\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 onClick={(ItemType, ContainerType, item) => {\n if (onItemClick) onItemClick(item, ItemType, ContainerType);\n }}\n onSelected={(optionId: string, item: IItem) => {\n if (onSelected) onSelected(optionId, item);\n }}\n onDragStart={(item, slotIndex, itemContainerType) => {\n if (onItemDragStart)\n onItemDragStart(item, slotIndex, itemContainerType);\n }}\n onDragEnd={quantity => {\n if (onItemDragEnd) onItemDragEnd(quantity);\n }}\n dragScale={dragScale}\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 onOutsideDrop={(item, position) => {\n if (onOutsideDrop) onOutsideDrop(item, position);\n }}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n }\n return slots;\n };\n\n return (\n <>\n <SlotsContainer\n title={itemContainer.name || 'Container'}\n onClose={onClose}\n initialPosition={initialPosition}\n >\n <ItemsContainer className=\"item-container-body\">\n {onRenderSlots()}\n </ItemsContainer>\n </SlotsContainer>\n {quantitySelect.isOpen && (\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 )}\n </>\n );\n};\n\nconst ItemsContainer = styled.div`\n max-width: 280px;\n display: flex;\n justify-content: center;\n flex-wrap: wrap;\n`;\n\nconst QuantitySelectorContainer = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n width: 100vw;\n height: 100vh;\n z-index: 100;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: rgba(0, 0, 0, 0.5);\n`;\n","import React, { useEffect, useState } from 'react';\nimport styled from 'styled-components';\nimport { Button, ButtonTypes } from '../Button';\nimport { DraggableContainer } from '../DraggableContainer';\nimport { RPGUIContainerTypes } from '../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 onClick={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} onClick={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 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 onClick={() => {\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 { 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}\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}) => {\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 >\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}\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`;\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 '../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}\n\nexport const QuestInfo: React.FC<IQuestInfoProps> = ({\n quests,\n onClose,\n buttons,\n onChangeQuest,\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 >\n {quests.length >= 2 ? (\n <QuestsContainer>\n {currentIndex !== 0 && (\n <SelectArrow\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n )}\n {currentIndex !== quests.length - 1 && (\n <SelectArrow\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={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 onClick={() =>\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 onClick={() =>\n button.onClick(quests[0]._id, quests[0].npcId)\n }\n disabled={button.disabled}\n buttonType={ButtonTypes.RPGUIButton}\n id={`button-${index}`}\n >\n {button.title}\n </Button>\n ))}\n </QuestColumn>\n </QuestContainer>\n </QuestsContainer>\n )}\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 600px;\n padding: 0 0 0 0 !important;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n height: auto;\n }\n .container-close {\n position: absolute;\n margin-left: auto;\n top: 20px;\n padding-right: 5px;\n }\n img {\n display: inline-block;\n vertical-align: middle;\n line-height: normal;\n }\n`;\n\nconst QuestContainer = styled.div`\n margin-right: 40px;\n margin-left: 40px;\n`;\n\nconst QuestsContainer = styled.div`\n display: flex;\n align-items: center;\n`;\n\nconst Content = styled.div`\n padding: 18px;\n h1 {\n text-align: left;\n margin: 14px 0px;\n }\n`;\n\nconst QuestSplitDiv = styled.div`\n width: 100%;\n font-size: 11px;\n margin-bottom: 10px;\n hr {\n margin: 0px;\n padding: 0px;\n }\n p {\n margin-bottom: 0px;\n }\n`;\n\nconst QuestColumn = styled(Column)`\n padding-top: 5px;\n margin-bottom: 20px;\n display: flex;\n justify-content: space-evenly;\n`;\n\nconst TitleContainer = styled.div`\n width: 100%;\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: center;\n margin-top: 1rem;\n`;\n\nconst Title = styled.h1`\n color: white;\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: ${uiColors.yellow} !important;\n`;\n\nconst Thumbnail = styled.img`\n color: white;\n z-index: 22;\n width: 32px * 1.5;\n margin-right: 0.5rem;\n position: relative;\n top: -4px;\n`;\n","import { IQuest } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { uiFonts } from '../constants/uiFonts';\nimport { DraggableContainer } from './DraggableContainer';\nimport { RPGUIContainerTypes } from './RPGUIContainer';\n\nexport interface IQuestListProps {\n quests?: IQuest[];\n onClose: () => void;\n}\n\nexport const QuestList: React.FC<IQuestListProps> = ({ quests, onClose }) => {\n return (\n <QuestDraggableContainer\n type={RPGUIContainerTypes.Framed}\n onCloseButton={() => {\n if (onClose) onClose();\n }}\n width=\"520px\"\n >\n <div style={{ width: '100%' }}>\n <Title>Quests</Title>\n <hr className=\"golden\" />\n\n <QuestListContainer>\n {quests ? (\n quests.map((quest, i) => (\n <div className=\"quest-item\" key={i}>\n <span className=\"quest-number\">{i + 1}</span>\n <div className=\"quest-detail\">\n <p className=\"quest-detail__title\">{quest.title}</p>\n <p className=\"quest-detail__description\">\n {quest.description}\n </p>\n </div>\n </div>\n ))\n ) : (\n <NoQuestContainer>\n <p>There are no ongoing quests</p>\n </NoQuestContainer>\n )}\n </QuestListContainer>\n </div>\n </QuestDraggableContainer>\n );\n};\n\nconst QuestDraggableContainer = styled(DraggableContainer)`\n .container-close {\n top: 10px;\n right: 10px;\n }\n\n .quest-title {\n text-align: left;\n margin-left: 44px;\n margin-top: 20px;\n color: yellow;\n }\n\n .quest-desc {\n margin-top: 12px;\n margin-left: 44px;\n }\n\n .rpgui-progress {\n min-width: 80%;\n margin: 0 auto;\n }\n`;\n\nconst Title = styled.h1`\n z-index: 22;\n font-size: ${uiFonts.size.medium} !important;\n color: yellow !important;\n`;\n\nconst QuestListContainer = styled.div`\n margin-top: 20px;\n margin-bottom: 40px;\n overflow-y: auto;\n max-height: 400px;\n\n .quest-item {\n display: flex;\n align-items: flex-start;\n margin-bottom: 12px;\n }\n\n .quest-number {\n border-radius: 50%;\n width: 28px;\n height: 28px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n background-color: brown;\n flex-shrink: 0;\n }\n\n .quest-number.completed {\n background-color: yellow;\n }\n\n p {\n margin: 0;\n }\n\n .quest-detail__title {\n color: yellow;\n }\n\n .quest-detail__description {\n margin-top: 5px;\n }\n .Noquest-detail__description {\n margin-top: 5px;\n margin: auto;\n }\n`;\nconst NoQuestContainer = styled.div`\n text-align: center;\n p {\n margin-top: 5px;\n }\n`;\n","import React from 'react';\nimport 'rpgui/rpgui.min.css';\nimport 'rpgui/rpgui.min.js';\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 <div className=\"rpgui-content\">{children}</div>;\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 return (\n <Container className=\"simple-progress-bar\">\n <ProgressBarContainer margin={margin}>\n <BackgroundBar>\n <Progress value={value} 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 ISimpleProgressBarThemeProps {\n value: number;\n bgColor: string;\n}\n\nconst Progress = styled.span`\n background-color: ${(props: ISimpleProgressBarThemeProps) => props.bgColor};\n width: ${(props: ISimpleProgressBarThemeProps) => props.value}%;\n`;\n\ninterface ISimpleProgressBarTheme2Props {\n margin: number;\n}\n\nconst ProgressBarContainer = styled.div`\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: ISimpleProgressBarTheme2Props) => props.margin}px;\n`;\n","import { getSPForLevel } from '@rpg-engine/shared';\nimport React from 'react';\nimport styled from 'styled-components';\nimport { ErrorBoundary } from './Item/Inventory/ErrorBoundary';\nimport { SpriteFromAtlas } from './shared/SpriteFromAtlas';\nimport { SimpleProgressBar } from './SimpleProgressBar';\n\nexport interface ISkillProgressBarProps {\n skillName: string;\n bgColor: string;\n level: number;\n skillPoints: number;\n skillPointsToNextLevel?: number;\n texturePath: string;\n showSkillPoints?: boolean;\n atlasJSON: any;\n atlasIMG: any;\n}\n\nexport const SkillProgressBar: React.FC<ISkillProgressBarProps> = ({\n bgColor,\n skillName,\n level,\n skillPoints,\n skillPointsToNextLevel,\n texturePath,\n showSkillPoints = true,\n atlasIMG,\n atlasJSON,\n}) => {\n if (!skillPointsToNextLevel) {\n skillPointsToNextLevel = getSPForLevel(level + 1);\n }\n\n const nextLevelSPWillbe = skillPoints + skillPointsToNextLevel;\n\n const ratio = (skillPoints / nextLevelSPWillbe) * 100;\n\n return (\n <>\n <ProgressTitle>\n <TitleName>{skillName}</TitleName>\n <ValueDisplay>lv {level}</ValueDisplay>\n </ProgressTitle>\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 <ProgressBarContainer>\n <SimpleProgressBar value={ratio} bgColor={bgColor} />\n </ProgressBarContainer>\n </ProgressBody>\n {showSkillPoints && (\n <SkillDisplayContainer>\n <SkillPointsDisplay>\n {skillPoints}/{nextLevelSPWillbe}\n </SkillPointsDisplay>\n </SkillDisplayContainer>\n )}\n </>\n );\n};\n\nconst ProgressBarContainer = styled.div`\n position: relative;\n top: 8px;\n width: 100%;\n height: auto;\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.6rem !important;\n font-weight: bold;\n text-align: center;\n`;\n\nconst TitleName = styled.span`\n margin-left: 5px;\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: row;\n justify-content: space-between;\n span {\n font-size: 0.6rem;\n }\n`;\n","import { ISkill, ISkillDetails } from '@rpg-engine/shared';\nimport _ from 'lodash';\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}\n\nconst skillProps = {\n attributes: {\n color: uiColors.purple,\n values: {\n stamina: 'spell-icons/regenerate.png',\n magic: 'spell-icons/fireball.png',\n magicResistance: 'spell-icons/freeze.png',\n strength: 'spell-icons/enchanted-blow.png',\n resistance: 'spell-icons/magic-shield.png',\n dexterity: 'spell-icons/haste.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 mining: 'crafting-resources/iron-ingot.png',\n lumberjacking: 'crafting-resources/greater-wooden-log.png',\n cooking: 'foods/chickens-meat.png',\n alchemy: 'potions/greater-mana-potion.png',\n },\n },\n};\n\nexport const SkillsContainer: React.FC<ISkillContainerProps> = ({\n onCloseButton,\n skill,\n atlasIMG,\n atlasJSON,\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 //@ts-ignore\n const skillDetails = (skill[key] as unknown) as ISkillDetails;\n\n output.push(\n <SkillProgressBar\n key={key}\n skillName={_.capitalize(key)}\n bgColor={skillCategoryColor}\n level={skillDetails.level || 0}\n skillPoints={Math.round(skillDetails.skillPoints) || 0}\n skillPointsToNextLevel={\n Math.round(skillDetails.skillPointsToNextLevel) || 0\n }\n texturePath={value}\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n />\n );\n }\n\n return output;\n };\n\n return (\n <SkillsDraggableContainer title=\"Skills\">\n {onCloseButton && (\n <CloseButton onClick={onCloseButton} onTouchStart={onCloseButton}>\n X\n </CloseButton>\n )}\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={Math.round(skill.xpToNextLevel) || 0}\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 </SkillsDraggableContainer>\n );\n};\n\nconst SkillsDraggableContainer = styled(DraggableContainer)`\n border: 1px solid black;\n width: 400px;\n height: 90%;\n overflow-y: scroll;\n .DraggableContainer__TitleContainer-sc-184mpyl-2 {\n width: auto;\n height: auto;\n }\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","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}\n\nexport const TimeWidget: React.FC<IClockWidgetProps> = ({\n onClose,\n TimeClock,\n periodOfDay,\n}) => {\n return (\n <Draggable>\n <WidgetContainer>\n <CloseButton onClick={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 { ITradeResponseItem, getItemTextureKeyPath } 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 { 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}\n\nexport const TradingItemRow: React.FC<ITradeComponentProps> = ({\n atlasIMG,\n atlasJSON,\n onQuantityChange,\n traderItem,\n selectedQty,\n}) => {\n const onLeftClick = () => {\n if (selectedQty > 0) {\n const newQuantity = selectedQty - 1;\n onQuantityChange(traderItem, newQuantity);\n }\n };\n const onRightClick = () => {\n if (selectedQty < (traderItem.qty ?? 999)) {\n const newQuantity = selectedQty + 1;\n onQuantityChange(traderItem, newQuantity);\n }\n };\n\n return (\n <ItemWrapper>\n <ItemIconContainer>\n <SpriteContainer>\n <SpriteFromAtlas\n atlasIMG={atlasIMG}\n atlasJSON={atlasJSON}\n spriteKey={getItemTextureKeyPath(\n {\n key: traderItem.key,\n stackQty: traderItem.qty || 1,\n texturePath: traderItem.texturePath,\n },\n atlasJSON\n )}\n imgScale={2.5}\n />\n </SpriteContainer>\n </ItemIconContainer>\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 </NameValue>\n </ItemNameContainer>\n\n <QuantityContainer>\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"left\"\n onClick={onLeftClick}\n onTouchStart={onLeftClick}\n ></SelectArrow>\n <QuantityDisplay>\n <TextOverlay>\n <Item>{selectedQty}</Item>\n </TextOverlay>\n </QuantityDisplay>\n <SelectArrow\n size={32}\n className=\"arrow-selector\"\n direction=\"right\"\n onClick={onRightClick}\n onTouchStart={onRightClick}\n ></SelectArrow>\n </QuantityContainer>\n </ItemWrapper>\n );\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: 20%;\n`;\n\nconst QuantityDisplay = styled.div`\n font-size: ${uiFonts.size.small};\n`;\n","import { ITradeResponseItem, TradeTransactionType } 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 '../RPGUIContainer';\nimport { TradingItemRow } from './TradingItemRow';\nexport interface ITrandingMenu {\n traderItems: ITradeResponseItem[];\n onClose: () => void;\n onConfirm: (items: ITradeResponseItem[]) => void;\n type: TradeTransactionType;\n atlasJSON: any;\n atlasIMG: any;\n characterAvailableGold: number;\n}\n\nexport const TradingMenu: React.FC<ITrandingMenu> = ({\n traderItems,\n onClose,\n type,\n atlasJSON,\n atlasIMG,\n characterAvailableGold,\n onConfirm,\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: ITradeResponseItem[] = [];\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=\"500px\"\n cancelDrag=\".equipment-container-body .arrow-selector\"\n >\n <>\n <div style={{ width: '100%' }}>\n <Title>{Capitalize(type)} Menu</Title>\n <hr className=\"golden\" />\n </div>\n <TradingComponentScrollWrapper>\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 />\n </ItemWrapper>\n ))}\n </TradingComponentScrollWrapper>\n <GoldWrapper>\n <p>Available Gold:</p>\n <p>${characterAvailableGold}</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()}</p>\n </GoldWrapper>\n )}\n\n <ButtonWrapper>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n disabled={!hasGoldForSale()}\n onClick={() => onConfirmClick()}\n >\n Confirm\n </Button>\n <Button\n buttonType={ButtonTypes.RPGUIButton}\n onClick={() => 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`;\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, { 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 onClick={() => handleClick(element.label)}>\n {element.label}\n </label>\n <br />\n </div>\n );\n })}\n </div>\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 onClick={handleClick}>{element.label}</label>\n <br />\n </>\n );\n })}\n </div>\n );\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"],"names":["ButtonTypes","RPGUIContainerTypes","Button","disabled","children","buttonType","onClick","props","React","ButtonContainer","className","onTouchStart","styled","button","displayName","componentId","SpriteFromAtlas","atlasJSON","atlasIMG","spriteKey","_ref$width","width","GRID_WIDTH","_ref$height","height","GRID_HEIGHT","_ref$imgScale","imgScale","imgStyle","containerStyle","_ref$grayScale","grayScale","_ref$opacity","opacity","spriteData","frames","Error","Container","hasHover","style","ImgSprite","frame","scale","div","w","h","x","y","ErrorBoundary","args","_this","state","hasError","getDerivedStateFromError","_","_proto","componentDidCatch","error","errorInfo","console","render","this","Component","SelectArrow","direction","size","LeftArrow","RightArrow","span","Ellipsis","maxWidth","fontSize","center","maxLines","PropertySelect","item","availableProperties","onChange","useState","currentIndex","setCurrentIndex","propertiesLength","length","onLeftClick","index","onRightClick","useEffect","JSON","stringify","TextOverlay","Item","name","Column","flex","flexWrap","alignItems","justifyContent","ChatContainer","TextField","input","MessagesContainer","Message","color","Form","form","buttonColor","buttonBackgroundColor","Input","rest","ref","innerRef","RPGUIContainer","type","CloseButton","CustomInput","CustomContainer","MessageText","p","useOutsideClick","id","handleClickOutside","event","current","contains","target","CustomEvent","detail","document","dispatchEvent","addEventListener","removeEventListener","NPCDialogType","DraggableContainer","_ref$type","FramedGold","onCloseButton","title","imgSrc","_ref$imgWidth","imgWidth","cancelDrag","onPositionChange","onOutsideClick","_ref$initialPosition","initialPosition","draggableRef","useRef","_e","Draggable","cancel","onDrag","data","defaultPosition","TitleContainer","Title","Icon","src","h1","img","Dropdown","options","dropdownId","uuidv4","selectedValue","setSelectedValue","selectedOption","setSelectedOption","opened","setOpened","firstOption","value","option","onMouseLeave","DropdownSelect","prev","DropdownOptions","map","key","ul","StyledItem","Recipes","Subtitle","RadioInputScroller","SpriteAtlasWrapper","RadioOptionsWrapper","ButtonWrapper","Details","RelativeListMenu","onSelected","_ref$fontSize","overflow","params","ListElement","text","li","ItemTooltip","label","generateContextMenuListOptions","actionsByTypeList","action","ItemSocketEventsDisplayLabels","EquipmentSlotSpriteByType","Neck","LeftHand","Ring","Head","Torso","Legs","Feet","Inventory","RightHand","Accessory","ItemSlot","observer","slotIndex","containerType","itemContainerType","slotSpriteMask","onMouseOver","onMouseOut","_ref$isContextMenuDis","isContextMenuDisabled","onDragEnd","onDragStart","onPlaceDrop","onDrop","onOutsideDrop","checkIfItemCanBeMoved","openQuantitySelector","checkIfItemShouldDragEnd","dragScale","isTooltipVisible","setTooltipVisible","isContextMenuVisible","setIsContextMenuVisible","isFocused","setIsFocused","wasDragged","setWasDragged","dragPosition","setDragPosition","dropPosition","setDropPosition","dragContainer","contextActions","setContextActions","contextActionMenu","ItemContainerType","ItemType","Weapon","Armor","Jewelry","ActionsForInventory","Equipment","Consumable","CraftingResource","Tool","Other","ActionsForEquipmentSet","Loot","ActionsForLoot","MapContainer","ActionsForMapContainer","contextActionMenuDontHaveUseWith","find","toLowerCase","includes","hasUseWith","push","generateContextMenu","getStackInfo","itemId","stackQty","qtyClassName","ItemQtyContainer","ItemQty","resetItem","onSuccesfulDrag","quantity","onMouseUp","onTouchEnd","e","changedTouches","clientX","clientY","simulatedEvent","MouseEvent","bubbles","elementFromPoint","_document$elementFrom","defaultClassName","onStop","classes","Array","from","_e$target","classList","some","elm","window","getComputedStyle","matrix","DOMMatrixReadOnly","transform","m41","m42","setTimeout","onStart","position","ItemContainer","onMouseEnter","itemToRender","texturePath","allowedEquipSlotType","_itemToRender$allowed","element","_id","getItemTextureKeyPath","stackInfo","renderEquipment","renderItem","onRenderSlot","optionId","EquipmentSetContainer","EquipmentColumn","IS_MOBILE_OR_TABLET","isMobile","tablet","DynamicText","onFinish","textState","setTextState","i","interval","setInterval","substring","clearInterval","TextContainer","NPCDialogText","str","charactersPerLine","linesPerDiv","onClose","onEndStep","onStartStep","windowSize","innerWidth","innerHeight","textChunks","Math","floor","round","match","RegExp","chunkIndex","setChunkIndex","onHandleSpacePress","code","goToNextStep","showGoNextIndicator","setShowGoNextIndicator","PressSpaceIndicator","right","TextOnly","pressSpaceGif","useEventListener","handler","el","savedHandler","listener","QuestionDialog","questions","answers","currentQuestion","setCurrentQuestion","canShowAnswers","setCanShowAnswers","onGetFirstAnswer","answerIds","firstAnswerId","answer","currentAnswer","setCurrentAnswer","onGetAnswers","answerId","nextAnswerIndex","findIndex","nextAnswerID","nextAnswer","previousAnswerIndex","previousAnswerID","previousAnswer","pop","nextQuestionId","question","QuestionContainer","AnswersContainer","isSelected","selectedColor","AnswerRow","AnswerSelectedIcon","Answer","onAnswerClick","onRenderCurrentAnswers","ImgSide","NPCDialog","imagePath","_ref$isQuestionDialog","isQuestionDialog","TextAndThumbnail","ThumbnailContainer","NPCThumbnail","aliceDefaultThumbnail","RangeSliderType","NPCMultiDialog","textAndTypeArray","slide","setSlide","_textAndTypeArray$sli","imageSide","BackgroundContainer","imgPath","DialogContainer","SlotsContainer","Framed","RangeSlider","valueMin","valueMax","sliderId","containerRef","left","setLeft","calculatedWidth","_containerRef$current","clientWidth","max","typeClass","GoldSlider","pointerEvents","min","Number","ItemQuantitySelector","onConfirm","setValue","inputRef","focus","select","closeSelector","StyledContainer","StyledForm","onSubmit","preventDefault","numberValue","isNaN","noValidate","StyledInput","placeholder","onBlur","newValue","Slider","RPGUIButton","ItemsContainer","QuantitySelectorContainer","ProgressBarText","minWidth","percentageWidth","QuestDraggableContainer","QuestContainer","QuestsContainer","Content","QuestSplitDiv","QuestColumn","Thumbnail","QuestListContainer","NoQuestContainer","_RPGUI","RPGUI","SimpleProgressBar","_ref$bgColor","bgColor","_ref$margin","margin","ProgressBarContainer","BackgroundBar","Progress","SkillProgressBar","skillName","level","skillPoints","skillPointsToNextLevel","_ref$showSkillPoints","showSkillPoints","getSPForLevel","nextLevelSPWillbe","ratio","ProgressTitle","TitleName","ValueDisplay","ProgressBody","ProgressIconContainer","SpriteContainer","SkillDisplayContainer","SkillPointsDisplay","skillProps","attributes","values","stamina","magic","magicResistance","strength","resistance","dexterity","combat","first","club","sword","axe","distance","shielding","dagger","crafting","fishing","mining","lumberjacking","cooking","alchemy","SkillsDraggableContainer","SkillSplitDiv","DayNightPeriod","periodOfDay","periodOfDaySrcFiles","PeriodOfDay","Morning","Afternoon","Night","GifContainer","WidgetContainer","Time","DayNightContainer","TradingItemRow","onQuantityChange","traderItem","selectedQty","qty","ItemWrapper","ItemIconContainer","ItemNameContainer","NameValue","capitalize","price","QuantityContainer","QuantityDisplay","TradingComponentScrollWrapper","TotalWrapper","GoldWrapper","AlertWrapper","availableCharacters","propertySelectValues","textureKey","selectedSpriteKey","setSelectedSpriteKey","entitiesJSON","display","paddingBottom","chatMessages","onSendChatMessage","onFocus","_ref$styles","styles","textColor","message","setMessage","scrollChatToBottom","scrollingElement","querySelector","scrollTop","scrollHeight","fallback","emitter","createdAt","dayjs","Date","format","onRenderMessageLines","onRenderChatMessages","autoComplete","borderRadius","RxPaperPlane","FramedGrey","items","selectedValues","forEach","generateSelectedValuesList","setSelectedValues","checked","onSelect","onCraftItem","craftablesItems","optionsId","show","isShown","setIsShown","craftItem","setCraftItem","modifyString","parts","split","words","replace","slice","toUpperCase","concat","join","handleClick","Object","keys","ItemSubType","canCraft","ingredients","details","equipmentSet","onItemClick","onItemDragEnd","onItemDragStart","onItemPlaceDrop","onItemOutsideDrop","equipmentData","neck","leftHand","ring","head","armor","legs","boot","inventory","rightHand","accessory","equipmentMaskSlots","ItemSlotType","onRenderEquipmentSlotRange","start","end","equipmentRange","slotMaksRange","itemContainer","itemType","ContainerType","backgroundImgPath","fullCoverBackground","setImage","fullImg","_ref$disableContextMe","disableContextMenu","isOpen","maxQuantity","callback","_quantity","quantitySelect","setQuantitySelect","slots","slotQty","_itemContainer$slots","onRenderSlots","imageKey","description","_ref$displayText","displayText","_ref$percentageWidth","_ref$minWidth","calculatePercentageValue","quests","buttons","onChangeQuest","questsLength","thumbnail","thumbnailDefault","npcId","quest","skill","onRenderSkillCategory","category","skillCategory","skillCategoryColor","output","entries","skillDetails","experience","xpToNextLevel","TimeClock","word","traderItems","characterAvailableGold","sum","setSum","Map","qtyMap","setQtyMap","set","newSum","get","isBuy","hasGoldForSale","tradeItem","assign"],"mappings":"skCAAO,ICIKA,oDAAAA,EAAAA,sBAAAA,oDAEVA,4CCHUC,EDcCC,EAAS,oBACpBC,SAAAA,gBACAC,IAAAA,SACAC,IAAAA,WACAC,IAAAA,QACGC,SAEH,OACEC,gBAACC,iBACCC,aAAcL,EACdF,SAAUA,GACNI,GACJI,aAAcL,EACdA,QAASA,IAETE,yBAAIJ,KAKJK,EAAkBG,EAAOC,mBAAMC,sCAAAC,2BAAbH,gCDjCb,QGcEI,EAAoC,gBAC/CC,IAAAA,UACAC,IAAAA,SACAC,IAAAA,UAASC,IACTC,MAAAA,aAAQC,eAAUC,IAClBC,OAAAA,aAASC,gBAAWC,IACpBC,SAAAA,aAAW,IACXC,IAAAA,SACAtB,IAAAA,QACAuB,IAAAA,eAAcC,IACdC,UAAAA,gBAAiBC,IACjBC,QAAAA,aAAU,IAKJC,EACJjB,EAAUkB,OAAOhB,IAAcF,EAAUkB,OAAO,uBAElD,IAAKD,EAAY,MAAM,IAAIE,gBAAgBjB,0BAE3C,OACEX,gBAAC6B,GACChB,MAAOA,EACPG,OAAQA,EACRc,SAAUP,EACVzB,QAASA,EACTiC,MAAOV,GAEPrB,gBAACgC,GACC9B,UAAU,wBACVQ,SAAUA,EACVuB,MAAOP,EAAWO,MAClBC,MAAOf,EACPI,UAAWA,EACXE,QAASA,EACTM,MAAOX,MAyBTS,EAAYzB,EAAO+B,gBAAG7B,yCAAAC,4BAAVH,mCACP,SAACL,GAAsB,OAAKA,EAAMc,SACjC,SAACd,GAAsB,OAAKA,EAAMiB,UAC1C,SAACjB,GAAsB,OACtBA,EAAM+B,4GAOLE,EAAY5B,EAAO+B,gBAAG7B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