{"version":3,"sources":["../../src/Modal.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/textTruncation.ts","../../src/WorkArea.tsx","../../src/ModalProvider.tsx","../../src/ModalContext.ts","../../src/ModalRoot.web.tsx","../../src/useModal.ts","../../src/index.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, useCallback } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, useId, ModalIdContext } from \"@xsolla/xui-core\";\nimport { FlexButton, getFlexButtonBoxSize } from \"@xsolla/xui-button\";\nimport { ChevronLeft, Remove } from \"@xsolla/xui-icons-base\";\nimport type { ModalFooterAlign, ModalProps } from \"./types\";\nimport { WorkArea } from \"./WorkArea\";\n\nconst FOCUSABLE_SELECTORS =\n  'button:not([disabled]), [href], input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * `footerAlign` -> the flex `align-items` value on the footer wrapper.\n * `stretch` is the default and matches the wrapper's original behaviour, so\n * existing modals render identically. See FEP-755.\n */\nconst FOOTER_ALIGN_ITEMS: Record<ModalFooterAlign, string> = {\n  stretch: \"stretch\",\n  start: \"flex-start\",\n  center: \"center\",\n  end: \"flex-end\",\n};\n\nconst isElementVisible = (el: HTMLElement): boolean => {\n  if (el.offsetParent === null && getComputedStyle(el).position !== \"fixed\")\n    return false;\n  const style = getComputedStyle(el);\n  return style.visibility !== \"hidden\" && style.display !== \"none\";\n};\n\nconst getFocusableElements = (container: HTMLElement): HTMLElement[] =>\n  Array.from(\n    container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTORS)\n  ).filter(isElementVisible);\n\nexport const Modal = forwardRef<any, ModalProps>(\n  (\n    {\n      children,\n      type = \"popup\",\n      openContent = false,\n      closeOutside = true,\n      backgroundColor,\n      onClose,\n      onBack,\n      align,\n      heading,\n      subheading,\n      header,\n      footer,\n      footerAlign = \"stretch\",\n      styled: styledProps,\n      maxWidth,\n      minHeight,\n      title,\n      \"aria-label\": ariaLabel,\n      \"aria-describedby\": ariaDescribedBy,\n      initialFocusRef,\n      testID,\n      closeButtonTestId,\n      closeButtonSize = \"xl\",\n      themeMode,\n      themeProductContext,\n      ...rest\n    },\n    ref\n  ) => {\n    const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n    const sizing = theme.sizing.modal();\n    // Reserved header columns, sourced from FlexButton so they can't desync.\n    const headerButtonBox = getFlexButtonBoxSize(closeButtonSize);\n    const modalRef = useRef<HTMLDivElement>(null);\n    const closeButtonRef = useRef<HTMLButtonElement>(null);\n    const previousActiveElement = useRef<HTMLElement | null>(null);\n    const titleId = useId();\n\n    useEffect(() => {\n      previousActiveElement.current = document.activeElement as HTMLElement;\n\n      const focusTarget =\n        initialFocusRef?.current ||\n        closeButtonRef.current ||\n        (modalRef.current && getFocusableElements(modalRef.current)[0]);\n\n      if (focusTarget) {\n        focusTarget.focus();\n      } else {\n        modalRef.current?.focus();\n      }\n\n      return () => {\n        previousActiveElement.current?.focus();\n      };\n    }, [initialFocusRef]);\n\n    useEffect(() => {\n      if (!onClose) return;\n      const handleKeyDown = (event: KeyboardEvent) => {\n        if (event.key === \"Escape\") onClose();\n      };\n      document.addEventListener(\"keydown\", handleKeyDown);\n      return () => document.removeEventListener(\"keydown\", handleKeyDown);\n    }, [onClose]);\n\n    useEffect(() => {\n      if (!closeOutside || !onClose) return;\n      const handleClickOutside = (event: MouseEvent) => {\n        const target = event.target;\n        if (!target || !(target instanceof Node)) return;\n        if (modalRef.current && !modalRef.current.contains(target)) {\n          const portalContent = (target as Element).closest?.(\n            `[data-modal-id=\"${titleId}\"]`\n          );\n          if (!portalContent) {\n            onClose();\n          }\n        }\n      };\n      document.addEventListener(\"mousedown\", handleClickOutside);\n      return () =>\n        document.removeEventListener(\"mousedown\", handleClickOutside);\n    }, [closeOutside, onClose, titleId]);\n\n    const handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n      if (event.key !== \"Tab\" || !modalRef.current) return;\n\n      const focusableElements = getFocusableElements(modalRef.current);\n      const firstElement = focusableElements[0];\n      const lastElement = focusableElements[focusableElements.length - 1];\n\n      if (!firstElement) {\n        event.preventDefault();\n        return;\n      }\n\n      if (event.shiftKey && document.activeElement === firstElement) {\n        event.preventDefault();\n        lastElement.focus();\n      } else if (!event.shiftKey && document.activeElement === lastElement) {\n        event.preventDefault();\n        firstElement.focus();\n      }\n    }, []);\n\n    const maxWidthValue =\n      type === \"full-screen\" || type === \"bottom-sheet\"\n        ? \"100%\"\n        : (maxWidth ?? sizing.maxWidth);\n    const hasDefaultHeader =\n      !header && (onBack || onClose || heading || subheading);\n    const hasHeader = !!header || hasDefaultHeader;\n\n    const typeStyles: React.CSSProperties =\n      type === \"full-screen\"\n        ? {\n            position: \"fixed\",\n            top: 0,\n            left: 0,\n            right: 0,\n            bottom: 0,\n            zIndex: 1,\n            maxWidth: \"100%\",\n          }\n        : type === \"bottom-sheet\"\n          ? {\n              position: \"fixed\",\n              bottom: 0,\n              left: 0,\n              right: 0,\n              zIndex: 1,\n              maxWidth: \"100%\",\n            }\n          : {};\n\n    return (\n      <Box\n        testID={testID}\n        ref={modalRef}\n        role=\"dialog\"\n        aria-modal=\"true\"\n        aria-labelledby={title ? titleId : undefined}\n        aria-label={!title ? ariaLabel : undefined}\n        aria-describedby={ariaDescribedBy}\n        data-modal-id={titleId}\n        data-modal-type={type}\n        tabIndex={-1}\n        onKeyDown={handleKeyDown}\n        flexGrow={1}\n        position=\"relative\"\n        width=\"100%\"\n        style={{\n          maxWidth:\n            typeof maxWidthValue === \"number\"\n              ? `${maxWidthValue}px`\n              : maxWidthValue,\n          minHeight:\n            typeof minHeight === \"number\" ? `${minHeight}px` : minHeight,\n          outline: \"none\",\n          ...typeStyles,\n          ...styledProps,\n        }}\n        {...rest}\n      >\n        {title && (\n          <Box\n            id={titleId}\n            position=\"absolute\"\n            style={{\n              clip: \"rect(0 0 0 0)\",\n              clipPath: \"inset(50%)\",\n              height: 1,\n              width: 1,\n              overflow: \"hidden\",\n              whiteSpace: \"nowrap\",\n            }}\n          >\n            {title}\n          </Box>\n        )}\n        <ModalIdContext.Provider value={titleId}>\n          <WorkArea\n            ref={ref}\n            stretched\n            openContent={openContent}\n            type={type}\n            align={align}\n            backgroundColor={backgroundColor}\n          >\n            {hasHeader && (\n              <Box\n                width=\"100%\"\n                padding={sizing.headerPadding}\n                style={{ flexShrink: 0 }}\n              >\n                <Box\n                  flexDirection=\"row\"\n                  justifyContent=\"space-between\"\n                  alignItems=\"center\"\n                  width=\"100%\"\n                  style={{ minHeight: sizing.headerMinHeight, gap: 8 }}\n                >\n                  {header ?? (\n                    <>\n                      <Box style={{ minWidth: headerButtonBox }}>\n                        {onBack && (\n                          <FlexButton\n                            variant=\"secondary\"\n                            size={closeButtonSize}\n                            background\n                            iconLeft={<ChevronLeft />}\n                            onPress={onBack}\n                            aria-label=\"Go back\"\n                            themeMode={themeMode}\n                            themeProductContext={themeProductContext}\n                            testID=\"modal-back-button\"\n                          />\n                        )}\n                      </Box>\n                      {(heading || subheading) && (\n                        <Box\n                          flexGrow={1}\n                          flexDirection=\"column\"\n                          alignItems=\"center\"\n                          justifyContent=\"center\"\n                          style={{ gap: 2, minWidth: 0, overflow: \"hidden\" }}\n                        >\n                          {heading && (\n                            <Text\n                              color={theme.colors.content.primary}\n                              fontSize={\n                                theme.typographyTokens.basic[\"body-lg\"].fontSize\n                              }\n                              lineHeight={\n                                theme.typographyTokens.basic[\"body-lg\"]\n                                  .lineHeight\n                              }\n                              fontWeight={\n                                theme.typographyTokens.basic[\"body-lg\"].accent\n                                  ?.fontWeight ?? 500\n                              }\n                              fontFamily={theme.fonts.body}\n                              whiteSpace=\"nowrap\"\n                              textAlign=\"center\"\n                              style={{\n                                maxWidth: \"100%\",\n                                overflow: \"hidden\",\n                                textOverflow: \"ellipsis\",\n                              }}\n                            >\n                              {heading}\n                            </Text>\n                          )}\n                          {subheading && (\n                            <Text\n                              color={theme.colors.content.secondary}\n                              fontSize={\n                                theme.typographyTokens.basic[\"body-sm\"].fontSize\n                              }\n                              lineHeight={\n                                theme.typographyTokens.basic[\"body-sm\"]\n                                  .lineHeight\n                              }\n                              fontWeight={\n                                theme.typographyTokens.basic[\"body-sm\"]\n                                  .fontWeight\n                              }\n                              fontFamily={theme.fonts.body}\n                              whiteSpace=\"nowrap\"\n                              textAlign=\"center\"\n                              style={{\n                                maxWidth: \"100%\",\n                                overflow: \"hidden\",\n                                textOverflow: \"ellipsis\",\n                              }}\n                            >\n                              {subheading}\n                            </Text>\n                          )}\n                        </Box>\n                      )}\n                      <Box\n                        style={{ minWidth: headerButtonBox }}\n                        alignItems=\"flex-end\"\n                      >\n                        {onClose && (\n                          <FlexButton\n                            ref={closeButtonRef}\n                            variant=\"secondary\"\n                            size={closeButtonSize}\n                            background\n                            iconLeft={<Remove />}\n                            onPress={onClose}\n                            aria-label=\"Close modal\"\n                            themeMode={themeMode}\n                            themeProductContext={themeProductContext}\n                            // Keeps this out of FlexButton's \"flex-button\" fallback.\n                            testID={closeButtonTestId ?? \"modal-close-button\"}\n                          />\n                        )}\n                      </Box>\n                    </>\n                  )}\n                </Box>\n              </Box>\n            )}\n            <Box\n              flexGrow={1}\n              width=\"100%\"\n              padding={openContent ? 0 : sizing.contentPadding}\n              style={{\n                paddingTop:\n                  hasHeader && !openContent ? sizing.headerGap : undefined,\n                paddingBottom:\n                  footer && !openContent ? sizing.footerGap : undefined,\n              }}\n            >\n              {children}\n            </Box>\n            {footer && (\n              <Box\n                width=\"100%\"\n                padding={openContent ? 0 : sizing.contentPadding}\n                alignItems={FOOTER_ALIGN_ITEMS[footerAlign]}\n                style={{ paddingTop: 0, flexShrink: 0 }}\n              >\n                {footer}\n              </Box>\n            )}\n          </WorkArea>\n        </ModalIdContext.Provider>\n      </Box>\n    );\n  }\n);\n\nModal.displayName = \"Modal\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n  display: flex;\n  box-sizing: border-box;\n  background-color: ${(props) => props.backgroundColor || \"transparent\"};\n  border-color: ${(props) => props.borderColor || \"transparent\"};\n  border-width: ${(props) =>\n    typeof props.borderWidth === \"number\"\n      ? `${props.borderWidth}px`\n      : props.borderWidth || 0};\n\n  ${(props) =>\n    props.borderBottomWidth !== undefined &&\n    `\n    border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n    border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n    border-bottom-style: solid;\n  `}\n  ${(props) =>\n    props.borderTopWidth !== undefined &&\n    `\n    border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n    border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n    border-top-style: solid;\n  `}\n  ${(props) =>\n    props.borderLeftWidth !== undefined &&\n    `\n    border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n    border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n    border-left-style: solid;\n  `}\n  ${(props) =>\n    props.borderRightWidth !== undefined &&\n    `\n    border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n    border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n    border-right-style: solid;\n  `}\n\n  border-style: ${(props) =>\n    props.borderStyle ||\n    (props.borderWidth ||\n    props.borderBottomWidth ||\n    props.borderTopWidth ||\n    props.borderLeftWidth ||\n    props.borderRightWidth\n      ? \"solid\"\n      : \"none\")};\n  border-radius: ${(props) =>\n    typeof props.borderRadius === \"number\"\n      ? `${props.borderRadius}px`\n      : props.borderRadius || 0};\n  height: ${(props) =>\n    typeof props.height === \"number\"\n      ? `${props.height}px`\n      : props.height || \"auto\"};\n  width: ${(props) =>\n    typeof props.width === \"number\"\n      ? `${props.width}px`\n      : props.width || \"auto\"};\n  min-width: ${(props) =>\n    typeof props.minWidth === \"number\"\n      ? `${props.minWidth}px`\n      : props.minWidth || \"auto\"};\n  min-height: ${(props) =>\n    typeof props.minHeight === \"number\"\n      ? `${props.minHeight}px`\n      : props.minHeight || \"auto\"};\n  max-width: ${(props) =>\n    typeof props.maxWidth === \"number\"\n      ? `${props.maxWidth}px`\n      : props.maxWidth || \"none\"};\n  max-height: ${(props) =>\n    typeof props.maxHeight === \"number\"\n      ? `${props.maxHeight}px`\n      : props.maxHeight || \"none\"};\n\n  padding: ${(props) =>\n    typeof props.padding === \"number\"\n      ? `${props.padding}px`\n      : props.padding || 0};\n  ${(props) =>\n    props.paddingHorizontal &&\n    `\n    padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n    padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n  `}\n  ${(props) =>\n    props.paddingVertical &&\n    `\n    padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n    padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n  `}\n  ${(props) =>\n    props.paddingTop !== undefined &&\n    `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n  ${(props) =>\n    props.paddingBottom !== undefined &&\n    `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n  ${(props) =>\n    props.paddingLeft !== undefined &&\n    `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n  ${(props) =>\n    props.paddingRight !== undefined &&\n    `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n  margin: ${(props) =>\n    typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n  ${(props) =>\n    props.marginTop !== undefined &&\n    `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n  ${(props) =>\n    props.marginBottom !== undefined &&\n    `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n  ${(props) =>\n    props.marginLeft !== undefined &&\n    `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n  ${(props) =>\n    props.marginRight !== undefined &&\n    `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n  flex-direction: ${(props) => props.flexDirection || \"column\"};\n  flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n  align-items: ${(props) => props.alignItems || \"stretch\"};\n  justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n  cursor: ${(props) =>\n    props.cursor\n      ? props.cursor\n      : props.onClick || props.onPress\n        ? \"pointer\"\n        : \"inherit\"};\n  position: ${(props) => props.position || \"static\"};\n  top: ${(props) =>\n    typeof props.top === \"number\" ? `${props.top}px` : props.top};\n  bottom: ${(props) =>\n    typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n  left: ${(props) =>\n    typeof props.left === \"number\" ? `${props.left}px` : props.left};\n  right: ${(props) =>\n    typeof props.right === \"number\" ? `${props.right}px` : props.right};\n  flex: ${(props) => props.flex};\n  flex-shrink: ${(props) => props.flexShrink ?? 1};\n  gap: ${(props) =>\n    typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n  align-self: ${(props) => props.alignSelf || \"auto\"};\n  /* Only emit overflow-x/y when explicitly set. Defaulting them to\n     visible after overflow would override the shorthand and break\n     clipping (e.g. OtherCard bottom-right promo image). */\n  overflow: ${(props) => props.overflow || \"visible\"};\n  ${(props) =>\n    props.overflowX != null ? `overflow-x: ${props.overflowX};` : \"\"}\n  ${(props) =>\n    props.overflowY != null ? `overflow-y: ${props.overflowY};` : \"\"}\n  z-index: ${(props) => props.zIndex};\n  opacity: ${(props) =>\n    props.opacity != null ? props.opacity : props.disabled ? 0.5 : 1};\n  pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n  /* \\`background\\` is emitted before \\`background-color\\` so a caller passing\n     both still gets backgroundColor as the winner. Use the shorthand for a\n     layered fill (e.g. an overlay tint over a resting surface colour), which\n     a single background-color cannot express. */\n  &:hover {\n    ${(props) =>\n      props.hoverStyle?.background &&\n      `background: ${props.hoverStyle.background};`}\n    ${(props) =>\n      props.hoverStyle?.backgroundColor &&\n      `background-color: ${props.hoverStyle.backgroundColor};`}\n    ${(props) =>\n      props.hoverStyle?.borderColor &&\n      `border-color: ${props.hoverStyle.borderColor};`}\n  }\n\n  &:active {\n    ${(props) =>\n      props.pressStyle?.background &&\n      `background: ${props.pressStyle.background};`}\n    ${(props) =>\n      props.pressStyle?.backgroundColor &&\n      `background-color: ${props.pressStyle.backgroundColor};`}\n  }\n`;\n\nexport const Box = React.forwardRef<\n  HTMLDivElement | HTMLButtonElement,\n  BoxProps\n>(\n  (\n    {\n      children,\n      onPress,\n      onKeyDown,\n      onKeyUp,\n      role,\n      \"aria-label\": ariaLabel,\n      \"aria-labelledby\": ariaLabelledBy,\n      \"aria-current\": ariaCurrent,\n      \"aria-disabled\": ariaDisabled,\n      \"aria-live\": ariaLive,\n      \"aria-busy\": ariaBusy,\n      \"aria-describedby\": ariaDescribedBy,\n      \"aria-expanded\": ariaExpanded,\n      \"aria-haspopup\": ariaHasPopup,\n      \"aria-pressed\": ariaPressed,\n      \"aria-controls\": ariaControls,\n      tabIndex,\n      as,\n      src,\n      alt,\n      onError,\n      onLoad,\n      type,\n      disabled,\n      id,\n      testID,\n      \"data-testid\": dataTestId,\n      ...props\n    },\n    ref\n  ) => {\n    // Handle as=\"img\" for rendering images with proper border-radius\n    if (as === \"img\" && src) {\n      return (\n        <img\n          src={src}\n          alt={alt || \"\"}\n          onError={onError}\n          onLoad={onLoad}\n          data-testid={dataTestId || testID}\n          style={{\n            display: \"block\",\n            objectFit: \"cover\",\n            width:\n              typeof props.width === \"number\"\n                ? `${props.width}px`\n                : props.width,\n            height:\n              typeof props.height === \"number\"\n                ? `${props.height}px`\n                : props.height,\n            borderRadius:\n              typeof props.borderRadius === \"number\"\n                ? `${props.borderRadius}px`\n                : props.borderRadius,\n            position: props.position,\n            top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n            left:\n              typeof props.left === \"number\" ? `${props.left}px` : props.left,\n            right:\n              typeof props.right === \"number\"\n                ? `${props.right}px`\n                : props.right,\n            bottom:\n              typeof props.bottom === \"number\"\n                ? `${props.bottom}px`\n                : props.bottom,\n            ...props.style,\n          }}\n        />\n      );\n    }\n\n    return (\n      <StyledBox\n        ref={ref}\n        elementType={as}\n        id={id}\n        type={as === \"button\" ? type || \"button\" : undefined}\n        disabled={as === \"button\" ? disabled : undefined}\n        onClick={onPress}\n        onKeyDown={onKeyDown}\n        onKeyUp={onKeyUp}\n        role={role}\n        aria-label={ariaLabel}\n        aria-labelledby={ariaLabelledBy}\n        aria-current={ariaCurrent}\n        aria-disabled={ariaDisabled}\n        aria-busy={ariaBusy}\n        aria-describedby={ariaDescribedBy}\n        aria-expanded={ariaExpanded}\n        aria-haspopup={ariaHasPopup}\n        aria-pressed={ariaPressed}\n        aria-controls={ariaControls}\n        aria-live={ariaLive}\n        tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n        data-testid={dataTestId || testID}\n        {...props}\n      >\n        {children}\n      </StyledBox>\n    );\n  }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n  // RN-only event handlers (pass isPropValid's on* pattern)\n  \"onPress\",\n  \"onChangeText\",\n  \"onLayout\",\n  \"onMoveShouldSetResponder\",\n  \"onResponderGrant\",\n  \"onResponderMove\",\n  \"onResponderRelease\",\n  \"onResponderTerminate\",\n  // SVG attributes that pass isPropValid\n  \"strokeWidth\",\n  // CSS properties that pass isPropValid but are used as component props\n  \"overflow\",\n  \"opacity\",\n  \"cursor\",\n  \"fontSize\",\n  \"fontWeight\",\n  \"fontFamily\",\n  \"textDecoration\",\n  // Cross-platform layout prop that Text consumes as CSS, never as an\n  // attribute. Pinned explicitly because it is now spread into the styled\n  // component rather than destructured away before it can reach the DOM.\n  \"numberOfLines\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n  if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n  return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then:  `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n  const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n    ({ children, elementType, ...props }, ref) => {\n      const Tag = (elementType as string) || defaultTag;\n      const htmlProps: Record<string, unknown> = {};\n      for (const key of Object.keys(props)) {\n        if (shouldForwardProp(key)) {\n          htmlProps[key] = props[key];\n        }\n      }\n      return React.createElement(\n        Tag,\n        { ref, ...htmlProps },\n        children as React.ReactNode\n      );\n    }\n  );\n  Component.displayName = `Filtered(${defaultTag})`;\n  return Component;\n}\n","function memoize(fn) {\n  var cache = {};\n  return function (arg) {\n    if (cache[arg] === undefined) cache[arg] = fn(arg);\n    return cache[arg];\n  };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n  return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n  /* o */\n  && prop.charCodeAt(1) === 110\n  /* n */\n  && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\nimport { truncationStyles } from \"./textTruncation\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n  color: ${(props) => props.color || \"inherit\"};\n  font-size: ${(props) =>\n    typeof props.fontSize === \"number\"\n      ? `${props.fontSize}px`\n      : props.fontSize || \"inherit\"};\n  font-weight: ${(props) => props.fontWeight || \"normal\"};\n  font-family: ${(props) =>\n    props.fontFamily ||\n    '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n  line-height: ${(props) =>\n    typeof props.lineHeight === \"number\"\n      ? `${props.lineHeight}px`\n      : props.lineHeight || \"inherit\"};\n  white-space: ${(props) => props.whiteSpace || \"normal\"};\n  text-align: ${(props) => props.textAlign || \"inherit\"};\n  text-decoration: ${(props) => props.textDecoration || \"none\"};\n\n  /* Keep last: single-line truncation has to win over white-space above. */\n  ${(props) => truncationStyles(props.numberOfLines)}\n`;\n\nexport const Text: React.FC<TextProps> = ({\n  style,\n  className,\n  id,\n  role,\n  testID,\n  \"data-testid\": dataTestId,\n  ...props\n}) => {\n  return (\n    <StyledText\n      {...props}\n      style={style}\n      className={className}\n      id={id}\n      role={role}\n      data-testid={dataTestId || testID}\n    />\n  );\n};\n","/**\n * Web implementation of the cross-platform `numberOfLines` text prop.\n *\n * Native maps `numberOfLines` straight onto `RNText`. A web `<span>` has no\n * equivalent, so emit the CSS that produces the same result.\n *\n * Two details matter for the single-line case:\n * - `text-overflow` only takes effect on a block container, so the inline\n *   `<span>` is promoted to `display: block` and capped at `max-width: 100%`.\n * - `min-width: 0` lets the text shrink below its own content width when it\n *   sits in a flex row. Without it a `nowrap` label keeps its full intrinsic\n *   width and pushes its siblings (icons, chevrons) out of a fixed-width field.\n *\n * Returns an empty string when there is nothing to clamp, so the declaration\n * block stays untouched for the majority of callers.\n */\nexport const truncationStyles = (numberOfLines?: number): string => {\n  if (!numberOfLines || numberOfLines < 1) return \"\";\n\n  if (numberOfLines === 1) {\n    return `\n      display: block;\n      max-width: 100%;\n      min-width: 0;\n      overflow: hidden;\n      text-overflow: ellipsis;\n      white-space: nowrap;\n    `;\n  }\n\n  return `\n    display: -webkit-box;\n    -webkit-box-orient: vertical;\n    -webkit-line-clamp: ${numberOfLines};\n    line-clamp: ${numberOfLines};\n    max-width: 100%;\n    min-width: 0;\n    overflow: hidden;\n  `;\n};\n","import { forwardRef } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport type { WorkAreaProps } from \"./types\";\n\nconst getBorderRadius = (\n  type: WorkAreaProps[\"type\"],\n  baseRadius: number\n): string | number => {\n  switch (type) {\n    case \"full-screen\":\n      return 0;\n    case \"bottom-sheet\":\n      return `${baseRadius}px ${baseRadius}px 0 0`;\n    default:\n      return baseRadius;\n  }\n};\n\nexport const WorkArea = forwardRef<any, WorkAreaProps>(\n  (\n    {\n      children,\n      openContent = false,\n      stretched = false,\n      fetching = false,\n      type = \"popup\",\n      align,\n      backgroundColor,\n      testID,\n      themeMode,\n      themeProductContext,\n    },\n    ref\n  ) => {\n    const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n    const sizing = theme.sizing.modal();\n\n    return (\n      <Box\n        testID={testID}\n        ref={ref}\n        backgroundColor={backgroundColor ?? theme.colors.background.primary}\n        width=\"100%\"\n        height={stretched ? \"100%\" : \"auto\"}\n        flexDirection=\"column\"\n        alignItems={align === \"center\" ? \"center\" : \"stretch\"}\n        style={{\n          borderRadius: getBorderRadius(type, sizing.borderRadius),\n          overflow: \"hidden\",\n          color: theme.colors.content.primary,\n        }}\n      >\n        <Box\n          width=\"100%\"\n          height=\"100%\"\n          flexDirection=\"column\"\n          alignItems={align === \"center\" ? \"center\" : \"stretch\"}\n          style={{ textAlign: align === \"center\" ? \"center\" : \"left\" }}\n        >\n          {fetching ? (\n            <Box\n              alignItems=\"center\"\n              justifyContent=\"center\"\n              width=\"100%\"\n              height=\"100%\"\n            >\n              <div>Loading...</div>\n            </Box>\n          ) : (\n            children\n          )}\n        </Box>\n      </Box>\n    );\n  }\n);\n\nWorkArea.displayName = \"WorkArea\";\n","import { useCallback, useMemo, useState } from \"react\";\nimport { ModalStackProvider } from \"@xsolla/xui-core\";\nimport { ModalContext } from \"./ModalContext\";\nimport { ModalRoot } from \"./ModalRoot\";\nimport type { ModalProviderProps, ModalType } from \"./types\";\n\nexport const ModalProvider = ({ children, testID }: ModalProviderProps) => {\n  const [modals, setModals] = useState<Record<string, ModalType>>({});\n\n  const onOpenModal = useCallback(\n    (key: string, modal: ModalType) =>\n      setModals((m) => ({ ...m, [key]: modal })),\n    []\n  );\n\n  const onCloseModal = useCallback(\n    (key: string) =>\n      setModals((m) => {\n        if (!m[key]) return m;\n        const newModals = { ...m };\n        delete newModals[key];\n        return newModals;\n      }),\n    []\n  );\n\n  const contextValue = useMemo(\n    () => ({ onOpenModal, onCloseModal }),\n    [onOpenModal, onCloseModal]\n  );\n\n  return (\n    <ModalContext.Provider value={contextValue}>\n      <ModalStackProvider value={Object.keys(modals).length}>\n        {children}\n        <ModalRoot modals={modals} testID={testID} />\n      </ModalStackProvider>\n    </ModalContext.Provider>\n  );\n};\n","import { createContext } from \"react\";\nimport type { ModalContextType } from \"./types\";\n\nconst invariantViolation = () => {\n  throw new Error(\n    \"Attempted to call useModal outside of modal context. Make sure your app is rendered inside ModalProvider.\"\n  );\n};\n\nexport const ModalContext = createContext<ModalContextType>({\n  onOpenModal: invariantViolation,\n  onCloseModal: invariantViolation,\n});\n","import React, { memo, useEffect, useMemo, useRef, useState } from \"react\";\nimport ReactDOM from \"react-dom\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport {\n  useResolvedTheme,\n  useOverlayLayer,\n  OverlayLayerProvider,\n  MODAL_LAYER_STEP,\n} from \"@xsolla/xui-core\";\nimport type { ModalRootProps, ModalType } from \"./types\";\n\nconst ENTER_DURATION = 250;\nconst EXIT_DURATION = 200;\n\n// Per-type enter/exit motion keyed off the data-modal-type attribute that\n// Modal sets on its root node: popup fades + scales, bottom-sheet slides up,\n// full-screen fades with the overlay. Exits are faster and accelerate\n// (industry convention); prefers-reduced-motion drops motion entirely.\nconst MODAL_ANIMATION_CSS = `\n.xui-modal-overlay {\n  opacity: 0;\n  transition: opacity ${EXIT_DURATION}ms cubic-bezier(0.4, 0, 1, 1);\n}\n.xui-modal-overlay.xui-modal-open {\n  opacity: 1;\n  transition: opacity ${ENTER_DURATION}ms cubic-bezier(0, 0, 0.2, 1);\n}\n.xui-modal-overlay [data-modal-type] {\n  transition: transform ${EXIT_DURATION}ms cubic-bezier(0.4, 0, 1, 1);\n}\n.xui-modal-overlay.xui-modal-open [data-modal-type] {\n  transition: transform ${ENTER_DURATION}ms cubic-bezier(0, 0, 0.2, 1);\n}\n.xui-modal-overlay:not(.xui-modal-open) [data-modal-type=\"popup\"] {\n  transform: scale(0.95);\n}\n.xui-modal-overlay:not(.xui-modal-open) [data-modal-type=\"bottom-sheet\"] {\n  transform: translateY(100%);\n}\n@media (prefers-reduced-motion: reduce) {\n  .xui-modal-overlay,\n  .xui-modal-overlay.xui-modal-open,\n  .xui-modal-overlay [data-modal-type],\n  .xui-modal-overlay.xui-modal-open [data-modal-type] {\n    transition: none;\n    transform: none;\n  }\n}\n`;\n\nexport const ModalRoot = memo(({ modals, testID }: ModalRootProps) => {\n  const { theme } = useResolvedTheme();\n  const modalLayer = useOverlayLayer() + MODAL_LAYER_STEP;\n  const visibleModalKey = useMemo(\n    () => Object.keys(modals)[Object.keys(modals).length - 1],\n    [modals]\n  );\n\n  // Retain the last open modal so it stays rendered during the fade-out.\n  // NOTE: this ref is intentionally updated during render (not in an effect)\n  // so it is always populated on the SAME render that visibleModalKey first\n  // becomes undefined. Deriving activeKey/activeModal from the ref directly\n  // (without an `exiting` state guard) prevents the one-frame null-return gap\n  // that caused the modal to snap away before the CSS transition could start.\n  const lastModalRef = useRef<{ key: string; modal: ModalType } | null>(null);\n  if (visibleModalKey) {\n    lastModalRef.current = {\n      key: visibleModalKey,\n      modal: modals[visibleModalKey],\n    };\n  }\n\n  const [visible, setVisible] = useState(false);\n  const [exiting, setExiting] = useState(false);\n\n  useEffect(() => {\n    if (visibleModalKey) {\n      setExiting(false);\n      const frame = requestAnimationFrame(() => setVisible(true));\n      return () => cancelAnimationFrame(frame);\n    }\n    if (!lastModalRef.current) return;\n    setVisible(false);\n    setExiting(true);\n    const timer = setTimeout(() => {\n      lastModalRef.current = null;\n      setExiting(false);\n    }, EXIT_DURATION);\n    return () => clearTimeout(timer);\n  }, [visibleModalKey]);\n\n  // Derive from lastModalRef directly so the portal stays mounted on the\n  // first render after close (before useEffect has had a chance to set\n  // exiting=true). lastModalRef is only null'd after EXIT_DURATION ms.\n  const activeKey = visibleModalKey ?? lastModalRef.current?.key;\n  const activeModal = visibleModalKey\n    ? modals[visibleModalKey]\n    : lastModalRef.current?.modal;\n\n  if (!activeKey || !activeModal || typeof document === \"undefined\")\n    return null;\n\n  return ReactDOM.createPortal(\n    <>\n      <style>{MODAL_ANIMATION_CSS}</style>\n      <Box\n        testID={testID}\n        className={`xui-modal-overlay${visible ? \" xui-modal-open\" : \"\"}`}\n        position=\"fixed\"\n        zIndex={modalLayer}\n        top={0}\n        left={0}\n        right={0}\n        bottom={0}\n        alignItems=\"center\"\n        justifyContent=\"start\"\n        padding={20}\n        overflowY=\"auto\"\n        style={{\n          overscrollBehavior: \"contain\",\n          // Disable interaction during exit so clicks do not reach\n          // underlying content while the overlay is fading out.\n          pointerEvents: !visible && !!activeKey ? \"none\" : undefined,\n        }}\n      >\n        <Box\n          position=\"fixed\"\n          zIndex={0}\n          top={0}\n          left={0}\n          right={0}\n          bottom={0}\n          backgroundColor={theme.colors.layer?.scrim ?? \"rgba(0, 0, 0, 0.75)\"}\n          aria-hidden=\"true\"\n        />\n        <Box\n          position=\"relative\"\n          zIndex={1}\n          width=\"100%\"\n          alignItems=\"center\"\n          justifyContent=\"center\"\n          margin=\"auto\"\n        >\n          <OverlayLayerProvider value={modalLayer}>\n            <React.Fragment key={activeKey}>{activeModal({})}</React.Fragment>\n          </OverlayLayerProvider>\n        </Box>\n      </Box>\n    </>,\n    document.body\n  );\n});\n\nModalRoot.displayName = \"ModalRoot\";\n","import { useContext, useEffect, useMemo, useRef, useCallback } from \"react\";\nimport { ModalContext } from \"./ModalContext\";\nimport { ModalType } from \"./types\";\n\nexport const useModal = (modal: ModalType): [() => void, () => void] => {\n  const { onOpenModal, onCloseModal } = useContext(ModalContext);\n  const key = useMemo(() => Math.random().toString(36).substr(2, 9), []);\n  const modalRef = useRef(modal);\n\n  useEffect(() => {\n    modalRef.current = modal;\n  }, [modal]);\n\n  const open = useCallback(() => {\n    onOpenModal(key, modalRef.current);\n  }, [key, onOpenModal]);\n\n  const close = useCallback(() => {\n    onCloseModal(key);\n  }, [key, onCloseModal]);\n\n  return [open, close];\n};\n","export * from \"./Modal\";\nexport * from \"./ModalProvider\";\nexport * from \"./useModal\";\nexport * from \"./types\";\nexport * from \"./WorkArea\";\nexport { useModalId } from \"@xsolla/xui-core\";\n"],"mappings":";AAAA,SAAS,cAAAA,aAAY,WAAW,QAAQ,mBAAmB;;;ACA3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,KAAC,aAAa,UAAb,EAAsB,OAAO,cAC5B,0BAAAC,MAAC,sBAAmB,OAAO,OAAO,KAAK,MAAM,EAAE,QAC5C;AAAA;AAAA,IACD,gBAAAD,KAAC,aAAU,QAAgB,QAAgB;AAAA,KAC7C,GACF;AAEJ;;;AGvCA,SAAS,YAAY,aAAAK,YAAW,WAAAC,UAAS,UAAAC,SAAQ,eAAAC,oBAAmB;AAI7D,IAAM,WAAW,CAAC,UAA+C;AACtE,QAAM,EAAE,aAAa,aAAa,IAAI,WAAW,YAAY;AAC7D,QAAM,MAAMC,SAAQ,MAAM,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;AACrE,QAAM,WAAWC,QAAO,KAAK;AAE7B,EAAAC,WAAU,MAAM;AACd,aAAS,UAAU;AAAA,EACrB,GAAG,CAAC,KAAK,CAAC;AAEV,QAAM,OAAOC,aAAY,MAAM;AAC7B,gBAAY,KAAK,SAAS,OAAO;AAAA,EACnC,GAAG,CAAC,KAAK,WAAW,CAAC;AAErB,QAAM,QAAQA,aAAY,MAAM;AAC9B,iBAAa,GAAG;AAAA,EAClB,GAAG,CAAC,KAAK,YAAY,CAAC;AAEtB,SAAO,CAAC,MAAM,KAAK;AACrB;;;ACjBA,SAAS,kBAAkB;","names":["forwardRef","React","React","styled","jsx","styled","useResolvedTheme","jsx","jsx","forwardRef","useResolvedTheme","handleKeyDown","useCallback","useMemo","useState","React","useEffect","useRef","useResolvedTheme","Fragment","jsx","jsxs","useRef","useEffect","React","jsx","jsxs","useState","useCallback","useMemo","useEffect","useMemo","useRef","useCallback","useMemo","useRef","useEffect","useCallback"]}