{"ast":null,"code":"import _objectSpread from \"C:/Users/user/Desktop/06portreact/node_modules/@babel/runtime/helpers/esm/objectSpread2.js\";\nimport _toConsumableArray from \"C:/Users/user/Desktop/06portreact/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js\";\nimport _slicedToArray from \"C:/Users/user/Desktop/06portreact/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _objectWithoutProperties from \"C:/Users/user/Desktop/06portreact/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js\";\nvar _excluded = [\"disableOutsidePointerEvents\", \"onEscapeKeyDown\", \"onPointerDownOutside\", \"onFocusOutside\", \"onInteractOutside\", \"onDismiss\"];\nimport $kqwpH$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport { createContext as $kqwpH$createContext, forwardRef as $kqwpH$forwardRef, useContext as $kqwpH$useContext, useState as $kqwpH$useState, useEffect as $kqwpH$useEffect, createElement as $kqwpH$createElement, useRef as $kqwpH$useRef } from \"react\";\nimport { composeEventHandlers as $kqwpH$composeEventHandlers } from \"@radix-ui/primitive\";\nimport { Primitive as $kqwpH$Primitive, dispatchDiscreteCustomEvent as $kqwpH$dispatchDiscreteCustomEvent } from \"@radix-ui/react-primitive\";\nimport { useComposedRefs as $kqwpH$useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useCallbackRef as $kqwpH$useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useEscapeKeydown as $kqwpH$useEscapeKeydown } from \"@radix-ui/react-use-escape-keydown\";\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\nvar $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nvar $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';\nvar $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nvar $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\nvar $5cb92bef7577960e$var$originalBodyPointerEvents;\nvar $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/$kqwpH$createContext({\n  layers: new Set(),\n  layersWithOutsidePointerEventsDisabled: new Set(),\n  branches: new Set()\n});\nvar $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/$kqwpH$forwardRef(function (props, forwardedRef) {\n  var _node$ownerDocument;\n  var _props$disableOutside = props.disableOutsidePointerEvents,\n    disableOutsidePointerEvents = _props$disableOutside === void 0 ? false : _props$disableOutside,\n    onEscapeKeyDown = props.onEscapeKeyDown,\n    onPointerDownOutside = props.onPointerDownOutside,\n    onFocusOutside = props.onFocusOutside,\n    onInteractOutside = props.onInteractOutside,\n    onDismiss = props.onDismiss,\n    layerProps = _objectWithoutProperties(props, _excluded);\n  var context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);\n  var _$kqwpH$useState = $kqwpH$useState(null),\n    _$kqwpH$useState2 = _slicedToArray(_$kqwpH$useState, 2),\n    node1 = _$kqwpH$useState2[0],\n    setNode = _$kqwpH$useState2[1];\n  var ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n  var _$kqwpH$useState3 = $kqwpH$useState({}),\n    _$kqwpH$useState4 = _slicedToArray(_$kqwpH$useState3, 2),\n    force = _$kqwpH$useState4[1];\n  var composedRefs = $kqwpH$useComposedRefs(forwardedRef, function (node) {\n    return setNode(node);\n  });\n  var layers = Array.from(context.layers);\n  var _slice = _toConsumableArray(context.layersWithOutsidePointerEventsDisabled).slice(-1),\n    _slice2 = _slicedToArray(_slice, 1),\n    highestLayerWithOutsidePointerEventsDisabled = _slice2[0]; // prettier-ignore\n  var highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n  var index = node1 ? layers.indexOf(node1) : -1;\n  var isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n  var isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n  var pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside(function (event) {\n    var target = event.target;\n    var isPointerDownOnBranch = _toConsumableArray(context.branches).some(function (branch) {\n      return branch.contains(target);\n    });\n    if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n    onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);\n    onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n    if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n  }, ownerDocument);\n  var focusOutside = $5cb92bef7577960e$var$useFocusOutside(function (event) {\n    var target = event.target;\n    var isFocusInBranch = _toConsumableArray(context.branches).some(function (branch) {\n      return branch.contains(target);\n    });\n    if (isFocusInBranch) return;\n    onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);\n    onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n    if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n  }, ownerDocument);\n  $kqwpH$useEscapeKeydown(function (event) {\n    var isHighestLayer = index === context.layers.size - 1;\n    if (!isHighestLayer) return;\n    onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);\n    if (!event.defaultPrevented && onDismiss) {\n      event.preventDefault();\n      onDismiss();\n    }\n  }, ownerDocument);\n  $kqwpH$useEffect(function () {\n    if (!node1) return;\n    if (disableOutsidePointerEvents) {\n      if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n        $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n        ownerDocument.body.style.pointerEvents = 'none';\n      }\n      context.layersWithOutsidePointerEventsDisabled.add(node1);\n    }\n    context.layers.add(node1);\n    $5cb92bef7577960e$var$dispatchUpdate();\n    return function () {\n      if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;\n    };\n  }, [node1, ownerDocument, disableOutsidePointerEvents, context]);\n  /**\n  * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n  * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n  * and add it to the end again so the layering order wouldn't be _creation order_.\n  * We only want them to be removed from context stacks when unmounted.\n  */\n  $kqwpH$useEffect(function () {\n    return function () {\n      if (!node1) return;\n      context.layers.delete(node1);\n      context.layersWithOutsidePointerEventsDisabled.delete(node1);\n      $5cb92bef7577960e$var$dispatchUpdate();\n    };\n  }, [node1, context]);\n  $kqwpH$useEffect(function () {\n    var handleUpdate = function handleUpdate() {\n      return force({});\n    };\n    document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n    return function () {\n      return document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n    };\n  }, []);\n  return /*#__PURE__*/$kqwpH$createElement($kqwpH$Primitive.div, $kqwpH$babelruntimehelpersesmextends({}, layerProps, {\n    ref: composedRefs,\n    style: _objectSpread({\n      pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined\n    }, props.style),\n    onFocusCapture: $kqwpH$composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture),\n    onBlurCapture: $kqwpH$composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture),\n    onPointerDownCapture: $kqwpH$composeEventHandlers(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)\n  }));\n});\n/*#__PURE__*/\nObject.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {\n  displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\nvar $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';\nvar $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/$kqwpH$forwardRef(function (props, forwardedRef) {\n  var context = $kqwpH$useContext($5cb92bef7577960e$var$DismissableLayerContext);\n  var ref = $kqwpH$useRef(null);\n  var composedRefs = $kqwpH$useComposedRefs(forwardedRef, ref);\n  $kqwpH$useEffect(function () {\n    var node = ref.current;\n    if (node) {\n      context.branches.add(node);\n      return function () {\n        context.branches.delete(node);\n      };\n    }\n  }, [context.branches]);\n  return /*#__PURE__*/$kqwpH$createElement($kqwpH$Primitive.div, $kqwpH$babelruntimehelpersesmextends({}, props, {\n    ref: composedRefs\n  }));\n});\n/*#__PURE__*/\nObject.assign($5cb92bef7577960e$export$4d5eb2109db14228, {\n  displayName: $5cb92bef7577960e$var$BRANCH_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ /**\n                                                                                                     * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n                                                                                                     * to mimic layer dismissing behaviour present in OS.\n                                                                                                     * Returns props to pass to the node we want to check for outside events.\n                                                                                                     */\nfunction $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside) {\n  var ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n  var handlePointerDownOutside = $kqwpH$useCallbackRef(onPointerDownOutside);\n  var isPointerInsideReactTreeRef = $kqwpH$useRef(false);\n  var handleClickRef = $kqwpH$useRef(function () {});\n  $kqwpH$useEffect(function () {\n    var handlePointerDown = function handlePointerDown(event) {\n      if (event.target && !isPointerInsideReactTreeRef.current) {\n        var handleAndDispatchPointerDownOutsideEvent = function handleAndDispatchPointerDownOutsideEvent() {\n          $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {\n            discrete: true\n          });\n        };\n        /**\n        * On touch devices, we need to wait for a click event because browsers implement\n        * a ~350ms delay between the time the user stops touching the display and when the\n        * browser executres events. We need to ensure we don't reactivate pointer-events within\n        * this timeframe otherwise the browser may execute events that should have been prevented.\n        *\n        * Additionally, this also lets us deal automatically with cancellations when a click event\n        * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n        *\n        * This is why we also continuously remove the previous listener, because we cannot be\n        * certain that it was raised, and therefore cleaned-up.\n        */\n        var eventDetail = {\n          originalEvent: event\n        };\n        if (event.pointerType === 'touch') {\n          ownerDocument.removeEventListener('click', handleClickRef.current);\n          handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n          ownerDocument.addEventListener('click', handleClickRef.current, {\n            once: true\n          });\n        } else handleAndDispatchPointerDownOutsideEvent();\n      }\n      isPointerInsideReactTreeRef.current = false;\n    };\n    /**\n    * if this hook executes in a component that mounts via a `pointerdown` event, the event\n    * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n    * this by delaying the event listener registration on the document.\n    * This is not React specific, but rather how the DOM works, ie:\n    * ```\n    * button.addEventListener('pointerdown', () => {\n    *   console.log('I will log');\n    *   document.addEventListener('pointerdown', () => {\n    *     console.log('I will also log');\n    *   })\n    * });\n    */\n    var timerId = window.setTimeout(function () {\n      ownerDocument.addEventListener('pointerdown', handlePointerDown);\n    }, 0);\n    return function () {\n      window.clearTimeout(timerId);\n      ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n      ownerDocument.removeEventListener('click', handleClickRef.current);\n    };\n  }, [ownerDocument, handlePointerDownOutside]);\n  return {\n    // ensures we check React component tree (not just DOM tree)\n    onPointerDownCapture: function onPointerDownCapture() {\n      return isPointerInsideReactTreeRef.current = true;\n    }\n  };\n}\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction $5cb92bef7577960e$var$useFocusOutside(onFocusOutside) {\n  var ownerDocument = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n  var handleFocusOutside = $kqwpH$useCallbackRef(onFocusOutside);\n  var isFocusInsideReactTreeRef = $kqwpH$useRef(false);\n  $kqwpH$useEffect(function () {\n    var handleFocus = function handleFocus(event) {\n      if (event.target && !isFocusInsideReactTreeRef.current) {\n        var eventDetail = {\n          originalEvent: event\n        };\n        $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n          discrete: false\n        });\n      }\n    };\n    ownerDocument.addEventListener('focusin', handleFocus);\n    return function () {\n      return ownerDocument.removeEventListener('focusin', handleFocus);\n    };\n  }, [ownerDocument, handleFocusOutside]);\n  return {\n    onFocusCapture: function onFocusCapture() {\n      return isFocusInsideReactTreeRef.current = true;\n    },\n    onBlurCapture: function onBlurCapture() {\n      return isFocusInsideReactTreeRef.current = false;\n    }\n  };\n}\nfunction $5cb92bef7577960e$var$dispatchUpdate() {\n  var event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);\n  document.dispatchEvent(event);\n}\nfunction $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, _ref) {\n  var discrete = _ref.discrete;\n  var target = detail.originalEvent.target;\n  var event = new CustomEvent(name, {\n    bubbles: false,\n    cancelable: true,\n    detail: detail\n  });\n  if (handler) target.addEventListener(name, handler, {\n    once: true\n  });\n  if (discrete) $kqwpH$dispatchDiscreteCustomEvent(target, event);else target.dispatchEvent(event);\n}\nvar $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;\nvar $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;\nexport { $5cb92bef7577960e$export$177fb62ff3ec1f22 as DismissableLayer, $5cb92bef7577960e$export$4d5eb2109db14228 as DismissableLayerBranch, $5cb92bef7577960e$export$be92b6f5f03c0fe9 as Root, $5cb92bef7577960e$export$aecb2ddcb55c95be as Branch };","map":{"version":3,"names":["$5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME","$5cb92bef7577960e$var$CONTEXT_UPDATE","$5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE","$5cb92bef7577960e$var$FOCUS_OUTSIDE","$5cb92bef7577960e$var$originalBodyPointerEvents","$5cb92bef7577960e$var$DismissableLayerContext","$kqwpH$createContext","layers","Set","layersWithOutsidePointerEventsDisabled","branches","$5cb92bef7577960e$export$177fb62ff3ec1f22","$kqwpH$forwardRef","props","forwardedRef","_node$ownerDocument","_props$disableOutside","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","layerProps","_objectWithoutProperties","_excluded","context","$kqwpH$useContext","_$kqwpH$useState","$kqwpH$useState","_$kqwpH$useState2","_slicedToArray","node1","setNode","ownerDocument","globalThis","document","_$kqwpH$useState3","_$kqwpH$useState4","force","composedRefs","$kqwpH$useComposedRefs","node","Array","from","_slice","_toConsumableArray","slice","_slice2","highestLayerWithOutsidePointerEventsDisabled","highestLayerWithOutsidePointerEventsDisabledIndex","indexOf","index","isBodyPointerEventsDisabled","size","isPointerEventsEnabled","pointerDownOutside","$5cb92bef7577960e$var$usePointerDownOutside","event","target","isPointerDownOnBranch","some","branch","contains","defaultPrevented","focusOutside","$5cb92bef7577960e$var$useFocusOutside","isFocusInBranch","$kqwpH$useEscapeKeydown","isHighestLayer","preventDefault","$kqwpH$useEffect","body","style","pointerEvents","add","$5cb92bef7577960e$var$dispatchUpdate","delete","handleUpdate","addEventListener","removeEventListener","$kqwpH$createElement","$kqwpH$Primitive","div","$kqwpH$babelruntimehelpersesmextends","ref","_objectSpread","undefined","onFocusCapture","$kqwpH$composeEventHandlers","onBlurCapture","onPointerDownCapture","Object","assign","displayName","$5cb92bef7577960e$var$BRANCH_NAME","$5cb92bef7577960e$export$4d5eb2109db14228","$kqwpH$useRef","current","usePointerDownOutside","arguments","length","handlePointerDownOutside","$kqwpH$useCallbackRef","isPointerInsideReactTreeRef","handleClickRef","handlePointerDown","handleAndDispatchPointerDownOutsideEvent","$5cb92bef7577960e$var$handleAndDispatchCustomEvent","eventDetail","discrete","originalEvent","pointerType","once","timerId","window","setTimeout","clearTimeout","useFocusOutside","handleFocusOutside","isFocusInsideReactTreeRef","handleFocus","dispatchUpdate","CustomEvent","dispatchEvent","handleAndDispatchCustomEvent","name","handler","detail","_ref","bubbles","cancelable","$kqwpH$dispatchDiscreteCustomEvent","$5cb92bef7577960e$export$be92b6f5f03c0fe9","$5cb92bef7577960e$export$aecb2ddcb55c95be"],"sources":["C:\\Users\\user\\Desktop\\06portreact\\node_modules\\@radix-ui\\react-dismissable-layer\\dist\\packages\\react\\dismissable-layer\\src\\index.ts","C:\\Users\\user\\Desktop\\06portreact\\node_modules\\@radix-ui\\react-dismissable-layer\\dist\\packages\\react\\dismissable-layer\\src\\DismissableLayer.tsx"],"sourcesContent":["export {\n  DismissableLayer,\n  DismissableLayerBranch,\n  //\n  Root,\n  Branch,\n} from './DismissableLayer';\nexport type { DismissableLayerProps } from './DismissableLayer';\n","import * as React from 'react';\nimport { composeEventHandlers } from '@radix-ui/primitive';\nimport { Primitive, dispatchDiscreteCustomEvent } from '@radix-ui/react-primitive';\nimport { useComposedRefs } from '@radix-ui/react-compose-refs';\nimport { useCallbackRef } from '@radix-ui/react-use-callback-ref';\nimport { useEscapeKeydown } from '@radix-ui/react-use-escape-keydown';\n\nimport type * as Radix from '@radix-ui/react-primitive';\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/\n\nconst DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst CONTEXT_UPDATE = 'dismissableLayer.update';\nconst POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\n\nlet originalBodyPointerEvents: string;\n\nconst DismissableLayerContext = React.createContext({\n  layers: new Set<DismissableLayerElement>(),\n  layersWithOutsidePointerEventsDisabled: new Set<DismissableLayerElement>(),\n  branches: new Set<DismissableLayerBranchElement>(),\n});\n\ntype DismissableLayerElement = React.ElementRef<typeof Primitive.div>;\ntype PrimitiveDivProps = Radix.ComponentPropsWithoutRef<typeof Primitive.div>;\ninterface DismissableLayerProps extends PrimitiveDivProps {\n  /**\n   * When `true`, hover/focus/click interactions will be disabled on elements outside\n   * the `DismissableLayer`. Users will need to click twice on outside elements to\n   * interact with them: once to close the `DismissableLayer`, and again to trigger the element.\n   */\n  disableOutsidePointerEvents?: boolean;\n  /**\n   * Event handler called when the escape key is down.\n   * Can be prevented.\n   */\n  onEscapeKeyDown?: (event: KeyboardEvent) => void;\n  /**\n   * Event handler called when the a `pointerdown` event happens outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  onPointerDownOutside?: (event: PointerDownOutsideEvent) => void;\n  /**\n   * Event handler called when the focus moves outside of the `DismissableLayer`.\n   * Can be prevented.\n   */\n  onFocusOutside?: (event: FocusOutsideEvent) => void;\n  /**\n   * Event handler called when an interaction happens outside the `DismissableLayer`.\n   * Specifically, when a `pointerdown` event happens outside or focus moves outside of it.\n   * Can be prevented.\n   */\n  onInteractOutside?: (event: PointerDownOutsideEvent | FocusOutsideEvent) => void;\n  /**\n   * Handler called when the `DismissableLayer` should be dismissed\n   */\n  onDismiss?: () => void;\n}\n\nconst DismissableLayer = React.forwardRef<DismissableLayerElement, DismissableLayerProps>(\n  (props, forwardedRef) => {\n    const {\n      disableOutsidePointerEvents = false,\n      onEscapeKeyDown,\n      onPointerDownOutside,\n      onFocusOutside,\n      onInteractOutside,\n      onDismiss,\n      ...layerProps\n    } = props;\n    const context = React.useContext(DismissableLayerContext);\n    const [node, setNode] = React.useState<DismissableLayerElement | null>(null);\n    const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n    const [, force] = React.useState({});\n    const composedRefs = useComposedRefs(forwardedRef, (node) => setNode(node));\n    const layers = Array.from(context.layers);\n    const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1); // prettier-ignore\n    const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n    const index = node ? layers.indexOf(node) : -1;\n    const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n    const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n\n    const pointerDownOutside = usePointerDownOutside((event) => {\n      const target = event.target as HTMLElement;\n      const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n      if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n      onPointerDownOutside?.(event);\n      onInteractOutside?.(event);\n      if (!event.defaultPrevented) onDismiss?.();\n    }, ownerDocument);\n\n    const focusOutside = useFocusOutside((event) => {\n      const target = event.target as HTMLElement;\n      const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n      if (isFocusInBranch) return;\n      onFocusOutside?.(event);\n      onInteractOutside?.(event);\n      if (!event.defaultPrevented) onDismiss?.();\n    }, ownerDocument);\n\n    useEscapeKeydown((event) => {\n      const isHighestLayer = index === context.layers.size - 1;\n      if (!isHighestLayer) return;\n      onEscapeKeyDown?.(event);\n      if (!event.defaultPrevented && onDismiss) {\n        event.preventDefault();\n        onDismiss();\n      }\n    }, ownerDocument);\n\n    React.useEffect(() => {\n      if (!node) return;\n      if (disableOutsidePointerEvents) {\n        if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n          originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n          ownerDocument.body.style.pointerEvents = 'none';\n        }\n        context.layersWithOutsidePointerEventsDisabled.add(node);\n      }\n      context.layers.add(node);\n      dispatchUpdate();\n      return () => {\n        if (\n          disableOutsidePointerEvents &&\n          context.layersWithOutsidePointerEventsDisabled.size === 1\n        ) {\n          ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n        }\n      };\n    }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n\n    /**\n     * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n     * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n     * and add it to the end again so the layering order wouldn't be _creation order_.\n     * We only want them to be removed from context stacks when unmounted.\n     */\n    React.useEffect(() => {\n      return () => {\n        if (!node) return;\n        context.layers.delete(node);\n        context.layersWithOutsidePointerEventsDisabled.delete(node);\n        dispatchUpdate();\n      };\n    }, [node, context]);\n\n    React.useEffect(() => {\n      const handleUpdate = () => force({});\n      document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n      return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n    }, []);\n\n    return (\n      <Primitive.div\n        {...layerProps}\n        ref={composedRefs}\n        style={{\n          pointerEvents: isBodyPointerEventsDisabled\n            ? isPointerEventsEnabled\n              ? 'auto'\n              : 'none'\n            : undefined,\n          ...props.style,\n        }}\n        onFocusCapture={composeEventHandlers(props.onFocusCapture, focusOutside.onFocusCapture)}\n        onBlurCapture={composeEventHandlers(props.onBlurCapture, focusOutside.onBlurCapture)}\n        onPointerDownCapture={composeEventHandlers(\n          props.onPointerDownCapture,\n          pointerDownOutside.onPointerDownCapture\n        )}\n      />\n    );\n  }\n);\n\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/\n\nconst BRANCH_NAME = 'DismissableLayerBranch';\n\ntype DismissableLayerBranchElement = React.ElementRef<typeof Primitive.div>;\ninterface DismissableLayerBranchProps extends PrimitiveDivProps {}\n\nconst DismissableLayerBranch = React.forwardRef<\n  DismissableLayerBranchElement,\n  DismissableLayerBranchProps\n>((props, forwardedRef) => {\n  const context = React.useContext(DismissableLayerContext);\n  const ref = React.useRef<DismissableLayerBranchElement>(null);\n  const composedRefs = useComposedRefs(forwardedRef, ref);\n\n  React.useEffect(() => {\n    const node = ref.current;\n    if (node) {\n      context.branches.add(node);\n      return () => {\n        context.branches.delete(node);\n      };\n    }\n  }, [context.branches]);\n\n  return <Primitive.div {...props} ref={composedRefs} />;\n});\n\nDismissableLayerBranch.displayName = BRANCH_NAME;\n\n/* -----------------------------------------------------------------------------------------------*/\n\ntype PointerDownOutsideEvent = CustomEvent<{ originalEvent: PointerEvent }>;\ntype FocusOutsideEvent = CustomEvent<{ originalEvent: FocusEvent }>;\n\n/**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */\nfunction usePointerDownOutside(\n  onPointerDownOutside?: (event: PointerDownOutsideEvent) => void,\n  ownerDocument: Document = globalThis?.document\n) {\n  const handlePointerDownOutside = useCallbackRef(onPointerDownOutside) as EventListener;\n  const isPointerInsideReactTreeRef = React.useRef(false);\n  const handleClickRef = React.useRef(() => {});\n\n  React.useEffect(() => {\n    const handlePointerDown = (event: PointerEvent) => {\n      if (event.target && !isPointerInsideReactTreeRef.current) {\n        const eventDetail = { originalEvent: event };\n\n        function handleAndDispatchPointerDownOutsideEvent() {\n          handleAndDispatchCustomEvent(\n            POINTER_DOWN_OUTSIDE,\n            handlePointerDownOutside,\n            eventDetail,\n            { discrete: true }\n          );\n        }\n\n        /**\n         * On touch devices, we need to wait for a click event because browsers implement\n         * a ~350ms delay between the time the user stops touching the display and when the\n         * browser executres events. We need to ensure we don't reactivate pointer-events within\n         * this timeframe otherwise the browser may execute events that should have been prevented.\n         *\n         * Additionally, this also lets us deal automatically with cancellations when a click event\n         * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n         *\n         * This is why we also continuously remove the previous listener, because we cannot be\n         * certain that it was raised, and therefore cleaned-up.\n         */\n        if (event.pointerType === 'touch') {\n          ownerDocument.removeEventListener('click', handleClickRef.current);\n          handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n          ownerDocument.addEventListener('click', handleClickRef.current, { once: true });\n        } else {\n          handleAndDispatchPointerDownOutsideEvent();\n        }\n      }\n      isPointerInsideReactTreeRef.current = false;\n    };\n    /**\n     * if this hook executes in a component that mounts via a `pointerdown` event, the event\n     * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n     * this by delaying the event listener registration on the document.\n     * This is not React specific, but rather how the DOM works, ie:\n     * ```\n     * button.addEventListener('pointerdown', () => {\n     *   console.log('I will log');\n     *   document.addEventListener('pointerdown', () => {\n     *     console.log('I will also log');\n     *   })\n     * });\n     */\n    const timerId = window.setTimeout(() => {\n      ownerDocument.addEventListener('pointerdown', handlePointerDown);\n    }, 0);\n    return () => {\n      window.clearTimeout(timerId);\n      ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n      ownerDocument.removeEventListener('click', handleClickRef.current);\n    };\n  }, [ownerDocument, handlePointerDownOutside]);\n\n  return {\n    // ensures we check React component tree (not just DOM tree)\n    onPointerDownCapture: () => (isPointerInsideReactTreeRef.current = true),\n  };\n}\n\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */\nfunction useFocusOutside(\n  onFocusOutside?: (event: FocusOutsideEvent) => void,\n  ownerDocument: Document = globalThis?.document\n) {\n  const handleFocusOutside = useCallbackRef(onFocusOutside) as EventListener;\n  const isFocusInsideReactTreeRef = React.useRef(false);\n\n  React.useEffect(() => {\n    const handleFocus = (event: FocusEvent) => {\n      if (event.target && !isFocusInsideReactTreeRef.current) {\n        const eventDetail = { originalEvent: event };\n        handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n          discrete: false,\n        });\n      }\n    };\n    ownerDocument.addEventListener('focusin', handleFocus);\n    return () => ownerDocument.removeEventListener('focusin', handleFocus);\n  }, [ownerDocument, handleFocusOutside]);\n\n  return {\n    onFocusCapture: () => (isFocusInsideReactTreeRef.current = true),\n    onBlurCapture: () => (isFocusInsideReactTreeRef.current = false),\n  };\n}\n\nfunction dispatchUpdate() {\n  const event = new CustomEvent(CONTEXT_UPDATE);\n  document.dispatchEvent(event);\n}\n\nfunction handleAndDispatchCustomEvent<E extends CustomEvent, OriginalEvent extends Event>(\n  name: string,\n  handler: ((event: E) => void) | undefined,\n  detail: { originalEvent: OriginalEvent } & (E extends CustomEvent<infer D> ? D : never),\n  { discrete }: { discrete: boolean }\n) {\n  const target = detail.originalEvent.target;\n  const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n  if (handler) target.addEventListener(name, handler as EventListener, { once: true });\n\n  if (discrete) {\n    dispatchDiscreteCustomEvent(target, event);\n  } else {\n    target.dispatchEvent(event);\n  }\n}\n\nconst Root = DismissableLayer;\nconst Branch = DismissableLayerBranch;\n\nexport {\n  DismissableLayer,\n  DismissableLayerBranch,\n  //\n  Root,\n  Branch,\n};\nexport type { DismissableLayerProps };\n"],"mappings":";;;;;;;;;;;;;ACSA;;;AAIA,IAAMA,4CAAsB,GAAG,kBAA/B;AACA,IAAMC,oCAAc,GAAG,yBAAvB;AACA,IAAMC,0CAAoB,GAAG,qCAA7B;AACA,IAAMC,mCAAa,GAAG,+BAAtB;AAEA,IAAIC,+CAAJ;AAEA,IAAMC,6CAAuB,gBAAGC,oBAAA,CAAoB;EAClDC,MAAM,EAAE,IAAIC,GAAJ,EAD0C;EAElDC,sCAAsC,EAAE,IAAID,GAAJ,EAFU;EAGlDE,QAAQ,EAAE,IAAIF,GAAJ;CAHoB,CAAhC;AA0CA,IAAMG,yCAAgB,gBAAGC,iBAAA,CACvB,UAACC,KAAD,EAAQC,YAAR,EAAyB;EAAA,IAAAC,mBAAA;EACvB,IAAAC,qBAAA,GAQIH,KARJ,CAAMI,2BAAA;IACJA,2BAA2B,GAAAD,qBAAA,cAAG,KAD1B,GAAAA,qBAAA;IAEJE,eAFI,GAQFL,KARJ,C;IAGEM,oBAHI,GAQFN,KARJ,C;IAIEO,cAJI,GAQFP,KARJ,C;IAKEQ,iBALI,GAQFR,KARJ,C;IAMES,SANI,GAQFT,KARJ,C;IAOKU,UAAH,GAAAC,wBAAA,CACEX,KARJ,EAAAY,SAAA;EASA,IAAMC,OAAO,GA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