{"version":3,"file":"static/chunks/481-d42a8bec12178ec3.js","mappings":"wIAAA,aACA,oFACA,CC0BA,MAA6C,IAAc,KAAL,YAAoB,CAAG,WAAS,YEJtF,cACA,IDjBA,ECiBA,aACA,SACA,8BACA,iBACA,EAAkB,YAAM,OACxB,EAAmB,YAAM,OACzB,GDvBA,EADkB,SCwBE,IDxBF,CAAQ,SCwBQ,KDxBR,OAC1B,IAES,iBAAW,YACpB,sBACA,CAAG,MC+CH,OAhBE,EAAyB,WAE3B,YAF2B,EAK3B,QAHoC,OAGpC,eACA,qCAIA,OAHA,4CACA,yBACA,IACA,WACA,cACA,wBAEA,EACA,CAAG,UACH,UAA2C,kBAAY,cAA8C,mBAAa,SAClH,KACA,CAAG,CACH,EE9DA,SAAS,IAAI,CGGb,gBACA,IHJa,GGIb,6BAEA,uBAAyC,IAAS,cAElD,QACA,CCDA,gBACA,mBAGA,GAFA,QAEA,oBACA,WAEA,CACA,iDCdO,GACP,YACA,aACA,UACA,kBACA,iBACA,UACA,UACA,aCTO,EAAkB,OAAY,GAAG,aAGxC,OACA,OAHA,SAIA,cAHA,eAIA,CACA,CAAC,EACM,EAAiB,OAAY,GAC7B,EAAmB,OAAY,GAC/B,EAAoB,OAAmB,EAC9C,SACA,gCACA,CAAC,ECbM,EAA8B,mBAAa,SCOlD,KACA,EAA6B,gBAAU,eAEvC,IADA,EACA,EAAkB,cAAQ,GAC1B,OACA,OACA,EAAiB,YAAM,GACvB,EAAiB,YAAM,KACvB,EAA+B,YAAM,OAErC,EADmB,cAAQ,GAAG,CAC9B,IACA,aACA,aACA,gBACA,kBACA,gBACA,oBAEA,eAEA,cAGA,GADA,qBACA,SACA,cACA,cACA,uBACA,WACA,iBACA,OAEA,cAEA,YACA,gBACA,gBACA,iBACA,iBACA,mBAEA,GADmB,aAAQ,GAAG,CAC9B,IACA,EAAqB,iBAAW,aAChC,4BACA,eAEA,IADA,EACA,2CACA,aACA,mBACA,gBAEA,CACA,cACA,aAEA,aACA,GACA,C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S,QAAiB,WAC1B,EAMA,aACA,SACA,MACA,QACA,aACA,oBACA,cACA,WACA,eACA,iBACA,kBACA,0BACA,8BACA,6BAjBA,KADA,EAkBA,GAjBA,8BACA,iBACA,CAAG,CAeH,GACA,UACA,GACA,SAEA,CAEA,uCACA,MACA,IA3BA,EA2BA,mBAAwD,GAAU,iBAkClE,GAtBA,KAzFA,cAJA,WACA,QACA,CAEA,EAyFA,KACA,IAZA,WACA,IA7CA,CA6CA,EA5CA,IAEA,eADA,GA2CA,UACA,SAEA,WACA,0BAEA,OADA,SACA,CACA,CAAS,EACT,4BACA,KAEA,CAxGA,MAA0B,OAAa,KAwGvC,SACA,KAA+B,OAAW,QAhD1C,mBACA,gBALA,SACA,0GACA,EAkD0C,EA/C1C,IACA,CAAG,GApCH,uBAkF0C,KAC1C,qBACA,QACA,SAEA,wBAEA,EAAuB,OAAe,MACtC,cACA,CAAe,EACf,OAGA,uCACA,eACA,GAA8B,OAAmB,KAEjD,MAGA,yFACA,uCACA,EAAuB,OAAoB,IAC3C,oBAEA,OADA,OAES,aACT,OACA,qBACA,cACA,SACA,mCACW,sBAEX,OADA,OACA,2BACA,CAAW,EACX,kBACA,aAEA,CACA,CACA,CACA,QACA,EACA,cACA,SACA,oBACA,mBAEA,EACA,aACA,OAAS,EAAW,EACpB,EAqBA,KAtBoB,QAuBpB,IACA,EACA,aACA,KACA,SACE,EAAW,WACb,aACA,CAAG,CACH,EACA,aACA,uCACA,wCACA,mCACA,iCACA,EACA,aACA,0CACA,2CACA,sCACA,oCACA,EAOA,GACA,gBAAmB,GAAe,CAClC,YAAe,GAAW,CAC1B,iBAAoB,IAAgB,CACpC,iBAAoB,IAAgB,CACpC,kBAAqB,IAAiB,CACtC,iBAAoB,IAAgB,CACpC,oBAAuB,GAAmB,EA+B1C,EAAW,iBAtFX,YACA,eACA,kBACA,eACA,MAEA,GAiFA,EAAU,gBACV,EAAY,yBACZ,WACA,CAAC,EACD,MAAe,OAAc,CAjD7B,YACA,4BA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","sources":["webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/use-isomorphic-layout-effect/dist/reach-utils-use-isomorphic-layout-effect.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/use-force-update/dist/reach-utils-use-force-update.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+portal@0.16.2_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/portal/dist/reach-portal.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/noop/dist/reach-utils-noop.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/dev-utils/dist/reach-utils-dev-utils.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.esm.js","webpack://_N_E/../../node_modules/.pnpm/@reach+utils@0.16.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/utils/compose-event-handlers/dist/reach-utils-compose-event-handlers.esm.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/FocusGuard.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/medium.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/scope.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/Lock.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/util.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/Trap.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/Combination.js","webpack://_N_E/../../node_modules/.pnpm/react-focus-lock@2.13.5_@types+react@18.3.18_react@18.3.1/node_modules/react-focus-lock/dist/es2015/index.js","webpack://_N_E/../../node_modules/.pnpm/@reach+dialog@0.16.2_@types+react@18.3.18_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@reach/dialog/dist/reach-dialog.esm.js"],"sourcesContent":["function canUseDOM() {\n  return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n\nexport { canUseDOM };\n","import { useLayoutEffect, useEffect } from 'react';\nimport { canUseDOM } from '../../can-use-dom/dist/reach-utils-can-use-dom.esm.js';\n\n/**\n * React currently throws a warning when using useLayoutEffect on the server. To\n * get around it, we can conditionally useEffect on the server (no-op) and\n * useLayoutEffect in the browser. We occasionally need useLayoutEffect to\n * ensure we don't get a render flash for certain operations, but we may also\n * need affected components to render on the server. One example is when setting\n * a component's descendants to retrieve their index values.\n *\n * Important to note that using this hook as an escape hatch will break the\n * eslint dependency warnings unless you rename the import to `useLayoutEffect`.\n * Use sparingly only when the effect won't effect the rendered HTML to avoid\n * any server/client mismatch.\n *\n * If a useLayoutEffect is needed and the result would create a mismatch, it's\n * likely that the component in question shouldn't be rendered on the server at\n * all, so a better approach would be to lazily render those in a parent\n * component after client-side hydration.\n *\n * https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * https://github.com/reduxjs/react-redux/blob/master/src/utils/useIsomorphicLayoutEffect.js\n *\n * @param effect\n * @param deps\n */\n\nvar useIsomorphicLayoutEffect = /*#__PURE__*/canUseDOM() ? useLayoutEffect : useEffect;\n\nexport { useIsomorphicLayoutEffect };\n","import { useState, useCallback } from 'react';\n\n/**\n * Forces a re-render, similar to `forceUpdate` in class components.\n */\n\nfunction useForceUpdate() {\n  var _useState = useState(Object.create(null)),\n      dispatch = _useState[1];\n\n  return useCallback(function () {\n    dispatch(Object.create(null));\n  }, []);\n}\n\nexport { useForceUpdate };\n","import { useRef, useEffect, createElement } from 'react';\nimport { useIsomorphicLayoutEffect } from '@reach/utils/use-isomorphic-layout-effect';\nimport { useForceUpdate } from '@reach/utils/use-force-update';\nimport { createPortal } from 'react-dom';\nimport warning from 'tiny-warning';\n\n/**\n * Welcome to @reach/portal!\n *\n * Creates and appends a DOM node to the end of `document.body` and renders a\n * React tree into it. Useful for rendering a natural React element hierarchy\n * with a different DOM hierarchy to prevent parent styles from clipping or\n * hiding content (for popovers, dropdowns, and modals).\n *\n * @see Docs   https://reach.tech/portal\n * @see Source https://github.com/reach/reach-ui/tree/main/packages/portal\n * @see React  https://reactjs.org/docs/portals.html\n */\n/**\n * Portal\n *\n * @see Docs https://reach.tech/portal#portal\n */\n\nvar Portal = function Portal(_ref) {\n  var children = _ref.children,\n      _ref$type = _ref.type,\n      type = _ref$type === void 0 ? \"reach-portal\" : _ref$type,\n      containerRef = _ref.containerRef;\n  var mountNode = useRef(null);\n  var portalNode = useRef(null);\n  var forceUpdate = useForceUpdate();\n\n  if (process.env.NODE_ENV !== \"production\") {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(function () {\n      if (containerRef != null) {\n        process.env.NODE_ENV !== \"production\" ? warning(typeof containerRef === \"object\" && \"current\" in containerRef, \"@reach/portal: Invalid value passed to the `containerRef` of a \" + \"`Portal`. The portal will be appended to the document body, but if \" + \"you want to attach it to another DOM node you must pass a valid \" + \"React ref object to `containerRef`.\") : void 0;\n        process.env.NODE_ENV !== \"production\" ? warning(containerRef ? containerRef.current != null : true, \"@reach/portal: A ref was passed to the `containerRef` prop of a \" + \"`Portal`, but no DOM node was attached to it. Be sure to pass the \" + \"ref to a DOM component.\\n\\nIf you are forwarding the ref from \" + \"another component, be sure to use the React.forwardRef API. \" + \"See https://reactjs.org/docs/forwarding-refs.html.\") : void 0;\n      }\n    }, [containerRef]);\n  }\n\n  useIsomorphicLayoutEffect(function () {\n    // This ref may be null when a hot-loader replaces components on the page\n    if (!mountNode.current) return; // It's possible that the content of the portal has, itself, been portaled.\n    // In that case, it's important to append to the correct document element.\n\n    var ownerDocument = mountNode.current.ownerDocument;\n    var body = (containerRef == null ? void 0 : containerRef.current) || ownerDocument.body;\n    portalNode.current = ownerDocument == null ? void 0 : ownerDocument.createElement(type);\n    body.appendChild(portalNode.current);\n    forceUpdate();\n    return function () {\n      if (portalNode.current && body) {\n        body.removeChild(portalNode.current);\n      }\n    };\n  }, [type, forceUpdate, containerRef]);\n  return portalNode.current ? /*#__PURE__*/createPortal(children, portalNode.current) : /*#__PURE__*/createElement(\"span\", {\n    ref: mountNode\n  });\n};\n/**\n * @see Docs https://reach.tech/portal#portal-props\n */\n\n\nif (process.env.NODE_ENV !== \"production\") {\n  Portal.displayName = \"Portal\";\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport default Portal;\nexport { Portal };\n","import { canUseDOM } from '../../can-use-dom/dist/reach-utils-can-use-dom.esm.js';\n\n/**\n * Get an element's owner document. Useful when components are used in iframes\n * or other environments like dev tools.\n *\n * @param element\n */\n\nfunction getOwnerDocument(element) {\n  return canUseDOM() ? element ? element.ownerDocument : document : null;\n}\n/**\n * TODO: Remove in 1.0\n */\n\nfunction getOwnerWindow(element) {\n  var ownerDocument = getOwnerDocument(element);\n  return ownerDocument ? ownerDocument.defaultView || window : null;\n}\n\nexport { getOwnerDocument, getOwnerWindow };\n","function noop() {}\n\nexport { noop };\n","import { useRef, useEffect } from 'react';\n\n/* eslint-disable react-hooks/rules-of-hooks */\nvar checkedPkgs = {};\n/**\n * Just a lil state logger\n *\n * @param state\n * @param DEBUG\n */\n\nfunction useStateLogger(state, DEBUG) {\n  if (DEBUG === void 0) {\n    DEBUG = false;\n  }\n\n  if (process.env.NODE_ENV !== \"production\") {\n    var debugRef = useRef(DEBUG);\n    useEffect(function () {\n      debugRef.current = DEBUG;\n    }, [DEBUG]);\n    useEffect(function () {\n      if (debugRef.current) {\n        console.group(\"State Updated\");\n        console.log(\"%c\" + state, \"font-weight: normal; font-size: 120%; font-style: italic;\");\n        console.groupEnd();\n      }\n    }, [state]);\n  }\n}\n/**\n * When in dev mode, checks that styles for a given `@reach` package are loaded.\n *\n * @param packageName Name of the package to check.\n * @example checkStyles(\"dialog\") will check for styles for @reach/dialog\n */\n\nfunction checkStyles(packageName) {\n  if (process.env.NODE_ENV !== \"production\") {\n    // In CJS files, process.env.NODE_ENV is stripped from our build, but we\n    // need it to prevent style checks from clogging up user logs while testing.\n    // This is a workaround until we can tweak the build a bit to accommodate.\n    var _ref = typeof process !== \"undefined\" ? process.env : {\n      NODE_ENV: \"development\"\n    },\n        environment = _ref.NODE_ENV; // only check once per package\n\n\n    if (checkedPkgs[packageName]) return;\n    checkedPkgs[packageName] = true;\n\n    if (environment === \"development\" && parseInt(window.getComputedStyle(document.body).getPropertyValue(\"--reach-\" + packageName), 10) !== 1) {\n      console.warn(\"@reach/\" + packageName + \" styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\\n  \\n      import \\\"@reach/\" + packageName + \"/styles.css\\\";\\n  \\n    Otherwise you'll need to include them some other way:\\n  \\n      <link rel=\\\"stylesheet\\\" type=\\\"text/css\\\" href=\\\"node_modules/@reach/\" + packageName + \"/styles.css\\\" />\\n  \\n    For more information visit https://ui.reach.tech/styling.\\n    \");\n    }\n  }\n}\n/**\n * When in dev mode, checks that styles for a given `@reach` package are loaded.\n *\n * @param packageName Name of the package to check.\n * @example useCheckStyles(\"dialog\") will check for styles for @reach/dialog\n */\n\nfunction useCheckStyles(packageName) {\n  if (process.env.NODE_ENV !== \"production\") {\n    var name = useRef(packageName);\n    useEffect(function () {\n      return void (name.current = packageName);\n    }, [packageName]);\n    useEffect(function () {\n      return checkStyles(name.current);\n    }, []);\n  }\n}\n/**\n * Logs a warning in dev mode when a component switches from controlled to\n * uncontrolled, or vice versa\n *\n * A single prop should typically be used to determine whether or not a\n * component is controlled or not.\n *\n * @param controlledValue\n * @param controlledPropName\n * @param componentName\n */\n\nfunction useControlledSwitchWarning(controlledValue, controlledPropName, componentName) {\n  if (process.env.NODE_ENV !== \"production\") {\n    var controlledRef = useRef(controlledValue != null);\n    var nameCache = useRef({\n      componentName: componentName,\n      controlledPropName: controlledPropName\n    });\n    useEffect(function () {\n      nameCache.current = {\n        componentName: componentName,\n        controlledPropName: controlledPropName\n      };\n    }, [componentName, controlledPropName]);\n    useEffect(function () {\n      var wasControlled = controlledRef.current;\n      var _nameCache$current = nameCache.current,\n          componentName = _nameCache$current.componentName,\n          controlledPropName = _nameCache$current.controlledPropName;\n      var isControlled = controlledValue != null;\n\n      if (wasControlled !== isControlled) {\n        console.error(\"A component is changing an \" + (wasControlled ? \"\" : \"un\") + \"controlled `\" + controlledPropName + \"` state of \" + componentName + \" to be \" + (wasControlled ? \"un\" : \"\") + \"controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled \" + componentName + \" element for the lifetime of the component.\\n      More info: https://fb.me/react-controlled-components\");\n      }\n    }, [controlledValue]);\n  }\n}\n\nexport { checkStyles, useCheckStyles, useControlledSwitchWarning, useStateLogger };\n","/**\n * Checks whether or not a value is a boolean.\n *\n * @param value\n */\nfunction isBoolean(value) {\n  return typeof value === \"boolean\";\n}\n/**\n * Checks whether or not a value is a function.\n *\n * @param value\n */\n\nfunction isFunction(value) {\n  // eslint-disable-next-line eqeqeq\n  return !!(value && {}.toString.call(value) == \"[object Function]\");\n}\n/**\n * Checks whether or not a value is a number.\n *\n * @param value\n */\n\nfunction isNumber(value) {\n  return typeof value === \"number\" && !isNaN(value);\n}\n/**\n * Checks whether or not a value is a string.\n *\n * @param value\n */\n\nfunction isString(value) {\n  return typeof value === \"string\";\n}\n\nexport { isBoolean, isFunction, isNumber, isString };\n","import { useCallback } from 'react';\nimport { isFunction } from '../../type-check/dist/reach-utils-type-check.esm.js';\n\nfunction _arrayLikeToArray(arr, len) {\n  if (len == null || len > arr.length) len = arr.length;\n\n  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n  return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n  if (!o) return;\n  if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n  var n = Object.prototype.toString.call(o).slice(8, -1);\n  if (n === \"Object\" && o.constructor) n = o.constructor.name;\n  if (n === \"Map\" || n === \"Set\") return Array.from(o);\n  if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n  var it;\n\n  if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n    if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n      if (it) o = it;\n      var i = 0;\n      return function () {\n        if (i >= o.length) return {\n          done: true\n        };\n        return {\n          done: false,\n          value: o[i++]\n        };\n      };\n    }\n\n    throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n  }\n\n  it = o[Symbol.iterator]();\n  return it.next.bind(it);\n}\n\n/**\n * Passes or assigns an arbitrary value to a ref function or object.\n *\n * @param ref\n * @param value\n */\nfunction assignRef(ref, value) {\n  if (ref == null) return;\n\n  if (isFunction(ref)) {\n    ref(value);\n  } else {\n    try {\n      ref.current = value;\n    } catch (error) {\n      throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n    }\n  }\n}\n/**\n * Passes or assigns a value to multiple refs (typically a DOM node). Useful for\n * dealing with components that need an explicit ref for DOM calculations but\n * also forwards refs assigned by an app.\n *\n * @param refs Refs to fork\n */\n\nfunction useComposedRefs() {\n  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n    refs[_key] = arguments[_key];\n  }\n\n  return useCallback(function (node) {\n    for (var _iterator = _createForOfIteratorHelperLoose(refs), _step; !(_step = _iterator()).done;) {\n      var ref = _step.value;\n      assignRef(ref, node);\n    } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n  }, refs);\n}\n\nexport { assignRef, useComposedRefs };\n","/**\n * Wraps a lib-defined event handler and a user-defined event handler, returning\n * a single handler that allows a user to prevent lib-defined handlers from\n * firing.\n *\n * @param theirHandler User-supplied event handler\n * @param ourHandler Library-supplied event handler\n */\nfunction composeEventHandlers(theirHandler, ourHandler) {\n  return function (event) {\n    theirHandler && theirHandler(event);\n\n    if (!event.defaultPrevented) {\n      return ourHandler(event);\n    }\n  };\n}\n\nexport { composeEventHandlers };\n","import React, { Fragment } from 'react';\nimport PropTypes from 'prop-types';\nexport var hiddenGuard = {\n  width: '1px',\n  height: '0px',\n  padding: 0,\n  overflow: 'hidden',\n  position: 'fixed',\n  top: '1px',\n  left: '1px'\n};\nvar InFocusGuard = function InFocusGuard(_ref) {\n  var _ref$children = _ref.children,\n    children = _ref$children === void 0 ? null : _ref$children;\n  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n    key: \"guard-first\",\n    \"data-focus-guard\": true,\n    \"data-focus-auto-guard\": true,\n    style: hiddenGuard\n  }), children, children && /*#__PURE__*/React.createElement(\"div\", {\n    key: \"guard-last\",\n    \"data-focus-guard\": true,\n    \"data-focus-auto-guard\": true,\n    style: hiddenGuard\n  }));\n};\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  children: PropTypes.node\n} : {};\nexport default InFocusGuard;","import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n  var target = _ref.target,\n    currentTarget = _ref.currentTarget;\n  return {\n    target: target,\n    currentTarget: currentTarget\n  };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n  async: true,\n  ssr: typeof document !== 'undefined'\n});","import { createContext } from 'react';\nexport var focusScope = /*#__PURE__*/createContext(undefined);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { forwardRef, useRef, useState, useCallback, useEffect, useMemo, Fragment } from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport { FOCUS_DISABLED, FOCUS_GROUP } from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nimport { focusScope } from './scope';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/forwardRef(function FocusLockUI(props, parentRef) {\n  var _extends2;\n  var _useState = useState(),\n    realObserved = _useState[0],\n    setObserved = _useState[1];\n  var observed = useRef();\n  var isActive = useRef(false);\n  var originalFocusedElement = useRef(null);\n  var _useState2 = useState({}),\n    update = _useState2[1];\n  var children = props.children,\n    _props$disabled = props.disabled,\n    disabled = _props$disabled === void 0 ? false : _props$disabled,\n    _props$noFocusGuards = props.noFocusGuards,\n    noFocusGuards = _props$noFocusGuards === void 0 ? false : _props$noFocusGuards,\n    _props$persistentFocu = props.persistentFocus,\n    persistentFocus = _props$persistentFocu === void 0 ? false : _props$persistentFocu,\n    _props$crossFrame = props.crossFrame,\n    crossFrame = _props$crossFrame === void 0 ? true : _props$crossFrame,\n    _props$autoFocus = props.autoFocus,\n    autoFocus = _props$autoFocus === void 0 ? true : _props$autoFocus,\n    allowTextSelection = props.allowTextSelection,\n    group = props.group,\n    className = props.className,\n    whiteList = props.whiteList,\n    hasPositiveIndices = props.hasPositiveIndices,\n    _props$shards = props.shards,\n    shards = _props$shards === void 0 ? emptyArray : _props$shards,\n    _props$as = props.as,\n    Container = _props$as === void 0 ? 'div' : _props$as,\n    _props$lockProps = props.lockProps,\n    containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n    SideCar = props.sideCar,\n    _props$returnFocus = props.returnFocus,\n    shouldReturnFocus = _props$returnFocus === void 0 ? false : _props$returnFocus,\n    focusOptions = props.focusOptions,\n    onActivationCallback = props.onActivation,\n    onDeactivationCallback = props.onDeactivation;\n  var _useState3 = useState({}),\n    id = _useState3[0];\n  var onActivation = useCallback(function (_ref) {\n    var captureFocusRestore = _ref.captureFocusRestore;\n    if (!originalFocusedElement.current) {\n      var _document;\n      var activeElement = (_document = document) == null ? void 0 : _document.activeElement;\n      originalFocusedElement.current = activeElement;\n      if (activeElement !== document.body) {\n        originalFocusedElement.current = captureFocusRestore(activeElement);\n      }\n    }\n    if (observed.current && onActivationCallback) {\n      onActivationCallback(observed.current);\n    }\n    isActive.current = true;\n    update();\n  }, [onActivationCallback]);\n  var onDeactivation = useCallback(function () {\n    isActive.current = false;\n    if (onDeactivationCallback) {\n      onDeactivationCallback(observed.current);\n    }\n    update();\n  }, [onDeactivationCallback]);\n  var returnFocus = useCallback(function (allowDefer) {\n    var focusRestore = originalFocusedElement.current;\n    if (focusRestore) {\n      var returnFocusTo = (typeof focusRestore === 'function' ? focusRestore() : focusRestore) || document.body;\n      var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n      if (howToReturnFocus) {\n        var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n        originalFocusedElement.current = null;\n        if (allowDefer) {\n          Promise.resolve().then(function () {\n            return returnFocusTo.focus(returnFocusOptions);\n          });\n        } else {\n          returnFocusTo.focus(returnFocusOptions);\n        }\n      }\n    }\n  }, [shouldReturnFocus]);\n  var onFocus = useCallback(function (event) {\n    if (isActive.current) {\n      mediumFocus.useMedium(event);\n    }\n  }, []);\n  var onBlur = mediumBlur.useMedium;\n  var setObserveNode = useCallback(function (newObserved) {\n    if (observed.current !== newObserved) {\n      observed.current = newObserved;\n      setObserved(newObserved);\n    }\n  }, []);\n  if (process.env.NODE_ENV !== 'production') {\n    if (typeof allowTextSelection !== 'undefined') {\n      console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n    }\n    useEffect(function () {\n      if (!observed.current && typeof Container !== 'string') {\n        console.error('FocusLock: could not obtain ref to internal node');\n      }\n    }, []);\n  }\n  var lockProps = _extends((_extends2 = {}, _extends2[FOCUS_DISABLED] = disabled && 'disabled', _extends2[FOCUS_GROUP] = group, _extends2), containerProps);\n  var hasLeadingGuards = noFocusGuards !== true;\n  var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n  var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n  var focusScopeValue = useMemo(function () {\n    return {\n      observed: observed,\n      shards: shards,\n      enabled: !disabled,\n      active: isActive.current\n    };\n  }, [disabled, isActive.current, shards, realObserved]);\n  return /*#__PURE__*/React.createElement(Fragment, null, hasLeadingGuards && [\n  /*#__PURE__*/\n  React.createElement(\"div\", {\n    key: \"guard-first\",\n    \"data-focus-guard\": true,\n    tabIndex: disabled ? -1 : 0,\n    style: hiddenGuard\n  }), hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n    key: \"guard-nearest\",\n    \"data-focus-guard\": true,\n    tabIndex: disabled ? -1 : 1,\n    style: hiddenGuard\n  }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n    id: id,\n    sideCar: mediumSidecar,\n    observed: realObserved,\n    disabled: disabled,\n    persistentFocus: persistentFocus,\n    crossFrame: crossFrame,\n    autoFocus: autoFocus,\n    whiteList: whiteList,\n    shards: shards,\n    onActivation: onActivation,\n    onDeactivation: onDeactivation,\n    returnFocus: returnFocus,\n    focusOptions: focusOptions,\n    noFocusGuards: noFocusGuards\n  }), /*#__PURE__*/React.createElement(Container, _extends({\n    ref: mergedRef\n  }, lockProps, {\n    className: className,\n    onBlur: onBlur,\n    onFocus: onFocus\n  }), /*#__PURE__*/React.createElement(focusScope.Provider, {\n    value: focusScopeValue\n  }, children)), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n    \"data-focus-guard\": true,\n    tabIndex: disabled ? -1 : 0,\n    style: hiddenGuard\n  }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  children: node,\n  disabled: bool,\n  returnFocus: oneOfType([bool, object, func]),\n  focusOptions: object,\n  noFocusGuards: bool,\n  hasPositiveIndices: bool,\n  allowTextSelection: bool,\n  autoFocus: bool,\n  persistentFocus: bool,\n  crossFrame: bool,\n  group: string,\n  className: string,\n  whiteList: func,\n  shards: arrayOf(any),\n  as: oneOfType([string, func, object]),\n  lockProps: object,\n  onActivation: func,\n  onDeactivation: func,\n  sideCar: any.isRequired\n} : {};\nexport default FocusLock;","export function deferAction(action) {\n  setTimeout(action, 1);\n}\nexport var inlineProp = function inlineProp(name, value) {\n  var obj = {};\n  obj[name] = value;\n  return obj;\n};\nexport var extractRef = function extractRef(ref) {\n  return ref && 'current' in ref ? ref.current : ref;\n};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport { moveFocusInside, focusInside, focusIsHidden, expandFocusableNodes, getFocusableNodes, focusNextElement, focusPrevElement, focusFirstElement, focusLastElement, captureFocusRestore } from 'focus-lock';\nimport { deferAction, extractRef } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\nvar focusOnBody = function focusOnBody() {\n  return document && document.activeElement === document.body;\n};\nvar isFreeFocus = function isFreeFocus() {\n  return focusOnBody() || focusIsHidden();\n};\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar tryRestoreFocus = function tryRestoreFocus() {\n  return null;\n};\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\nvar windowFocused = false;\nvar defaultWhitelist = function defaultWhitelist() {\n  return true;\n};\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n  return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n  lastPortaledElement = {\n    observerNode: observerNode,\n    portaledElement: portaledElement\n  };\n};\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n  return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\nfunction autoGuard(startIndex, end, step, allNodes) {\n  var lastGuard = null;\n  var i = startIndex;\n  do {\n    var item = allNodes[i];\n    if (item.guard) {\n      if (item.node.dataset.focusAutoGuard) {\n        lastGuard = item;\n      }\n    } else if (item.lockItem) {\n      if (i !== startIndex) {\n        return;\n      }\n      lastGuard = null;\n    } else {\n      break;\n    }\n  } while ((i += step) !== end);\n  if (lastGuard) {\n    lastGuard.node.tabIndex = 0;\n  }\n}\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n  if (crossFrameOption) {\n    return Boolean(focusWasOutsideWindow);\n  }\n  return focusWasOutsideWindow === 'meanwhile';\n};\nvar checkInHost = function checkInHost(check, el, boundary) {\n  return el && (el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\nvar withinHost = function withinHost(activeElement, workingArea) {\n  return workingArea.some(function (area) {\n    return checkInHost(activeElement, area, area);\n  });\n};\nvar getNodeFocusables = function getNodeFocusables(nodes) {\n  return getFocusableNodes(nodes, new Map());\n};\nvar isNotFocusable = function isNotFocusable(node) {\n  return !getNodeFocusables([node.parentNode]).some(function (el) {\n    return el.node === node;\n  });\n};\nvar activateTrap = function activateTrap() {\n  var result = false;\n  if (lastActiveTrap) {\n    var _lastActiveTrap = lastActiveTrap,\n      observed = _lastActiveTrap.observed,\n      persistentFocus = _lastActiveTrap.persistentFocus,\n      autoFocus = _lastActiveTrap.autoFocus,\n      shards = _lastActiveTrap.shards,\n      crossFrame = _lastActiveTrap.crossFrame,\n      focusOptions = _lastActiveTrap.focusOptions,\n      noFocusGuards = _lastActiveTrap.noFocusGuards;\n    var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n    if (focusOnBody() && lastActiveFocus && lastActiveFocus !== document.body) {\n      if (!document.body.contains(lastActiveFocus) || isNotFocusable(lastActiveFocus)) {\n        var newTarget = tryRestoreFocus();\n        if (newTarget) {\n          newTarget.focus();\n        }\n      }\n    }\n    var activeElement = document && document.activeElement;\n    if (workingNode) {\n      var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n      var shouldForceRestoreFocus = function shouldForceRestoreFocus() {\n        if (!focusWasOutside(crossFrame) || !noFocusGuards || !lastActiveFocus || windowFocused) {\n          return false;\n        }\n        var nodes = getNodeFocusables(workingArea);\n        var lastIndex = nodes.findIndex(function (_ref) {\n          var node = _ref.node;\n          return node === lastActiveFocus;\n        });\n        return lastIndex === 0 || lastIndex === nodes.length - 1;\n      };\n      if (!activeElement || focusWhitelisted(activeElement)) {\n        if (persistentFocus || shouldForceRestoreFocus() || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n          if (workingNode && !(focusInside(workingArea) || activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n            if (document && !lastActiveFocus && activeElement && !autoFocus) {\n              if (activeElement.blur) {\n                activeElement.blur();\n              }\n              document.body.focus();\n            } else {\n              result = moveFocusInside(workingArea, lastActiveFocus, {\n                focusOptions: focusOptions\n              });\n              lastPortaledElement = {};\n            }\n          }\n          lastActiveFocus = document && document.activeElement;\n          if (lastActiveFocus !== document.body) {\n            tryRestoreFocus = captureFocusRestore(lastActiveFocus);\n          }\n          focusWasOutsideWindow = false;\n        }\n      }\n      if (document && activeElement !== document.activeElement && document.querySelector('[data-focus-auto-guard]')) {\n        var newActiveElement = document && document.activeElement;\n        var allNodes = expandFocusableNodes(workingArea);\n        var focusedIndex = allNodes.map(function (_ref2) {\n          var node = _ref2.node;\n          return node;\n        }).indexOf(newActiveElement);\n        if (focusedIndex > -1) {\n          allNodes.filter(function (_ref3) {\n            var guard = _ref3.guard,\n              node = _ref3.node;\n            return guard && node.dataset.focusAutoGuard;\n          }).forEach(function (_ref4) {\n            var node = _ref4.node;\n            return node.removeAttribute('tabIndex');\n          });\n          autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n          autoGuard(focusedIndex, -1, -1, allNodes);\n        }\n      }\n    }\n  }\n  return result;\n};\nvar onTrap = function onTrap(event) {\n  if (activateTrap() && event) {\n    event.stopPropagation();\n    event.preventDefault();\n  }\n};\nvar onBlur = function onBlur() {\n  return deferAction(activateTrap);\n};\nvar onFocus = function onFocus(event) {\n  var source = event.target;\n  var currentNode = event.currentTarget;\n  if (!currentNode.contains(source)) {\n    recordPortal(currentNode, source);\n  }\n};\nvar FocusWatcher = function FocusWatcher() {\n  return null;\n};\nvar FocusTrap = function FocusTrap(_ref5) {\n  var children = _ref5.children;\n  return /*#__PURE__*/React.createElement(\"div\", {\n    onBlur: onBlur,\n    onFocus: onFocus\n  }, children);\n};\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n  children: PropTypes.node.isRequired\n} : {};\nvar onWindowFocus = function onWindowFocus() {\n  windowFocused = true;\n};\nvar onWindowBlur = function onWindowBlur() {\n  windowFocused = false;\n  focusWasOutsideWindow = 'just';\n  deferAction(function () {\n    focusWasOutsideWindow = 'meanwhile';\n  });\n};\nvar attachHandler = function attachHandler() {\n  document.addEventListener('focusin', onTrap);\n  document.addEventListener('focusout', onBlur);\n  window.addEventListener('focus', onWindowFocus);\n  window.addEventListener('blur', onWindowBlur);\n};\nvar detachHandler = function detachHandler() {\n  document.removeEventListener('focusin', onTrap);\n  document.removeEventListener('focusout', onBlur);\n  window.removeEventListener('focus', onWindowFocus);\n  window.removeEventListener('blur', onWindowBlur);\n};\nfunction reducePropsToState(propsList) {\n  return propsList.filter(function (_ref6) {\n    var disabled = _ref6.disabled;\n    return !disabled;\n  });\n}\nvar focusLockAPI = {\n  moveFocusInside: moveFocusInside,\n  focusInside: focusInside,\n  focusNextElement: focusNextElement,\n  focusPrevElement: focusPrevElement,\n  focusFirstElement: focusFirstElement,\n  focusLastElement: focusLastElement,\n  captureFocusRestore: captureFocusRestore\n};\nfunction handleStateChangeOnClient(traps) {\n  var trap = traps.slice(-1)[0];\n  if (trap && !lastActiveTrap) {\n    attachHandler();\n  }\n  var lastTrap = lastActiveTrap;\n  var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n  lastActiveTrap = trap;\n  if (lastTrap && !sameTrap) {\n    lastTrap.onDeactivation();\n    if (!traps.filter(function (_ref7) {\n      var id = _ref7.id;\n      return id === lastTrap.id;\n    }).length) {\n      lastTrap.returnFocus(!trap);\n    }\n  }\n  if (trap) {\n    lastActiveFocus = null;\n    if (!sameTrap || lastTrap.observed !== trap.observed) {\n      trap.onActivation(focusLockAPI);\n    }\n    activateTrap(true);\n    deferAction(activateTrap);\n  } else {\n    detachHandler();\n    lastActiveFocus = null;\n  }\n}\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n  return cb(focusLockAPI);\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React, { forwardRef } from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\nvar FocusLockCombination = /*#__PURE__*/forwardRef(function FocusLockUICombination(props, ref) {\n  return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n    sideCar: FocusTrap,\n    ref: ref\n  }, props));\n});\nvar _ref = FocusLockUI.propTypes || {},\n  sideCar = _ref.sideCar,\n  propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;","import FocusLock from './Combination';\nexport * from './UI';\nexport default FocusLock;","import { forwardRef, useEffect, createElement, useRef, useCallback } from 'react';\nimport { Portal } from '@reach/portal';\nimport { getOwnerDocument } from '@reach/utils/owner-document';\nimport { isString } from '@reach/utils/type-check';\nimport { noop } from '@reach/utils/noop';\nimport { useCheckStyles } from '@reach/utils/dev-utils';\nimport { useComposedRefs } from '@reach/utils/compose-refs';\nimport { composeEventHandlers } from '@reach/utils/compose-event-handlers';\nimport FocusLock from 'react-focus-lock';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n  _extends = Object.assign || function (target) {\n    for (var i = 1; i < arguments.length; i++) {\n      var source = arguments[i];\n\n      for (var key in source) {\n        if (Object.prototype.hasOwnProperty.call(source, key)) {\n          target[key] = source[key];\n        }\n      }\n    }\n\n    return target;\n  };\n\n  return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nvar _excluded = [\"as\", \"isOpen\"],\n    _excluded2 = [\"allowPinchZoom\", \"as\", \"dangerouslyBypassFocusLock\", \"dangerouslyBypassScrollLock\", \"initialFocusRef\", \"onClick\", \"onDismiss\", \"onKeyDown\", \"onMouseDown\", \"unstable_lockFocusAcrossFrames\"],\n    _excluded3 = [\"as\", \"onClick\", \"onKeyDown\"],\n    _excluded4 = [\"allowPinchZoom\", \"initialFocusRef\", \"isOpen\", \"onDismiss\"];\nvar overlayPropTypes = {\n  allowPinchZoom: PropTypes.bool,\n  dangerouslyBypassFocusLock: PropTypes.bool,\n  dangerouslyBypassScrollLock: PropTypes.bool,\n  // TODO:\n  initialFocusRef: function initialFocusRef() {\n    return null;\n  },\n  onDismiss: PropTypes.func\n}; ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogOverlay\n *\n * Low-level component if you need more control over the styles or rendering of\n * the dialog overlay.\n *\n * Note: You must render a `DialogContent` inside.\n *\n * @see Docs https://reach.tech/dialog#dialogoverlay\n */\n\nvar DialogOverlay = /*#__PURE__*/forwardRef(function DialogOverlay(_ref, forwardedRef) {\n  var _ref$as = _ref.as,\n      Comp = _ref$as === void 0 ? \"div\" : _ref$as,\n      _ref$isOpen = _ref.isOpen,\n      isOpen = _ref$isOpen === void 0 ? true : _ref$isOpen,\n      props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n  useCheckStyles(\"dialog\"); // We want to ignore the immediate focus of a tooltip so it doesn't pop\n  // up again when the menu closes, only pops up when focus returns again\n  // to the tooltip (like native OS tooltips).\n\n  useEffect(function () {\n    if (isOpen) {\n      // @ts-ignore\n      window.__REACH_DISABLE_TOOLTIPS = true;\n    } else {\n      window.requestAnimationFrame(function () {\n        // Wait a frame so that this doesn't fire before tooltip does\n        // @ts-ignore\n        window.__REACH_DISABLE_TOOLTIPS = false;\n      });\n    }\n  }, [isOpen]);\n  return isOpen ? /*#__PURE__*/createElement(Portal, {\n    \"data-reach-dialog-wrapper\": \"\"\n  }, /*#__PURE__*/createElement(DialogInner, _extends({\n    ref: forwardedRef,\n    as: Comp\n  }, props))) : null;\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n  DialogOverlay.displayName = \"DialogOverlay\";\n  DialogOverlay.propTypes = /*#__PURE__*/_extends({}, overlayPropTypes, {\n    isOpen: PropTypes.bool\n  });\n}\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogInner\n */\nvar DialogInner = /*#__PURE__*/forwardRef(function DialogInner(_ref2, forwardedRef) {\n  var allowPinchZoom = _ref2.allowPinchZoom,\n      _ref2$as = _ref2.as,\n      Comp = _ref2$as === void 0 ? \"div\" : _ref2$as,\n      _ref2$dangerouslyBypa = _ref2.dangerouslyBypassFocusLock,\n      dangerouslyBypassFocusLock = _ref2$dangerouslyBypa === void 0 ? false : _ref2$dangerouslyBypa,\n      _ref2$dangerouslyBypa2 = _ref2.dangerouslyBypassScrollLock,\n      dangerouslyBypassScrollLock = _ref2$dangerouslyBypa2 === void 0 ? false : _ref2$dangerouslyBypa2,\n      initialFocusRef = _ref2.initialFocusRef,\n      onClick = _ref2.onClick,\n      _ref2$onDismiss = _ref2.onDismiss,\n      onDismiss = _ref2$onDismiss === void 0 ? noop : _ref2$onDismiss,\n      onKeyDown = _ref2.onKeyDown,\n      onMouseDown = _ref2.onMouseDown,\n      unstable_lockFocusAcrossFrames = _ref2.unstable_lockFocusAcrossFrames,\n      props = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n  var lockFocusAcrossFramesIsDefined = unstable_lockFocusAcrossFrames !== undefined;\n\n  if (process.env.NODE_ENV !== \"production\") {\n    // eslint-disable-next-line react-hooks/rules-of-hooks\n    useEffect(function () {\n      if (lockFocusAcrossFramesIsDefined) {\n        console.warn(\"The unstable_lockFocusAcrossFrames in @reach/dialog is deprecated. It will be removed in the next minor release.\");\n      }\n    }, [lockFocusAcrossFramesIsDefined]);\n  }\n\n  var mouseDownTarget = useRef(null);\n  var overlayNode = useRef(null);\n  var ref = useComposedRefs(overlayNode, forwardedRef);\n  var activateFocusLock = useCallback(function () {\n    if (initialFocusRef && initialFocusRef.current) {\n      initialFocusRef.current.focus();\n    }\n  }, [initialFocusRef]);\n\n  function handleClick(event) {\n    if (mouseDownTarget.current === event.target) {\n      event.stopPropagation();\n      onDismiss(event);\n    }\n  }\n\n  function handleKeyDown(event) {\n    if (event.key === \"Escape\") {\n      event.stopPropagation();\n      onDismiss(event);\n    }\n  }\n\n  function handleMouseDown(event) {\n    mouseDownTarget.current = event.target;\n  }\n\n  useEffect(function () {\n    return overlayNode.current ? createAriaHider(overlayNode.current) : void null;\n  }, []);\n  return /*#__PURE__*/createElement(FocusLock, {\n    autoFocus: true,\n    returnFocus: true,\n    onActivation: activateFocusLock,\n    disabled: dangerouslyBypassFocusLock,\n    crossFrame: unstable_lockFocusAcrossFrames != null ? unstable_lockFocusAcrossFrames : true\n  }, /*#__PURE__*/createElement(RemoveScroll, {\n    allowPinchZoom: allowPinchZoom,\n    enabled: !dangerouslyBypassScrollLock\n  }, /*#__PURE__*/createElement(Comp, _extends({}, props, {\n    ref: ref,\n    \"data-reach-dialog-overlay\": \"\"\n    /*\n     * We can ignore the `no-static-element-interactions` warning here\n     * because our overlay is only designed to capture any outside\n     * clicks, not to serve as a clickable element itself.\n     */\n    ,\n    onClick: composeEventHandlers(onClick, handleClick),\n    onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown),\n    onMouseDown: composeEventHandlers(onMouseDown, handleMouseDown)\n  }))));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n  DialogOverlay.displayName = \"DialogOverlay\";\n  DialogOverlay.propTypes = /*#__PURE__*/_extends({}, overlayPropTypes);\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * DialogContent\n *\n * Low-level component if you need more control over the styles or rendering of\n * the dialog content.\n *\n * Note: Must be a child of `DialogOverlay`.\n *\n * Note: You only need to use this when you are also styling `DialogOverlay`,\n * otherwise you can use the high-level `Dialog` component and pass the props\n * to it. Any props passed to `Dialog` component (besides `isOpen` and\n * `onDismiss`) will be spread onto `DialogContent`.\n *\n * @see Docs https://reach.tech/dialog#dialogcontent\n */\n\n\nvar DialogContent = /*#__PURE__*/forwardRef(function DialogContent(_ref3, forwardedRef) {\n  var _ref3$as = _ref3.as,\n      Comp = _ref3$as === void 0 ? \"div\" : _ref3$as,\n      onClick = _ref3.onClick;\n      _ref3.onKeyDown;\n      var props = _objectWithoutPropertiesLoose(_ref3, _excluded3);\n\n  return /*#__PURE__*/createElement(Comp, _extends({\n    \"aria-modal\": \"true\",\n    role: \"dialog\",\n    tabIndex: -1\n  }, props, {\n    ref: forwardedRef,\n    \"data-reach-dialog-content\": \"\",\n    onClick: composeEventHandlers(onClick, function (event) {\n      event.stopPropagation();\n    })\n  }));\n});\n/**\n * @see Docs https://reach.tech/dialog#dialogcontent-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n  DialogContent.displayName = \"DialogContent\";\n  DialogContent.propTypes = {\n    \"aria-label\": ariaLabelType,\n    \"aria-labelledby\": ariaLabelType\n  };\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Dialog\n *\n * High-level component to render a modal dialog window over the top of the page\n * (or another dialog).\n *\n * @see Docs https://reach.tech/dialog#dialog\n */\n\n\nvar Dialog = /*#__PURE__*/forwardRef(function Dialog(_ref4, forwardedRef) {\n  var _ref4$allowPinchZoom = _ref4.allowPinchZoom,\n      allowPinchZoom = _ref4$allowPinchZoom === void 0 ? false : _ref4$allowPinchZoom,\n      initialFocusRef = _ref4.initialFocusRef,\n      isOpen = _ref4.isOpen,\n      _ref4$onDismiss = _ref4.onDismiss,\n      onDismiss = _ref4$onDismiss === void 0 ? noop : _ref4$onDismiss,\n      props = _objectWithoutPropertiesLoose(_ref4, _excluded4);\n\n  return /*#__PURE__*/createElement(DialogOverlay, {\n    allowPinchZoom: allowPinchZoom,\n    initialFocusRef: initialFocusRef,\n    isOpen: isOpen,\n    onDismiss: onDismiss\n  }, /*#__PURE__*/createElement(DialogContent, _extends({\n    ref: forwardedRef\n  }, props)));\n});\n/**\n * @see Docs https://reach.tech/dialog#dialog-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n  Dialog.displayName = \"Dialog\";\n  Dialog.propTypes = {\n    isOpen: PropTypes.bool,\n    onDismiss: PropTypes.func,\n    \"aria-label\": ariaLabelType,\n    \"aria-labelledby\": ariaLabelType\n  };\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction createAriaHider(dialogNode) {\n  var originalValues = [];\n  var rootNodes = [];\n  var ownerDocument = getOwnerDocument(dialogNode);\n\n  if (!dialogNode) {\n    if (process.env.NODE_ENV !== \"production\") {\n      console.warn(\"A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`.\");\n    }\n\n    return noop;\n  }\n\n  Array.prototype.forEach.call(ownerDocument.querySelectorAll(\"body > *\"), function (node) {\n    var _dialogNode$parentNod, _dialogNode$parentNod2;\n\n    var portalNode = (_dialogNode$parentNod = dialogNode.parentNode) == null ? void 0 : (_dialogNode$parentNod2 = _dialogNode$parentNod.parentNode) == null ? void 0 : _dialogNode$parentNod2.parentNode;\n\n    if (node === portalNode) {\n      return;\n    }\n\n    var attr = node.getAttribute(\"aria-hidden\");\n    var alreadyHidden = attr !== null && attr !== \"false\";\n\n    if (alreadyHidden) {\n      return;\n    }\n\n    originalValues.push(attr);\n    rootNodes.push(node);\n    node.setAttribute(\"aria-hidden\", \"true\");\n  });\n  return function () {\n    rootNodes.forEach(function (node, index) {\n      var originalValue = originalValues[index];\n\n      if (originalValue === null) {\n        node.removeAttribute(\"aria-hidden\");\n      } else {\n        node.setAttribute(\"aria-hidden\", originalValue);\n      }\n    });\n  };\n}\n\nfunction ariaLabelType(props, propName, compName, location, propFullName) {\n  var details = \"\\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.\";\n\n  if (!props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n    return new Error(\"A <\" + compName + \"> must have either an `aria-label` or `aria-labelledby` prop.\\n      \" + details);\n  }\n\n  if (props[\"aria-label\"] && props[\"aria-labelledby\"]) {\n    return new Error(\"You provided both `aria-label` and `aria-labelledby` props to a <\" + compName + \">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <\" + compName + \">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag.\" + details);\n  } else if (props[propName] != null && !isString(props[propName])) {\n    return new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + compName + \"`. Expected `string`, received `\" + (Array.isArray(propFullName) ? \"array\" : typeof propFullName) + \"`.\");\n  }\n\n  return null;\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport default Dialog;\nexport { Dialog, DialogContent, DialogOverlay };\n"],"names":[],"sourceRoot":"","ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]}