{"version":3,"file":"navbar.Dnkj42B4.js","sources":["../../node_modules/wicg-inert/dist/inert.esm.js","../ts/modules/navbar-toggle.ts","../ts/modules/slide-toggle.ts","../ts/navbar.ts"],"sourcesContent":["var _createClass = function () { function 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, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/**\n * This work is licensed under the W3C Software and Document License\n * (http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).\n */\n\n(function () {\n // Return early if we're not running inside of the browser.\n if (typeof window === 'undefined' || typeof Element === 'undefined') {\n return;\n }\n\n // Convenience function for converting NodeLists.\n /** @type {typeof Array.prototype.slice} */\n var slice = Array.prototype.slice;\n\n /**\n * IE has a non-standard name for \"matches\".\n * @type {typeof Element.prototype.matches}\n */\n var matches = Element.prototype.matches || Element.prototype.msMatchesSelector;\n\n /** @type {string} */\n var _focusableElementsString = ['a[href]', 'area[href]', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'details', 'summary', 'iframe', 'object', 'embed', 'video', '[contenteditable]'].join(',');\n\n /**\n * `InertRoot` manages a single inert subtree, i.e. a DOM subtree whose root element has an `inert`\n * attribute.\n *\n * Its main functions are:\n *\n * - to create and maintain a set of managed `InertNode`s, including when mutations occur in the\n * subtree. The `makeSubtreeUnfocusable()` method handles collecting `InertNode`s via registering\n * each focusable node in the subtree with the singleton `InertManager` which manages all known\n * focusable nodes within inert subtrees. `InertManager` ensures that a single `InertNode`\n * instance exists for each focusable node which has at least one inert root as an ancestor.\n *\n * - to notify all managed `InertNode`s when this subtree stops being inert (i.e. when the `inert`\n * attribute is removed from the root node). This is handled in the destructor, which calls the\n * `deregister` method on `InertManager` for each managed inert node.\n */\n\n var InertRoot = function () {\n /**\n * @param {!HTMLElement} rootElement The HTMLElement at the root of the inert subtree.\n * @param {!InertManager} inertManager The global singleton InertManager object.\n */\n function InertRoot(rootElement, inertManager) {\n _classCallCheck(this, InertRoot);\n\n /** @type {!InertManager} */\n this._inertManager = inertManager;\n\n /** @type {!HTMLElement} */\n this._rootElement = rootElement;\n\n /**\n * @type {!Set}\n * All managed focusable nodes in this InertRoot's subtree.\n */\n this._managedNodes = new Set();\n\n // Make the subtree hidden from assistive technology\n if (this._rootElement.hasAttribute('aria-hidden')) {\n /** @type {?string} */\n this._savedAriaHidden = this._rootElement.getAttribute('aria-hidden');\n } else {\n this._savedAriaHidden = null;\n }\n this._rootElement.setAttribute('aria-hidden', 'true');\n\n // Make all focusable elements in the subtree unfocusable and add them to _managedNodes\n this._makeSubtreeUnfocusable(this._rootElement);\n\n // Watch for:\n // - any additions in the subtree: make them unfocusable too\n // - any removals from the subtree: remove them from this inert root's managed nodes\n // - attribute changes: if `tabindex` is added, or removed from an intrinsically focusable\n // element, make that node a managed node.\n this._observer = new MutationObserver(this._onMutation.bind(this));\n this._observer.observe(this._rootElement, { attributes: true, childList: true, subtree: true });\n }\n\n /**\n * Call this whenever this object is about to become obsolete. This unwinds all of the state\n * stored in this object and updates the state of all of the managed nodes.\n */\n\n\n _createClass(InertRoot, [{\n key: 'destructor',\n value: function destructor() {\n this._observer.disconnect();\n\n if (this._rootElement) {\n if (this._savedAriaHidden !== null) {\n this._rootElement.setAttribute('aria-hidden', this._savedAriaHidden);\n } else {\n this._rootElement.removeAttribute('aria-hidden');\n }\n }\n\n this._managedNodes.forEach(function (inertNode) {\n this._unmanageNode(inertNode.node);\n }, this);\n\n // Note we cast the nulls to the ANY type here because:\n // 1) We want the class properties to be declared as non-null, or else we\n // need even more casts throughout this code. All bets are off if an\n // instance has been destroyed and a method is called.\n // 2) We don't want to cast \"this\", because we want type-aware optimizations\n // to know which properties we're setting.\n this._observer = /** @type {?} */null;\n this._rootElement = /** @type {?} */null;\n this._managedNodes = /** @type {?} */null;\n this._inertManager = /** @type {?} */null;\n }\n\n /**\n * @return {!Set} A copy of this InertRoot's managed nodes set.\n */\n\n }, {\n key: '_makeSubtreeUnfocusable',\n\n\n /**\n * @param {!Node} startNode\n */\n value: function _makeSubtreeUnfocusable(startNode) {\n var _this2 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this2._visitNode(node);\n });\n\n var activeElement = document.activeElement;\n\n if (!document.body.contains(startNode)) {\n // startNode may be in shadow DOM, so find its nearest shadowRoot to get the activeElement.\n var node = startNode;\n /** @type {!ShadowRoot|undefined} */\n var root = undefined;\n while (node) {\n if (node.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {\n root = /** @type {!ShadowRoot} */node;\n break;\n }\n node = node.parentNode;\n }\n if (root) {\n activeElement = root.activeElement;\n }\n }\n if (startNode.contains(activeElement)) {\n activeElement.blur();\n // In IE11, if an element is already focused, and then set to tabindex=-1\n // calling blur() will not actually move the focus.\n // To work around this we call focus() on the body instead.\n if (activeElement === document.activeElement) {\n document.body.focus();\n }\n }\n }\n\n /**\n * @param {!Node} node\n */\n\n }, {\n key: '_visitNode',\n value: function _visitNode(node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */node;\n\n // If a descendant inert root becomes un-inert, its descendants will still be inert because of\n // this inert root, so all of its managed nodes need to be adopted by this InertRoot.\n if (element !== this._rootElement && element.hasAttribute('inert')) {\n this._adoptInertRoot(element);\n }\n\n if (matches.call(element, _focusableElementsString) || element.hasAttribute('tabindex')) {\n this._manageNode(element);\n }\n }\n\n /**\n * Register the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_manageNode',\n value: function _manageNode(node) {\n var inertNode = this._inertManager.register(node, this);\n this._managedNodes.add(inertNode);\n }\n\n /**\n * Unregister the given node with this InertRoot and with InertManager.\n * @param {!Node} node\n */\n\n }, {\n key: '_unmanageNode',\n value: function _unmanageNode(node) {\n var inertNode = this._inertManager.deregister(node, this);\n if (inertNode) {\n this._managedNodes['delete'](inertNode);\n }\n }\n\n /**\n * Unregister the entire subtree starting at `startNode`.\n * @param {!Node} startNode\n */\n\n }, {\n key: '_unmanageSubtree',\n value: function _unmanageSubtree(startNode) {\n var _this3 = this;\n\n composedTreeWalk(startNode, function (node) {\n return _this3._unmanageNode(node);\n });\n }\n\n /**\n * If a descendant node is found with an `inert` attribute, adopt its managed nodes.\n * @param {!HTMLElement} node\n */\n\n }, {\n key: '_adoptInertRoot',\n value: function _adoptInertRoot(node) {\n var inertSubroot = this._inertManager.getInertRoot(node);\n\n // During initialisation this inert root may not have been registered yet,\n // so register it now if need be.\n if (!inertSubroot) {\n this._inertManager.setInert(node, true);\n inertSubroot = this._inertManager.getInertRoot(node);\n }\n\n inertSubroot.managedNodes.forEach(function (savedInertNode) {\n this._manageNode(savedInertNode.node);\n }, this);\n }\n\n /**\n * Callback used when mutation observer detects subtree additions, removals, or attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_onMutation',\n value: function _onMutation(records, self) {\n records.forEach(function (record) {\n var target = /** @type {!HTMLElement} */record.target;\n if (record.type === 'childList') {\n // Manage added nodes\n slice.call(record.addedNodes).forEach(function (node) {\n this._makeSubtreeUnfocusable(node);\n }, this);\n\n // Un-manage removed nodes\n slice.call(record.removedNodes).forEach(function (node) {\n this._unmanageSubtree(node);\n }, this);\n } else if (record.type === 'attributes') {\n if (record.attributeName === 'tabindex') {\n // Re-initialise inert node if tabindex changes\n this._manageNode(target);\n } else if (target !== this._rootElement && record.attributeName === 'inert' && target.hasAttribute('inert')) {\n // If a new inert root is added, adopt its managed nodes and make sure it knows about the\n // already managed nodes from this inert subroot.\n this._adoptInertRoot(target);\n var inertSubroot = this._inertManager.getInertRoot(target);\n this._managedNodes.forEach(function (managedNode) {\n if (target.contains(managedNode.node)) {\n inertSubroot._manageNode(managedNode.node);\n }\n });\n }\n }\n }, this);\n }\n }, {\n key: 'managedNodes',\n get: function get() {\n return new Set(this._managedNodes);\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'hasSavedAriaHidden',\n get: function get() {\n return this._savedAriaHidden !== null;\n }\n\n /** @param {?string} ariaHidden */\n\n }, {\n key: 'savedAriaHidden',\n set: function set(ariaHidden) {\n this._savedAriaHidden = ariaHidden;\n }\n\n /** @return {?string} */\n ,\n get: function get() {\n return this._savedAriaHidden;\n }\n }]);\n\n return InertRoot;\n }();\n\n /**\n * `InertNode` initialises and manages a single inert node.\n * A node is inert if it is a descendant of one or more inert root elements.\n *\n * On construction, `InertNode` saves the existing `tabindex` value for the node, if any, and\n * either removes the `tabindex` attribute or sets it to `-1`, depending on whether the element\n * is intrinsically focusable or not.\n *\n * `InertNode` maintains a set of `InertRoot`s which are descendants of this `InertNode`. When an\n * `InertRoot` is destroyed, and calls `InertManager.deregister()`, the `InertManager` notifies the\n * `InertNode` via `removeInertRoot()`, which in turn destroys the `InertNode` if no `InertRoot`s\n * remain in the set. On destruction, `InertNode` reinstates the stored `tabindex` if one exists,\n * or removes the `tabindex` attribute if the element is intrinsically focusable.\n */\n\n\n var InertNode = function () {\n /**\n * @param {!Node} node A focusable element to be made inert.\n * @param {!InertRoot} inertRoot The inert root element associated with this inert node.\n */\n function InertNode(node, inertRoot) {\n _classCallCheck(this, InertNode);\n\n /** @type {!Node} */\n this._node = node;\n\n /** @type {boolean} */\n this._overrodeFocusMethod = false;\n\n /**\n * @type {!Set} The set of descendant inert roots.\n * If and only if this set becomes empty, this node is no longer inert.\n */\n this._inertRoots = new Set([inertRoot]);\n\n /** @type {?number} */\n this._savedTabIndex = null;\n\n /** @type {boolean} */\n this._destroyed = false;\n\n // Save any prior tabindex info and make this node untabbable\n this.ensureUntabbable();\n }\n\n /**\n * Call this whenever this object is about to become obsolete.\n * This makes the managed node focusable again and deletes all of the previously stored state.\n */\n\n\n _createClass(InertNode, [{\n key: 'destructor',\n value: function destructor() {\n this._throwIfDestroyed();\n\n if (this._node && this._node.nodeType === Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */this._node;\n if (this._savedTabIndex !== null) {\n element.setAttribute('tabindex', this._savedTabIndex);\n } else {\n element.removeAttribute('tabindex');\n }\n\n // Use `delete` to restore native focus method.\n if (this._overrodeFocusMethod) {\n delete element.focus;\n }\n }\n\n // See note in InertRoot.destructor for why we cast these nulls to ANY.\n this._node = /** @type {?} */null;\n this._inertRoots = /** @type {?} */null;\n this._destroyed = true;\n }\n\n /**\n * @type {boolean} Whether this object is obsolete because the managed node is no longer inert.\n * If the object has been destroyed, any attempt to access it will cause an exception.\n */\n\n }, {\n key: '_throwIfDestroyed',\n\n\n /**\n * Throw if user tries to access destroyed InertNode.\n */\n value: function _throwIfDestroyed() {\n if (this.destroyed) {\n throw new Error('Trying to access destroyed InertNode');\n }\n }\n\n /** @return {boolean} */\n\n }, {\n key: 'ensureUntabbable',\n\n\n /** Save the existing tabindex value and make the node untabbable and unfocusable */\n value: function ensureUntabbable() {\n if (this.node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var element = /** @type {!HTMLElement} */this.node;\n if (matches.call(element, _focusableElementsString)) {\n if ( /** @type {!HTMLElement} */element.tabIndex === -1 && this.hasSavedTabIndex) {\n return;\n }\n\n if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n }\n element.setAttribute('tabindex', '-1');\n if (element.nodeType === Node.ELEMENT_NODE) {\n element.focus = function () {};\n this._overrodeFocusMethod = true;\n }\n } else if (element.hasAttribute('tabindex')) {\n this._savedTabIndex = /** @type {!HTMLElement} */element.tabIndex;\n element.removeAttribute('tabindex');\n }\n }\n\n /**\n * Add another inert root to this inert node's set of managing inert roots.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'addInertRoot',\n value: function addInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots.add(inertRoot);\n }\n\n /**\n * Remove the given inert root from this inert node's set of managing inert roots.\n * If the set of managing inert roots becomes empty, this node is no longer inert,\n * so the object should be destroyed.\n * @param {!InertRoot} inertRoot\n */\n\n }, {\n key: 'removeInertRoot',\n value: function removeInertRoot(inertRoot) {\n this._throwIfDestroyed();\n this._inertRoots['delete'](inertRoot);\n if (this._inertRoots.size === 0) {\n this.destructor();\n }\n }\n }, {\n key: 'destroyed',\n get: function get() {\n return (/** @type {!InertNode} */this._destroyed\n );\n }\n }, {\n key: 'hasSavedTabIndex',\n get: function get() {\n return this._savedTabIndex !== null;\n }\n\n /** @return {!Node} */\n\n }, {\n key: 'node',\n get: function get() {\n this._throwIfDestroyed();\n return this._node;\n }\n\n /** @param {?number} tabIndex */\n\n }, {\n key: 'savedTabIndex',\n set: function set(tabIndex) {\n this._throwIfDestroyed();\n this._savedTabIndex = tabIndex;\n }\n\n /** @return {?number} */\n ,\n get: function get() {\n this._throwIfDestroyed();\n return this._savedTabIndex;\n }\n }]);\n\n return InertNode;\n }();\n\n /**\n * InertManager is a per-document singleton object which manages all inert roots and nodes.\n *\n * When an element becomes an inert root by having an `inert` attribute set and/or its `inert`\n * property set to `true`, the `setInert` method creates an `InertRoot` object for the element.\n * The `InertRoot` in turn registers itself as managing all of the element's focusable descendant\n * nodes via the `register()` method. The `InertManager` ensures that a single `InertNode` instance\n * is created for each such node, via the `_managedNodes` map.\n */\n\n\n var InertManager = function () {\n /**\n * @param {!Document} document\n */\n function InertManager(document) {\n _classCallCheck(this, InertManager);\n\n if (!document) {\n throw new Error('Missing required argument; InertManager needs to wrap a document.');\n }\n\n /** @type {!Document} */\n this._document = document;\n\n /**\n * All managed nodes known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._managedNodes = new Map();\n\n /**\n * All inert roots known to this InertManager. In a map to allow looking up by Node.\n * @type {!Map}\n */\n this._inertRoots = new Map();\n\n /**\n * Observer for mutations on `document.body`.\n * @type {!MutationObserver}\n */\n this._observer = new MutationObserver(this._watchForInert.bind(this));\n\n // Add inert style.\n addInertStyle(document.head || document.body || document.documentElement);\n\n // Wait for document to be loaded.\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', this._onDocumentLoaded.bind(this));\n } else {\n this._onDocumentLoaded();\n }\n }\n\n /**\n * Set whether the given element should be an inert root or not.\n * @param {!HTMLElement} root\n * @param {boolean} inert\n */\n\n\n _createClass(InertManager, [{\n key: 'setInert',\n value: function setInert(root, inert) {\n if (inert) {\n if (this._inertRoots.has(root)) {\n // element is already inert\n return;\n }\n\n var inertRoot = new InertRoot(root, this);\n root.setAttribute('inert', '');\n this._inertRoots.set(root, inertRoot);\n // If not contained in the document, it must be in a shadowRoot.\n // Ensure inert styles are added there.\n if (!this._document.body.contains(root)) {\n var parent = root.parentNode;\n while (parent) {\n if (parent.nodeType === 11) {\n addInertStyle(parent);\n }\n parent = parent.parentNode;\n }\n }\n } else {\n if (!this._inertRoots.has(root)) {\n // element is already non-inert\n return;\n }\n\n var _inertRoot = this._inertRoots.get(root);\n _inertRoot.destructor();\n this._inertRoots['delete'](root);\n root.removeAttribute('inert');\n }\n }\n\n /**\n * Get the InertRoot object corresponding to the given inert root element, if any.\n * @param {!Node} element\n * @return {!InertRoot|undefined}\n */\n\n }, {\n key: 'getInertRoot',\n value: function getInertRoot(element) {\n return this._inertRoots.get(element);\n }\n\n /**\n * Register the given InertRoot as managing the given node.\n * In the case where the node has a previously existing inert root, this inert root will\n * be added to its set of inert roots.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {!InertNode} inertNode\n */\n\n }, {\n key: 'register',\n value: function register(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (inertNode !== undefined) {\n // node was already in an inert subtree\n inertNode.addInertRoot(inertRoot);\n } else {\n inertNode = new InertNode(node, inertRoot);\n }\n\n this._managedNodes.set(node, inertNode);\n\n return inertNode;\n }\n\n /**\n * De-register the given InertRoot as managing the given inert node.\n * Removes the inert root from the InertNode's set of managing inert roots, and remove the inert\n * node from the InertManager's set of managed nodes if it is destroyed.\n * If the node is not currently managed, this is essentially a no-op.\n * @param {!Node} node\n * @param {!InertRoot} inertRoot\n * @return {?InertNode} The potentially destroyed InertNode associated with this node, if any.\n */\n\n }, {\n key: 'deregister',\n value: function deregister(node, inertRoot) {\n var inertNode = this._managedNodes.get(node);\n if (!inertNode) {\n return null;\n }\n\n inertNode.removeInertRoot(inertRoot);\n if (inertNode.destroyed) {\n this._managedNodes['delete'](node);\n }\n\n return inertNode;\n }\n\n /**\n * Callback used when document has finished loading.\n */\n\n }, {\n key: '_onDocumentLoaded',\n value: function _onDocumentLoaded() {\n // Find all inert roots in document and make them actually inert.\n var inertElements = slice.call(this._document.querySelectorAll('[inert]'));\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, this);\n\n // Comment this out to use programmatic API only.\n this._observer.observe(this._document.body || this._document.documentElement, { attributes: true, subtree: true, childList: true });\n }\n\n /**\n * Callback used when mutation observer detects attribute changes.\n * @param {!Array} records\n * @param {!MutationObserver} self\n */\n\n }, {\n key: '_watchForInert',\n value: function _watchForInert(records, self) {\n var _this = this;\n records.forEach(function (record) {\n switch (record.type) {\n case 'childList':\n slice.call(record.addedNodes).forEach(function (node) {\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return;\n }\n var inertElements = slice.call(node.querySelectorAll('[inert]'));\n if (matches.call(node, '[inert]')) {\n inertElements.unshift(node);\n }\n inertElements.forEach(function (inertElement) {\n this.setInert(inertElement, true);\n }, _this);\n }, _this);\n break;\n case 'attributes':\n if (record.attributeName !== 'inert') {\n return;\n }\n var target = /** @type {!HTMLElement} */record.target;\n var inert = target.hasAttribute('inert');\n _this.setInert(target, inert);\n break;\n }\n }, this);\n }\n }]);\n\n return InertManager;\n }();\n\n /**\n * Recursively walk the composed tree from |node|.\n * @param {!Node} node\n * @param {(function (!HTMLElement))=} callback Callback to be called for each element traversed,\n * before descending into child nodes.\n * @param {?ShadowRoot=} shadowRootAncestor The nearest ShadowRoot ancestor, if any.\n */\n\n\n function composedTreeWalk(node, callback, shadowRootAncestor) {\n if (node.nodeType == Node.ELEMENT_NODE) {\n var element = /** @type {!HTMLElement} */node;\n if (callback) {\n callback(element);\n }\n\n // Descend into node:\n // If it has a ShadowRoot, ignore all child elements - these will be picked\n // up by the or elements. Descend straight into the\n // ShadowRoot.\n var shadowRoot = /** @type {!HTMLElement} */element.shadowRoot;\n if (shadowRoot) {\n composedTreeWalk(shadowRoot, callback, shadowRoot);\n return;\n }\n\n // If it is a element, descend into distributed elements - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'content') {\n var content = /** @type {!HTMLContentElement} */element;\n // Verifies if ShadowDom v0 is supported.\n var distributedNodes = content.getDistributedNodes ? content.getDistributedNodes() : [];\n for (var i = 0; i < distributedNodes.length; i++) {\n composedTreeWalk(distributedNodes[i], callback, shadowRootAncestor);\n }\n return;\n }\n\n // If it is a element, descend into assigned nodes - these\n // are elements from outside the shadow root which are rendered inside the\n // shadow DOM.\n if (element.localName == 'slot') {\n var slot = /** @type {!HTMLSlotElement} */element;\n // Verify if ShadowDom v1 is supported.\n var _distributedNodes = slot.assignedNodes ? slot.assignedNodes({ flatten: true }) : [];\n for (var _i = 0; _i < _distributedNodes.length; _i++) {\n composedTreeWalk(_distributedNodes[_i], callback, shadowRootAncestor);\n }\n return;\n }\n }\n\n // If it is neither the parent of a ShadowRoot, a element, a \n // element, nor a element recurse normally.\n var child = node.firstChild;\n while (child != null) {\n composedTreeWalk(child, callback, shadowRootAncestor);\n child = child.nextSibling;\n }\n }\n\n /**\n * Adds a style element to the node containing the inert specific styles\n * @param {!Node} node\n */\n function addInertStyle(node) {\n if (node.querySelector('style#inert-style, link#inert-style')) {\n return;\n }\n var style = document.createElement('style');\n style.setAttribute('id', 'inert-style');\n style.textContent = '\\n' + '[inert] {\\n' + ' pointer-events: none;\\n' + ' cursor: default;\\n' + '}\\n' + '\\n' + '[inert], [inert] * {\\n' + ' -webkit-user-select: none;\\n' + ' -moz-user-select: none;\\n' + ' -ms-user-select: none;\\n' + ' user-select: none;\\n' + '}\\n';\n node.appendChild(style);\n }\n\n if (!HTMLElement.prototype.hasOwnProperty('inert')) {\n /** @type {!InertManager} */\n var inertManager = new InertManager(document);\n\n Object.defineProperty(HTMLElement.prototype, 'inert', {\n enumerable: true,\n /** @this {!HTMLElement} */\n get: function get() {\n return this.hasAttribute('inert');\n },\n /** @this {!HTMLElement} */\n set: function set(inert) {\n inertManager.setInert(this, inert);\n }\n });\n }\n})();\n","import { requestIdleCallbackShim } from \"./utility\";\r\n\r\n/**\r\n * The mobile nav menu. Just adds a class and changes the aria attribute.\r\n * Fairly simple\r\n */\r\nexport class NavbarToggle {\r\n private navButton$ = $(\".hamburger\");\r\n private navMenu$ = $(\".navbar-nav\");\r\n\r\n constructor() {\r\n if (this.navButton$.length) {\r\n this.navButton$.on(\"click\", () => {\r\n if (!this.navMenu$.hasClass('nav-open')) {\r\n this.navMenu$.addClass('nav-open');\r\n } else {\r\n this.navMenu$.removeClass('nav-open');\r\n }\r\n\r\n this.handleToggle();\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Manually close the navbar. This can be used anywhere\r\n */\r\n public closeNavbar() {\r\n if (this.navMenu$.length && this.navMenu$.hasClass(\"nav-open\")) {\r\n this.navMenu$.removeClass(\"nav-open\");\r\n this.handleToggle(true);\r\n }\r\n }\r\n\r\n /**\r\n * Set the inert attribute to true. This hides the menu from screen readers\r\n */\r\n public setInert() {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = (Element.prototype as any).msMatchesSelector;\r\n }\r\n\r\n requestIdleCallbackShim();\r\n\r\n (window as any).requestIdleCallback(() => {\r\n this.navMenu$.prop('inert', 'true')\r\n });\r\n }\r\n\r\n /**\r\n * Set the inert attribute to false. This shows the menu in screen readers.\r\n */\r\n public unsetInert() {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = (Element.prototype as any).msMatchesSelector;\r\n }\r\n\r\n requestIdleCallbackShim();\r\n\r\n (window as any).requestIdleCallback(() => {\r\n this.navMenu$.removeAttr('inert');\r\n });\r\n }\r\n\r\n /**\r\n * Set the aria-expanded\r\n * @param collapse boolean\r\n */\r\n private handleToggle(collapse = false) {\r\n if (collapse || this.navButton$.attr(\"aria-expanded\") === \"true\") {\r\n this.navButton$.attr(\"aria-expanded\", \"false\");\r\n this.navMenu$.trigger('nav-closed');\r\n this.setInert();\r\n } else {\r\n this.navButton$.attr(\"aria-expanded\", \"true\");\r\n this.navMenu$.trigger('nav-opened');\r\n this.unsetInert();\r\n\r\n // Have to delay because of inert\r\n setTimeout(() => {\r\n $('.nav-link').trigger('focus');\r\n }, 100);\r\n }\r\n }\r\n}\r\n","import { requestIdleCallbackShim } from \"./utility\";\r\n\r\n/**\r\n * Allows elements to animate in from the top of the screen.\r\n * Mostly used in the navbar, but can be used anywhere if things should come from the top.\r\n *\r\n * There needs to be an initiator (ex: button) and then the slidey element.\r\n * The initiator should have a class of 'js-slide-control' and the slidey should have a class of slide-element.\r\n */\r\nexport class SlideToggle {\r\n private slideToggles$ = $(\".js-slide-control\");\r\n private slideTarget$: JQuery | null = null;\r\n private currentToggle: HTMLElement | null = null;\r\n\r\n constructor() {\r\n this.handleClose = this.handleClose.bind(this);\r\n\r\n this.attachSlide();\r\n }\r\n\r\n /**\r\n * Close all dem slides\r\n */\r\n public closeAll() {\r\n this.slideToggles$.each((_, slideToggle) => {\r\n\r\n const target = $(`#${slideToggle.dataset.slideTarget}`);\r\n\r\n this.slideClose(target, slideToggle);\r\n })\r\n }\r\n\r\n /**\r\n * Attach the event to the initiator element.\r\n */\r\n private attachSlide() {\r\n this.slideToggles$.each((_, toggle) => {\r\n toggle.addEventListener(\"click\", () => {\r\n this.currentToggle = toggle;\r\n this.determineSlide();\r\n });\r\n })\r\n\r\n }\r\n\r\n /**\r\n * Determine whether the element needs to slide up or down.\r\n */\r\n private determineSlide() {\r\n this.slideTarget$ = $(`#${this.currentToggle?.dataset.slideTarget}`);\r\n\r\n if (this.slideTarget$.hasClass(\"slide-open\")) {\r\n this.slideClose();\r\n } else {\r\n this.slideOpen();\r\n }\r\n }\r\n\r\n /**\r\n * Slide the element down and set the aria-expanded to true.\r\n */\r\n private slideOpen() {\r\n if (this.slideTarget$) {\r\n // Emit an event specific to the slidey target\r\n this.slideTarget$.trigger('slide-opening');\r\n\r\n this.closeOthers();\r\n this.slideTarget$.addClass(\"slide-open\");\r\n this.currentToggle!.setAttribute(\"aria-expanded\", \"true\");\r\n this.attachClose();\r\n\r\n this.slideTarget$.trigger('slide-opened');\r\n\r\n this.unsetInert(this.slideTarget$);\r\n }\r\n }\r\n\r\n /**\r\n * Closes the slide element. Takes optional target and toggle options. Useful when closing from external trigger.\r\n * @param slideTarget HTMLElement | null\r\n * @param currentToggle HTMLElement | null\r\n */\r\n private slideClose(slideTarget = this.slideTarget$, currentToggle = this.currentToggle) {\r\n if (slideTarget) {\r\n slideTarget.trigger(\"slide-closing\");\r\n\r\n slideTarget.removeClass(\"slide-open\");\r\n currentToggle!.setAttribute(\"aria-expanded\", \"false\");\r\n this.removeClose();\r\n\r\n slideTarget.trigger(\"slide-closed\");\r\n\r\n this.setInert(slideTarget);\r\n }\r\n }\r\n\r\n /**\r\n * Only allow one slidey thing to be slided down. Calls slide up to handle sliding everything up.\r\n */\r\n private closeOthers() {\r\n // Call the element that is currently open.\r\n const slideTarget$ = $(\".slide-open\");\r\n\r\n if (slideTarget$?.length > 0) {\r\n // Grab the id of the open element and grab the initiator element based on the data attribute.\r\n const slideId = slideTarget$.prop('id');\r\n const currentToggles$ = $(`.js-slide-control[data-slide-target=\"${slideId}\"]`);\r\n\r\n // Make sure all the aria-expanded attributes are set to false. Lookin at you account icon.\r\n currentToggles$.each((_, currentToggle) => {\r\n this.slideClose(slideTarget$, currentToggle);\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * The slide elements can also be closed by clicking on the body or using the esc key. This handles that logic\r\n */\r\n private handleClose(e: JQuery.Event) {\r\n const slideTarget$ = $(\".slide-open\");\r\n const slideId = slideTarget$.attr(\"id\");\r\n const currentToggles$ = $(`.js-slide-control[data-slide-target=\"${slideId}\"]`);\r\n\r\n if (e.type === \"click\") {\r\n currentToggles$.each((_, currentToggle) => {\r\n this.slideClose(slideTarget$, currentToggle);\r\n });\r\n }\r\n\r\n if (e.key === 'Enter') {\r\n currentToggles$.each((_, currentToggle) => {\r\n this.slideClose(slideTarget$, currentToggle);\r\n })\r\n }\r\n }\r\n\r\n /**\r\n * Set the inert attribute to true. This hides the dropdowns from screen readers\r\n */\r\n private setInert(slideTarget: JQuery) {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = (Element.prototype as any).msMatchesSelector;\r\n }\r\n\r\n requestIdleCallbackShim();\r\n\r\n (window as any).requestIdleCallback(() => slideTarget.attr(\"inert\", \"true\"));\r\n }\r\n\r\n /**\r\n * Set the inert attribute to false. This shows the dropdown in screen readers.\r\n */\r\n private unsetInert(slideTarget: JQuery) {\r\n if (!Element.prototype.matches) {\r\n Element.prototype.matches = (Element.prototype as any).msMatchesSelector;\r\n }\r\n\r\n requestIdleCallbackShim();\r\n\r\n (window as any).requestIdleCallback(() => slideTarget.removeAttr('inert'));\r\n }\r\n\r\n /**\r\n * Attach the extra close event handlers\r\n */\r\n private attachClose() {\r\n $('main').on('click', this.handleClose);\r\n $(document.body).on('keyup', this.handleClose);\r\n }\r\n\r\n /**\r\n * Clean up and remove the event handlers once we're done\r\n */\r\n private removeClose() {\r\n $('main').off('click', this.handleClose);\r\n $(document.body).off('keyup', this.handleClose);\r\n }\r\n}\r\n","import \"wicg-inert\";\r\nimport { NavbarToggle } from \"./modules/navbar-toggle\";\r\nimport { SlideToggle } from \"./modules/slide-toggle\";\r\nimport { mobileWidth } from \"./modules/utility\";\r\n\r\n// Init all the slide downs\r\nconst slideToggle = new SlideToggle();\r\nlet mobileNavbar: NavbarToggle;\r\n\r\n// Set the true if mobile nav has run. That way we can stop checking\r\nlet mobileNavSetup = false;\r\n\r\n/**\r\n * Setup the mobile nav if the width matches\r\n */\r\nfunction setupMobileNav() {\r\n const navbarMenu$ = $('.navbar-nav');\r\n\r\n if (mobileWidth.matches) {\r\n // This should only run the first time things are set up\r\n if (!mobileNavSetup) {\r\n mobileNavbar = new NavbarToggle();\r\n\r\n navbarMenu$.on(\"nav-opened\", () => slideToggle.closeAll()); // Close search wrap\r\n }\r\n\r\n // Set this later so there isn't a flash of menu on resize\r\n navbarMenu$.addClass(\"navbar-transition\");\r\n\r\n // Manually set inert if on mobile\r\n mobileNavbar.setInert();\r\n\r\n mobileNavSetup = true;\r\n }\r\n\r\n // This should only run if the mobile nav has been set up at some point\r\n if (!mobileWidth.matches && mobileNavSetup) {\r\n navbarMenu$.removeClass(\"navbar-transition\");\r\n mobileNavbar.unsetInert();\r\n }\r\n}\r\n\r\nconst delay = 100;\r\nlet resizeTaskId: NodeJS.Timeout | null = null;\r\n\r\n/**\r\n * Use this to debounce the resize check\r\n */\r\nfunction debounceMobileNav() {\r\n if (resizeTaskId !== null) {\r\n clearTimeout(resizeTaskId);\r\n }\r\n\r\n resizeTaskId = setTimeout(() => {\r\n resizeTaskId = null;\r\n setupMobileNav();\r\n }, delay);\r\n}\r\n\r\nsetupMobileNav();\r\n\r\n// Make sure the mobile works on resize\r\nwindow.addEventListener(\"resize\", debounceMobileNav, { passive: true });\r\n"],"names":["_createClass","defineProperties","target","props","i","descriptor","Constructor","protoProps","staticProps","_classCallCheck","instance","slice","matches","_focusableElementsString","InertRoot","rootElement","inertManager","inertNode","startNode","_this2","composedTreeWalk","node","activeElement","root","element","_this3","inertSubroot","savedInertNode","records","self","record","managedNode","ariaHidden","InertNode","inertRoot","tabIndex","InertManager","document","addInertStyle","inert","parent","_inertRoot","inertElements","inertElement","_this","callback","shadowRootAncestor","shadowRoot","content","distributedNodes","slot","_distributedNodes","_i","child","style","NavbarToggle","requestIdleCallbackShim","collapse","SlideToggle","_","slideToggle","toggle","slideTarget","currentToggle","slideTarget$","slideId","e","currentToggles$","mobileNavbar","mobileNavSetup","setupMobileNav","navbarMenu$","mobileWidth","delay","resizeTaskId","debounceMobileNav"],"mappings":"8DAAA,IAAIA,EAAe,UAAY,CAAE,SAASC,EAAiBC,EAAQC,EAAO,CAAE,QAASC,EAAI,EAAGA,EAAID,EAAM,OAAQC,IAAK,CAAE,IAAIC,EAAaF,EAAMC,CAAC,EAAGC,EAAW,WAAaA,EAAW,YAAc,GAAOA,EAAW,aAAe,GAAU,UAAWA,IAAYA,EAAW,SAAW,IAAM,OAAO,eAAeH,EAAQG,EAAW,IAAKA,CAAU,CAAE,CAAI,CAAC,OAAO,SAAUC,EAAaC,EAAYC,EAAa,CAAE,OAAID,GAAYN,EAAiBK,EAAY,UAAWC,CAAU,EAAOC,GAAaP,EAAiBK,EAAaE,CAAW,EAAUF,CAAc,CAAG,EAAA,EAEjjB,SAASG,EAAgBC,EAAUJ,EAAa,CAAE,GAAI,EAAEI,aAAoBJ,GAAgB,MAAM,IAAI,UAAU,mCAAmC,CAAM,EAOxJ,UAAY,CAEX,GAAI,OAAO,OAAW,KAAe,OAAO,QAAY,IACtD,OAKF,IAAIK,EAAQ,MAAM,UAAU,MAMxBC,EAAU,QAAQ,UAAU,SAAW,QAAQ,UAAU,kBAGzDC,EAA2B,CAAC,UAAW,aAAc,wBAAyB,yBAA0B,2BAA4B,yBAA0B,UAAW,UAAW,SAAU,SAAU,QAAS,QAAS,mBAAmB,EAAE,KAAK,GAAG,EAmBvPC,EAAY,UAAY,CAK1B,SAASA,EAAUC,EAAaC,EAAc,CAC5CP,EAAgB,KAAMK,CAAS,EAG/B,KAAK,cAAgBE,EAGrB,KAAK,aAAeD,EAMpB,KAAK,cAAgB,IAAI,IAGrB,KAAK,aAAa,aAAa,aAAa,EAE9C,KAAK,iBAAmB,KAAK,aAAa,aAAa,aAAa,EAEpE,KAAK,iBAAmB,KAE1B,KAAK,aAAa,aAAa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