{"ast":null,"code":"import $98Iye$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport { forwardRef as $98Iye$forwardRef, createElement as $98Iye$createElement, useRef as $98Iye$useRef, useState as $98Iye$useState, useEffect as $98Iye$useEffect, useCallback as $98Iye$useCallback } from \"react\";\nimport { composeEventHandlers as $98Iye$composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection as $98Iye$createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs as $98Iye$useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope as $98Iye$createContextScope } from \"@radix-ui/react-context\";\nimport { useId as $98Iye$useId } from \"@radix-ui/react-id\";\nimport { Primitive as $98Iye$Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef as $98Iye$useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState as $98Iye$useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection as $98Iye$useDirection } from \"@radix-ui/react-direction\";\nconst $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {\n  bubbles: false,\n  cancelable: true\n};\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\nconst $d7bdfb9eb0fdf311$var$GROUP_NAME = 'RovingFocusGroup';\nconst [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $98Iye$createCollection($d7bdfb9eb0fdf311$var$GROUP_NAME);\nconst [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $98Iye$createContextScope($d7bdfb9eb0fdf311$var$GROUP_NAME, [$d7bdfb9eb0fdf311$var$createCollectionScope]);\nconst [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);\nconst $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/$98Iye$forwardRef((props, forwardedRef) => {\n  return /*#__PURE__*/$98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {\n    scope: props.__scopeRovingFocusGroup\n  }, /*#__PURE__*/$98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {\n    scope: props.__scopeRovingFocusGroup\n  }, /*#__PURE__*/$98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, $98Iye$babelruntimehelpersesmextends({}, props, {\n    ref: forwardedRef\n  }))));\n});\n/*#__PURE__*/\nObject.assign($d7bdfb9eb0fdf311$export$8699f7c8af148338, {\n  displayName: $d7bdfb9eb0fdf311$var$GROUP_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/\nconst $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /*#__PURE__*/$98Iye$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeRovingFocusGroup: __scopeRovingFocusGroup,\n    orientation: orientation,\n    loop = false,\n    dir: dir,\n    currentTabStopId: currentTabStopIdProp,\n    defaultCurrentTabStopId: defaultCurrentTabStopId,\n    onCurrentTabStopIdChange: onCurrentTabStopIdChange,\n    onEntryFocus: onEntryFocus,\n    ...groupProps\n  } = props;\n  const ref = $98Iye$useRef(null);\n  const composedRefs = $98Iye$useComposedRefs(forwardedRef, ref);\n  const direction = $98Iye$useDirection(dir);\n  const [currentTabStopId = null, setCurrentTabStopId] = $98Iye$useControllableState({\n    prop: currentTabStopIdProp,\n    defaultProp: defaultCurrentTabStopId,\n    onChange: onCurrentTabStopIdChange\n  });\n  const [isTabbingBackOut, setIsTabbingBackOut] = $98Iye$useState(false);\n  const handleEntryFocus = $98Iye$useCallbackRef(onEntryFocus);\n  const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);\n  const isClickFocusRef = $98Iye$useRef(false);\n  const [focusableItemsCount, setFocusableItemsCount] = $98Iye$useState(0);\n  $98Iye$useEffect(() => {\n    const node = ref.current;\n    if (node) {\n      node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);\n      return () => node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);\n    }\n  }, [handleEntryFocus]);\n  return /*#__PURE__*/$98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {\n    scope: __scopeRovingFocusGroup,\n    orientation: orientation,\n    dir: direction,\n    loop: loop,\n    currentTabStopId: currentTabStopId,\n    onItemFocus: $98Iye$useCallback(tabStopId => setCurrentTabStopId(tabStopId), [setCurrentTabStopId]),\n    onItemShiftTab: $98Iye$useCallback(() => setIsTabbingBackOut(true), []),\n    onFocusableItemAdd: $98Iye$useCallback(() => setFocusableItemsCount(prevCount => prevCount + 1), []),\n    onFocusableItemRemove: $98Iye$useCallback(() => setFocusableItemsCount(prevCount => prevCount - 1), [])\n  }, /*#__PURE__*/$98Iye$createElement($98Iye$Primitive.div, $98Iye$babelruntimehelpersesmextends({\n    tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n    \"data-orientation\": orientation\n  }, groupProps, {\n    ref: composedRefs,\n    style: {\n      outline: 'none',\n      ...props.style\n    },\n    onMouseDown: $98Iye$composeEventHandlers(props.onMouseDown, () => {\n      isClickFocusRef.current = true;\n    }),\n    onFocus: $98Iye$composeEventHandlers(props.onFocus, event => {\n      // We normally wouldn't need this check, because we already check\n      // that the focus is on the current target and not bubbling to it.\n      // We do this because Safari doesn't focus buttons when clicked, and\n      // instead, the wrapper will get focused and not through a bubbling event.\n      const isKeyboardFocus = !isClickFocusRef.current;\n      if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n        const entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);\n        event.currentTarget.dispatchEvent(entryFocusEvent);\n        if (!entryFocusEvent.defaultPrevented) {\n          const items = getItems().filter(item => item.focusable);\n          const activeItem = items.find(item => item.active);\n          const currentItem = items.find(item => item.id === currentTabStopId);\n          const candidateItems = [activeItem, currentItem, ...items].filter(Boolean);\n          const candidateNodes = candidateItems.map(item => item.ref.current);\n          $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);\n        }\n      }\n      isClickFocusRef.current = false;\n    }),\n    onBlur: $98Iye$composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n  })));\n});\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/\nconst $d7bdfb9eb0fdf311$var$ITEM_NAME = 'RovingFocusGroupItem';\nconst $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/$98Iye$forwardRef((props, forwardedRef) => {\n  const {\n    __scopeRovingFocusGroup: __scopeRovingFocusGroup,\n    focusable = true,\n    active = false,\n    tabStopId: tabStopId,\n    ...itemProps\n  } = props;\n  const autoId = $98Iye$useId();\n  const id = tabStopId || autoId;\n  const context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);\n  const isCurrentTabStop = context.currentTabStopId === id;\n  const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);\n  const {\n    onFocusableItemAdd: onFocusableItemAdd,\n    onFocusableItemRemove: onFocusableItemRemove\n  } = context;\n  $98Iye$useEffect(() => {\n    if (focusable) {\n      onFocusableItemAdd();\n      return () => onFocusableItemRemove();\n    }\n  }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n  return /*#__PURE__*/$98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {\n    scope: __scopeRovingFocusGroup,\n    id: id,\n    focusable: focusable,\n    active: active\n  }, /*#__PURE__*/$98Iye$createElement($98Iye$Primitive.span, $98Iye$babelruntimehelpersesmextends({\n    tabIndex: isCurrentTabStop ? 0 : -1,\n    \"data-orientation\": context.orientation\n  }, itemProps, {\n    ref: forwardedRef,\n    onMouseDown: $98Iye$composeEventHandlers(props.onMouseDown, event => {\n      // We prevent focusing non-focusable items on `mousedown`.\n      // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n      if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n      else context.onItemFocus(id);\n    }),\n    onFocus: $98Iye$composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n    onKeyDown: $98Iye$composeEventHandlers(props.onKeyDown, event => {\n      if (event.key === 'Tab' && event.shiftKey) {\n        context.onItemShiftTab();\n        return;\n      }\n      if (event.target !== event.currentTarget) return;\n      const focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);\n      if (focusIntent !== undefined) {\n        event.preventDefault();\n        const items = getItems().filter(item => item.focusable);\n        let candidateNodes = items.map(item => item.ref.current);\n        if (focusIntent === 'last') candidateNodes.reverse();else if (focusIntent === 'prev' || focusIntent === 'next') {\n          if (focusIntent === 'prev') candidateNodes.reverse();\n          const currentIndex = candidateNodes.indexOf(event.currentTarget);\n          candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n        }\n        /**\n        * Imperative focus during keydown is risky so we prevent React's batching updates\n        * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n        */\n        setTimeout(() => $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes));\n      }\n    })\n  })));\n});\n/*#__PURE__*/\nObject.assign($d7bdfb9eb0fdf311$export$ab9df7c53fe8454, {\n  displayName: $d7bdfb9eb0fdf311$var$ITEM_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ // prettier-ignore\nconst $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {\n  ArrowLeft: 'prev',\n  ArrowUp: 'prev',\n  ArrowRight: 'next',\n  ArrowDown: 'next',\n  PageUp: 'first',\n  Home: 'first',\n  PageDown: 'last',\n  End: 'last'\n};\nfunction $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {\n  if (dir !== 'rtl') return key;\n  return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\nfunction $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {\n  const key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);\n  if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n  if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n  return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction $d7bdfb9eb0fdf311$var$focusFirst(candidates) {\n  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n  for (const candidate of candidates) {\n    // if focus is already where we want to go, we don't want to keep going through the candidates\n    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n    candidate.focus();\n    if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n  }\n}\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {\n  return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nconst $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;\nconst $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;\nexport { $d7bdfb9eb0fdf311$export$c7109489551a4f4 as createRovingFocusGroupScope, $d7bdfb9eb0fdf311$export$8699f7c8af148338 as RovingFocusGroup, $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 as RovingFocusGroupItem, $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 as Root, $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 as Item };","map":{"version":3,"names":["$d7bdfb9eb0fdf311$var$ENTRY_FOCUS","$d7bdfb9eb0fdf311$var$EVENT_OPTIONS","bubbles","cancelable","$d7bdfb9eb0fdf311$var$GROUP_NAME","$d7bdfb9eb0fdf311$var$Collection","$d7bdfb9eb0fdf311$var$useCollection","$d7bdfb9eb0fdf311$var$createCollectionScope","$98Iye$createCollection","$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext","$d7bdfb9eb0fdf311$export$c7109489551a4f4","$98Iye$createContextScope","$d7bdfb9eb0fdf311$var$RovingFocusProvider","$d7bdfb9eb0fdf311$var$useRovingFocusContext","$d7bdfb9eb0fdf311$export$8699f7c8af148338","$98Iye$forwardRef","props","forwardedRef","$98Iye$createElement","Provider","scope","__scopeRovingFocusGroup","Slot","$d7bdfb9eb0fdf311$var$RovingFocusGroupImpl","$98Iye$babelruntimehelpersesmextends","ref","Object","assign","displayName","orientation","loop","dir","currentTabStopId","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","groupProps","$98Iye$useRef","composedRefs","$98Iye$useComposedRefs","direction","$98Iye$useDirection","setCurrentTabStopId","$98Iye$useControllableState","prop","defaultProp","onChange","isTabbingBackOut","setIsTabbingBackOut","$98Iye$useState","handleEntryFocus","$98Iye$useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","$98Iye$useEffect","node","current","addEventListener","removeEventListener","onItemFocus","$98Iye$useCallback","tabStopId","onItemShiftTab","onFocusableItemAdd","prevCount","onFocusableItemRemove","$98Iye$Primitive","div","tabIndex","style","outline","onMouseDown","$98Iye$composeEventHandlers","onFocus","event","isKeyboardFocus","target","currentTarget","entryFocusEvent","CustomEvent","dispatchEvent","defaultPrevented","items","filter","item","focusable","activeItem","find","active","currentItem","id","candidateItems","Boolean","candidateNodes","map","$d7bdfb9eb0fdf311$var$focusFirst","onBlur","$d7bdfb9eb0fdf311$var$ITEM_NAME","$d7bdfb9eb0fdf311$export$ab9df7c53fe8454","itemProps","autoId","$98Iye$useId","context","isCurrentTabStop","ItemSlot","span","preventDefault","onKeyDown","key","shiftKey","focusIntent","$d7bdfb9eb0fdf311$var$getFocusIntent","undefined","reverse","currentIndex","indexOf","$d7bdfb9eb0fdf311$var$wrapArray","slice","setTimeout","$d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","PageUp","Home","PageDown","End","$d7bdfb9eb0fdf311$var$getDirectionAwareKey","getDirectionAwareKey","getFocusIntent","includes","focusFirst","candidates","PREVIOUSLY_FOCUSED_ELEMENT","document","activeElement","candidate","focus","wrapArray","array","startIndex","_","index","length","$d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9","$d7bdfb9eb0fdf311$export$6d08773d2e66f8f2"],"sources":["C:\\Users\\user\\Desktop\\05portreact\\node_modules\\@radix-ui\\react-roving-focus\\dist\\packages\\react\\roving-focus\\src\\index.ts","C:\\Users\\user\\Desktop\\05portreact\\node_modules\\@radix-ui\\react-roving-focus\\dist\\packages\\react\\roving-focus\\src\\RovingFocusGroup.tsx"],"sourcesContent":["export {\n  createRovingFocusGroupScope,\n  //\n  RovingFocusGroup,\n  RovingFocusGroupItem,\n  //\n  Root,\n  Item,\n} from './RovingFocusGroup';\nexport type { RovingFocusGroupProps, RovingFocusItemProps } from './RovingFocusGroup';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { createCollection } from '@radix-ui/react-collection';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { createContextScope } from '@radix-ui/react-context';\nimport { useId } from '@radix-ui/react-id';\nimport { Primitive } from '@radix-ui/react-primitive';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useControllableState } from '@radix-ui/react-use-controllable-state';\nimport { useDirection } from '@radix-ui/react-direction';\n\nimport type * as Radix from '@radix-ui/react-primitive';\nimport type { Scope } from '@radix-ui/react-context';\n\nconst ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst EVENT_OPTIONS = { bubbles: false, cancelable: true };\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/\n\nconst GROUP_NAME = 'RovingFocusGroup';\n\ntype ItemData = { id: string; focusable: boolean; active: boolean };\nconst [Collection, useCollection, createCollectionScope] = createCollection<\n  HTMLSpanElement,\n  ItemData\n>(GROUP_NAME);\n\ntype ScopedProps<P> = P & { __scopeRovingFocusGroup?: Scope };\nconst [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n  GROUP_NAME,\n  [createCollectionScope]\n);\n\ntype Orientation = React.AriaAttributes['aria-orientation'];\ntype Direction = 'ltr' | 'rtl';\n\ninterface RovingFocusGroupOptions {\n  /**\n   * The orientation of the group.\n   * Mainly so arrow navigation is done accordingly (left & right vs. up & down)\n   */\n  orientation?: Orientation;\n  /**\n   * The direction of navigation between items.\n   */\n  dir?: Direction;\n  /**\n   * Whether keyboard navigation should loop around\n   * @defaultValue false\n   */\n  loop?: boolean;\n}\n\ntype RovingContextValue = RovingFocusGroupOptions & {\n  currentTabStopId: string | null;\n  onItemFocus(tabStopId: string): void;\n  onItemShiftTab(): void;\n  onFocusableItemAdd(): void;\n  onFocusableItemRemove(): void;\n};\n\nconst [RovingFocusProvider, useRovingFocusContext] =\n  createRovingFocusGroupContext<RovingContextValue>(GROUP_NAME);\n\ntype RovingFocusGroupElement = RovingFocusGroupImplElement;\ninterface RovingFocusGroupProps extends RovingFocusGroupImplProps {}\n\nconst RovingFocusGroup = React.forwardRef<RovingFocusGroupElement, RovingFocusGroupProps>(\n  (props: ScopedProps<RovingFocusGroupProps>, forwardedRef) => {\n    return (\n      <Collection.Provider scope={props.__scopeRovingFocusGroup}>\n        <Collection.Slot scope={props.__scopeRovingFocusGroup}>\n          <RovingFocusGroupImpl {...props} ref={forwardedRef} />\n        </Collection.Slot>\n      </Collection.Provider>\n    );\n  }\n);\n\nRovingFocusGroup.displayName = GROUP_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype RovingFocusGroupImplElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface RovingFocusGroupImplProps\n  extends Omit<PrimitiveDivProps, 'dir'>,\n    RovingFocusGroupOptions {\n  currentTabStopId?: string | null;\n  defaultCurrentTabStopId?: string;\n  onCurrentTabStopIdChange?: (tabStopId: string | null) => void;\n  onEntryFocus?: (event: Event) => void;\n}\n\nconst RovingFocusGroupImpl = React.forwardRef<\n  RovingFocusGroupImplElement,\n  RovingFocusGroupImplProps\n>((props: ScopedProps<RovingFocusGroupImplProps>, forwardedRef) => {\n  const {\n    __scopeRovingFocusGroup,\n    orientation,\n    loop = false,\n    dir,\n    currentTabStopId: currentTabStopIdProp,\n    defaultCurrentTabStopId,\n    onCurrentTabStopIdChange,\n    onEntryFocus,\n    ...groupProps\n  } = props;\n  const ref = React.useRef<RovingFocusGroupImplElement>(null);\n  const composedRefs = useComposedRefs(forwardedRef, ref);\n  const direction = useDirection(dir);\n  const [currentTabStopId = null, setCurrentTabStopId] = useControllableState({\n    prop: currentTabStopIdProp,\n    defaultProp: defaultCurrentTabStopId,\n    onChange: onCurrentTabStopIdChange,\n  });\n  const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n  const handleEntryFocus = useCallbackRef(onEntryFocus);\n  const getItems = useCollection(__scopeRovingFocusGroup);\n  const isClickFocusRef = React.useRef(false);\n  const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n\n  React.useEffect(() => {\n    const node = ref.current;\n    if (node) {\n      node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n      return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n    }\n  }, [handleEntryFocus]);\n\n  return (\n    <RovingFocusProvider\n      scope={__scopeRovingFocusGroup}\n      orientation={orientation}\n      dir={direction}\n      loop={loop}\n      currentTabStopId={currentTabStopId}\n      onItemFocus={React.useCallback(\n        (tabStopId) => setCurrentTabStopId(tabStopId),\n        [setCurrentTabStopId]\n      )}\n      onItemShiftTab={React.useCallback(() => setIsTabbingBackOut(true), [])}\n      onFocusableItemAdd={React.useCallback(\n        () => setFocusableItemsCount((prevCount) => prevCount + 1),\n        []\n      )}\n      onFocusableItemRemove={React.useCallback(\n        () => setFocusableItemsCount((prevCount) => prevCount - 1),\n        []\n      )}\n    >\n      <Primitive.div\n        tabIndex={isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0}\n        data-orientation={orientation}\n        {...groupProps}\n        ref={composedRefs}\n        style={{ outline: 'none', ...props.style }}\n        onMouseDown={composeEventHandlers(props.onMouseDown, () => {\n          isClickFocusRef.current = true;\n        })}\n        onFocus={composeEventHandlers(props.onFocus, (event) => {\n          // We normally wouldn't need this check, because we already check\n          // that the focus is on the current target and not bubbling to it.\n          // We do this because Safari doesn't focus buttons when clicked, and\n          // instead, the wrapper will get focused and not through a bubbling event.\n          const isKeyboardFocus = !isClickFocusRef.current;\n\n          if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n            const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n            event.currentTarget.dispatchEvent(entryFocusEvent);\n\n            if (!entryFocusEvent.defaultPrevented) {\n              const items = getItems().filter((item) => item.focusable);\n              const activeItem = items.find((item) => item.active);\n              const currentItem = items.find((item) => item.id === currentTabStopId);\n              const candidateItems = [activeItem, currentItem, ...items].filter(\n                Boolean\n              ) as typeof items;\n              const candidateNodes = candidateItems.map((item) => item.ref.current!);\n              focusFirst(candidateNodes);\n            }\n          }\n\n          isClickFocusRef.current = false;\n        })}\n        onBlur={composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))}\n      />\n    </RovingFocusProvider>\n  );\n});\n\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/\n\nconst ITEM_NAME = 'RovingFocusGroupItem';\n\ntype RovingFocusItemElement = React.ElementRef<typeof Primitive.span>;\ntype PrimitiveSpanProps = Radix.ComponentPropsWithoutRef<typeof Primitive.span>;\ninterface RovingFocusItemProps extends PrimitiveSpanProps {\n  tabStopId?: string;\n  focusable?: boolean;\n  active?: boolean;\n}\n\nconst RovingFocusGroupItem = React.forwardRef<RovingFocusItemElement, RovingFocusItemProps>(\n  (props: ScopedProps<RovingFocusItemProps>, forwardedRef) => {\n    const {\n      __scopeRovingFocusGroup,\n      focusable = true,\n      active = false,\n      tabStopId,\n      ...itemProps\n    } = props;\n    const autoId = useId();\n    const id = tabStopId || autoId;\n    const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n    const isCurrentTabStop = context.currentTabStopId === id;\n    const getItems = useCollection(__scopeRovingFocusGroup);\n\n    const { onFocusableItemAdd, onFocusableItemRemove } = context;\n\n    React.useEffect(() => {\n      if (focusable) {\n        onFocusableItemAdd();\n        return () => onFocusableItemRemove();\n      }\n    }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n\n    return (\n      <Collection.ItemSlot\n        scope={__scopeRovingFocusGroup}\n        id={id}\n        focusable={focusable}\n        active={active}\n      >\n        <Primitive.span\n          tabIndex={isCurrentTabStop ? 0 : -1}\n          data-orientation={context.orientation}\n          {...itemProps}\n          ref={forwardedRef}\n          onMouseDown={composeEventHandlers(props.onMouseDown, (event) => {\n            // We prevent focusing non-focusable items on `mousedown`.\n            // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n            if (!focusable) event.preventDefault();\n            // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n            else context.onItemFocus(id);\n          })}\n          onFocus={composeEventHandlers(props.onFocus, () => context.onItemFocus(id))}\n          onKeyDown={composeEventHandlers(props.onKeyDown, (event) => {\n            if (event.key === 'Tab' && event.shiftKey) {\n              context.onItemShiftTab();\n              return;\n            }\n\n            if (event.target !== event.currentTarget) return;\n\n            const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n\n            if (focusIntent !== undefined) {\n              event.preventDefault();\n              const items = getItems().filter((item) => item.focusable);\n              let candidateNodes = items.map((item) => item.ref.current!);\n\n              if (focusIntent === 'last') candidateNodes.reverse();\n              else if (focusIntent === 'prev' || focusIntent === 'next') {\n                if (focusIntent === 'prev') candidateNodes.reverse();\n                const currentIndex = candidateNodes.indexOf(event.currentTarget);\n                candidateNodes = context.loop\n                  ? wrapArray(candidateNodes, currentIndex + 1)\n                  : candidateNodes.slice(currentIndex + 1);\n              }\n\n              /**\n               * Imperative focus during keydown is risky so we prevent React's batching updates\n               * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n               */\n              setTimeout(() => focusFirst(candidateNodes));\n            }\n          })}\n        />\n      </Collection.ItemSlot>\n    );\n  }\n);\n\nRovingFocusGroupItem.displayName = ITEM_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\n// prettier-ignore\nconst MAP_KEY_TO_FOCUS_INTENT: Record<string, FocusIntent> = {\n  ArrowLeft: 'prev', ArrowUp: 'prev',\n  ArrowRight: 'next', ArrowDown: 'next',\n  PageUp: 'first', Home: 'first',\n  PageDown: 'last', End: 'last',\n};\n\nfunction getDirectionAwareKey(key: string, dir?: Direction) {\n  if (dir !== 'rtl') return key;\n  return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\n\ntype FocusIntent = 'first' | 'last' | 'prev' | 'next';\n\nfunction getFocusIntent(event: React.KeyboardEvent, orientation?: Orientation, dir?: Direction) {\n  const key = getDirectionAwareKey(event.key, dir);\n  if (orientation === 'vertical' && ['ArrowLeft', 'ArrowRight'].includes(key)) return undefined;\n  if (orientation === 'horizontal' && ['ArrowUp', 'ArrowDown'].includes(key)) return undefined;\n  return MAP_KEY_TO_FOCUS_INTENT[key];\n}\n\nfunction focusFirst(candidates: HTMLElement[]) {\n  const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n  for (const candidate of candidates) {\n    // if focus is already where we want to go, we don't want to keep going through the candidates\n    if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n    candidate.focus();\n    if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n  }\n}\n\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */\nfunction wrapArray<T>(array: T[], startIndex: number) {\n  return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\n\nconst Root = RovingFocusGroup;\nconst Item = RovingFocusGroupItem;\n\nexport {\n  createRovingFocusGroupScope,\n  //\n  RovingFocusGroup,\n  RovingFocusGroupItem,\n  //\n  Root,\n  Item,\n};\nexport type { RovingFocusGroupProps, RovingFocusItemProps };\n"],"mappings":";;;;;;;;;;;ACcA,MAAMA,iCAAW,GAAG,+BAApB;AACA,MAAMC,mCAAa,GAAG;EAAEC,OAAO,EAAE,KAAX;EAAkBC,UAAU,EAAE;CAApD;AAEA;;;AAIA,MAAMC,gCAAU,GAAG,kBAAnB;AAGA,MAAM,CAACC,gCAAD,EAAaC,mCAAb,EAA4BC,2CAA5B,IAAqDC,uBAAgB,CAGzEJ,gCAHyE,CAA3E;AAMA,MAAM,CAACK,mDAAD,EAAgCC,wCAAhC,IAA+DC,yBAAkB,CACrFP,gCADqF,EAErF,CAACG,2CAAD,CAFqF,CAAvF;AAiCA,MAAM,CAACK,yCAAD,EAAsBC,2CAAtB,IACJJ,mDAA6B,CAAqBL,gCAArB,CAD/B;AAMA,MAAMU,yCAAgB,gBAAGC,iBAAA,CACvB,CAACC,KAAD,EAA4CC,YAA5C,KAA6D;EAC3D,oBACEC,oBAAA,CAACb,gCAAD,CAAYc,QAAZ,EADF;IACuBC,KAAK,EAAEJ,KAAK,CAACK;GAAlC,eACEH,oBAAA,CAACb,gCAAD,CAAYiB,IAAZ,EADF;IACmBF,KAA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