{"version":3,"file":"index.2a4a93e5.js","sources":["../../../frontend/contexts/Modal/ModalRoot/index.js","../../../frontend/contexts/Modal/ModalContext/index.js","../../../frontend/contexts/Modal/ModalProvider/index.js","../../../frontend/features/ideation/hooks/base/useScrollDisable.js","../../../frontend/features/common/hooks/useKeyListener.js","../../../node_modules/tabbable/dist/index.esm.js","../../../node_modules/focus-trap/dist/focus-trap.esm.js","../../../frontend/features/ideation/hooks/base/useFocusTrap.js","../../../frontend/features/ideation/components/base/BaseModal/index.js","../../../frontend/features/ideation/components/base/Modal/index.js"],"sourcesContent":["// Libraries\nimport PropTypes from 'prop-types';\n\nconst ModalRoot = ({ activeModal }) => {\n if (!activeModal) return null;\n\n return activeModal;\n};\n\nModalRoot.propTypes = {\n activeModal: PropTypes.node,\n setActiveModal: PropTypes.func.isRequired,\n};\n\nModalRoot.defaultProps = {\n activeModal: null,\n};\n\nexport default ModalRoot;\n","// Libraries\nimport { createContext } from 'react';\n\nexport default createContext({});\n","// Libraries\nimport React, { useState } from 'react';\nimport PropTypes from 'prop-types';\n\n// Root\nimport ModalRoot from 'contexts/Modal/ModalRoot';\n\n// Context\nimport ModalContext from 'contexts/Modal/ModalContext';\n\nconst ModalProvider = ({ children }) => {\n const [activeModal, setActiveModal] = useState();\n\n return (\n \n {children}\n \n \n );\n};\n\nModalProvider.propTypes = {\n children: PropTypes.node.isRequired,\n};\n\nexport default ModalProvider;\n","// Libraries\nimport { useEffect } from 'react';\n\nexport const useScrollDisable = () => {\n const htmlClassList = window.document.documentElement.classList;\n\n useEffect(() => {\n if (!htmlClassList) return null;\n htmlClassList.add('is-clipped');\n return () => {\n htmlClassList.remove('is-clipped');\n };\n }, []);\n};\n","// Libraries\nimport { useEffect } from 'react';\n\nexport const useKeyListener = (key, onKeyPress) => {\n const keyListener = (event) => {\n if (event.key === key) {\n onKeyPress(event);\n }\n };\n\n useEffect(() => {\n window.addEventListener('keydown', keyListener);\n return () => window.removeEventListener('keydown', keyListener);\n });\n};\n","/*!\n* tabbable 5.3.3\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\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 return element.getRootNode();\n} : function (element) {\n return element.ownerDocument;\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 */\n\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n\n candidates = candidates.filter(filter);\n return candidates;\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} CandidatesScope\n * @property {Element} scope contains inner candidates\n * @property {Element[]} candidates\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 CandidatesScope 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 */\n\n\nvar getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\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\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scope: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n } // iterate over shadow content if possible\n\n\n var shadowRoot = element.shadowRoot || // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);\n\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\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scope: 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\n return candidates;\n};\n\nvar getTabindex = function getTabindex(node, isScope) {\n if (node.tabIndex < 0) {\n // in Chrome,
,