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AkB8E,EAA+BrY,KAAK,KAAMgS,IAE9FwG,EAAYhF,EACrB,EACIhF,EAAY,SAAmB8E,EAAItB,GAYrC,OAXAA,EAAUA,GAAW,CAAC,GAEVpI,cACG+J,EAAyB,CAACL,GAAKtB,EAAQuB,iBAAkB,CACpE7I,OAAQqN,EAAgC/X,KAAK,KAAMgS,GACnDiC,SAAS,EACTrK,cAAeoI,EAAQpI,gBAGZyJ,EAAcC,EAAItB,EAAQuB,iBAAkBwE,EAAgC/X,KAAK,KAAMgS,GAGxG,EACIjD,EAAa,SAAoB5K,EAAM6N,GAEzC,GADAA,EAAUA,GAAW,CAAC,GACjB7N,EACH,MAAM,IAAIH,MAAM,oBAElB,OAA8C,IAA1CyO,EAAQ9R,KAAKwD,EAAMmO,IAGhB+F,EAA+BrG,EAAS7N,EACjD,EACI8U,EAA4C5G,EAAmBpO,OAAO,UAAUsO,KAAK,KACrF/P,EAAc,SAAqB2B,EAAM6N,GAE3C,GADAA,EAAUA,GAAW,CAAC,GACjB7N,EACH,MAAM,IAAIH,MAAM,oBAElB,OAAuD,IAAnDyO,EAAQ9R,KAAKwD,EAAM8U,IAGhBlB,EAAgC/F,EAAS7N,EAClD","sources":["webpack:///../node_modules/focus-trap-react/dist/focus-trap-react.js","webpack:///../node_modules/focus-trap/dist/focus-trap.esm.js","webpack:///../node_modules/tabbable/dist/index.esm.js"],"sourcesContent":["\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar React = require('react');\nvar PropTypes = require('prop-types');\nvar _require = require('focus-trap'),\n createFocusTrap = _require.createFocusTrap;\nvar _require2 = require('tabbable'),\n isFocusable = _require2.isFocusable;\nvar FocusTrap = /*#__PURE__*/function (_React$Component) {\n _inherits(FocusTrap, _React$Component);\n var _super = _createSuper(FocusTrap);\n function FocusTrap(props) {\n var _this;\n _classCallCheck(this, FocusTrap);\n _this = _super.call(this, props);\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @returns {undefined | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `false` if the option\n * resolved to `false` (node explicitly not given); otherwise, the resolved\n * DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node.\n */\n _defineProperty(_assertThisInitialized(_this), \"getNodeForOption\", function (optionName) {\n var _this$internalOptions;\n // use internal options first, falling back to original options\n var optionValue = (_this$internalOptions = this.internalOptions[optionName]) !== null && _this$internalOptions !== void 0 ? _this$internalOptions : this.originalOptions[optionName];\n if (typeof optionValue === 'function') {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n var _this$getDocument;\n node = (_this$getDocument = this.getDocument()) === null || _this$getDocument === void 0 ? void 0 : _this$getDocument.querySelector(optionValue); // resolve to node, or null if fails\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n });\n _this.handleDeactivate = _this.handleDeactivate.bind(_assertThisInitialized(_this));\n _this.handlePostDeactivate = _this.handlePostDeactivate.bind(_assertThisInitialized(_this));\n _this.handleClickOutsideDeactivates = _this.handleClickOutsideDeactivates.bind(_assertThisInitialized(_this));\n\n // focus-trap options used internally when creating the trap\n _this.internalOptions = {\n // We need to hijack the returnFocusOnDeactivate option,\n // because React can move focus into the element before we arrived at\n // this lifecycle hook (e.g. with autoFocus inputs). So the component\n // captures the previouslyFocusedElement in componentWillMount,\n // then (optionally) returns focus to it in componentWillUnmount.\n returnFocusOnDeactivate: false,\n // the rest of these are also related to deactivation of the trap, and we\n // need to use them and control them as well\n checkCanReturnFocus: null,\n onDeactivate: _this.handleDeactivate,\n onPostDeactivate: _this.handlePostDeactivate,\n // we need to special-case this setting as well so that we can know if we should\n // NOT return focus if the trap gets auto-deactivated as the result of an\n // outside click (otherwise, we'll always think we should return focus because\n // of how we manage that flag internally here)\n clickOutsideDeactivates: _this.handleClickOutsideDeactivates\n };\n\n // original options provided by the consumer\n _this.originalOptions = {\n // because of the above `internalOptions`, we maintain our own flag for\n // this option, and default it to `true` because that's focus-trap's default\n returnFocusOnDeactivate: true,\n // because of the above `internalOptions`, we keep these separate since\n // they're part of the deactivation process which we configure (internally) to\n // be shared between focus-trap and focus-trap-react\n onDeactivate: null,\n onPostDeactivate: null,\n checkCanReturnFocus: null,\n // the user's setting, defaulted to false since focus-trap defaults this to false\n clickOutsideDeactivates: false\n };\n var focusTrapOptions = props.focusTrapOptions;\n for (var optionName in focusTrapOptions) {\n if (!Object.prototype.hasOwnProperty.call(focusTrapOptions, optionName)) {\n continue;\n }\n if (optionName === 'returnFocusOnDeactivate' || optionName === 'onDeactivate' || optionName === 'onPostDeactivate' || optionName === 'checkCanReturnFocus' || optionName === 'clickOutsideDeactivates') {\n _this.originalOptions[optionName] = focusTrapOptions[optionName];\n continue; // exclude from internalOptions\n }\n\n _this.internalOptions[optionName] = focusTrapOptions[optionName];\n }\n\n // if set, `{ target: Node, allowDeactivation: boolean }` where `target` is the outside\n // node that was clicked, and `allowDeactivation` is the result of the consumer's\n // option (stored in `this.originalOptions.clickOutsideDeactivates`, which may be a\n // function) whether to allow or deny auto-deactivation on click on this outside node\n _this.outsideClick = null;\n\n // elements from which to create the focus trap on mount; if a child is used\n // instead of the `containerElements` prop, we'll get the child's related\n // element when the trap renders and then is declared 'mounted'\n _this.focusTrapElements = props.containerElements || [];\n\n // now we remember what the currently focused element is, not relying on focus-trap\n _this.updatePreviousElement();\n return _this;\n }\n\n /**\n * Gets the configured document.\n * @returns {Document|undefined} Configured document, falling back to the main\n * document, if it exists. During SSR, `undefined` is returned since the\n * document doesn't exist.\n */\n _createClass(FocusTrap, [{\n key: \"getDocument\",\n value: function getDocument() {\n // SSR: careful to check if `document` exists before accessing it as a variable\n return this.props.focusTrapOptions.document || (typeof document !== 'undefined' ? document : undefined);\n }\n }, {\n key: \"getReturnFocusNode\",\n value: function getReturnFocusNode() {\n var node = this.getNodeForOption('setReturnFocus', this.previouslyFocusedElement);\n return node ? node : node === false ? false : this.previouslyFocusedElement;\n }\n\n /** Update the previously focused element with the currently focused element. */\n }, {\n key: \"updatePreviousElement\",\n value: function updatePreviousElement() {\n var currentDocument = this.getDocument();\n if (currentDocument) {\n this.previouslyFocusedElement = currentDocument.activeElement;\n }\n }\n }, {\n key: \"deactivateTrap\",\n value: function deactivateTrap() {\n // NOTE: it's possible the focus trap has already been deactivated without our knowing it,\n // especially if the user set the `clickOutsideDeactivates: true` option on the trap,\n // and the mouse was clicked on some element outside the trap; at that point, focus-trap\n // will initiate its auto-deactivation process, which will call our own\n // handleDeactivate(), which will call into this method\n if (!this.focusTrap || !this.focusTrap.active) {\n return;\n }\n this.focusTrap.deactivate({\n // NOTE: we never let the trap return the focus since we do that ourselves\n returnFocus: false,\n // we'll call this in our own post deactivate handler so make sure the trap doesn't\n // do it prematurely\n checkCanReturnFocus: null,\n // let it call the user's original deactivate handler, if any, instead of\n // our own which calls back into this function\n onDeactivate: this.originalOptions.onDeactivate\n // NOTE: for post deactivate, don't specify anything so that it calls the\n // onPostDeactivate handler specified on `this.internalOptions`\n // which will always be our own `handlePostDeactivate()` handler, which\n // will finish things off by calling the user's provided onPostDeactivate\n // handler, if any, at the right time\n // onPostDeactivate: NOTHING\n });\n }\n }, {\n key: \"handleClickOutsideDeactivates\",\n value: function handleClickOutsideDeactivates(event) {\n // use consumer's option (or call their handler) as the permission or denial\n var allowDeactivation = typeof this.originalOptions.clickOutsideDeactivates === 'function' ? this.originalOptions.clickOutsideDeactivates.call(null, event) // call out of context\n : this.originalOptions.clickOutsideDeactivates; // boolean\n\n if (allowDeactivation) {\n // capture the outside target that was clicked so we can use it in the deactivation\n // process since the consumer allowed it to cause auto-deactivation\n this.outsideClick = {\n target: event.target,\n allowDeactivation: allowDeactivation\n };\n }\n return allowDeactivation;\n }\n }, {\n key: \"handleDeactivate\",\n value: function handleDeactivate() {\n if (this.originalOptions.onDeactivate) {\n this.originalOptions.onDeactivate.call(null); // call user's handler out of context\n }\n\n this.deactivateTrap();\n }\n }, {\n key: \"handlePostDeactivate\",\n value: function handlePostDeactivate() {\n var _this2 = this;\n var finishDeactivation = function finishDeactivation() {\n var returnFocusNode = _this2.getReturnFocusNode();\n var canReturnFocus = !!(\n // did the consumer allow it?\n\n _this2.originalOptions.returnFocusOnDeactivate && // can we actually focus the node?\n returnFocusNode !== null && returnFocusNode !== void 0 && returnFocusNode.focus && (\n // was there an outside click that allowed deactivation?\n !_this2.outsideClick ||\n // did the consumer allow deactivation when the outside node was clicked?\n _this2.outsideClick.allowDeactivation &&\n // is the outside node NOT focusable (implying that it did NOT receive focus\n // as a result of the click-through) -- in which case do NOT restore focus\n // to `returnFocusNode` because focus should remain on the outside node\n !isFocusable(_this2.outsideClick.target, _this2.internalOptions.tabbableOptions))\n\n // if no, the restore focus to `returnFocusNode` at this point\n );\n\n var _this2$internalOption = _this2.internalOptions.preventScroll,\n preventScroll = _this2$internalOption === void 0 ? false : _this2$internalOption;\n if (canReturnFocus) {\n // return focus to the element that had focus when the trap was activated\n returnFocusNode.focus({\n preventScroll: preventScroll\n });\n }\n if (_this2.originalOptions.onPostDeactivate) {\n _this2.originalOptions.onPostDeactivate.call(null); // don't call it in context of \"this\"\n }\n\n _this2.outsideClick = null; // reset: no longer needed\n };\n\n if (this.originalOptions.checkCanReturnFocus) {\n this.originalOptions.checkCanReturnFocus.call(null, this.getReturnFocusNode()) // call out of context\n .then(finishDeactivation, finishDeactivation);\n } else {\n finishDeactivation();\n }\n }\n }, {\n key: \"setupFocusTrap\",\n value: function setupFocusTrap() {\n if (this.focusTrap) {\n // trap already exists: it's possible we're in StrictMode and we're being remounted,\n // in which case, we will have deactivated the trap when we got unmounted (remember,\n // StrictMode, in development, purposely unmounts and remounts components after\n // mounting them the first time to make sure they have reusable state,\n // @see https://reactjs.org/docs/strict-mode.html#ensuring-reusable-state) so now\n // we need to restore the state of the trap according to our component state\n // NOTE: Strict mode __violates__ assumptions about the `componentWillUnmount()` API\n // which clearly states -- even for React 18 -- that, \"Once a component instance is\n // unmounted, __it will never be mounted again.__\" (emphasis ours). So when we get\n // unmounted, we assume we're gone forever and we deactivate the trap. But then\n // we get remounted and we're supposed to restore state. But if you had paused,\n // we've now deactivated (we don't know we're amount to get remounted again)\n // which means we need to reactivate and then pause. Otherwise, do nothing.\n if (this.props.active && !this.focusTrap.active) {\n this.focusTrap.activate();\n if (this.props.paused) {\n this.focusTrap.pause();\n }\n }\n } else {\n var nodesExist = this.focusTrapElements.some(Boolean);\n if (nodesExist) {\n // eslint-disable-next-line react/prop-types -- _createFocusTrap is an internal prop\n this.focusTrap = this.props._createFocusTrap(this.focusTrapElements, this.internalOptions);\n if (this.props.active) {\n this.focusTrap.activate();\n }\n if (this.props.paused) {\n this.focusTrap.pause();\n }\n }\n }\n }\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n if (this.props.active) {\n this.setupFocusTrap();\n }\n // else, wait for later activation in case the `focusTrapOptions` will be updated\n // again before the trap is activated (e.g. if waiting to know what the document\n // object will be, so the Trap must be rendered, but the consumer is waiting to\n // activate until they have obtained the document from a ref)\n // @see https://github.com/focus-trap/focus-trap-react/issues/539\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n if (this.focusTrap) {\n if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrap.updateContainerElements(this.props.containerElements);\n }\n var hasActivated = !prevProps.active && this.props.active;\n var hasDeactivated = prevProps.active && !this.props.active;\n var hasPaused = !prevProps.paused && this.props.paused;\n var hasUnpaused = prevProps.paused && !this.props.paused;\n if (hasActivated) {\n this.updatePreviousElement();\n this.focusTrap.activate();\n }\n if (hasDeactivated) {\n this.deactivateTrap();\n return; // un/pause does nothing on an inactive trap\n }\n\n if (hasPaused) {\n this.focusTrap.pause();\n }\n if (hasUnpaused) {\n this.focusTrap.unpause();\n }\n } else {\n // NOTE: if we're in `componentDidUpdate` and we don't have a trap yet,\n // it either means it shouldn't be active, or it should be but none of\n // of given `containerElements` were present in the DOM the last time\n // we tried to create the trap\n\n if (prevProps.containerElements !== this.props.containerElements) {\n this.focusTrapElements = this.props.containerElements;\n }\n\n // don't create the trap unless it should be active in case the consumer\n // is still updating `focusTrapOptions`\n // @see https://github.com/focus-trap/focus-trap-react/issues/539\n if (this.props.active) {\n this.updatePreviousElement();\n this.setupFocusTrap();\n }\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.deactivateTrap();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n var child = this.props.children ? React.Children.only(this.props.children) : undefined;\n if (child) {\n if (child.type && child.type === React.Fragment) {\n throw new Error('A focus-trap cannot use a Fragment as its child container. Try replacing it with a
element.');\n }\n var callbackRef = function callbackRef(element) {\n var containerElements = _this3.props.containerElements;\n if (child) {\n if (typeof child.ref === 'function') {\n child.ref(element);\n } else if (child.ref) {\n child.ref.current = element;\n }\n }\n _this3.focusTrapElements = containerElements ? containerElements : [element];\n };\n var childWithRef = React.cloneElement(child, {\n ref: callbackRef\n });\n return childWithRef;\n }\n return null;\n }\n }]);\n return FocusTrap;\n}(React.Component); // support server-side rendering where `Element` will not be defined\nvar ElementType = typeof Element === 'undefined' ? Function : Element;\nFocusTrap.propTypes = {\n active: PropTypes.bool,\n paused: PropTypes.bool,\n focusTrapOptions: PropTypes.shape({\n document: PropTypes.object,\n onActivate: PropTypes.func,\n onPostActivate: PropTypes.func,\n checkCanFocusTrap: PropTypes.func,\n onPause: PropTypes.func,\n onPostPause: PropTypes.func,\n onUnpause: PropTypes.func,\n onPostUnpause: PropTypes.func,\n onDeactivate: PropTypes.func,\n onPostDeactivate: PropTypes.func,\n checkCanReturnFocus: PropTypes.func,\n initialFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.bool, PropTypes.func]),\n fallbackFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string,\n // NOTE: does not support `false` as value (or return value from function)\n PropTypes.func]),\n escapeDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n clickOutsideDeactivates: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n returnFocusOnDeactivate: PropTypes.bool,\n setReturnFocus: PropTypes.oneOfType([PropTypes.instanceOf(ElementType), PropTypes.string, PropTypes.bool, PropTypes.func]),\n allowOutsideClick: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),\n preventScroll: PropTypes.bool,\n tabbableOptions: PropTypes.shape({\n displayCheck: PropTypes.oneOf(['full', 'legacy-full', 'non-zero-area', 'none']),\n getShadowRoot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func])\n }),\n trapStack: PropTypes.array,\n isKeyForward: PropTypes.func,\n isKeyBackward: PropTypes.func\n }),\n containerElements: PropTypes.arrayOf(PropTypes.instanceOf(ElementType)),\n // DOM element ONLY\n children: PropTypes.oneOfType([PropTypes.element,\n // React element\n PropTypes.instanceOf(ElementType) // DOM element\n ])\n\n // NOTE: _createFocusTrap is internal, for testing purposes only, so we don't\n // specify it here. It's expected to be set to the function returned from\n // require('focus-trap'), or one with a compatible interface.\n};\n\nFocusTrap.defaultProps = {\n active: true,\n paused: false,\n focusTrapOptions: {},\n _createFocusTrap: createFocusTrap\n};\nmodule.exports = FocusTrap;","/*!\n* focus-trap 7.4.3\n* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE\n*/\nimport { isFocusable, tabbable, focusable, isTabbable } from 'tabbable';\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\nfunction _toPrimitive(input, hint) {\n if (typeof input !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (typeof res !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return typeof key === \"symbol\" ? key : String(key);\n}\n\nvar activeFocusTraps = {\n activateTrap: function activateTrap(trapStack, trap) {\n if (trapStack.length > 0) {\n var activeTrap = trapStack[trapStack.length - 1];\n if (activeTrap !== trap) {\n activeTrap.pause();\n }\n }\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex === -1) {\n trapStack.push(trap);\n } else {\n // move this existing trap to the front of the queue\n trapStack.splice(trapIndex, 1);\n trapStack.push(trap);\n }\n },\n deactivateTrap: function deactivateTrap(trapStack, trap) {\n var trapIndex = trapStack.indexOf(trap);\n if (trapIndex !== -1) {\n trapStack.splice(trapIndex, 1);\n }\n if (trapStack.length > 0) {\n trapStack[trapStack.length - 1].unpause();\n }\n }\n};\nvar isSelectableInput = function isSelectableInput(node) {\n return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';\n};\nvar isEscapeEvent = function isEscapeEvent(e) {\n return e.key === 'Escape' || e.key === 'Esc' || e.keyCode === 27;\n};\nvar isTabEvent = function isTabEvent(e) {\n return e.key === 'Tab' || e.keyCode === 9;\n};\n\n// checks for TAB by default\nvar isKeyForward = function isKeyForward(e) {\n return isTabEvent(e) && !e.shiftKey;\n};\n\n// checks for SHIFT+TAB by default\nvar isKeyBackward = function isKeyBackward(e) {\n return isTabEvent(e) && e.shiftKey;\n};\nvar delay = function delay(fn) {\n return setTimeout(fn, 0);\n};\n\n// Array.find/findIndex() are not supported on IE; this replicates enough\n// of Array.findIndex() for our needs\nvar findIndex = function findIndex(arr, fn) {\n var idx = -1;\n arr.every(function (value, i) {\n if (fn(value)) {\n idx = i;\n return false; // break\n }\n\n return true; // next\n });\n\n return idx;\n};\n\n/**\n * Get an option's value when it could be a plain value, or a handler that provides\n * the value.\n * @param {*} value Option's value to check.\n * @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.\n * @returns {*} The `value`, or the handler's returned value.\n */\nvar valueOrHandler = function valueOrHandler(value) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n return typeof value === 'function' ? value.apply(void 0, params) : value;\n};\nvar getActualTarget = function getActualTarget(event) {\n // NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the\n // shadow host. However, event.target.composedPath() will be an array of\n // nodes \"clicked\" from inner-most (the actual element inside the shadow) to\n // outer-most (the host HTML document). If we have access to composedPath(),\n // then use its first element; otherwise, fall back to event.target (and\n // this only works for an _open_ shadow DOM; otherwise,\n // composedPath()[0] === event.target always).\n return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;\n};\n\n// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this\n// current instance use the same stack if `userOptions.trapStack` isn't specified\nvar internalTrapStack = [];\nvar createFocusTrap = function createFocusTrap(elements, userOptions) {\n // SSR: a live trap shouldn't be created in this type of environment so this\n // should be safe code to execute if the `document` option isn't specified\n var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;\n var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;\n var config = _objectSpread2({\n returnFocusOnDeactivate: true,\n escapeDeactivates: true,\n delayInitialFocus: true,\n isKeyForward: isKeyForward,\n isKeyBackward: isKeyBackward\n }, userOptions);\n var state = {\n // containers given to createFocusTrap()\n // @type {Array}\n containers: [],\n // list of objects identifying tabbable nodes in `containers` in the trap\n // NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap\n // is active, but the trap should never get to a state where there isn't at least one group\n // with at least one tabbable node in it (that would lead to an error condition that would\n // result in an error being thrown)\n // @type {Array<{\n // container: HTMLElement,\n // tabbableNodes: Array, // empty if none\n // focusableNodes: Array, // empty if none\n // firstTabbableNode: HTMLElement|null,\n // lastTabbableNode: HTMLElement|null,\n // nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined\n // }>}\n containerGroups: [],\n // same order/length as `containers` list\n\n // references to objects in `containerGroups`, but only those that actually have\n // tabbable nodes in them\n // NOTE: same order as `containers` and `containerGroups`, but __not necessarily__\n // the same length\n tabbableGroups: [],\n nodeFocusedBeforeActivation: null,\n mostRecentlyFocusedNode: null,\n active: false,\n paused: false,\n // timer ID for when delayInitialFocus is true and initial focus in this trap\n // has been delayed during activation\n delayInitialFocusTimer: undefined\n };\n var trap; // eslint-disable-line prefer-const -- some private functions reference it, and its methods reference private functions, so we must declare here and define later\n\n /**\n * Gets a configuration option value.\n * @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,\n * value will be taken from this object. Otherwise, value will be taken from base configuration.\n * @param {string} optionName Name of the option whose value is sought.\n * @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`\n * IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.\n */\n var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {\n return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];\n };\n\n /**\n * Finds the index of the container that contains the element.\n * @param {HTMLElement} element\n * @param {Event} [event]\n * @returns {number} Index of the container in either `state.containers` or\n * `state.containerGroups` (the order/length of these lists are the same); -1\n * if the element isn't found.\n */\n var findContainerIndex = function findContainerIndex(element, event) {\n var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;\n // NOTE: search `containerGroups` because it's possible a group contains no tabbable\n // nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)\n // and we still need to find the element in there\n return state.containerGroups.findIndex(function (_ref) {\n var container = _ref.container,\n tabbableNodes = _ref.tabbableNodes;\n return container.contains(element) || ( // fall back to explicit tabbable search which will take into consideration any\n // web components if the `tabbableOptions.getShadowRoot` option was used for\n // the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't\n // look inside web components even if open)\n composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {\n return node === element;\n });\n });\n };\n\n /**\n * Gets the node for the given option, which is expected to be an option that\n * can be either a DOM node, a string that is a selector to get a node, `false`\n * (if a node is explicitly NOT given), or a function that returns any of these\n * values.\n * @param {string} optionName\n * @returns {undefined | false | HTMLElement | SVGElement} Returns\n * `undefined` if the option is not specified; `false` if the option\n * resolved to `false` (node explicitly not given); otherwise, the resolved\n * DOM node.\n * @throws {Error} If the option is set, not `false`, and is not, or does not\n * resolve to a node.\n */\n var getNodeForOption = function getNodeForOption(optionName) {\n var optionValue = config[optionName];\n if (typeof optionValue === 'function') {\n for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n params[_key2 - 1] = arguments[_key2];\n }\n optionValue = optionValue.apply(void 0, params);\n }\n if (optionValue === true) {\n optionValue = undefined; // use default value\n }\n\n if (!optionValue) {\n if (optionValue === undefined || optionValue === false) {\n return optionValue;\n }\n // else, empty string (invalid), null (invalid), 0 (invalid)\n\n throw new Error(\"`\".concat(optionName, \"` was specified but was not a node, or did not return a node\"));\n }\n var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point\n\n if (typeof optionValue === 'string') {\n node = doc.querySelector(optionValue); // resolve to node, or null if fails\n if (!node) {\n throw new Error(\"`\".concat(optionName, \"` as selector refers to no known node\"));\n }\n }\n return node;\n };\n var getInitialFocusNode = function getInitialFocusNode() {\n var node = getNodeForOption('initialFocus');\n\n // false explicitly indicates we want no initialFocus at all\n if (node === false) {\n return false;\n }\n if (node === undefined || !isFocusable(node, config.tabbableOptions)) {\n // option not specified nor focusable: use fallback options\n if (findContainerIndex(doc.activeElement) >= 0) {\n node = doc.activeElement;\n } else {\n var firstTabbableGroup = state.tabbableGroups[0];\n var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;\n\n // NOTE: `fallbackFocus` option function cannot return `false` (not supported)\n node = firstTabbableNode || getNodeForOption('fallbackFocus');\n }\n }\n if (!node) {\n throw new Error('Your focus-trap needs to have at least one focusable element');\n }\n return node;\n };\n var updateTabbableNodes = function updateTabbableNodes() {\n state.containerGroups = state.containers.map(function (container) {\n var tabbableNodes = tabbable(container, config.tabbableOptions);\n\n // NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes\n // are a superset of tabbable nodes\n var focusableNodes = focusable(container, config.tabbableOptions);\n return {\n container: container,\n tabbableNodes: tabbableNodes,\n focusableNodes: focusableNodes,\n firstTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[0] : null,\n lastTabbableNode: tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : null,\n /**\n * Finds the __tabbable__ node that follows the given node in the specified direction,\n * in this container, if any.\n * @param {HTMLElement} node\n * @param {boolean} [forward] True if going in forward tab order; false if going\n * in reverse.\n * @returns {HTMLElement|undefined} The next tabbable node, if any.\n */\n nextTabbableNode: function nextTabbableNode(node) {\n var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n // NOTE: If tabindex is positive (in order to manipulate the tab order separate\n // from the DOM order), this __will not work__ because the list of focusableNodes,\n // while it contains tabbable nodes, does not sort its nodes in any order other\n // than DOM order, because it can't: Where would you place focusable (but not\n // tabbable) nodes in that order? They have no order, because they aren't tabbale...\n // Support for positive tabindex is already broken and hard to manage (possibly\n // not supportable, TBD), so this isn't going to make things worse than they\n // already are, and at least makes things better for the majority of cases where\n // tabindex is either 0/unset or negative.\n // FYI, positive tabindex issue: https://github.com/focus-trap/focus-trap/issues/375\n var nodeIdx = focusableNodes.findIndex(function (n) {\n return n === node;\n });\n if (nodeIdx < 0) {\n return undefined;\n }\n if (forward) {\n return focusableNodes.slice(nodeIdx + 1).find(function (n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n return focusableNodes.slice(0, nodeIdx).reverse().find(function (n) {\n return isTabbable(n, config.tabbableOptions);\n });\n }\n };\n });\n state.tabbableGroups = state.containerGroups.filter(function (group) {\n return group.tabbableNodes.length > 0;\n });\n\n // throw if no groups have tabbable nodes and we don't have a fallback focus node either\n if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option\n ) {\n throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');\n }\n };\n var tryFocus = function tryFocus(node) {\n if (node === false) {\n return;\n }\n if (node === doc.activeElement) {\n return;\n }\n if (!node || !node.focus) {\n tryFocus(getInitialFocusNode());\n return;\n }\n node.focus({\n preventScroll: !!config.preventScroll\n });\n state.mostRecentlyFocusedNode = node;\n if (isSelectableInput(node)) {\n node.select();\n }\n };\n var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {\n var node = getNodeForOption('setReturnFocus', previousActiveElement);\n return node ? node : node === false ? false : previousActiveElement;\n };\n\n // This needs to be done on mousedown and touchstart instead of click\n // so that it precedes the focus event.\n var checkPointerDown = function checkPointerDown(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n // allow the click since it ocurred inside the trap\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n // immediately deactivate the trap\n trap.deactivate({\n // NOTE: by setting `returnFocus: false`, deactivate() will do nothing,\n // which will result in the outside click setting focus to the node\n // that was clicked (and if not focusable, to \"nothing\"); by setting\n // `returnFocus: true`, we'll attempt to re-focus the node originally-focused\n // on activation (or the configured `setReturnFocus` node), whether the\n // outside click was on a focusable node or not\n returnFocus: config.returnFocusOnDeactivate\n });\n return;\n }\n\n // This is needed for mobile devices.\n // (If we'll only let `click` events through,\n // then on mobile they will be blocked anyways if `touchstart` is blocked.)\n if (valueOrHandler(config.allowOutsideClick, e)) {\n // allow the click outside the trap to take place\n return;\n }\n\n // otherwise, prevent the click\n e.preventDefault();\n };\n\n // In case focus escapes the trap for some strange reason, pull it back in.\n var checkFocusIn = function checkFocusIn(e) {\n var target = getActualTarget(e);\n var targetContained = findContainerIndex(target, e) >= 0;\n\n // In Firefox when you Tab out of an iframe the Document is briefly focused.\n if (targetContained || target instanceof Document) {\n if (targetContained) {\n state.mostRecentlyFocusedNode = target;\n }\n } else {\n // escaped! pull it back in to where it just left\n e.stopImmediatePropagation();\n tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());\n }\n };\n\n // Hijack key nav events on the first and last focusable nodes of the trap,\n // in order to prevent focus from escaping. If it escapes for even a\n // moment it can end up scrolling the page and causing confusion so we\n // kind of need to capture the action at the keydown phase.\n var checkKeyNav = function checkKeyNav(event) {\n var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var target = getActualTarget(event);\n updateTabbableNodes();\n var destinationNode = null;\n if (state.tabbableGroups.length > 0) {\n // make sure the target is actually contained in a group\n // NOTE: the target may also be the container itself if it's focusable\n // with tabIndex='-1' and was given initial focus\n var containerIndex = findContainerIndex(target, event);\n var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;\n if (containerIndex < 0) {\n // target not found in any group: quite possible focus has escaped the trap,\n // so bring it back into...\n if (isBackward) {\n // ...the last node in the last group\n destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;\n } else {\n // ...the first node in the first group\n destinationNode = state.tabbableGroups[0].firstTabbableNode;\n }\n } else if (isBackward) {\n // REVERSE\n\n // is the target the first tabbable node in a group?\n var startOfGroupIndex = findIndex(state.tabbableGroups, function (_ref2) {\n var firstTabbableNode = _ref2.firstTabbableNode;\n return target === firstTabbableNode;\n });\n if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {\n // an exception case where the target is either the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle shift+tab as if focus were on the container's\n // first tabbable node, and go to the last tabbable node of the LAST group\n startOfGroupIndex = containerIndex;\n }\n if (startOfGroupIndex >= 0) {\n // YES: then shift+tab should go to the last tabbable node in the\n // previous group (and wrap around to the last tabbable node of\n // the LAST group if it's the first tabbable node of the FIRST group)\n var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;\n var destinationGroup = state.tabbableGroups[destinationGroupIndex];\n destinationNode = destinationGroup.lastTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target, false);\n }\n } else {\n // FORWARD\n\n // is the target the last tabbable node in a group?\n var lastOfGroupIndex = findIndex(state.tabbableGroups, function (_ref3) {\n var lastTabbableNode = _ref3.lastTabbableNode;\n return target === lastTabbableNode;\n });\n if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {\n // an exception case where the target is the container itself, or\n // a non-tabbable node that was given focus (i.e. tabindex is negative\n // and user clicked on it or node was programmatically given focus)\n // and is not followed by any other tabbable node, in which\n // case, we should handle tab as if focus were on the container's\n // last tabbable node, and go to the first tabbable node of the FIRST group\n lastOfGroupIndex = containerIndex;\n }\n if (lastOfGroupIndex >= 0) {\n // YES: then tab should go to the first tabbable node in the next\n // group (and wrap around to the first tabbable node of the FIRST\n // group if it's the last tabbable node of the LAST group)\n var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;\n var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];\n destinationNode = _destinationGroup.firstTabbableNode;\n } else if (!isTabEvent(event)) {\n // user must have customized the nav keys so we have to move focus manually _within_\n // the active group: do this based on the order determined by tabbable()\n destinationNode = containerGroup.nextTabbableNode(target);\n }\n }\n } else {\n // no groups available\n // NOTE: the fallbackFocus option does not support returning false to opt-out\n destinationNode = getNodeForOption('fallbackFocus');\n }\n if (destinationNode) {\n if (isTabEvent(event)) {\n // since tab natively moves focus, we wouldn't have a destination node unless we\n // were on the edge of a container and had to move to the next/previous edge, in\n // which case we want to prevent default to keep the browser from moving focus\n // to where it normally would\n event.preventDefault();\n }\n tryFocus(destinationNode);\n }\n // else, let the browser take care of [shift+]tab and move the focus\n };\n\n var checkKey = function checkKey(event) {\n if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {\n event.preventDefault();\n trap.deactivate();\n return;\n }\n if (config.isKeyForward(event) || config.isKeyBackward(event)) {\n checkKeyNav(event, config.isKeyBackward(event));\n }\n };\n var checkClick = function checkClick(e) {\n var target = getActualTarget(e);\n if (findContainerIndex(target, e) >= 0) {\n return;\n }\n if (valueOrHandler(config.clickOutsideDeactivates, e)) {\n return;\n }\n if (valueOrHandler(config.allowOutsideClick, e)) {\n return;\n }\n e.preventDefault();\n e.stopImmediatePropagation();\n };\n\n //\n // EVENT LISTENERS\n //\n\n var addListeners = function addListeners() {\n if (!state.active) {\n return;\n }\n\n // There can be only one listening focus trap at a time\n activeFocusTraps.activateTrap(trapStack, trap);\n\n // Delay ensures that the focused element doesn't capture the event\n // that caused the focus trap activation.\n state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {\n tryFocus(getInitialFocusNode());\n }) : tryFocus(getInitialFocusNode());\n doc.addEventListener('focusin', checkFocusIn, true);\n doc.addEventListener('mousedown', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('touchstart', checkPointerDown, {\n capture: true,\n passive: false\n });\n doc.addEventListener('click', checkClick, {\n capture: true,\n passive: false\n });\n doc.addEventListener('keydown', checkKey, {\n capture: true,\n passive: false\n });\n return trap;\n };\n var removeListeners = function removeListeners() {\n if (!state.active) {\n return;\n }\n doc.removeEventListener('focusin', checkFocusIn, true);\n doc.removeEventListener('mousedown', checkPointerDown, true);\n doc.removeEventListener('touchstart', checkPointerDown, true);\n doc.removeEventListener('click', checkClick, true);\n doc.removeEventListener('keydown', checkKey, true);\n return trap;\n };\n\n //\n // MUTATION OBSERVER\n //\n\n var checkDomRemoval = function checkDomRemoval(mutations) {\n var isFocusedNodeRemoved = mutations.some(function (mutation) {\n var removedNodes = Array.from(mutation.removedNodes);\n return removedNodes.some(function (node) {\n return node === state.mostRecentlyFocusedNode;\n });\n });\n\n // If the currently focused is removed then browsers will move focus to the\n // element. If this happens, try to move focus back into the trap.\n if (isFocusedNodeRemoved) {\n tryFocus(getInitialFocusNode());\n }\n };\n\n // Use MutationObserver - if supported - to detect if focused node is removed\n // from the DOM.\n var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;\n var updateObservedNodes = function updateObservedNodes() {\n if (!mutationObserver) {\n return;\n }\n mutationObserver.disconnect();\n if (state.active && !state.paused) {\n state.containers.map(function (container) {\n mutationObserver.observe(container, {\n subtree: true,\n childList: true\n });\n });\n }\n };\n\n //\n // TRAP DEFINITION\n //\n\n trap = {\n get active() {\n return state.active;\n },\n get paused() {\n return state.paused;\n },\n activate: function activate(activateOptions) {\n if (state.active) {\n return this;\n }\n var onActivate = getOption(activateOptions, 'onActivate');\n var onPostActivate = getOption(activateOptions, 'onPostActivate');\n var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');\n if (!checkCanFocusTrap) {\n updateTabbableNodes();\n }\n state.active = true;\n state.paused = false;\n state.nodeFocusedBeforeActivation = doc.activeElement;\n onActivate === null || onActivate === void 0 ? void 0 : onActivate();\n var finishActivation = function finishActivation() {\n if (checkCanFocusTrap) {\n updateTabbableNodes();\n }\n addListeners();\n updateObservedNodes();\n onPostActivate === null || onPostActivate === void 0 ? void 0 : onPostActivate();\n };\n if (checkCanFocusTrap) {\n checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);\n return this;\n }\n finishActivation();\n return this;\n },\n deactivate: function deactivate(deactivateOptions) {\n if (!state.active) {\n return this;\n }\n var options = _objectSpread2({\n onDeactivate: config.onDeactivate,\n onPostDeactivate: config.onPostDeactivate,\n checkCanReturnFocus: config.checkCanReturnFocus\n }, deactivateOptions);\n clearTimeout(state.delayInitialFocusTimer); // noop if undefined\n state.delayInitialFocusTimer = undefined;\n removeListeners();\n state.active = false;\n state.paused = false;\n updateObservedNodes();\n activeFocusTraps.deactivateTrap(trapStack, trap);\n var onDeactivate = getOption(options, 'onDeactivate');\n var onPostDeactivate = getOption(options, 'onPostDeactivate');\n var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');\n var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');\n onDeactivate === null || onDeactivate === void 0 ? void 0 : onDeactivate();\n var finishDeactivation = function finishDeactivation() {\n delay(function () {\n if (returnFocus) {\n tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));\n }\n onPostDeactivate === null || onPostDeactivate === void 0 ? void 0 : onPostDeactivate();\n });\n };\n if (returnFocus && checkCanReturnFocus) {\n checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);\n return this;\n }\n finishDeactivation();\n return this;\n },\n pause: function pause(pauseOptions) {\n if (state.paused || !state.active) {\n return this;\n }\n var onPause = getOption(pauseOptions, 'onPause');\n var onPostPause = getOption(pauseOptions, 'onPostPause');\n state.paused = true;\n onPause === null || onPause === void 0 ? void 0 : onPause();\n removeListeners();\n updateObservedNodes();\n onPostPause === null || onPostPause === void 0 ? void 0 : onPostPause();\n return this;\n },\n unpause: function unpause(unpauseOptions) {\n if (!state.paused || !state.active) {\n return this;\n }\n var onUnpause = getOption(unpauseOptions, 'onUnpause');\n var onPostUnpause = getOption(unpauseOptions, 'onPostUnpause');\n state.paused = false;\n onUnpause === null || onUnpause === void 0 ? void 0 : onUnpause();\n updateTabbableNodes();\n addListeners();\n updateObservedNodes();\n onPostUnpause === null || onPostUnpause === void 0 ? void 0 : onPostUnpause();\n return this;\n },\n updateContainerElements: function updateContainerElements(containerElements) {\n var elementsAsArray = [].concat(containerElements).filter(Boolean);\n state.containers = elementsAsArray.map(function (element) {\n return typeof element === 'string' ? doc.querySelector(element) : element;\n });\n if (state.active) {\n updateTabbableNodes();\n }\n updateObservedNodes();\n return this;\n }\n };\n\n // initialize container elements\n trap.updateContainerElements(elements);\n return trap;\n};\n\nexport { createFocusTrap };\n//# sourceMappingURL=focus-trap.esm.js.map\n","/*!\n* tabbable 6.1.2\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.}\n */\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\nvar getTabindex = function getTabindex(node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome,
,