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,YAAc,IAAI9F,GAAY,CACjCvK,QAAStM,KAAKrC,QACd+V,OACAqD,WACA/G,OAAQgM,EACRhF,iBAAkBhX,KAAKmc,YAE3B,CACF,CAOAA,UAAAA,CAAWS,GACT,MAAM,SAAE7F,GAAa/W,KAAKpC,SAG1BoC,KAAK0c,QAAQpC,YAAe,EAAIsC,EAAa,IAAM5c,KAAKsc,gBAExDtc,KAAK0c,QAAQxB,kBAGb,MAAM,KAAExH,EAAI,MAAEvC,GAAU4F,OACpBpe,IAAc+a,GAChBA,EAAK6G,oBAGH5hB,IAAcwY,GAChBA,EAAM8H,wBAEV,CAKA1lB,IAAAA,GACE,MAAM,KAAEmgB,GAAS1T,KAAKpC,UACd6J,WAAagF,MAAOoQ,IAAoB7c,KAAKjK,QAErDiK,KAAK0c,QAAU,IAAI5B,GAAQ,CACzBjJ,KAAM6B,EACN4G,YAAcpP,EAAYC,MAAMK,QAAWxL,KAAKsc,gBAAkB,IAClEvD,cAAe/Y,KAAKoc,4BAItBpc,KAAK0c,QAAQ/I,OAAO9V,SAASsT,IAC3B,MAAM,WAAErJ,EAAU,OAAEnH,GAAWwQ,EAEzB1E,EAAQ9L,EAAO1D,cAAc4f,GAC/B,OAASpQ,GACXA,EAAM/P,iBAAiB,SAAS,KAC9ByU,EAAM+H,OACNpR,EAAWuE,OAAO,GAEtB,IAGFrM,KAAKkc,iBACLhR,EAAYC,MAAMC,YAAYpL,KAAKkc,eACrC,GDpIAjf,cAAe,CACbyW,QACAsI,QACAjF,YACA9T,aAEFlN,QAAS,CACPgmB,cACAtU,eAIJ7K,EAAkBqf","sources":["webpack://sciencenews/./node_modules/js-cookie/src/js.cookie.js","webpack://sciencenews/./node_modules/memize/index.js","webpack://sciencenews/./node_modules/sprintf-js/src/sprintf.js","webpack://sciencenews/./client/src/components/nav-bar/chevron-down.svg","webpack://sciencenews/webpack/bootstrap","webpack://sciencenews/webpack/runtime/compat get default export","webpack://sciencenews/webpack/runtime/define property getters","webpack://sciencenews/webpack/runtime/hasOwnProperty shorthand","webpack://sciencenews/./node_modules/js-component-framework/es/domContentLoaded.js","webpack://sciencenews/./node_modules/js-component-framework/es/componentProvider.js","webpack://sciencenews/./node_modules/js-component-framework/es/componentLoader.js","webpack://sciencenews/./client/src/js/utils/getFormattedClassnames.js","webpack://sciencenews/./node_modules/@tannin/postfix/index.js","webpack://sciencenews/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://sciencenews/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://sciencenews/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://sciencenews/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://sciencenews/./node_modules/@wordpress/i18n/build-module/sprintf.js","webpack://sciencenews/./node_modules/@tannin/evaluate/index.js","webpack://sciencenews/./node_modules/tannin/index.js","webpack://sciencenews/./node_modules/@wordpress/i18n/build-module/create-i18n.js","webpack://sciencenews/./node_modules/@tannin/plural-forms/index.js","webpack://sciencenews/./node_modules/@tannin/compile/index.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/validateNamespace.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/validateHookName.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createAddHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createRemoveHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createHasHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createRunHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createCurrentHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createDoingHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createDidHook.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/index.js","webpack://sciencenews/./node_modules/@wordpress/hooks/build-module/createHooks.js","webpack://sciencenews/./node_modules/@babel/runtime/helpers/esm/classCallCheck.js","webpack://sciencenews/./node_modules/@wordpress/i18n/build-module/default-i18n.js","webpack://sciencenews/./client/src/js/a11y/lib/interactiveChildren.js","webpack://sciencenews/./client/src/js/a11y/Disclosure.js","webpack://sciencenews/./client/src/js/a11y/lib/uniqueId.js","webpack://sciencenews/./client/src/js/utils/getClassnameFromComponent.js","webpack://sciencenews/./client/src/js/utils/camelCaseString.js","webpack://sciencenews/./client/src/js/utils/getElementFromComponent.js","webpack://sciencenews/./client/src/js/utils/breakpoints.js","webpack://sciencenews/./client/src/components/header-search/index.js","webpack://sciencenews/./client/src/components/header-search/header-search.js","webpack://sciencenews/./client/src/js/a11y/lib/createScreenReaderText.js","webpack://sciencenews/./client/src/js/utils/FormAssemblySubmit.js","webpack://sciencenews/./client/src/components/form-assembly/index.js","webpack://sciencenews/./client/src/components/form-assembly/form-assembly.js","webpack://sciencenews/./client/src/components/snc-signup/index.js","webpack://sciencenews/./client/src/components/snc-signup/snc-signup.js","webpack://sciencenews/./client/src/components/cookie-banner/index.js","webpack://sciencenews/./client/src/components/cookie-banner/cookie-banner.js","webpack://sciencenews/./client/src/js/a11y/lib/keyCodes.js","webpack://sciencenews/./client/src/js/a11y/Popup.js","webpack://sciencenews/./client/src/js/a11y/MenuItem.js","webpack://sciencenews/./client/src/js/a11y/lib/rovingTabIndex.js","webpack://sciencenews/./client/src/js/a11y/Menu.js","webpack://sciencenews/./client/src/components/nav-bar-collapsed/index.js","webpack://sciencenews/./client/src/components/nav-bar/nav-bar.js","webpack://sciencenews/./client/src/js/utils/Throttle.js","webpack://sciencenews/./client/src/js/utils/PriorityNav.js","webpack://sciencenews/./node_modules/aria-components/src/AriaComponent.js","webpack://sciencenews/./node_modules/aria-components/src/lib/keyCodes.js","webpack://sciencenews/./node_modules/aria-components/src/lib/interactiveChildren.js","webpack://sciencenews/./node_modules/aria-components/src/lib/rovingTabIndex.js","webpack://sciencenews/./node_modules/aria-components/src/lib/uniqueId.js","webpack://sciencenews/./node_modules/aria-components/src/lib/getFirstAndLastItems.js","webpack://sciencenews/./node_modules/aria-components/src/Popup/index.js","webpack://sciencenews/./node_modules/aria-components/src/lib/Search.js","webpack://sciencenews/./node_modules/aria-components/src/Disclosure/index.js","webpack://sciencenews/./node_modules/aria-components/src/lib/isInstanceOf.js","webpack://sciencenews/./node_modules/aria-components/src/lib/nextPrevious.js","webpack://sciencenews/./node_modules/aria-components/src/Menu/index.js","webpack://sciencenews/./node_modules/aria-components/src/MenuBar/index.js","webpack://sciencenews/./client/src/components/snc-menu/index.js","webpack://sciencenews/./client/src/components/snc-menu/snc-menu.js"],"sourcesContent":["/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","/**\n * Memize options object.\n *\n * @typedef MemizeOptions\n *\n * @property {number} [maxSize] Maximum size of the cache.\n */\n\n/**\n * Internal cache entry.\n *\n * @typedef MemizeCacheNode\n *\n * @property {?MemizeCacheNode|undefined} [prev] Previous node.\n * @property {?MemizeCacheNode|undefined} [next] Next node.\n * @property {Array<*>} args Function arguments for cache\n * entry.\n * @property {*} val Function result.\n */\n\n/**\n * Properties of the enhanced function for controlling cache.\n *\n * @typedef MemizeMemoizedFunction\n *\n * @property {()=>void} clear Clear the cache.\n */\n\n/**\n * Accepts a function to be memoized, and returns a new memoized function, with\n * optional options.\n *\n * @template {Function} F\n *\n * @param {F} fn Function to memoize.\n * @param {MemizeOptions} [options] Options object.\n *\n * @return {F & MemizeMemoizedFunction} Memoized function.\n */\nfunction memize( fn, options ) {\n\tvar size = 0;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar head;\n\n\t/** @type {?MemizeCacheNode|undefined} */\n\tvar tail;\n\n\toptions = options || {};\n\n\tfunction memoized( /* ...args */ ) {\n\t\tvar node = head,\n\t\t\tlen = arguments.length,\n\t\t\targs, i;\n\n\t\tsearchCache: while ( node ) {\n\t\t\t// Perform a shallow equality test to confirm that whether the node\n\t\t\t// under test is a candidate for the arguments passed. Two arrays\n\t\t\t// are shallowly equal if their length matches and each entry is\n\t\t\t// strictly equal between the two sets. Avoid abstracting to a\n\t\t\t// function which could incur an arguments leaking deoptimization.\n\n\t\t\t// Check whether node arguments match arguments length\n\t\t\tif ( node.args.length !== arguments.length ) {\n\t\t\t\tnode = node.next;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Check whether node arguments match arguments values\n\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\tif ( node.args[ i ] !== arguments[ i ] ) {\n\t\t\t\t\tnode = node.next;\n\t\t\t\t\tcontinue searchCache;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// At this point we can assume we've found a match\n\n\t\t\t// Surface matched node to head if not already\n\t\t\tif ( node !== head ) {\n\t\t\t\t// As tail, shift to previous. Must only shift if not also\n\t\t\t\t// head, since if both head and tail, there is no previous.\n\t\t\t\tif ( node === tail ) {\n\t\t\t\t\ttail = node.prev;\n\t\t\t\t}\n\n\t\t\t\t// Adjust siblings to point to each other. If node was tail,\n\t\t\t\t// this also handles new tail's empty `next` assignment.\n\t\t\t\t/** @type {MemizeCacheNode} */ ( node.prev ).next = node.next;\n\t\t\t\tif ( node.next ) {\n\t\t\t\t\tnode.next.prev = node.prev;\n\t\t\t\t}\n\n\t\t\t\tnode.next = head;\n\t\t\t\tnode.prev = null;\n\t\t\t\t/** @type {MemizeCacheNode} */ ( head ).prev = node;\n\t\t\t\thead = node;\n\t\t\t}\n\n\t\t\t// Return immediately\n\t\t\treturn node.val;\n\t\t}\n\n\t\t// No cached value found. Continue to insertion phase:\n\n\t\t// Create a copy of arguments (avoid leaking deoptimization)\n\t\targs = new Array( len );\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\targs[ i ] = arguments[ i ];\n\t\t}\n\n\t\tnode = {\n\t\t\targs: args,\n\n\t\t\t// Generate the result from original function\n\t\t\tval: fn.apply( null, args ),\n\t\t};\n\n\t\t// Don't need to check whether node is already head, since it would\n\t\t// have been returned above already if it was\n\n\t\t// Shift existing head down list\n\t\tif ( head ) {\n\t\t\thead.prev = node;\n\t\t\tnode.next = head;\n\t\t} else {\n\t\t\t// If no head, follows that there's no tail (at initial or reset)\n\t\t\ttail = node;\n\t\t}\n\n\t\t// Trim tail if we're reached max size and are pending cache insertion\n\t\tif ( size === /** @type {MemizeOptions} */ ( options ).maxSize ) {\n\t\t\ttail = /** @type {MemizeCacheNode} */ ( tail ).prev;\n\t\t\t/** @type {MemizeCacheNode} */ ( tail ).next = null;\n\t\t} else {\n\t\t\tsize++;\n\t\t}\n\n\t\thead = node;\n\n\t\treturn node.val;\n\t}\n\n\tmemoized.clear = function() {\n\t\thead = null;\n\t\ttail = null;\n\t\tsize = 0;\n\t};\n\n\tif ( process.env.NODE_ENV === 'test' ) {\n\t\t// Cache is not exposed in the public API, but used in tests to ensure\n\t\t// expected list progression\n\t\tmemoized.getCache = function() {\n\t\t\treturn [ head, tail, size ];\n\t\t};\n\t}\n\n\t// Ignore reason: There's not a clear solution to create an intersection of\n\t// the function with additional properties, where the goal is to retain the\n\t// function signature of the incoming argument and add control properties\n\t// on the return value.\n\n\t// @ts-ignore\n\treturn memoized;\n}\n\nmodule.exports = memize;\n","/* global window, exports, define */\n\n!function() {\n 'use strict'\n\n var re = {\n not_string: /[^s]/,\n not_bool: /[^t]/,\n not_type: /[^T]/,\n not_primitive: /[^v]/,\n number: /[diefg]/,\n numeric_arg: /[bcdiefguxX]/,\n json: /[j]/,\n not_json: /[^j]/,\n text: /^[^\\x25]+/,\n modulo: /^\\x25{2}/,\n placeholder: /^\\x25(?:([1-9]\\d*)\\$|\\(([^)]+)\\))?(\\+)?(0|'[^$])?(-)?(\\d+)?(?:\\.(\\d+))?([b-gijostTuvxX])/,\n key: /^([a-z_][a-z_\\d]*)/i,\n key_access: /^\\.([a-z_][a-z_\\d]*)/i,\n index_access: /^\\[(\\d+)\\]/,\n sign: /^[+-]/\n }\n\n function sprintf(key) {\n // `arguments` is not an array, but should be fine for this call\n return sprintf_format(sprintf_parse(key), arguments)\n }\n\n function vsprintf(fmt, argv) {\n return sprintf.apply(null, [fmt].concat(argv || []))\n }\n\n function sprintf_format(parse_tree, argv) {\n var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign\n for (i = 0; i < tree_length; i++) {\n if (typeof parse_tree[i] === 'string') {\n output += parse_tree[i]\n }\n else if (typeof parse_tree[i] === 'object') {\n ph = parse_tree[i] // convenience purposes only\n if (ph.keys) { // keyword argument\n arg = argv[cursor]\n for (k = 0; k < ph.keys.length; k++) {\n if (arg == undefined) {\n throw new Error(sprintf('[sprintf] Cannot access property \"%s\" of undefined value \"%s\"', ph.keys[k], ph.keys[k-1]))\n }\n arg = arg[ph.keys[k]]\n }\n }\n else if (ph.param_no) { // positional argument (explicit)\n arg = argv[ph.param_no]\n }\n else { // positional argument (implicit)\n arg = argv[cursor++]\n }\n\n if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {\n arg = arg()\n }\n\n if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {\n throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))\n }\n\n if (re.number.test(ph.type)) {\n is_positive = arg >= 0\n }\n\n switch (ph.type) {\n case 'b':\n arg = parseInt(arg, 10).toString(2)\n break\n case 'c':\n arg = String.fromCharCode(parseInt(arg, 10))\n break\n case 'd':\n case 'i':\n arg = parseInt(arg, 10)\n break\n case 'j':\n arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)\n break\n case 'e':\n arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()\n break\n case 'f':\n arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)\n break\n case 'g':\n arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)\n break\n case 'o':\n arg = (parseInt(arg, 10) >>> 0).toString(8)\n break\n case 's':\n arg = String(arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 't':\n arg = String(!!arg)\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'T':\n arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'u':\n arg = parseInt(arg, 10) >>> 0\n break\n case 'v':\n arg = arg.valueOf()\n arg = (ph.precision ? arg.substring(0, ph.precision) : arg)\n break\n case 'x':\n arg = (parseInt(arg, 10) >>> 0).toString(16)\n break\n case 'X':\n arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()\n break\n }\n if (re.json.test(ph.type)) {\n output += arg\n }\n else {\n if (re.number.test(ph.type) && (!is_positive || ph.sign)) {\n sign = is_positive ? '+' : '-'\n arg = arg.toString().replace(re.sign, '')\n }\n else {\n sign = ''\n }\n pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '\n pad_length = ph.width - (sign + arg).length\n pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''\n output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)\n }\n }\n }\n return output\n }\n\n var sprintf_cache = Object.create(null)\n\n function sprintf_parse(fmt) {\n if (sprintf_cache[fmt]) {\n return sprintf_cache[fmt]\n }\n\n var _fmt = fmt, match, parse_tree = [], arg_names = 0\n while (_fmt) {\n if ((match = re.text.exec(_fmt)) !== null) {\n parse_tree.push(match[0])\n }\n else if ((match = re.modulo.exec(_fmt)) !== null) {\n parse_tree.push('%')\n }\n else if ((match = re.placeholder.exec(_fmt)) !== null) {\n if (match[2]) {\n arg_names |= 1\n var field_list = [], replacement_field = match[2], field_match = []\n if ((field_match = re.key.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {\n if ((field_match = re.key_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else if ((field_match = re.index_access.exec(replacement_field)) !== null) {\n field_list.push(field_match[1])\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n }\n }\n else {\n throw new SyntaxError('[sprintf] failed to parse named argument key')\n }\n match[2] = field_list\n }\n else {\n arg_names |= 2\n }\n if (arg_names === 3) {\n throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')\n }\n\n parse_tree.push(\n {\n placeholder: match[0],\n param_no: match[1],\n keys: match[2],\n sign: match[3],\n pad_char: match[4],\n align: match[5],\n width: match[6],\n precision: match[7],\n type: match[8]\n }\n )\n }\n else {\n throw new SyntaxError('[sprintf] unexpected placeholder')\n }\n _fmt = _fmt.substring(match[0].length)\n }\n return sprintf_cache[fmt] = parse_tree\n }\n\n /**\n * export to either browser or node.js\n */\n /* eslint-disable quote-props */\n if (typeof exports !== 'undefined') {\n exports['sprintf'] = sprintf\n exports['vsprintf'] = vsprintf\n }\n if (typeof window !== 'undefined') {\n window['sprintf'] = sprintf\n window['vsprintf'] = vsprintf\n\n if (typeof define === 'function' && define['amd']) {\n define(function() {\n return {\n 'sprintf': sprintf,\n 'vsprintf': vsprintf\n }\n })\n }\n }\n /* eslint-enable quote-props */\n}(); // eslint-disable-line\n","module.exports = \"\"","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","/* eslint consistent-return: [\"error\", { \"treatUndefinedAsUnspecified\": true }] */\n\n/**\n * Executes the given callback when DOMContentLoaded is ready.\n *\n * @param {function} callback Callback to execute once DOMContentLoaded completes.\n */\nfunction domContentLoaded(callback) {\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n return void callback(); // eslint-disable-line no-void\n }\n\n document.addEventListener('DOMContentLoaded', callback, {\n once: true\n });\n}\nexport default domContentLoaded;","import componentLoader from './componentLoader';\n\n/**\n * Compile component elements and DOM attachments.\n *\n * @param {Object} config The component config.\n * @returns {Function|undefined} A function to initialize the component.\n */\nexport default function componentProvider(config) {\n const {\n component: Component,\n load,\n // default value omitted so `componentLoader` can use its default.\n name,\n querySelector = {},\n querySelectorAll = {},\n options = {}\n } = config;\n if (typeof Component !== 'function') {\n return undefined;\n }\n\n /**\n * Collect component arguments based on the config.\n *\n * @returns {array} Array of arguments.\n */\n const getComponentArgs = () => {\n // Set component selector, preferring the `name` property.\n const selector = undefined === name ? config === null || config === void 0 ? void 0 : config.root : `[data-component='${name}']`;\n let componentEls;\n\n // Test for a valid selector.\n try {\n componentEls = document.querySelectorAll(selector);\n } catch (e) {\n console.error(e); // eslint-disable-line no-console\n return [];\n }\n\n // No component elements found.\n if (componentEls.length < 1) {\n console.log(`No elements found for ${selector}`); // eslint-disable-line no-console\n return [];\n }\n return Array.from(componentEls).map(element => {\n const children = {};\n\n // Select single child nodes.\n Object.keys(querySelector).forEach(elementKey => {\n children[elementKey] = element.querySelector(querySelector[elementKey]);\n });\n\n // Select groups of child nodes.\n Object.keys(querySelectorAll).forEach(elementKey => {\n const nodeList = element.querySelectorAll(querySelectorAll[elementKey]);\n children[elementKey] = Array.from(nodeList);\n });\n return {\n element,\n children,\n options\n };\n });\n };\n\n /**\n * The provider function.\n *\n * Finds DOM nodes upon which the component should be initialized, collects\n * references to child nodes thereof, and passes these as arguments to each\n * instance of the component.\n */\n const init = () => {\n const componentArgs = getComponentArgs();\n componentArgs.forEach(args => new Component(args));\n };\n\n // Return the provider function for later execution.\n if (load === false) {\n return init;\n }\n\n /*\n * Call the provider function so it is executed as soon as the document is\n * parsed and loaded.\n *\n * This is a convenience option and is functionally identical to setting\n * `config.load` to false and calling the provider function later in the script.\n */\n if (load === true) {\n return void init(); // eslint-disable-line no-void\n }\n\n // Use the handler defined in the `load` config property.\n return void componentLoader(init, load); // eslint-disable-line no-void\n}","import domContentLoaded from './domContentLoaded';\n\n/**\n * Execute the given function according to the `load` parameter.\n *\n * @param {function} init The function to execute.\n * @param {boolean|array|function} load The loading instructions.\n */\nexport default function componentLoader(init) {\n let load = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : domContentLoaded;\n if (init) {\n if (typeof load === 'function') {\n load(init);\n } else if (Array.isArray(load)) {\n const [element, event] = load;\n\n // e.g., load: [window, 'load']\n element === null || element === void 0 ? void 0 : element.addEventListener(event, init);\n }\n }\n}","/**\n * Formats classnames from a given namespace\n * Essentially just adds a '.' to the beginning of classnames\n *\n * @param {Object} namespace The namespace within which to format classnames.\n * @return {Object}\n */\nexport default function getFormattedClassnames(namespace) {\n return Object.keys(namespace).reduce((acc, key) => {\n acc[key] = `.${namespace[key].split(' ')[0]}`;\n return acc;\n }, {});\n}\n","var PRECEDENCE, OPENERS, TERMINATORS, PATTERN;\n\n/**\n * Operator precedence mapping.\n *\n * @type {Object}\n */\nPRECEDENCE = {\n\t'(': 9,\n\t'!': 8,\n\t'*': 7,\n\t'/': 7,\n\t'%': 7,\n\t'+': 6,\n\t'-': 6,\n\t'<': 5,\n\t'<=': 5,\n\t'>': 5,\n\t'>=': 5,\n\t'==': 4,\n\t'!=': 4,\n\t'&&': 3,\n\t'||': 2,\n\t'?': 1,\n\t'?:': 1,\n};\n\n/**\n * Characters which signal pair opening, to be terminated by terminators.\n *\n * @type {string[]}\n */\nOPENERS = [ '(', '?' ];\n\n/**\n * Characters which signal pair termination, the value an array with the\n * opener as its first member. The second member is an optional operator\n * replacement to push to the stack.\n *\n * @type {string[]}\n */\nTERMINATORS = {\n\t')': [ '(' ],\n\t':': [ '?', '?:' ],\n};\n\n/**\n * Pattern matching operators and openers.\n *\n * @type {RegExp}\n */\nPATTERN = /<=|>=|==|!=|&&|\\|\\||\\?:|\\(|!|\\*|\\/|%|\\+|-|<|>|\\?|\\)|:/;\n\n/**\n * Given a C expression, returns the equivalent postfix (Reverse Polish)\n * notation terms as an array.\n *\n * If a postfix string is desired, simply `.join( ' ' )` the result.\n *\n * @example\n *\n * ```js\n * import postfix from '@tannin/postfix';\n *\n * postfix( 'n > 1' );\n * // ⇒ [ 'n', '1', '>' ]\n * ```\n *\n * @param {string} expression C expression.\n *\n * @return {string[]} Postfix terms.\n */\nexport default function postfix( expression ) {\n\tvar terms = [],\n\t\tstack = [],\n\t\tmatch, operator, term, element;\n\n\twhile ( ( match = expression.match( PATTERN ) ) ) {\n\t\toperator = match[ 0 ];\n\n\t\t// Term is the string preceding the operator match. It may contain\n\t\t// whitespace, and may be empty (if operator is at beginning).\n\t\tterm = expression.substr( 0, match.index ).trim();\n\t\tif ( term ) {\n\t\t\tterms.push( term );\n\t\t}\n\n\t\twhile ( ( element = stack.pop() ) ) {\n\t\t\tif ( TERMINATORS[ operator ] ) {\n\t\t\t\tif ( TERMINATORS[ operator ][ 0 ] === element ) {\n\t\t\t\t\t// Substitution works here under assumption that because\n\t\t\t\t\t// the assigned operator will no longer be a terminator, it\n\t\t\t\t\t// will be pushed to the stack during the condition below.\n\t\t\t\t\toperator = TERMINATORS[ operator ][ 1 ] || operator;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else if ( OPENERS.indexOf( element ) >= 0 || PRECEDENCE[ element ] < PRECEDENCE[ operator ] ) {\n\t\t\t\t// Push to stack if either an opener or when pop reveals an\n\t\t\t\t// element of lower precedence.\n\t\t\t\tstack.push( element );\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// For each popped from stack, push to terms.\n\t\t\tterms.push( element );\n\t\t}\n\n\t\tif ( ! TERMINATORS[ operator ] ) {\n\t\t\tstack.push( operator );\n\t\t}\n\n\t\t// Slice matched fragment from expression to continue match.\n\t\texpression = expression.substr( match.index + operator.length );\n\t}\n\n\t// Push remainder of operand, if exists, to terms.\n\texpression = expression.trim();\n\tif ( expression ) {\n\t\tterms.push( expression );\n\t}\n\n\t// Pop remaining items from stack into terms.\n\treturn terms.concat( stack.reverse() );\n}\n","export default function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _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}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function _toPropertyKey(arg) {\n var key = toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}","import _typeof from \"./typeof.js\";\nexport default function _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}","/**\n * External dependencies\n */\nimport memoize from 'memize';\nimport sprintfjs from 'sprintf-js';\n/**\n * Log to console, once per message; or more precisely, per referentially equal\n * argument set. Because Jed throws errors, we log these to the console instead\n * to avoid crashing the application.\n *\n * @param {...*} args Arguments to pass to `console.error`\n */\n\nvar logErrorOnce = memoize(console.error); // eslint-disable-line no-console\n\n/**\n * Returns a formatted string. If an error occurs in applying the format, the\n * original format string is returned.\n *\n * @param {string} format The format of the string to generate.\n * @param {...*} args Arguments to apply to the format.\n *\n * @see https://www.npmjs.com/package/sprintf-js\n *\n * @return {string} The formatted string.\n */\n\nexport function sprintf(format) {\n try {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return sprintfjs.sprintf.apply(sprintfjs, [format].concat(args));\n } catch (error) {\n logErrorOnce('sprintf error: \\n\\n' + error.toString());\n return format;\n }\n}\n//# sourceMappingURL=sprintf.js.map","/**\n * Operator callback functions.\n *\n * @type {Object}\n */\nvar OPERATORS = {\n\t'!': function( a ) {\n\t\treturn ! a;\n\t},\n\t'*': function( a, b ) {\n\t\treturn a * b;\n\t},\n\t'/': function( a, b ) {\n\t\treturn a / b;\n\t},\n\t'%': function( a, b ) {\n\t\treturn a % b;\n\t},\n\t'+': function( a, b ) {\n\t\treturn a + b;\n\t},\n\t'-': function( a, b ) {\n\t\treturn a - b;\n\t},\n\t'<': function( a, b ) {\n\t\treturn a < b;\n\t},\n\t'<=': function( a, b ) {\n\t\treturn a <= b;\n\t},\n\t'>': function( a, b ) {\n\t\treturn a > b;\n\t},\n\t'>=': function( a, b ) {\n\t\treturn a >= b;\n\t},\n\t'==': function( a, b ) {\n\t\treturn a === b;\n\t},\n\t'!=': function( a, b ) {\n\t\treturn a !== b;\n\t},\n\t'&&': function( a, b ) {\n\t\treturn a && b;\n\t},\n\t'||': function( a, b ) {\n\t\treturn a || b;\n\t},\n\t'?:': function( a, b, c ) {\n\t\tif ( a ) {\n\t\t\tthrow b;\n\t\t}\n\n\t\treturn c;\n\t},\n};\n\n/**\n * Given an array of postfix terms and operand variables, returns the result of\n * the postfix evaluation.\n *\n * @example\n *\n * ```js\n * import evaluate from '@tannin/evaluate';\n *\n * // 3 + 4 * 5 / 6 ⇒ '3 4 5 * 6 / +'\n * const terms = [ '3', '4', '5', '*', '6', '/', '+' ];\n *\n * evaluate( terms, {} );\n * // ⇒ 6.333333333333334\n * ```\n *\n * @param {string[]} postfix Postfix terms.\n * @param {Object} variables Operand variables.\n *\n * @return {*} Result of evaluation.\n */\nexport default function evaluate( postfix, variables ) {\n\tvar stack = [],\n\t\ti, j, args, getOperatorResult, term, value;\n\n\tfor ( i = 0; i < postfix.length; i++ ) {\n\t\tterm = postfix[ i ];\n\n\t\tgetOperatorResult = OPERATORS[ term ];\n\t\tif ( getOperatorResult ) {\n\t\t\t// Pop from stack by number of function arguments.\n\t\t\tj = getOperatorResult.length;\n\t\t\targs = Array( j );\n\t\t\twhile ( j-- ) {\n\t\t\t\targs[ j ] = stack.pop();\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tvalue = getOperatorResult.apply( null, args );\n\t\t\t} catch ( earlyReturn ) {\n\t\t\t\treturn earlyReturn;\n\t\t\t}\n\t\t} else if ( variables.hasOwnProperty( term ) ) {\n\t\t\tvalue = variables[ term ];\n\t\t} else {\n\t\t\tvalue = +term;\n\t\t}\n\n\t\tstack.push( value );\n\t}\n\n\treturn stack[ 0 ];\n}\n","import pluralForms from '@tannin/plural-forms';\n\n/**\n * Tannin constructor options.\n *\n * @typedef {Object} TanninOptions\n *\n * @property {string} [contextDelimiter] Joiner in string lookup with context.\n * @property {Function} [onMissingKey] Callback to invoke when key missing.\n */\n\n/**\n * Domain metadata.\n *\n * @typedef {Object} TanninDomainMetadata\n *\n * @property {string} [domain] Domain name.\n * @property {string} [lang] Language code.\n * @property {(string|Function)} [plural_forms] Plural forms expression or\n * function evaluator.\n */\n\n/**\n * Domain translation pair respectively representing the singular and plural\n * translation.\n *\n * @typedef {[string,string]} TanninTranslation\n */\n\n/**\n * Locale data domain. The key is used as reference for lookup, the value an\n * array of two string entries respectively representing the singular and plural\n * translation.\n *\n * @typedef {{[key:string]:TanninDomainMetadata|TanninTranslation,'':TanninDomainMetadata|TanninTranslation}} TanninLocaleDomain\n */\n\n/**\n * Jed-formatted locale data.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @typedef {{[domain:string]:TanninLocaleDomain}} TanninLocaleData\n */\n\n/**\n * Default Tannin constructor options.\n *\n * @type {TanninOptions}\n */\nvar DEFAULT_OPTIONS = {\n\tcontextDelimiter: '\\u0004',\n\tonMissingKey: null,\n};\n\n/**\n * Given a specific locale data's config `plural_forms` value, returns the\n * expression.\n *\n * @example\n *\n * ```\n * getPluralExpression( 'nplurals=2; plural=(n != 1);' ) === '(n != 1)'\n * ```\n *\n * @param {string} pf Locale data plural forms.\n *\n * @return {string} Plural forms expression.\n */\nfunction getPluralExpression( pf ) {\n\tvar parts, i, part;\n\n\tparts = pf.split( ';' );\n\n\tfor ( i = 0; i < parts.length; i++ ) {\n\t\tpart = parts[ i ].trim();\n\t\tif ( part.indexOf( 'plural=' ) === 0 ) {\n\t\t\treturn part.substr( 7 );\n\t\t}\n\t}\n}\n\n/**\n * Tannin constructor.\n *\n * @class\n *\n * @param {TanninLocaleData} data Jed-formatted locale data.\n * @param {TanninOptions} [options] Tannin options.\n */\nexport default function Tannin( data, options ) {\n\tvar key;\n\n\t/**\n\t * Jed-formatted locale data.\n\t *\n\t * @name Tannin#data\n\t * @type {TanninLocaleData}\n\t */\n\tthis.data = data;\n\n\t/**\n\t * Plural forms function cache, keyed by plural forms string.\n\t *\n\t * @name Tannin#pluralForms\n\t * @type {Object}\n\t */\n\tthis.pluralForms = {};\n\n\t/**\n\t * Effective options for instance, including defaults.\n\t *\n\t * @name Tannin#options\n\t * @type {TanninOptions}\n\t */\n\tthis.options = {};\n\n\tfor ( key in DEFAULT_OPTIONS ) {\n\t\tthis.options[ key ] = options !== undefined && key in options\n\t\t\t? options[ key ]\n\t\t\t: DEFAULT_OPTIONS[ key ];\n\t}\n}\n\n/**\n * Returns the plural form index for the given domain and value.\n *\n * @param {string} domain Domain on which to calculate plural form.\n * @param {number} n Value for which plural form is to be calculated.\n *\n * @return {number} Plural form index.\n */\nTannin.prototype.getPluralForm = function( domain, n ) {\n\tvar getPluralForm = this.pluralForms[ domain ],\n\t\tconfig, plural, pf;\n\n\tif ( ! getPluralForm ) {\n\t\tconfig = this.data[ domain ][ '' ];\n\n\t\tpf = (\n\t\t\tconfig[ 'Plural-Forms' ] ||\n\t\t\tconfig[ 'plural-forms' ] ||\n\t\t\t// Ignore reason: As known, there's no way to document the empty\n\t\t\t// string property on a key to guarantee this as metadata.\n\t\t\t// @ts-ignore\n\t\t\tconfig.plural_forms\n\t\t);\n\n\t\tif ( typeof pf !== 'function' ) {\n\t\t\tplural = getPluralExpression(\n\t\t\t\tconfig[ 'Plural-Forms' ] ||\n\t\t\t\tconfig[ 'plural-forms' ] ||\n\t\t\t\t// Ignore reason: As known, there's no way to document the empty\n\t\t\t\t// string property on a key to guarantee this as metadata.\n\t\t\t\t// @ts-ignore\n\t\t\t\tconfig.plural_forms\n\t\t\t);\n\n\t\t\tpf = pluralForms( plural );\n\t\t}\n\n\t\tgetPluralForm = this.pluralForms[ domain ] = pf;\n\t}\n\n\treturn getPluralForm( n );\n};\n\n/**\n * Translate a string.\n *\n * @param {string} domain Translation domain.\n * @param {string|void} context Context distinguishing terms of the same name.\n * @param {string} singular Primary key for translation lookup.\n * @param {string=} plural Fallback value used for non-zero plural\n * form index.\n * @param {number=} n Value to use in calculating plural form.\n *\n * @return {string} Translated string.\n */\nTannin.prototype.dcnpgettext = function( domain, context, singular, plural, n ) {\n\tvar index, key, entry;\n\n\tif ( n === undefined ) {\n\t\t// Default to singular.\n\t\tindex = 0;\n\t} else {\n\t\t// Find index by evaluating plural form for value.\n\t\tindex = this.getPluralForm( domain, n );\n\t}\n\n\tkey = singular;\n\n\t// If provided, context is prepended to key with delimiter.\n\tif ( context ) {\n\t\tkey = context + this.options.contextDelimiter + singular;\n\t}\n\n\tentry = this.data[ domain ][ key ];\n\n\t// Verify not only that entry exists, but that the intended index is within\n\t// range and non-empty.\n\tif ( entry && entry[ index ] ) {\n\t\treturn entry[ index ];\n\t}\n\n\tif ( this.options.onMissingKey ) {\n\t\tthis.options.onMissingKey( singular, domain );\n\t}\n\n\t// If entry not found, fall back to singular vs. plural with zero index\n\t// representing the singular value.\n\treturn index === 0 ? singular : plural;\n};\n","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n/**\n * External dependencies\n */\nimport Tannin from 'tannin';\n/**\n * @typedef {Record} LocaleData\n */\n\n/**\n * Default locale data to use for Tannin domain when not otherwise provided.\n * Assumes an English plural forms expression.\n *\n * @type {LocaleData}\n */\n\nvar DEFAULT_LOCALE_DATA = {\n '': {\n /** @param {number} n */\n plural_forms: function plural_forms(n) {\n return n === 1 ? 0 : 1;\n }\n }\n};\n/*\n * Regular expression that matches i18n hooks like `i18n.gettext`, `i18n.ngettext`,\n * `i18n.gettext_domain` or `i18n.ngettext_with_context` or `i18n.has_translation`.\n */\n\nvar I18N_HOOK_REGEXP = /^i18n\\.(n?gettext|has_translation)(_|$)/;\n/**\n * @typedef {(domain?: string) => LocaleData} GetLocaleData\n *\n * Returns locale data by domain in a\n * Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n */\n\n/**\n * @typedef {(data?: LocaleData, domain?: string) => void} SetLocaleData\n *\n * Merges locale data into the Tannin instance by domain. Accepts data in a\n * Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n */\n\n/**\n * @typedef {(data?: LocaleData, domain?: string) => void} ResetLocaleData\n *\n * Resets all current Tannin instance locale data and sets the specified\n * locale data for the domain. Accepts data in a Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n */\n\n/** @typedef {() => void} SubscribeCallback */\n\n/** @typedef {() => void} UnsubscribeCallback */\n\n/**\n * @typedef {(callback: SubscribeCallback) => UnsubscribeCallback} Subscribe\n *\n * Subscribes to changes of locale data\n */\n\n/**\n * @typedef {(domain?: string) => string} GetFilterDomain\n * Retrieve the domain to use when calling domain-specific filters.\n */\n\n/**\n * @typedef {(text: string, domain?: string) => string} __\n *\n * Retrieve the translation of text.\n *\n * @see https://developer.wordpress.org/reference/functions/__/\n */\n\n/**\n * @typedef {(text: string, context: string, domain?: string) => string} _x\n *\n * Retrieve translated string with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_x/\n */\n\n/**\n * @typedef {(single: string, plural: string, number: number, domain?: string) => string} _n\n *\n * Translates and retrieves the singular or plural form based on the supplied\n * number.\n *\n * @see https://developer.wordpress.org/reference/functions/_n/\n */\n\n/**\n * @typedef {(single: string, plural: string, number: number, context: string, domain?: string) => string} _nx\n *\n * Translates and retrieves the singular or plural form based on the supplied\n * number, with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_nx/\n */\n\n/**\n * @typedef {() => boolean} IsRtl\n *\n * Check if current locale is RTL.\n *\n * **RTL (Right To Left)** is a locale property indicating that text is written from right to left.\n * For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common\n * language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages,\n * including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`).\n */\n\n/**\n * @typedef {(single: string, context?: string, domain?: string) => boolean} HasTranslation\n *\n * Check if there is a translation for a given string in singular form.\n */\n\n/** @typedef {import('@wordpress/hooks').Hooks} Hooks */\n\n/**\n * An i18n instance\n *\n * @typedef I18n\n * @property {GetLocaleData} getLocaleData Returns locale data by domain in a Jed-formatted JSON object shape.\n * @property {SetLocaleData} setLocaleData Merges locale data into the Tannin instance by domain. Accepts data in a\n * Jed-formatted JSON object shape.\n * @property {ResetLocaleData} resetLocaleData Resets all current Tannin instance locale data and sets the specified\n * locale data for the domain. Accepts data in a Jed-formatted JSON object shape.\n * @property {Subscribe} subscribe Subscribes to changes of Tannin locale data.\n * @property {__} __ Retrieve the translation of text.\n * @property {_x} _x Retrieve translated string with gettext context.\n * @property {_n} _n Translates and retrieves the singular or plural form based on the supplied\n * number.\n * @property {_nx} _nx Translates and retrieves the singular or plural form based on the supplied\n * number, with gettext context.\n * @property {IsRtl} isRTL Check if current locale is RTL.\n * @property {HasTranslation} hasTranslation Check if there is a translation for a given string.\n */\n\n/**\n * Create an i18n instance\n *\n * @param {LocaleData} [initialData] Locale data configuration.\n * @param {string} [initialDomain] Domain for which configuration applies.\n * @param {Hooks} [hooks] Hooks implementation.\n * @return {I18n} I18n instance\n */\n\nexport var createI18n = function createI18n(initialData, initialDomain, hooks) {\n /**\n * The underlying instance of Tannin to which exported functions interface.\n *\n * @type {Tannin}\n */\n var tannin = new Tannin({});\n var listeners = new Set();\n\n var notifyListeners = function notifyListeners() {\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n /**\n * Subscribe to changes of locale data.\n *\n * @param {SubscribeCallback} callback Subscription callback.\n * @return {UnsubscribeCallback} Unsubscribe callback.\n */\n\n\n var subscribe = function subscribe(callback) {\n listeners.add(callback);\n return function () {\n return listeners.delete(callback);\n };\n };\n /** @type {GetLocaleData} */\n\n\n var getLocaleData = function getLocaleData() {\n var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n return tannin.data[domain];\n };\n /**\n * @param {LocaleData} [data]\n * @param {string} [domain]\n */\n\n\n var doSetLocaleData = function doSetLocaleData(data) {\n var domain = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'default';\n tannin.data[domain] = _objectSpread(_objectSpread(_objectSpread({}, DEFAULT_LOCALE_DATA), tannin.data[domain]), data); // Populate default domain configuration (supported locale date which omits\n // a plural forms expression).\n\n tannin.data[domain][''] = _objectSpread(_objectSpread({}, DEFAULT_LOCALE_DATA['']), tannin.data[domain]['']);\n };\n /** @type {SetLocaleData} */\n\n\n var setLocaleData = function setLocaleData(data, domain) {\n doSetLocaleData(data, domain);\n notifyListeners();\n };\n /** @type {ResetLocaleData} */\n\n\n var resetLocaleData = function resetLocaleData(data, domain) {\n // Reset all current Tannin locale data.\n tannin.data = {}; // Reset cached plural forms functions cache.\n\n tannin.pluralForms = {};\n setLocaleData(data, domain);\n };\n /**\n * Wrapper for Tannin's `dcnpgettext`. Populates default locale data if not\n * otherwise previously assigned.\n *\n * @param {string|undefined} domain Domain to retrieve the translated text.\n * @param {string|undefined} context Context information for the translators.\n * @param {string} single Text to translate if non-plural. Used as\n * fallback return value on a caught error.\n * @param {string} [plural] The text to be used if the number is\n * plural.\n * @param {number} [number] The number to compare against to use\n * either the singular or plural form.\n *\n * @return {string} The translated string.\n */\n\n\n var dcnpgettext = function dcnpgettext() {\n var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n var context = arguments.length > 1 ? arguments[1] : undefined;\n var single = arguments.length > 2 ? arguments[2] : undefined;\n var plural = arguments.length > 3 ? arguments[3] : undefined;\n var number = arguments.length > 4 ? arguments[4] : undefined;\n\n if (!tannin.data[domain]) {\n // use `doSetLocaleData` to set silently, without notifying listeners\n doSetLocaleData(undefined, domain);\n }\n\n return tannin.dcnpgettext(domain, context, single, plural, number);\n };\n /** @type {GetFilterDomain} */\n\n\n var getFilterDomain = function getFilterDomain() {\n var domain = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'default';\n return domain;\n };\n /** @type {__} */\n\n\n var __ = function __(text, domain) {\n var translation = dcnpgettext(domain, undefined, text);\n\n if (!hooks) {\n return translation;\n }\n /**\n * Filters text with its translation.\n *\n * @param {string} translation Translated text.\n * @param {string} text Text to translate.\n * @param {string} domain Text domain. Unique identifier for retrieving translated strings.\n */\n\n\n translation =\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.gettext', translation, text, domain);\n return (\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.gettext_' + getFilterDomain(domain), translation, text, domain)\n );\n };\n /** @type {_x} */\n\n\n var _x = function _x(text, context, domain) {\n var translation = dcnpgettext(domain, context, text);\n\n if (!hooks) {\n return translation;\n }\n /**\n * Filters text with its translation based on context information.\n *\n * @param {string} translation Translated text.\n * @param {string} text Text to translate.\n * @param {string} context Context information for the translators.\n * @param {string} domain Text domain. Unique identifier for retrieving translated strings.\n */\n\n\n translation =\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.gettext_with_context', translation, text, context, domain);\n return (\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.gettext_with_context_' + getFilterDomain(domain), translation, text, context, domain)\n );\n };\n /** @type {_n} */\n\n\n var _n = function _n(single, plural, number, domain) {\n var translation = dcnpgettext(domain, undefined, single, plural, number);\n\n if (!hooks) {\n return translation;\n }\n /**\n * Filters the singular or plural form of a string.\n *\n * @param {string} translation Translated text.\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {string} number The number to compare against to use either the singular or plural form.\n * @param {string} domain Text domain. Unique identifier for retrieving translated strings.\n */\n\n\n translation =\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.ngettext', translation, single, plural, number, domain);\n return (\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.ngettext_' + getFilterDomain(domain), translation, single, plural, number, domain)\n );\n };\n /** @type {_nx} */\n\n\n var _nx = function _nx(single, plural, number, context, domain) {\n var translation = dcnpgettext(domain, context, single, plural, number);\n\n if (!hooks) {\n return translation;\n }\n /**\n * Filters the singular or plural form of a string with gettext context.\n *\n * @param {string} translation Translated text.\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {string} number The number to compare against to use either the singular or plural form.\n * @param {string} context Context information for the translators.\n * @param {string} domain Text domain. Unique identifier for retrieving translated strings.\n */\n\n\n translation =\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.ngettext_with_context', translation, single, plural, number, context, domain);\n return (\n /** @type {string} */\n\n /** @type {*} */\n hooks.applyFilters('i18n.ngettext_with_context_' + getFilterDomain(domain), translation, single, plural, number, context, domain)\n );\n };\n /** @type {IsRtl} */\n\n\n var isRTL = function isRTL() {\n return 'rtl' === _x('ltr', 'text direction');\n };\n /** @type {HasTranslation} */\n\n\n var hasTranslation = function hasTranslation(single, context, domain) {\n var _tannin$data, _tannin$data2;\n\n var key = context ? context + \"\\x04\" + single : single;\n var result = !!((_tannin$data = tannin.data) !== null && _tannin$data !== void 0 && (_tannin$data2 = _tannin$data[domain !== null && domain !== void 0 ? domain : 'default']) !== null && _tannin$data2 !== void 0 && _tannin$data2[key]);\n\n if (hooks) {\n /**\n * Filters the presence of a translation in the locale data.\n *\n * @param {boolean} hasTranslation Whether the translation is present or not..\n * @param {string} single The singular form of the translated text (used as key in locale data)\n * @param {string} context Context information for the translators.\n * @param {string} domain Text domain. Unique identifier for retrieving translated strings.\n */\n result =\n /** @type { boolean } */\n\n /** @type {*} */\n hooks.applyFilters('i18n.has_translation', result, single, context, domain);\n result =\n /** @type { boolean } */\n\n /** @type {*} */\n hooks.applyFilters('i18n.has_translation_' + getFilterDomain(domain), result, single, context, domain);\n }\n\n return result;\n };\n\n if (initialData) {\n setLocaleData(initialData, initialDomain);\n }\n\n if (hooks) {\n /**\n * @param {string} hookName\n */\n var onHookAddedOrRemoved = function onHookAddedOrRemoved(hookName) {\n if (I18N_HOOK_REGEXP.test(hookName)) {\n notifyListeners();\n }\n };\n\n hooks.addAction('hookAdded', 'core/i18n', onHookAddedOrRemoved);\n hooks.addAction('hookRemoved', 'core/i18n', onHookAddedOrRemoved);\n }\n\n return {\n getLocaleData: getLocaleData,\n setLocaleData: setLocaleData,\n resetLocaleData: resetLocaleData,\n subscribe: subscribe,\n __: __,\n _x: _x,\n _n: _n,\n _nx: _nx,\n isRTL: isRTL,\n hasTranslation: hasTranslation\n };\n};\n//# sourceMappingURL=create-i18n.js.map","import compile from '@tannin/compile';\n\n/**\n * Given a C expression, returns a function which, when called with a value,\n * evaluates the result with the value assumed to be the \"n\" variable of the\n * expression. The result will be coerced to its numeric equivalent.\n *\n * @param {string} expression C expression.\n *\n * @return {Function} Evaluator function.\n */\nexport default function pluralForms( expression ) {\n\tvar evaluate = compile( expression );\n\n\treturn function( n ) {\n\t\treturn +evaluate( { n: n } );\n\t};\n}\n","import postfix from '@tannin/postfix';\nimport evaluate from '@tannin/evaluate';\n\n/**\n * Given a C expression, returns a function which can be called to evaluate its\n * result.\n *\n * @example\n *\n * ```js\n * import compile from '@tannin/compile';\n *\n * const evaluate = compile( 'n > 1' );\n *\n * evaluate( { n: 2 } );\n * // ⇒ true\n * ```\n *\n * @param {string} expression C expression.\n *\n * @return {(variables?:{[variable:string]:*})=>*} Compiled evaluator.\n */\nexport default function compile( expression ) {\n\tvar terms = postfix( expression );\n\n\treturn function( variables ) {\n\t\treturn evaluate( terms, variables );\n\t};\n}\n","/**\n * Validate a namespace string.\n *\n * @param {string} namespace The namespace to validate - should take the form\n * `vendor/plugin/function`.\n *\n * @return {boolean} Whether the namespace is valid.\n */\nfunction validateNamespace(namespace) {\n if ('string' !== typeof namespace || '' === namespace) {\n // eslint-disable-next-line no-console\n console.error('The namespace must be a non-empty string.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.\\-\\/]*$/.test(namespace)) {\n // eslint-disable-next-line no-console\n console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.');\n return false;\n }\n\n return true;\n}\n\nexport default validateNamespace;\n//# sourceMappingURL=validateNamespace.js.map","/**\n * Validate a hookName string.\n *\n * @param {string} hookName The hook name to validate. Should be a non empty string containing\n * only numbers, letters, dashes, periods and underscores. Also,\n * the hook name cannot begin with `__`.\n *\n * @return {boolean} Whether the hook name is valid.\n */\nfunction validateHookName(hookName) {\n if ('string' !== typeof hookName || '' === hookName) {\n // eslint-disable-next-line no-console\n console.error('The hook name must be a non-empty string.');\n return false;\n }\n\n if (/^__/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name cannot begin with `__`.');\n return false;\n }\n\n if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) {\n // eslint-disable-next-line no-console\n console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.');\n return false;\n }\n\n return true;\n}\n\nexport default validateHookName;\n//# sourceMappingURL=validateHookName.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\n/**\n * @callback AddHook\n *\n * Adds the hook to the appropriate hooks container.\n *\n * @param {string} hookName Name of hook to add\n * @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`.\n * @param {import('.').Callback} callback Function to call when the hook is run\n * @param {number} [priority=10] Priority of this hook\n */\n\n/**\n * Returns a function which, when invoked, will add a hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {AddHook} Function that adds a new hook.\n */\n\nfunction createAddHook(hooks, storeKey) {\n return function addHook(hookName, namespace, callback) {\n var priority = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 10;\n var hooksStore = hooks[storeKey];\n\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!validateNamespace(namespace)) {\n return;\n }\n\n if ('function' !== typeof callback) {\n // eslint-disable-next-line no-console\n console.error('The hook callback must be a function.');\n return;\n } // Validate numeric priority\n\n\n if ('number' !== typeof priority) {\n // eslint-disable-next-line no-console\n console.error('If specified, the hook priority must be a number.');\n return;\n }\n\n var handler = {\n callback: callback,\n priority: priority,\n namespace: namespace\n };\n\n if (hooksStore[hookName]) {\n // Find the correct insert index of the new hook.\n var handlers = hooksStore[hookName].handlers;\n /** @type {number} */\n\n var i;\n\n for (i = handlers.length; i > 0; i--) {\n if (priority >= handlers[i - 1].priority) {\n break;\n }\n }\n\n if (i === handlers.length) {\n // If append, operate via direct assignment.\n handlers[i] = handler;\n } else {\n // Otherwise, insert before index via splice.\n handlers.splice(i, 0, handler);\n } // We may also be currently executing this hook. If the callback\n // we're adding would come after the current callback, there's no\n // problem; otherwise we need to increase the execution index of\n // any other runs by 1 to account for the added element.\n\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex++;\n }\n });\n } else {\n // This is the first hook of its type.\n hooksStore[hookName] = {\n handlers: [handler],\n runs: 0\n };\n }\n\n if (hookName !== 'hookAdded') {\n hooks.doAction('hookAdded', hookName, namespace, callback, priority);\n }\n };\n}\n\nexport default createAddHook;\n//# sourceMappingURL=createAddHook.js.map","/**\n * Internal dependencies\n */\nimport validateNamespace from './validateNamespace.js';\nimport validateHookName from './validateHookName.js';\n/**\n * @callback RemoveHook\n * Removes the specified callback (or all callbacks) from the hook with a given hookName\n * and namespace.\n *\n * @param {string} hookName The name of the hook to modify.\n * @param {string} namespace The unique namespace identifying the callback in the\n * form `vendor/plugin/function`.\n *\n * @return {number | undefined} The number of callbacks removed.\n */\n\n/**\n * Returns a function which, when invoked, will remove a specified hook or all\n * hooks by the given name.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName,\n * without regard to namespace. Used to create\n * `removeAll*` functions.\n *\n * @return {RemoveHook} Function that removes hooks.\n */\n\nfunction createRemoveHook(hooks, storeKey) {\n var removeAll = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function removeHook(hookName, namespace) {\n var hooksStore = hooks[storeKey];\n\n if (!validateHookName(hookName)) {\n return;\n }\n\n if (!removeAll && !validateNamespace(namespace)) {\n return;\n } // Bail if no hooks exist by this name\n\n\n if (!hooksStore[hookName]) {\n return 0;\n }\n\n var handlersRemoved = 0;\n\n if (removeAll) {\n handlersRemoved = hooksStore[hookName].handlers.length;\n hooksStore[hookName] = {\n runs: hooksStore[hookName].runs,\n handlers: []\n };\n } else {\n // Try to find the specified callback to remove.\n var handlers = hooksStore[hookName].handlers;\n\n var _loop = function _loop(i) {\n if (handlers[i].namespace === namespace) {\n handlers.splice(i, 1);\n handlersRemoved++; // This callback may also be part of a hook that is\n // currently executing. If the callback we're removing\n // comes after the current callback, there's no problem;\n // otherwise we need to decrease the execution index of any\n // other runs by 1 to account for the removed element.\n\n hooksStore.__current.forEach(function (hookInfo) {\n if (hookInfo.name === hookName && hookInfo.currentIndex >= i) {\n hookInfo.currentIndex--;\n }\n });\n }\n };\n\n for (var i = handlers.length - 1; i >= 0; i--) {\n _loop(i);\n }\n }\n\n if (hookName !== 'hookRemoved') {\n hooks.doAction('hookRemoved', hookName, namespace);\n }\n\n return handlersRemoved;\n };\n}\n\nexport default createRemoveHook;\n//# sourceMappingURL=createRemoveHook.js.map","/**\n * @callback HasHook\n *\n * Returns whether any handlers are attached for the given hookName and optional namespace.\n *\n * @param {string} hookName The name of the hook to check for.\n * @param {string} [namespace] Optional. The unique namespace identifying the callback\n * in the form `vendor/plugin/function`.\n *\n * @return {boolean} Whether there are handlers that are attached to the given hook.\n */\n\n/**\n * Returns a function which, when invoked, will return whether any handlers are\n * attached to a particular hook.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {HasHook} Function that returns whether any handlers are\n * attached to a particular hook and optional namespace.\n */\nfunction createHasHook(hooks, storeKey) {\n return function hasHook(hookName, namespace) {\n var hooksStore = hooks[storeKey]; // Use the namespace if provided.\n\n if ('undefined' !== typeof namespace) {\n return hookName in hooksStore && hooksStore[hookName].handlers.some(function (hook) {\n return hook.namespace === namespace;\n });\n }\n\n return hookName in hooksStore;\n };\n}\n\nexport default createHasHook;\n//# sourceMappingURL=createHasHook.js.map","import _toConsumableArray from \"@babel/runtime/helpers/esm/toConsumableArray\";\n\n/**\n * Returns a function which, when invoked, will execute all callbacks\n * registered to a hook of the specified type, optionally returning the final\n * value of the call chain.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n * @param {boolean} [returnFirstArg=false] Whether each hook callback is expected to\n * return its first argument.\n *\n * @return {(hookName:string, ...args: unknown[]) => unknown} Function that runs hook callbacks.\n */\nfunction createRunHook(hooks, storeKey) {\n var returnFirstArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n return function runHooks(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!hooksStore[hookName]) {\n hooksStore[hookName] = {\n handlers: [],\n runs: 0\n };\n }\n\n hooksStore[hookName].runs++;\n var handlers = hooksStore[hookName].handlers; // The following code is stripped from production builds.\n\n if ('production' !== process.env.NODE_ENV) {\n // Handle any 'all' hooks registered.\n if ('hookAdded' !== hookName && hooksStore.all) {\n handlers.push.apply(handlers, _toConsumableArray(hooksStore.all.handlers));\n }\n }\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (!handlers || !handlers.length) {\n return returnFirstArg ? args[0] : undefined;\n }\n\n var hookInfo = {\n name: hookName,\n currentIndex: 0\n };\n\n hooksStore.__current.push(hookInfo);\n\n while (hookInfo.currentIndex < handlers.length) {\n var handler = handlers[hookInfo.currentIndex];\n var result = handler.callback.apply(null, args);\n\n if (returnFirstArg) {\n args[0] = result;\n }\n\n hookInfo.currentIndex++;\n }\n\n hooksStore.__current.pop();\n\n if (returnFirstArg) {\n return args[0];\n }\n };\n}\n\nexport default createRunHook;\n//# sourceMappingURL=createRunHook.js.map","/**\n * Returns a function which, when invoked, will return the name of the\n * currently running hook, or `null` if no hook of the given type is currently\n * running.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {() => string | null} Function that returns the current hook name or null.\n */\nfunction createCurrentHook(hooks, storeKey) {\n return function currentHook() {\n var _hooksStore$__current, _hooksStore$__current2;\n\n var hooksStore = hooks[storeKey];\n return (_hooksStore$__current = (_hooksStore$__current2 = hooksStore.__current[hooksStore.__current.length - 1]) === null || _hooksStore$__current2 === void 0 ? void 0 : _hooksStore$__current2.name) !== null && _hooksStore$__current !== void 0 ? _hooksStore$__current : null;\n };\n}\n\nexport default createCurrentHook;\n//# sourceMappingURL=createCurrentHook.js.map","/**\n * @callback DoingHook\n * Returns whether a hook is currently being executed.\n *\n * @param {string} [hookName] The name of the hook to check for. If\n * omitted, will check for any hook being executed.\n *\n * @return {boolean} Whether the hook is being executed.\n */\n\n/**\n * Returns a function which, when invoked, will return whether a hook is\n * currently being executed.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DoingHook} Function that returns whether a hook is currently\n * being executed.\n */\nfunction createDoingHook(hooks, storeKey) {\n return function doingHook(hookName) {\n var hooksStore = hooks[storeKey]; // If the hookName was not passed, check for any current hook.\n\n if ('undefined' === typeof hookName) {\n return 'undefined' !== typeof hooksStore.__current[0];\n } // Return the __current hook.\n\n\n return hooksStore.__current[0] ? hookName === hooksStore.__current[0].name : false;\n };\n}\n\nexport default createDoingHook;\n//# sourceMappingURL=createDoingHook.js.map","/**\n * Internal dependencies\n */\nimport validateHookName from './validateHookName.js';\n/**\n * @callback DidHook\n *\n * Returns the number of times an action has been fired.\n *\n * @param {string} hookName The hook name to check.\n *\n * @return {number | undefined} The number of times the hook has run.\n */\n\n/**\n * Returns a function which, when invoked, will return the number of times a\n * hook has been called.\n *\n * @param {import('.').Hooks} hooks Hooks instance.\n * @param {import('.').StoreKey} storeKey\n *\n * @return {DidHook} Function that returns a hook's call count.\n */\n\nfunction createDidHook(hooks, storeKey) {\n return function didHook(hookName) {\n var hooksStore = hooks[storeKey];\n\n if (!validateHookName(hookName)) {\n return;\n }\n\n return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0;\n };\n}\n\nexport default createDidHook;\n//# sourceMappingURL=createDidHook.js.map","/**\n * Internal dependencies\n */\nimport createHooks from './createHooks';\n/** @typedef {(...args: any[])=>any} Callback */\n\n/**\n * @typedef Handler\n * @property {Callback} callback The callback\n * @property {string} namespace The namespace\n * @property {number} priority The namespace\n */\n\n/**\n * @typedef Hook\n * @property {Handler[]} handlers Array of handlers\n * @property {number} runs Run counter\n */\n\n/**\n * @typedef Current\n * @property {string} name Hook name\n * @property {number} currentIndex The index\n */\n\n/**\n * @typedef {Record & {__current: Current[]}} Store\n */\n\n/**\n * @typedef {'actions' | 'filters'} StoreKey\n */\n\n/**\n * @typedef {import('./createHooks').Hooks} Hooks\n */\n\nexport var defaultHooks = createHooks();\nvar addAction = defaultHooks.addAction,\n addFilter = defaultHooks.addFilter,\n removeAction = defaultHooks.removeAction,\n removeFilter = defaultHooks.removeFilter,\n hasAction = defaultHooks.hasAction,\n hasFilter = defaultHooks.hasFilter,\n removeAllActions = defaultHooks.removeAllActions,\n removeAllFilters = defaultHooks.removeAllFilters,\n doAction = defaultHooks.doAction,\n applyFilters = defaultHooks.applyFilters,\n currentAction = defaultHooks.currentAction,\n currentFilter = defaultHooks.currentFilter,\n doingAction = defaultHooks.doingAction,\n doingFilter = defaultHooks.doingFilter,\n didAction = defaultHooks.didAction,\n didFilter = defaultHooks.didFilter,\n actions = defaultHooks.actions,\n filters = defaultHooks.filters;\nexport { createHooks, addAction, addFilter, removeAction, removeFilter, hasAction, hasFilter, removeAllActions, removeAllFilters, doAction, applyFilters, currentAction, currentFilter, doingAction, doingFilter, didAction, didFilter, actions, filters };\n//# sourceMappingURL=index.js.map","import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\n\n/**\n * Internal dependencies\n */\nimport createAddHook from './createAddHook';\nimport createRemoveHook from './createRemoveHook';\nimport createHasHook from './createHasHook';\nimport createRunHook from './createRunHook';\nimport createCurrentHook from './createCurrentHook';\nimport createDoingHook from './createDoingHook';\nimport createDidHook from './createDidHook';\n/**\n * Internal class for constructing hooks. Use `createHooks()` function\n *\n * Note, it is necessary to expose this class to make its type public.\n *\n * @private\n */\n\nexport var _Hooks = function _Hooks() {\n _classCallCheck(this, _Hooks);\n\n /** @type {import('.').Store} actions */\n this.actions = Object.create(null);\n this.actions.__current = [];\n /** @type {import('.').Store} filters */\n\n this.filters = Object.create(null);\n this.filters.__current = [];\n this.addAction = createAddHook(this, 'actions');\n this.addFilter = createAddHook(this, 'filters');\n this.removeAction = createRemoveHook(this, 'actions');\n this.removeFilter = createRemoveHook(this, 'filters');\n this.hasAction = createHasHook(this, 'actions');\n this.hasFilter = createHasHook(this, 'filters');\n this.removeAllActions = createRemoveHook(this, 'actions', true);\n this.removeAllFilters = createRemoveHook(this, 'filters', true);\n this.doAction = createRunHook(this, 'actions');\n this.applyFilters = createRunHook(this, 'filters', true);\n this.currentAction = createCurrentHook(this, 'actions');\n this.currentFilter = createCurrentHook(this, 'filters');\n this.doingAction = createDoingHook(this, 'actions');\n this.doingFilter = createDoingHook(this, 'filters');\n this.didAction = createDidHook(this, 'actions');\n this.didFilter = createDidHook(this, 'filters');\n};\n/** @typedef {_Hooks} Hooks */\n\n/**\n * Returns an instance of the hooks object.\n *\n * @return {Hooks} A Hooks instance.\n */\n\nfunction createHooks() {\n return new _Hooks();\n}\n\nexport default createHooks;\n//# sourceMappingURL=createHooks.js.map","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","/**\n * Internal dependencies\n */\nimport { createI18n } from './create-i18n';\n/**\n * WordPress dependencies\n */\n\nimport { defaultHooks } from '@wordpress/hooks';\nvar i18n = createI18n(undefined, undefined, defaultHooks);\n/**\n * Default, singleton instance of `I18n`.\n */\n\nexport default i18n;\n/*\n * Comments in this file are duplicated from ./i18n due to\n * https://github.com/WordPress/gutenberg/pull/20318#issuecomment-590837722\n */\n\n/**\n * @typedef {import('./create-i18n').LocaleData} LocaleData\n * @typedef {import('./create-i18n').SubscribeCallback} SubscribeCallback\n * @typedef {import('./create-i18n').UnsubscribeCallback} UnsubscribeCallback\n */\n\n/**\n * Returns locale data by domain in a Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {string} [domain] Domain for which to get the data.\n * @return {LocaleData} Locale data.\n */\n\nexport var getLocaleData = i18n.getLocaleData.bind(i18n);\n/**\n * Merges locale data into the Tannin instance by domain. Accepts data in a\n * Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {LocaleData} [data] Locale data configuration.\n * @param {string} [domain] Domain for which configuration applies.\n */\n\nexport var setLocaleData = i18n.setLocaleData.bind(i18n);\n/**\n * Resets all current Tannin instance locale data and sets the specified\n * locale data for the domain. Accepts data in a Jed-formatted JSON object shape.\n *\n * @see http://messageformat.github.io/Jed/\n *\n * @param {LocaleData} [data] Locale data configuration.\n * @param {string} [domain] Domain for which configuration applies.\n */\n\nexport var resetLocaleData = i18n.resetLocaleData.bind(i18n);\n/**\n * Subscribes to changes of locale data\n *\n * @param {SubscribeCallback} callback Subscription callback\n * @return {UnsubscribeCallback} Unsubscribe callback\n */\n\nexport var subscribe = i18n.subscribe.bind(i18n);\n/**\n * Retrieve the translation of text.\n *\n * @see https://developer.wordpress.org/reference/functions/__/\n *\n * @param {string} text Text to translate.\n * @param {string} [domain] Domain to retrieve the translated text.\n *\n * @return {string} Translated text.\n */\n\nexport var __ = i18n.__.bind(i18n);\n/**\n * Retrieve translated string with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_x/\n *\n * @param {string} text Text to translate.\n * @param {string} context Context information for the translators.\n * @param {string} [domain] Domain to retrieve the translated text.\n *\n * @return {string} Translated context string without pipe.\n */\n\nexport var _x = i18n._x.bind(i18n);\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number.\n *\n * @see https://developer.wordpress.org/reference/functions/_n/\n *\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {number} number The number to compare against to use either the\n * singular or plural form.\n * @param {string} [domain] Domain to retrieve the translated text.\n *\n * @return {string} The translated singular or plural form.\n */\n\nexport var _n = i18n._n.bind(i18n);\n/**\n * Translates and retrieves the singular or plural form based on the supplied\n * number, with gettext context.\n *\n * @see https://developer.wordpress.org/reference/functions/_nx/\n *\n * @param {string} single The text to be used if the number is singular.\n * @param {string} plural The text to be used if the number is plural.\n * @param {number} number The number to compare against to use either the\n * singular or plural form.\n * @param {string} context Context information for the translators.\n * @param {string} [domain] Domain to retrieve the translated text.\n *\n * @return {string} The translated singular or plural form.\n */\n\nexport var _nx = i18n._nx.bind(i18n);\n/**\n * Check if current locale is RTL.\n *\n * **RTL (Right To Left)** is a locale property indicating that text is written from right to left.\n * For example, the `he` locale (for Hebrew) specifies right-to-left. Arabic (ar) is another common\n * language written RTL. The opposite of RTL, LTR (Left To Right) is used in other languages,\n * including English (`en`, `en-US`, `en-GB`, etc.), Spanish (`es`), and French (`fr`).\n *\n * @return {boolean} Whether locale is RTL.\n */\n\nexport var isRTL = i18n.isRTL.bind(i18n);\n/**\n * Check if there is a translation for a given string (in singular form).\n *\n * @param {string} single Singular form of the string to look up.\n * @param {string} [context] Context information for the translators.\n * @param {string} [domain] Domain to retrieve the translated text.\n * @return {boolean} Whether the translation exists or not.\n */\n\nexport var hasTranslation = i18n.hasTranslation.bind(i18n);\n//# sourceMappingURL=default-i18n.js.map","/**\n * Collect all interactive child elements.\n *\n * @param {HTMLElement} target The element in which to search for interactive children.\n *\n * @return {Array}\n */\nexport default function interactiveChildren(target) {\n // List of possible active child element selectors\n const selectors = [\n 'a[href]:not([aria-hidden=\"true\"])',\n 'area[href]',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])',\n ].join(',');\n\n const interactiveElements = target.querySelectorAll(selectors);\n\n return Array.prototype.slice.call(interactiveElements);\n}\n","import interactiveChildren from './lib/interactiveChildren';\nimport uniqueId from './lib/uniqueId';\n\n/**\n * Sets up a controller-target relationship with appropriate aria-attributes and event handling.\n *\n * @param {Object} config {\n * And object denoting the Disclosure's configuration.\n *\n * @type {HTMLElement} controller The Disclosure's controlling element.\n * @type {HTMLElement} target The Disclosure's target element.\n * @type {Boolean} [loadOpen=false] To load the Disclosure open.\n * @type {Boolean} [allowOutsideClick=true] Keep the Disclosure open on outside clicks.\n * @type {Function} onOpen Function to be run after the Disclosure is opened.\n * @type {Function} onClose Function to be run after the Disclosure is closed.\n * }\n */\nexport default class Disclosure {\n /**\n * Start the component\n */\n constructor(config) {\n /**\n * The default string description for this object.\n *\n * @type {string}\n */\n this.stringDescription = 'Disclosure';\n\n /**\n * Default config options.\n * @type {Object}\n */\n const options = {\n controller: null,\n target: null,\n loadOpen: false,\n allowOutsideClick: true,\n onOpen: () => {},\n onClose: () => {},\n };\n\n // Merge config options with defaults.\n Object.assign(this, options, config);\n\n // Initial state.\n this.state = {\n expanded: this.loadOpen,\n };\n\n /**\n * The target element's interactive child elements.\n * @type {Array}\n */\n this.interactiveChildElements = interactiveChildren(this.target);\n\n // Bind class methods.\n this.setup = this.setup.bind(this);\n this.destroy = this.destroy.bind(this);\n this.toggleExpandedState = this.toggleExpandedState.bind(this);\n this.setExpandedState = this.setExpandedState.bind(this);\n this.rovingTabIndex = this.rovingTabIndex.bind(this);\n this.closeOnOutsideClick = this.closeOnOutsideClick.bind(this);\n\n this.setup();\n this.rovingTabIndex(false);\n }\n\n /**\n * Expand or collapse the disclosure\n *\n * @param {Boolean} expand The expected `expanded` state.\n */\n setExpandedState(expand) {\n this.controller.setAttribute('aria-expanded', `${expand}`);\n this.target.setAttribute('aria-hidden', `${! expand}`);\n\n this.rovingTabIndex(expand);\n\n this.state.expanded = expand;\n\n if (expand) {\n this.onOpen.call(this);\n } else {\n this.onClose.call(this);\n }\n }\n\n /**\n * Get the string description for this object.\n * E.x., Disclosure.toString() === '[object Disclosure]'\n *\n * @return {string}\n */\n get [Symbol.toStringTag]() {\n return this.stringDescription;\n }\n\n /**\n * Add initial attributes, establish relationships, and listen for events\n */\n setup() {\n const { expanded } = this.state;\n\n // Ensure the target and controller each have an ID attribute.\n [this.controller, this.target].forEach((element) => {\n if ('' === element.id) {\n element.setAttribute('id', uniqueId());\n }\n });\n\n // Add a reference to the class instance\n this.controller.disclosure = this;\n this.target.disclosure = this;\n\n // Add controller attributes\n this.controller.setAttribute('aria-expanded', `${expanded}`);\n this.controller.setAttribute('aria-controls', this.target.id);\n\n // If the markup is disconnected, establish a relationship.\n if (this.target !== this.controller.nextElementSibling) {\n this.controller.setAttribute('aria-owns', this.target.id);\n }\n\n // Add target attributes\n this.target.setAttribute('aria-hidden', `${! expanded}`);\n\n // Add event listeners\n this.controller.addEventListener('click', this.toggleExpandedState);\n\n if (! this.allowOutsideClick) {\n document.body.addEventListener('click', this.closeOnOutsideClick);\n }\n }\n\n /**\n * Remove all ARIA attributes added by this class.\n */\n destroy() {\n // Add a reference to the class instance.\n this.controller.disclosure = null;\n this.target.disclosure = null;\n\n // Remove controller attributes.\n this.controller.removeAttribute('aria-expanded');\n this.controller.removeAttribute('aria-controls');\n this.controller.removeAttribute('aria-owns');\n\n // Remove target attributes.\n this.target.removeAttribute('aria-hidden');\n\n // Remove event listeners.\n this.controller.removeEventListener('click', this.toggleExpandedState);\n document.body.removeEventListener('click', this.closeOnOutsideClick);\n\n // Reset initial state.\n this.state = {\n expanded: this.loadOpen,\n };\n }\n\n /**\n * Toggle the expanded state.\n *\n * @param {Object} event The event object.\n */\n toggleExpandedState(event) {\n event.preventDefault();\n\n if (this.state.expanded) {\n this.setExpandedState(false);\n } else {\n this.setExpandedState(true);\n }\n }\n\n /**\n * Close the disclosure when the user clicks outside of the target.\n *\n * @param {Object} event The event object.\n */\n closeOnOutsideClick(event) {\n if (\n this.state.expanded\n && event.target !== this.controller\n && ! this.target.contains(event.target)\n ) {\n this.setExpandedState(false);\n }\n }\n\n /**\n * Prevent focus on interactive elements in the target when the target is hidden.\n *\n * This isn't much of an issue if the element is visually hidden with\n * `display:none`, but becomes an issue if the target is collapsed by\n * other means, like reducing one of its dimensions.\n *\n * @param {Boolean} allow Whether or not to allow focus on children of this.target.\n */\n rovingTabIndex(allow) {\n this.interactiveChildElements.forEach((child) => {\n if (allow) {\n child.removeAttribute('tabindex');\n } else {\n child.setAttribute('tabindex', '-1');\n }\n });\n }\n}\n","/**\n * Create a passably unique `id` attribute.\n *\n * @param {Number} radix An optional base for converting the Number to a String.\n *\n * @returns {String}\n */\nexport default function uniquId(radix = 36) {\n const [, attr] = Math.random().toString(radix).split('.');\n return `id_${attr}`;\n}\n","import getFormattedClassnames from 'utils/getFormattedClassnames';\nimport camelCaseString from 'utils/camelCaseString';\n\n/**\n * Get a component's hashed classname.\n *\n * @param {String} className The classname to retrieve.\n * @param {String} component The component from which to retrieve the classname.\n *\n * @return {String|Boolean} The classname, or false if not found.\n */\nexport default function getClassnameFromComponent(className, component) {\n // Format the string to match that of the classnames object.\n const camelcasedClassName = camelCaseString(className);\n\n // Get the formatted classname.\n const navBarClassnames = sciencenewsClassnames[component];\n const navBarSelectors = getFormattedClassnames(navBarClassnames);\n\n return (undefined !== navBarSelectors[camelcasedClassName])\n ? navBarSelectors[camelcasedClassName]\n : false;\n}\n","/**\n * CamelCase a string.\n *\n * @param {String} input The string to camelCase.\n *\n * @return {String} The input, camelCased.\n */\nexport default function camelCaseString(input) {\n const camelCase = input.split('-').map((word, i) => {\n if (0 === i) {\n return word;\n }\n return word.charAt(0).toUpperCase() + word.slice(1);\n }).join('');\n\n return camelCase;\n}\n","import getClassnameFromComponent from 'utils/getClassnameFromComponent';\n\n/**\n * Get an element or NodeList from another component.\n *\n * @param {String} className The classname to retrieve.\n * @param {String} component The component from which to retrieve the classname.\n * @param {Boolean} all Return a NodeList\n *\n * @return {HTMLElement|NodeList}\n */\nexport default function getElementFromComponent(className, component, all = false) { // eslint-disable-line max-len\n const componentClassname = getClassnameFromComponent(className, component);\n\n if (! componentClassname) {\n return null;\n }\n\n const element = (all)\n ? document.querySelectorAll(componentClassname)\n : document.querySelector(componentClassname);\n\n return element;\n}\n","import config from '../../../config/breakpoints.json';\n\n/**\n * Format global breakpoint values.\n *\n * @return {Object} An object of MediaQueryLists.\n */\nfunction formatBreakpoints() {\n return Object.keys(config).reduce((acc, bp) => {\n const bpMinRems = `${config[bp] / 16}rem`;\n const bpMaxRems = `${(config[bp] - 1) / 16}rem`;\n\n acc[`${bp}Min`] = window.matchMedia(`(min-width: ${bpMinRems})`);\n acc[`${bp}Max`] = window.matchMedia(`(max-width: ${bpMaxRems})`);\n\n return acc;\n }, {});\n}\n\nconst breakpoints = formatBreakpoints();\nexport default breakpoints;\n","import { componentProvider } from 'js-component-framework';\nimport getFormattedClassnames from 'utils/getFormattedClassnames';\nimport HeaderSearch from './header-search';\n\nconst searchClassnames = sciencenewsClassnames['header-search'];\nconst searchSelectors = getFormattedClassnames(searchClassnames);\n\nconst headerSearchConfig = {\n name: 'header-search',\n component: HeaderSearch,\n querySelector: {\n target: searchSelectors.wrapper,\n controller: searchSelectors.toggle,\n openText: searchSelectors.open,\n closeText: searchSelectors.close,\n input: 'input',\n },\n};\n\ncomponentProvider(headerSearchConfig);\n","import { __, setLocaleData } from '@wordpress/i18n';\nimport Disclosure from 'a11y/Disclosure';\nimport createScreenReaderText from 'a11y/lib/createScreenReaderText';\nimport getElementFromComponent from 'utils/getElementFromComponent';\nimport breakpoints from 'utils/breakpoints';\nimport './header-search.scss';\n\n/**\n * Component for the header search form.\n */\nexport default class HeaderSearch {\n /**\n * Start the component\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n // Register text domain\n setLocaleData({ '': {} }, 'sciencenews');\n\n // Bind class methods.\n this.moveComponent = this.moveComponent.bind(this);\n this.updateControllerText = this.updateControllerText.bind(this);\n\n /**\n * The nav-bar wrapper element.\n * @type {HTMLElement}\n */\n this.navBarWrapper = getElementFromComponent('wrapper', 'nav-bar');\n\n /**\n * The nav-bar element (child of the nav-bar.wrapper)\n * @type {HTMLElement}\n */\n this.navBar = getElementFromComponent('nav-bar', 'nav-bar');\n\n /**\n * The nav-bar 'action list' element.\n * @type {HTMLElement}\n */\n this.actionsList = getElementFromComponent('actions', 'nav-bar');\n\n // Ensure the header-search is positioned correctly for the current screen size.\n this.moveComponent();\n breakpoints.lgMin.addListener(this.moveComponent);\n\n this.init();\n // Update the controller text to ensure it reflects the correct state.\n this.updateControllerText();\n }\n\n /**\n * Conditionally relocate the this component based on the matching breakpoint.\n */\n moveComponent() {\n const { controller } = this.children;\n\n if (\n null !== this.navBarWrapper\n && null !== this.navBar\n && null !== this.actionsList\n ) {\n const controllerParent = controller.parentElement;\n const targetParent = this.element.parentElement;\n\n if (breakpoints.lgMin.matches) {\n // For lgMin breakpoint, the header-search should be a child of nav-bar before the actions list.\n if (controllerParent !== this.navBar && targetParent !== this.navBar) {\n // Move the header-search elements into the nav-bar, directly before the actions list.\n // Target (this.element) first – order matters!\n this.navBar.insertBefore(this.element, this.actionsList);\n }\n } else if (\n controllerParent !== this.navBarWrapper\n && targetParent !== this.navBarWrapper\n ) {\n // For breakpoints < lgMin, the header-search should be the last child of the nav-bar.wrapper.\n // Move the header-search elements into the nav-bar wrapper as the last children.\n // Target (this.element) first – order matters!\n this.navBarWrapper.appendChild(this.element);\n }\n }\n }\n\n /**\n * Initialize the Disclosure class and add the screen reader description.\n */\n init() {\n const { controller, target } = this.children;\n /**\n * The Disclosure instance.\n * @type {Disclosure}\n */\n this.disclosure = new Disclosure({\n controller,\n target,\n onOpen: this.updateControllerText,\n onClose: this.updateControllerText,\n });\n\n // Add an aria-description about tabbing backward to the input\n const helpSpan = createScreenReaderText(\n 'header-search-help',\n // eslint-disable-next-line max-len\n __('Use the Shift key with the Tab key to tab back to the search input.', 'sciencenews'),\n );\n document.body.appendChild(helpSpan);\n\n // Make sure the input is completely hidden;\n target.style.clip = 'rect(0, 0, 0, 0)';\n\n target.addEventListener('transitionend', () => {\n const { expanded } = this.disclosure.state;\n\n if (! expanded) {\n target.style.clip = 'rect(0, 0, 0, 0)';\n }\n });\n }\n\n /**\n * Update button text to reflect the disclosure's state.\n */\n updateControllerText() {\n const {\n controller,\n target,\n openText,\n closeText,\n input,\n } = this.children;\n const { expanded } = this.disclosure.state;\n\n // Show the open label when the disclosure is closed.\n openText.setAttribute('aria-hidden', `${expanded}`);\n // Show the close label when the disclosure is open.\n closeText.setAttribute('aria-hidden', `${! expanded}`);\n\n if (expanded) {\n target.style.clip = 'auto';\n // Moving to the search field is unintuitive due to the markup being out-of-order\n // Add the help text when the disclosure is open\n controller.setAttribute('aria-describedby', 'header-search-help');\n input.focus();\n } else {\n controller.removeAttribute('aria-describedby');\n }\n }\n}\n","/**\n * Create the screen reader text element\n *\n * @param {String} id The id for the containing element.\n * @param {String} innerText The text to display to screen readers.\n *\n * @return {HTMLElement}\n */\nexport default function createScreenReaderText(id, innerText) {\n const span = document.createElement('span');\n span.classList.add('screen-reader-text');\n Object.assign(span, { id, innerText });\n\n return span;\n}\n","/**\n * Component for submitting Form Assembly forms.\n */\nclass FormAssemblySubmit {\n /**\n * Start the component.\n */\n constructor(form) {\n if (null == form || ! (form instanceof HTMLFormElement)) {\n throw new Error('Invalid form element.');\n }\n\n /**\n * The form to act upon.\n *\n * @type {HTMLFormElement}\n */\n this.form = form;\n\n // Bind class methods.\n this.validateEmailInput = this.validateEmailInput.bind(this);\n this.formSubmit = this.formSubmit.bind(this);\n this.checkEmailInput = this.checkEmailInput.bind(this);\n this.updateState = this.updateState.bind(this);\n this.updateReadyState = this.updateReadyState.bind(this);\n\n this.init();\n }\n\n /**\n * Dispatch the `sn.formstatechange` event.\n *\n * @param {String} status The form status.\n */\n updateState(status) {\n const event = new CustomEvent(\n 'sn.formstatechange',\n {\n bubbles: true,\n composed: true,\n detail: {\n status,\n },\n },\n );\n\n this.form.dispatchEvent(event);\n }\n\n /**\n * Update the form ready state and dispatch the `sn.formready` event.\n */\n updateReadyState() {\n Object.defineProperty(\n this.form,\n 'faReadyState',\n { value: 'ready', configurable: true },\n );\n\n const event = new CustomEvent(\n 'sn.formready',\n {\n bubbles: true,\n composed: true,\n detail: {},\n },\n );\n\n this.form.dispatchEvent(event);\n }\n\n /**\n * Initialize the Form Assembly helper.\n */\n init() {\n this.emailInput = this.form.querySelector('[name=\"email\"]');\n this.nonceInput = this.form.querySelector('[name=\"nonce\"]');\n this.submit = this.form.querySelector('[type=\"submit\"]');\n this.honeyPot = this.form.querySelector('[name=\"client_key\"]');\n this.formId = this.form.querySelector('[name=\"form_id\"]');\n this.control = this.form.querySelector('[name=\"control\"]');\n\n if (null != this.emailInput) {\n this.form.addEventListener('submit', this.formSubmit);\n this.emailInput.addEventListener('input', this.checkEmailInput);\n\n // Signal that the form is ready.\n this.updateReadyState();\n }\n }\n\n /**\n * Remove the invalid state when the input value is updated.\n */\n checkEmailInput() {\n if (null !== this.emailInput.getAttribute('aria-invalid')) {\n this.emailInput.removeAttribute('aria-invalid');\n }\n }\n\n /**\n * Ensure the email value is valid according to the input's `pattern` attribute.\n *\n * @returns {Boolean}\n */\n validateEmailInput() {\n const { value, pattern } = this.emailInput;\n\n const patternRegExp = new RegExp(pattern);\n const fieldValue = value.trim();\n\n return (0 < value.trim().length && patternRegExp.test(fieldValue));\n }\n\n /**\n * Form submission.\n *\n * @param {Event} event The event object.\n */\n formSubmit(event) { // eslint-disable-line consistent-return\n event.preventDefault();\n\n if (! this.validateEmailInput()) {\n this.emailInput.setAttribute('aria-invalid', 'true');\n return false;\n }\n\n const { pathname, search } = window.location;\n\n // Get hidden input values.\n const honeyPotValue = (this.honeyPot?.value) ? this.honeyPot.value : '';\n const nonceValue = this.nonceInput.value;\n const formId = this.formId.value;\n const control = this.control.value;\n\n // Email is the only forward-facing input.\n const emailValue = encodeURIComponent(this.emailInput.value);\n\n // Disable and clear error state.\n this.emailInput.removeAttribute('aria-invalid');\n this.updateState('loading');\n\n // Build request string.\n const parts = [\n `client_key=${honeyPotValue}`,\n `control=${control}`,\n `email=${emailValue}`,\n `form_id=${formId}`,\n `page=${pathname}`,\n ];\n const string = `${parts.join('&')}${search}`;\n\n const request = new XMLHttpRequest();\n\n // Make AJAX request.\n request.open('POST', this.form.action, true);\n request.setRequestHeader(\n 'Content-Type',\n 'application/x-www-form-urlencoded; charset=UTF-8',\n );\n request.setRequestHeader('X-WP-Nonce', nonceValue);\n request.send(encodeURI(string));\n\n // On completion.\n request.onreadystatechange = () => {\n if (request.readyState === XMLHttpRequest.DONE) {\n const { status } = request;\n\n if (0 === status || (200 <= status && 400 > status)) {\n this.updateState('success');\n } else {\n this.updateState('error');\n }\n }\n };\n }\n}\n\n/**\n * Update classes to reflect the form state.\n *\n * @param {HTMLElement} element The element upon which state classes should be applied\n * @param {Object} details The event details.\n */\nfunction setFormAssemblyState(element, { status }) {\n const classes = {\n loading: 'login-form--loading',\n success: 'login-form--success',\n error: 'login-form--error',\n };\n\n requestAnimationFrame(() => {\n // Clear state classes.\n if ('loading' === status) {\n element.classList.remove(classes.success, classes.error);\n } else {\n element.classList.remove(classes.loading);\n }\n\n // Add the status class.\n element.classList.add(classes[status]);\n });\n}\n\nexport {\n FormAssemblySubmit,\n setFormAssemblyState,\n};\n","import { componentProvider } from 'js-component-framework';\nimport FormAssembly from './form-assembly';\nimport './form-assembly.scss';\n\nconst formAssemblyConfig = {\n name: 'form-assembly',\n component: FormAssembly,\n};\n\ncomponentProvider(formAssemblyConfig);\n","import { FormAssemblySubmit } from 'js/utils/FormAssemblySubmit';\n\n/**\n * Component for Form Assembly component.\n */\nexport default class FormAssembly {\n /**\n * Start the component.\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n // Bind class methods.\n this.init = this.init.bind(this);\n\n this.init();\n }\n\n /**\n * Initialize a FormAssemblySubmit instance.\n */\n init() {\n this.formAssemblySubmit = new FormAssemblySubmit(this.element);\n }\n}\n","import { componentProvider } from 'js-component-framework';\nimport SNCSignup from './snc-signup';\nimport './snc-signup.scss';\n\nconst sncSignupConfig = {\n name: 'snc-signup',\n component: SNCSignup,\n};\n\ncomponentProvider(sncSignupConfig);\n","import { setFormAssemblyState } from 'js/utils/FormAssemblySubmit';\n\n/**\n * Component for SNC Signup CTA Module.\n */\nexport default class SNCSignup {\n /**\n * Start the component.\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n // Bind class methods.\n this.init = this.init.bind(this);\n\n this.init();\n }\n\n /**\n * Initialize a FormAssemblySubmit instance with relevant options.\n */\n init() {\n this.element.addEventListener('sn.formstatechange', (event) => {\n setFormAssemblyState(this.element, event.detail);\n });\n }\n}\n","import { componentProvider } from 'js-component-framework';\nimport getFormattedClassnames from 'utils/getFormattedClassnames';\nimport CookieBanner from './cookie-banner';\nimport './cookie-banner.scss';\n\nconst cookieClassnames = sciencenewsClassnames['cookie-banner'];\nconst cookieSelectors = getFormattedClassnames(cookieClassnames);\n\nconst cookieBannerConfig = {\n name: 'cookie-banner',\n component: CookieBanner,\n querySelector: {\n button: cookieSelectors.button,\n },\n};\n\ncomponentProvider(cookieBannerConfig);\n","import Cookies from 'js-cookie';\n\n/**\n * CookieBanner component.\n */\nexport default class CookieBanner {\n /**\n * Start the component\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n // Bind class methods.\n this.init = this.init.bind(this);\n this.handleButtonClick = this.handleButtonClick.bind(this);\n\n const { sitePrefix } = amScripts.global;\n const prefix = ('snhs' === sitePrefix) ? 'sn' : sitePrefix;\n\n /**\n * The cookie name.\n *\n * @type {String}\n */\n this.cookieName = `${prefix}-cookies-accepted`;\n\n if ('true' !== Cookies.get(this.cookieName)) {\n this.init();\n }\n }\n\n /**\n * Set the cookie and hide the banner when the \"Continue\" button is clicked.\n */\n handleButtonClick() {\n Cookies.set(this.cookieName, true, { expires: 365 });\n\n this.element.setAttribute('hidden', '');\n this.element.setAttribute('aria-hidden', 'true');\n }\n\n /**\n * Initialize the component.\n */\n init() {\n const { button } = this.children;\n\n // Show the cookie banner.\n this.element.removeAttribute('hidden');\n this.element.removeAttribute('aria-hidden');\n\n button.addEventListener('click', this.handleButtonClick);\n }\n}\n","/**\n * Event keyCode values mapped to a key name.\n */\nconst keyCodes = Object.freeze({\n TAB: 9,\n RETURN: 13,\n ESC: 27,\n SPACE: 32,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n});\n\nexport default keyCodes;\n","import keyCodes from './lib/keyCodes';\nimport interactiveChildren from './lib/interactiveChildren';\n\n/**\n * Sets up a controller-target relationship with appropriate aria-attributes and event handling.\n *\n * @param {Object} config {\n * And object denoting the Popup's controller and target elements\n *\n * @type {HTMLElement} controller The controlling element.\n * @type {HTMLElement} target The target popup element.\n * }\n */\nexport default class Popup {\n /**\n * Start the component\n */\n constructor(config) {\n /**\n * The default string description for this object.\n *\n * @type {string}\n */\n this.stringDescription = 'Popup';\n\n // Save references to the controller and target.\n Object.assign(this, config);\n\n /**\n * The target element's interactive child elements.\n * @type {Array}\n */\n this.interactiveChildElements = interactiveChildren(this.target);\n\n // Collect first and last interactive child elements from target.\n if (0 < this.interactiveChildElements.length) {\n const [firstItem] = this.interactiveChildElements;\n this.firstItem = firstItem;\n this.lastItem = (\n this.interactiveChildElements[this.interactiveChildElements.length - 1]\n );\n }\n\n // Intial state.\n this.state = {\n expanded: false,\n };\n\n // Bind class methods.\n this.setup = this.setup.bind(this);\n this.destroy = this.destroy.bind(this);\n this.manageExpandedState = this.manageExpandedState.bind(this);\n this.setExpandedState = this.setExpandedState.bind(this);\n this.controllerKeyDownHandler = this.controllerKeyDownHandler.bind(this);\n this.targetKeyDownHandler = this.targetKeyDownHandler.bind(this);\n this.closeOnTabOut = this.closeOnTabOut.bind(this);\n this.closeOnOutsideClick = this.closeOnOutsideClick.bind(this);\n\n this.setup();\n }\n\n /**\n * Expand or collapse the popup\n *\n * @param {Boolean} expand The expected `expanded` state.\n */\n setExpandedState(expand) {\n this.controller.setAttribute('aria-expanded', `${expand}`);\n this.target.setAttribute('aria-hidden', `${! expand}`);\n this.interactiveChildElements.forEach((element) => {\n element.setAttribute('tabindex', expand ? '0' : '-1');\n });\n\n this.state.expanded = expand;\n }\n\n /**\n * Get the string description for this object.\n * E.x., Popup.toString() === '[object Popup]'\n *\n * @return {string}\n */\n get [Symbol.toStringTag]() {\n return this.stringDescription;\n }\n\n /**\n * Add initial attributes, establish relationships, and listen for events\n */\n setup() {\n const { expanded } = this.state;\n\n // Add a reference to the class instance\n this.controller.popup = this;\n this.target.popup = this;\n\n // Add controller attributes\n this.controller.setAttribute('aria-haspopup', 'menu');\n this.controller.setAttribute('aria-expanded', `${expanded}`);\n this.controller.setAttribute('aria-controls', this.target.id);\n\n // If the markup is disconnected, establish a relationship.\n if (this.target !== this.controller.nextElementSibling) {\n this.controller.setAttribute('aria-owns', this.target.id);\n }\n\n // Add target attributes\n this.target.setAttribute('aria-hidden', `${! expanded}`);\n this.interactiveChildElements.forEach((element) => {\n element.setAttribute('tabindex', expanded ? '0' : '-1');\n });\n\n // Add event listeners\n this.controller.addEventListener('click', this.manageExpandedState);\n this.controller.addEventListener('keydown', this.controllerKeyDownHandler);\n this.target.addEventListener('keydown', this.targetKeyDownHandler);\n document.body.addEventListener('click', this.closeOnOutsideClick);\n }\n\n /**\n * Remove all ARIA attributes added by this class.\n */\n destroy() {\n // Add a reference to the class instance\n this.controller.popup = null;\n this.target.popup = null;\n\n // Remove controller attributes\n this.controller.removeAttribute('aria-haspopup');\n this.controller.removeAttribute('aria-expanded');\n this.controller.removeAttribute('aria-controls');\n\n if (this.target !== this.controller.nextElementSibling) {\n this.controller.removeAttribute('aria-owns');\n }\n\n // Remove target attributes\n this.target.removeAttribute('aria-hidden');\n\n // Remove event listeners.\n this.controller.removeEventListener('click', this.manageExpandedState);\n this.controller.removeEventListener(\n 'keydown',\n this.controllerKeyDownHandler,\n );\n this.target.removeEventListener('keydown', this.targetKeyDownHandler);\n document.body.removeEventListener('click', this.closeOnOutsideClick);\n\n // Reset initial state.\n this.state = {\n expanded: false,\n };\n }\n\n /**\n * Handle keydown events on the popup controller.\n *\n * @param {Object} event The event object.\n */\n controllerKeyDownHandler(event) {\n const { expanded } = this.state;\n\n if (expanded) {\n const { ESC, TAB } = keyCodes;\n const { keyCode } = event;\n\n if (ESC === keyCode) {\n // Close the popup.\n event.stopPropagation();\n event.preventDefault();\n\n this.setExpandedState(false);\n } else if (TAB === keyCode) {\n // Move to the first interactive child.\n event.preventDefault();\n\n this.firstItem.focus();\n }\n }\n }\n\n /**\n * Handle keydown events on the popup target.\n *\n * @param {Object} event The event object.\n */\n targetKeyDownHandler(event) {\n const { ESC, TAB } = keyCodes;\n const { keyCode } = event;\n const { expanded } = this.state;\n const { activeElement } = document;\n\n if (ESC === keyCode && expanded) {\n // Close the popup.\n event.stopPropagation();\n event.preventDefault();\n\n this.setExpandedState(false);\n this.controller.focus();\n } else if (TAB === keyCode) {\n if (\n event.shiftKey\n && (this.firstItem === activeElement || this.target === activeElement)\n ) {\n // Tab back from the first interactive child to the controller.\n event.preventDefault();\n this.controller.focus();\n } else if (this.lastChild === activeElement) {\n // Close the popup when tabbing from the last child.\n // TODO: Is this correct behavior?\n this.setExpandedState(false);\n }\n }\n }\n\n /**\n * Manage the popup state.\n *\n * @param {Object} event The event object.\n */\n manageExpandedState(event) {\n event.preventDefault();\n\n if (this.state.expanded) {\n this.setExpandedState(false);\n } else {\n this.setExpandedState(true);\n }\n }\n\n /**\n * Tab from the last item and close the menu.\n *\n * @param {Object} event The event object.\n */\n closeOnTabOut(event) {\n const { TAB } = keyCodes;\n\n if (TAB === event.keyCode && ! event.shiftKey && this.state.expanded) {\n this.setExpandedState(false);\n }\n }\n\n /**\n * Close the popup when clicking anywhere outside.\n *\n * @param {Object} event The event object.\n */\n closeOnOutsideClick(event) {\n if (\n this.state.expanded\n && event.target !== this.controller\n && ! this.target.contains(event.target)\n ) {\n this.setExpandedState(false);\n }\n }\n}\n","import keyCodes from './lib/keyCodes';\n\n/**\n * MenuItem class for managing menu items' keyboard interactions.\n *\n * @param {HTMLElement} list The list to manage.\n */\nexport default class MenuItem {\n /**\n * Test for a list as the next sibling element.\n *\n * @param {HTMLElement} element The element for which we're looking for a sibling.\n *\n * @return {HTMLElement|Boolean}\n */\n static nextElementIsUl(element) {\n const next = element.nextElementSibling;\n return (null !== next && 'UL' === next.nodeName) ? next : false;\n }\n\n /**\n * Start the component\n */\n constructor(list) {\n /**\n * The default string description for this object.\n *\n * @type {string}\n */\n this.stringDescription = 'MenuItem';\n\n /**\n * The list to manage\n * @type {HTMLElement}\n */\n this.list = list;\n\n // Save a reference to the MenuItem instance on the list item.\n Object.assign(list, { menuItem: this });\n\n /**\n * The list's child elements.\n * @type {Array}\n */\n this.listItems = Array.prototype.slice.call(list.children);\n\n // Bind class methods\n this.handleListKeydown = this.handleListKeydown.bind(this);\n this.destroy = this.destroy.bind(this);\n\n this.init();\n }\n\n /**\n * Get the string description for this object.\n * E.x., MenuItem.toString() === '[object MenuItem]'\n *\n * @return {string}\n */\n get [Symbol.toStringTag]() {\n return this.stringDescription;\n }\n\n /**\n * Collect menu links and recursively instantiate sublist menu items.\n */\n init() {\n // Collect menu items.\n this.menuItems = this.listItems.reduce((acc, item) => {\n const itemLink = item.firstElementChild;\n\n if (null !== itemLink && 'A' === itemLink.nodeName) {\n return [...acc, itemLink];\n }\n\n return acc;\n }, []);\n\n /**\n * The number of menu items.\n * @type {Number}\n */\n this.menuItemsLength = this.menuItems.length;\n\n // Set menu item link attributes and event listeners.\n this.list.setAttribute('role', 'menu');\n this.menuItems.forEach((link, index) => {\n link.parentElement.setAttribute('role', 'presentation');\n\n // Add size and position attributes.\n link.setAttribute('role', 'menuitem');\n link.setAttribute('aria-setsize', this.menuItemsLength);\n link.setAttribute('aria-posinset', index + 1);\n\n link.addEventListener('keydown', this.handleListKeydown);\n\n const siblingList = this.constructor.nextElementIsUl(link);\n if (siblingList) {\n const subList = new MenuItem(siblingList);\n // Save the list's previous sibling.\n subList.previousSibling = link;\n }\n });\n\n // Save the menu's first and last items.\n [this.firstItem] = this.menuItems;\n this.lastItem = this.menuItems[this.menuItemsLength - 1];\n }\n\n /**\n * Handle keydown events on menu items.\n *\n * @param {Object} event The event object.\n */\n handleListKeydown(event) {\n const { keyCode } = event;\n const {\n UP,\n DOWN,\n LEFT,\n RIGHT,\n } = keyCodes;\n const { activeElement } = document;\n const activeDescendant = (this.list.contains(activeElement)\n ? activeElement\n : this.menuItems[0]);\n const menuLastIndex = this.menuItems.length - 1;\n const activeIndex = this.menuItems.indexOf(activeDescendant);\n\n if ([UP, DOWN].includes(keyCode)) {\n // Move through sibling list items.\n event.stopPropagation();\n event.preventDefault();\n\n // Determine the direction.\n let nextIndex = (keyCode === UP)\n ? activeIndex - 1\n : activeIndex + 1;\n\n // Move to the end if we're moving to the previous child from the first child.\n if (UP === keyCode && 0 > nextIndex) {\n nextIndex = menuLastIndex;\n }\n\n // Move to first child if we're at the end.\n if (DOWN === keyCode && menuLastIndex < nextIndex) {\n nextIndex = 0;\n }\n\n this.menuItems[nextIndex].focus();\n } else if (RIGHT === keyCode) {\n // Drill down into a nested list, if present.\n const siblingElement = this.constructor.nextElementIsUl(activeDescendant);\n\n if (\n siblingElement\n && Object.hasOwnProperty.call(siblingElement, 'menuItem')\n ) {\n event.stopPropagation();\n event.preventDefault();\n\n const { menuItem } = siblingElement;\n menuItem.firstItem.focus();\n }\n } else if (LEFT === keyCode) {\n // Move up to the list's previous sibling, if present.\n if (undefined !== this.previousSibling) {\n event.stopPropagation();\n event.preventDefault();\n\n // Close the popup if it exists and is exapnded.\n if ('[object Popup]' === this.previousSibling?.popup?.toString()) {\n event.stopPropagation();\n event.preventDefault();\n\n const { popup } = this.previousSibling;\n if (popup.state.expanded) {\n popup.setExpandedState(false);\n }\n }\n\n this.previousSibling.focus();\n }\n }\n }\n\n /**\n * Destroy the MenuItem (recursively)\n */\n destroy() {\n if (undefined !== this.list.menuItem) {\n // Set the menuItem property to null\n this.list.menuItem = null;\n\n this.list.removeAttribute('role');\n\n this.menuItems.forEach((link) => {\n link.parentElement.removeAttribute('role');\n\n // Remove size and position attributes.\n link.removeAttribute('role');\n link.removeAttribute('aria-setsize');\n link.removeAttribute('aria-posinset');\n\n link.removeEventListener('keydown', this.handleListKeydown);\n\n // Destroy nested MenuItems.\n const siblingList = this.constructor.nextElementIsUl(link);\n if (\n siblingList\n && undefined !== siblingList.menuItem\n && '[object MenuItem]' === siblingList?.menuItem?.toString()\n ) {\n siblingList.menuItem.destroy();\n }\n });\n }\n }\n}\n","/**\n * Create an array from a value.\n *\n * @param {Mixed} maybeAnArray And HTMLElement, NodeList, or Array of elements.\n */\nfunction toArray(maybeAnArray) {\n if (Array.isArray(maybeAnArray)) {\n return maybeAnArray;\n }\n\n let shouldBeAnArray = [];\n\n if (maybeAnArray instanceof HTMLElement) {\n // Convert element(s) to an Array.\n shouldBeAnArray = new Array(maybeAnArray);\n } else if (maybeAnArray instanceof NodeList) {\n // Array.from(maybeAnArray);\n shouldBeAnArray = Array.prototype.slice.call(maybeAnArray, 0);\n }\n\n return shouldBeAnArray;\n}\n\n/**\n * Remove the tabIndex attribute from all elements.\n *\n * @param {Mixed} items And HTMLElement, NodeList, or Array of elements.\n */\nfunction tabIndexAllow(items) {\n const allowedElements = Array.isArray(items) ? items : toArray(items);\n\n allowedElements.forEach((item) => {\n item.removeAttribute('tabindex');\n });\n}\n\n/**\n * Add a negative tabIndex attribute to all elements.\n *\n * @param {Mixed} items And HTMLElement, NodeList, or Array of elements.\n */\nfunction tabIndexDeny(items) {\n const deniedElements = Array.isArray(items) ? items : toArray(items);\n\n deniedElements.forEach((item) => {\n item.setAttribute('tabindex', '-1');\n });\n}\n\n/**\n * Manage items' tabindex.\n *\n * @param {NodeList|Array} items The items whose tabindex may need updating.\n * @param {HTMLElement|NodeList|Array} allow The item to which we'll allow tabbing.\n */\nfunction rovingTabIndex(items, allow) {\n const allowedElements = Array.isArray(allow) ? allow : toArray(allow);\n const allItems = Array.isArray(items) ? items : toArray(items);\n\n tabIndexAllow(allowedElements);\n\n if (0 < allItems.length) {\n const deniedElements = allItems.filter((item) => (\n ! allowedElements.includes(item)\n ));\n tabIndexDeny(deniedElements);\n }\n}\n\nexport {\n rovingTabIndex,\n tabIndexAllow,\n tabIndexDeny,\n toArray,\n};\n","import { setLocaleData } from '@wordpress/i18n';\nimport Popup from 'a11y/Popup';\nimport MenuItem from 'a11y/MenuItem';\nimport keyCodes from './lib/keyCodes';\nimport { rovingTabIndex } from './lib/rovingTabIndex';\n\n/**\n * Menu class for managing a menu's top-level keyboard interactions.\n *\n * @param {HTMLElement} menu The menu
    \n */\nexport default class Menu {\n /**\n * Start the component\n */\n constructor(menu) {\n /**\n * The default string description for this object.\n *\n * @type {string}\n */\n this.stringDescription = 'Menu';\n\n /**\n * The menu
      \n * @type {HTMLElement}\n */\n this.menu = menu;\n\n /**\n * Will hold menu popups.\n * @type {Array}\n */\n this.popups = [];\n\n // Register text domain\n setLocaleData({ '': {} }, 'sciencenews');\n\n // Bind class methods.\n this.manageState = this.manageState.bind(this);\n this.handleMenuBarKeydown = this.handleMenuBarKeydown.bind(this);\n this.handleMenuBarClick = this.handleMenuBarClick.bind(this);\n this.destroy = this.destroy.bind(this);\n\n this.init();\n }\n\n /**\n * Get the string description for this object.\n * E.x., Menu.toString() === '[object Menu]'\n *\n * @return {string}\n */\n get [Symbol.toStringTag]() {\n return this.stringDescription;\n }\n\n /**\n * Manage menu activeDescendant state.\n *\n * @param {Object} newState The new state.\n */\n manageState(newState) {\n this.state = Object.assign(this.state, newState);\n\n if (Object.prototype.hasOwnProperty.call(newState, 'activeDescendant')) {\n const { activeDescendant } = this.state;\n\n rovingTabIndex(this.menuBarItems, activeDescendant);\n activeDescendant.focus();\n }\n }\n\n /**\n * Collect top-level menu items and set up event handlers.\n */\n init() {\n // Set the menu role.\n this.menu.setAttribute('role', 'menu');\n\n // Adds a circular self-reference for external access.\n this.menu.menu = this;\n\n this.menuItemsCollection = this.menu.children;\n this.menuItemsArray = Array.prototype.slice.call(this.menuItemsCollection);\n\n // Collect menu links.\n this.menuBarItems = this.menuItemsArray.reduce((acc, item) => {\n const itemLink = item.firstElementChild;\n\n if (null !== itemLink && 'A' === itemLink.nodeName) {\n return [...acc, itemLink];\n }\n\n return acc;\n }, []);\n\n /**\n * The number of menu items.\n * @type {Number}\n */\n this.menuLength = this.menuBarItems.length;\n\n // Set menu link attributes and event listeners.\n this.menuBarItems.forEach((link, index) => {\n link.parentElement.setAttribute('role', 'presentation');\n\n // Add size and position attributes.\n link.setAttribute('role', 'menuitem');\n link.setAttribute('aria-setsize', this.menuLength);\n link.setAttribute('aria-posinset', index + 1);\n\n link.addEventListener('keydown', this.handleMenuBarKeydown);\n link.addEventListener('click', this.handleMenuBarClick);\n });\n\n /**\n * The index of the last menubar item\n * @type {Number}\n */\n this.lastIndex = (this.menuLength - 1);\n\n // Save the menu's first and last items.\n [this.firstItem] = this.menuBarItems;\n this.lastItem = this.menuBarItems[this.lastIndex];\n\n /**\n * Set initial state.\n * @type {Object}\n */\n this.state = {\n activeDescendant: this.firstItem,\n };\n\n // Initialize popups for nested lists.\n this.popups = this.menuBarItems.reduce((acc, controller) => {\n const target = controller.nextElementSibling;\n\n if (null !== target && 'UL' === target.nodeName) {\n const popup = new Popup({ controller, target });\n\n target.addEventListener('keydown', this.handleListKeydown);\n const subList = new MenuItem(target);\n // Save the list's previous sibling.\n subList.previousSibling = controller;\n\n return [...acc, popup];\n }\n\n return acc;\n }, []);\n\n // Set up initial tabindex.\n rovingTabIndex(\n this.menuBarItems,\n this.state.activeDescendant,\n );\n }\n\n /**\n * Handle keydown events on the menuList element.\n *\n * @param {Object} event The event object.\n */\n handleMenuBarKeydown(event) {\n const { LEFT, RIGHT, DOWN } = keyCodes;\n const { keyCode } = event;\n const { activeDescendant } = this.state;\n const activeIndex = this.menuBarItems.indexOf(activeDescendant);\n\n if ([LEFT, RIGHT].includes(keyCode)) {\n event.stopPropagation();\n event.preventDefault();\n\n // Determine the direction.\n let nextIndex = (keyCode === LEFT)\n ? activeIndex - 1\n : activeIndex + 1;\n\n // Move to the end if we're moving to the previous child from the first child.\n if (LEFT === keyCode && 0 > nextIndex) {\n nextIndex = this.lastIndex;\n }\n\n // Move to first child if we're at the end.\n if (RIGHT === keyCode && this.lastIndex < nextIndex) {\n nextIndex = 0;\n }\n\n this.manageState({\n activeDescendant: this.menuBarItems[nextIndex],\n });\n } else if (DOWN === keyCode) {\n // Open the popup if it exists and is not expanded.\n if ('[object Popup]' === activeDescendant?.popup?.toString()) {\n event.stopPropagation();\n event.preventDefault();\n\n const { popup } = activeDescendant;\n\n if (! popup.state.expanded) {\n popup.setExpandedState(true);\n }\n\n popup.firstItem.focus();\n }\n }\n }\n\n /**\n * Update the active descendant when the item is clicked.\n *\n * @param {Object} event The event object.\n */\n handleMenuBarClick(event) {\n this.manageState({\n activeDescendant: event.target,\n });\n }\n\n /**\n * Recursively destroy Menu, MenuItems, and Popups.\n */\n destroy() {\n // Remove the menu role.\n this.menu.removeAttribute('role');\n\n this.menuItemsCollection = this.menu.children;\n this.menuItemsArray = Array.prototype.slice.call(this.menuItemsCollection);\n\n this.menuBarItems.forEach((link) => {\n link.parentElement.removeAttribute('role');\n\n // Remove size and position attributes.\n link.removeAttribute('role');\n link.removeAttribute('aria-setsize');\n link.removeAttribute('aria-posinset');\n\n link.removeEventListener('keydown', this.handleMenuBarKeydown);\n link.removeEventListener('click', this.handleMenuBarClick);\n });\n\n // Destroy nested components.\n if (0 < this.popups.length) {\n this.popups.forEach((popup) => {\n if (\n undefined !== popup.target.menuItem\n && '[object MenuItem]' === popup?.target?.menuItem?.toString()\n ) {\n popup.target.menuItem.destroy();\n }\n popup.destroy();\n });\n }\n\n // Allow tabbing to all menubar items\n this.menuBarItems.forEach((menuBarItem) => {\n menuBarItem.removeAttribute('tabindex');\n });\n }\n}\n","import { componentProvider } from 'js-component-framework';\nimport getFormattedClassnames from 'utils/getFormattedClassnames';\nimport NavBar from 'components/nav-bar/nav-bar';\nimport 'components/nav-bar/nav-bar.scss';\nimport './nav-bar-collapsed.scss';\nimport './primary-menu-collapsed.scss';\n\nconst navBarClassnames = sciencenewsClassnames['nav-bar-collapsed'];\nconst navBarSelectors = getFormattedClassnames(navBarClassnames);\nconst { toggle, navBar, actions } = navBarSelectors;\n\nconst navBarCollapsedConfig = {\n name: 'nav-bar-collapsed',\n component: NavBar,\n querySelector: { toggle, navBar, actions },\n querySelectorAll: {},\n options: {\n menuStylesheet: 'primary-menu-collapsed',\n persist: true,\n },\n};\n\ncomponentProvider(navBarCollapsedConfig);\n","import Popup from 'a11y/Popup';\nimport Menu from 'a11y/Menu';\nimport MenuItem from 'a11y/MenuItem';\nimport keyCodes from 'a11y/lib/keyCodes';\nimport breakpoints from 'utils/breakpoints';\nimport getElementFromComponent from 'utils/getElementFromComponent';\nimport getClassnameFromComponent from 'utils/getClassnameFromComponent';\n\n/**\n * Component for the NavBar menu.\n */\nexport default class NavBar {\n /**\n * Create the dropdown icon for identifying submenus.\n *\n * @todo Refactor this to instead place the icon in the markup via\n * 'walker_nav_menu_start_el' and hide with CSS until NavBar inits.\n *\n * @static\n * @return {DocumentFragment}\n */\n static getDropdownIcon() {\n // eslint-disable-next-line global-require, import/no-dynamic-require, import/no-webpack-loader-syntax\n const icon = require('!svg-inline-loader!./chevron-down.svg');\n const range = document.createRange();\n const fragment = range.createContextualFragment(icon);\n return fragment;\n }\n\n /**\n * Start the component\n */\n constructor({ element, children, options }) {\n this.element = element;\n this.children = children;\n this.options = options;\n\n const { menuStylesheet, persist } = this.options;\n\n /**\n * Test for the header variant for which the menu button persists across breakpoints.\n * @type {boolean}\n */\n this.persistMenuButton = (true === persist);\n\n /**\n * Hold the `.menu` class instances.\n * @type {Menu|MenuItem}\n */\n this.primaryMenu = {};\n\n /**\n * Hold the `.topics-menu` class instance.\n * @type {MenuItem}\n */\n this.topicsMenu = {};\n\n const stylesheet = (undefined !== menuStylesheet)\n ? menuStylesheet\n : 'primary-menu';\n\n const { toggle, navBar, actions } = this.children;\n\n // The primary navigation.\n const menu = getElementFromComponent('menu', stylesheet);\n\n // Get the submenu parent links.\n const hasChildren = getClassnameFromComponent('has-children', stylesheet);\n const submenuLinks = menu.querySelectorAll(`${hasChildren} > a`);\n\n // The (mobile-only) Topics Menu\n const topics = getElementFromComponent('topics-menu', stylesheet);\n // The (desktop-only) Topics MegaMenu\n const topicsMegaMenu = getElementFromComponent('list', 'topics-megamenu');\n\n // Collect instance properties.\n Object.assign(this, {\n toggle,\n navBar,\n menu,\n topics,\n actions,\n topicsMegaMenu,\n submenuLinks,\n menuButton: {},\n });\n\n // Bind class methods\n this.handleBreakpointChanges = this.handleBreakpointChanges.bind(this);\n this.setUpMenuButton = this.setUpMenuButton.bind(this);\n this.useHamburgerMenu = this.useHamburgerMenu.bind(this);\n this.setUpPrimaryMenu = this.setUpPrimaryMenu.bind(this);\n this.setUpPrimaryMenuItem = this.setUpPrimaryMenuItem.bind(this);\n this.setUpSecondaryMenuItems = this.setUpSecondaryMenuItems.bind(this);\n this.addKeydownPatches = this.addKeydownPatches.bind(this);\n this.removeKeydownPatches = this.removeKeydownPatches.bind(this);\n this.patchTopLevelKeydown = this.patchTopLevelKeydown.bind(this);\n this.patchNavBarKeydown = this.patchNavBarKeydown.bind(this);\n this.patchMenuButtonKeydown = this.patchMenuButtonKeydown.bind(this);\n this.patchPrimaryMenuFirstItem = this.patchPrimaryMenuFirstItem.bind(this);\n this.patchTopicsMenuFirstItem = this.patchTopicsMenuFirstItem.bind(this);\n\n if (this.persistMenuButton) {\n // Use the menu button setup (mobile menu) across all breakpoints.\n this.useHamburgerMenu();\n } else {\n /*\n * Add the dropdown icon.\n * We do this here so it's guaranteed to only be applied once.\n */\n const nodeListLength = this.submenuLinks.length;\n const dropdownIcon = this.constructor.getDropdownIcon();\n for (let i = 0; i < nodeListLength; i += 1) {\n if (! this.submenuLinks[i].querySelector('svg')) {\n this.submenuLinks[i].appendChild(dropdownIcon);\n }\n }\n\n // Check the viewport width and initialize accordingly.\n this.handleBreakpointChanges();\n breakpoints.lgMin.addListener(this.handleBreakpointChanges);\n }\n }\n\n /**\n * The Menu Button Popup should only be initialized for small screens.\n */\n handleBreakpointChanges() {\n if (breakpoints.lgMin.matches) {\n // Instantiate `this.primaryMenu` as Menu.\n this.setUpPrimaryMenu();\n\n // Destroy `this.topicsMenu` MenuItem.\n if (this.topicsMenu instanceof MenuItem) {\n this.topicsMenu.destroy();\n }\n\n // Destroy the menu button for large screens.\n if (this.menuButton instanceof Popup) {\n this.menuButton.destroy();\n }\n\n // Remove small screen keyboard support as not needed for larger screens.\n this.removeKeydownPatches();\n\n // Focus the topics megaMenu if a topics item has focus.\n if (\n null !== this.topics\n && this.topics.contains(document.activeElement)\n ) {\n this.topicsMegaMenu.menu.firstItem.focus();\n }\n } else {\n this.useHamburgerMenu();\n }\n }\n\n /**\n * Set up the menu button as a Popup.\n */\n setUpMenuButton() {\n // The popup may be been instantiated, but subsequently destroyed.\n if (this.menuButton instanceof Popup) {\n // If the Popup class has already been initialized, reset it.\n this.menuButton.setup();\n } else {\n // Initialize the Popup class.\n this.menuButton = new Popup({\n controller: this.toggle,\n target: this.navBar,\n });\n }\n\n /**\n * Adds expected keyboard support to the menu button toggle.\n *\n * @param {Event} event\n */\n this.menuButton.controller.addEventListener(\n 'keydown',\n this.patchMenuButtonKeydown,\n );\n }\n\n /**\n * Set up the primary nav menu as a Menu for desktop menu.\n * The primary menu may be been instantiated as Menu, but subsequently destroyed.\n */\n setUpPrimaryMenu() {\n if (this.primaryMenu instanceof MenuItem) {\n this.primaryMenu.destroy();\n }\n\n if (this.primaryMenu instanceof Menu) {\n // If the Menu class has already been initialized, reset it.\n this.primaryMenu.init();\n } else {\n // Initialize the Menu class.\n this.primaryMenu = new Menu(this.menu);\n }\n }\n\n /**\n * Set up the primary nav menu as a MenuItem for mobile menu.\n * The primary menu may be been instantiated as MenuItem, but subsequently destroyed.\n */\n setUpPrimaryMenuItem() {\n if (this.primaryMenu instanceof Menu) {\n this.primaryMenu.destroy();\n }\n\n if (this.primaryMenu instanceof MenuItem) {\n // If the MenuItem class has already been initialized, reset it.\n this.primaryMenu.init();\n } else {\n // Initialize the MenuItem class.\n this.primaryMenu = new MenuItem(this.menu);\n }\n }\n\n /**\n * Set up the Topics menu as MenuItems for mobile menu.\n * Either of these may have been instantiated, but subsequently destroyed.\n */\n setUpSecondaryMenuItems() {\n if (null !== this.topics) {\n if (this.topicsMenu instanceof MenuItem) {\n // If the MenuItem class has already been initialized, reset it.\n this.topicsMenu.init();\n } else {\n // Initialize the MenuItem class for the Topics menu.\n this.topicsMenu = new MenuItem(this.topics);\n }\n }\n }\n\n /**\n * Set the menu hidden behind the menu button.\n */\n useHamburgerMenu() {\n // Set up the menu button as a Popup.\n this.setUpMenuButton();\n\n // Instantiate `this.primaryMenu` as MenuItem.\n this.setUpPrimaryMenuItem();\n\n // Instantiate `this.topicsMenu` as MenuItems.\n this.setUpSecondaryMenuItems();\n\n // Patch keyboard support.\n this.addKeydownPatches();\n\n // Focus the menuButton if a nav-bar child has focus.\n if (\n this.navBar.contains(document.activeElement)\n || (\n null !== this.topics\n && this.topics.contains(document.activeElement)\n )\n ) {\n this.menuButton.controller.focus();\n }\n }\n\n /**\n * Remove keydown patches for large screen.\n */\n removeKeydownPatches() {\n if (\n this.primaryMenu instanceof MenuItem\n || this.primaryMenu instanceof Menu\n ) {\n this.primaryMenu.firstItem.removeEventListener(\n 'keydown',\n this.patchPrimaryMenuFirstItem,\n );\n }\n\n if (this.topicsMenu instanceof MenuItem) {\n this.topicsMenu.firstItem.removeEventListener(\n 'keydown',\n this.patchTopicsMenuFirstItem,\n );\n }\n\n this.menu.removeEventListener('keydown', this.patchTopLevelKeydown);\n if (null !== this.topics) {\n this.topics.removeEventListener('keydown', this.patchTopLevelKeydown);\n }\n\n this.navBar.removeEventListener('keydown', this.patchNavBarKeydown);\n }\n\n /**\n * Patch incomplete keyboard navigation. Applied to individual elements,\n * rather than delegated, in order to override the Menu/MenuItem event\n * listeners.\n */\n addKeydownPatches() {\n // Arrow up key moves focus to the topics menu's first item.\n this.primaryMenu.firstItem.addEventListener(\n 'keydown',\n this.patchPrimaryMenuFirstItem,\n );\n\n // Patches incomplete Topics Menu keyboard navigation support.\n if (null !== this.topics) {\n this.topicsMenu.firstItem.addEventListener(\n 'keydown',\n this.patchTopicsMenuFirstItem,\n );\n }\n\n // Close the menu on left arrow key.\n this.menu.addEventListener('keydown', this.patchTopLevelKeydown);\n if (null !== this.topics) {\n this.topics.addEventListener('keydown', this.patchTopLevelKeydown);\n }\n\n // Patch incomplete keyboard navigation.\n this.navBar.addEventListener('keydown', this.patchNavBarKeydown);\n }\n\n /**\n * Patches incomplete keyboard navigation. These are separate lists, so not\n * covered by the MenuItem's default keydown handlers:\n *\n * - Closes the menu on left arrow key if the item isn't a submenu.\n *\n * @param {Event} event\n */\n patchTopLevelKeydown(event) {\n const { keyCode, target } = event;\n const { LEFT } = keyCodes;\n\n if (\n LEFT === keyCode\n && (\n undefined === target.menuItem\n || undefined === target.menuItem.previousSibling\n )\n ) {\n this.menuButton.setExpandedState(false);\n this.menuButton.controller.focus();\n }\n }\n\n /**\n * Patches incomplete keyboard navigation. These are separate lists, so not\n * covered by the MenuItem's default keydown handlers:\n *\n * - Home key moves to last menu item, End key moves to last menu item.\n *\n * @param {Event} event\n */\n patchNavBarKeydown(event) {\n const { keyCode } = event;\n const { HOME, END } = keyCodes;\n\n if (HOME === keyCode) {\n event.preventDefault();\n this.menuButton.firstItem.focus();\n } else if (END === keyCode) {\n event.preventDefault();\n this.menuButton.lastItem.focus();\n }\n }\n\n /**\n * Patches incomplete keyboard navigation. These are separate lists, so not\n * covered by the MenuItem's default keydown handlers:\n *\n * - Moves from Topics Menu to Primary Menu.\n * - Recycles keyboard navigation from first to last item\n *\n * @param {Event} event\n */\n patchTopicsMenuFirstItem(event) {\n const { keyCode } = event;\n const { UP, DOWN } = keyCodes;\n\n if (DOWN === keyCode && undefined !== this.primaryMenu.firstItem) {\n event.preventDefault();\n this.primaryMenu.firstItem.focus();\n } else if (UP === keyCode) {\n event.preventDefault();\n this.menuButton.lastItem.focus();\n }\n }\n\n /**\n * Patches incomplete keyboard navigation. These are separate lists, so not\n * covered by the MenuItem's default keydown handlers:\n *\n * - Moves from the Primary Menu to the Topics Menu.\n *\n * @param {Event} event\n */\n patchPrimaryMenuFirstItem(event) {\n const { keyCode } = event;\n const { UP } = keyCodes;\n\n if (UP === keyCode && undefined !== this.topicsMenu.firstItem) {\n event.preventDefault();\n this.topicsMenu.firstItem.focus();\n }\n }\n\n /**\n * Patches incomplete keyboard navigation. These are separate lists, so not\n * covered by the MenuItem's default keydown handlers:\n *\n * - Opens the menu and selects the appropriate item\n *\n * @param {Event} event\n */\n patchMenuButtonKeydown(event) {\n const { keyCode } = event;\n const { UP, DOWN } = keyCodes;\n\n if ([UP, DOWN].includes(keyCode)) {\n event.preventDefault();\n\n // Open the menu if it's not already open.\n if (! this.menuButton.state.expanded) {\n this.menuButton.setExpandedState(true);\n }\n\n if (UP === keyCode) {\n // Focus the last item.\n this.menuButton.lastItem.focus();\n } else {\n // Focus the first item (down arrow).\n this.menuButton.firstItem.focus();\n }\n }\n }\n}\n","/**\n * Network component for handling throttling of events via requestAnimationFrame\n */\nexport default class Throttle {\n /**\n * Create a new instance of Throttle.\n *\n * @param {HTMLElement} element Element on which throttle should be applied.\n * @param {string} event Event on which the throttle should be applied.\n * @param {function} callback Function to debounce (don't forget to bind it!).\n * @param {int} frequency Maximum frequency at which callback should be executed.\n */\n constructor(element, event, callback, frequency = 250) {\n Object.assign(this, {\n callback,\n event,\n element,\n frequency,\n timeout: false,\n });\n\n // Bound events\n this.requestTick = this.requestTick.bind(this);\n this.update = this.update.bind(this);\n\n if (! this.callback) {\n // eslint-disable-next-line no-console\n console.error('Throttle error: you must specify a callback.');\n } else {\n this.element.addEventListener(this.event, this.requestTick);\n }\n }\n\n /**\n * Dispatches the event to the supplied callback\n * @private\n */\n update() {\n this.callback();\n window.clearTimeout(this.timeout);\n this.timeout = false;\n }\n\n /**\n * Ensures events don't get stacked\n * @private\n */\n requestTick() {\n if (! this.timeout) {\n this.timeout = window.setTimeout(() => {\n window.requestAnimationFrame(this.update);\n }, this.frequency);\n }\n }\n\n /**\n * Remove debouncer\n * @private\n */\n destroy() {\n this.element.removeEventListener(this.event, this.requestTick);\n }\n}\n","import Throttle from 'utils/Throttle';\n\n/**\n * A class to automatically manage menu items that overflow their container width.\n * h/t https://codepen.io/lukejacksonn/pen/PwmwWV\n */\nexport default class PriorityNav {\n /**\n * Create a PriorityNav instance.\n * @constructor\n *\n * @param {object} config The config object.\n */\n constructor(config) {\n /**\n * Component configuration options.\n *\n * @type {object}\n */\n const options = {\n /**\n * The element wrapping the menu.\n *\n * @type {HTMLElement}\n */\n wrapper: null,\n\n /**\n * The menu element.\n *\n * @type {HTMLUListElement}\n */\n menu: null,\n\n /**\n * The overflow menu toggle.\n *\n * @type {HTMLButtonElement}\n */\n button: null,\n\n /**\n * The overflow menu.\n *\n * @type {HTMLUListElement}\n */\n overflow: null,\n\n /**\n * Callback to run after the overflow menu is updated.\n *\n * @callback overflowUpdateCallback\n */\n onOverflowUpdate: () => {},\n };\n\n // Bind class methods.\n this.init = this.init.bind(this);\n this.handleResize = this.handleResize.bind(this);\n this.destroy = this.destroy.bind(this);\n\n // Filter out null & undefined values.\n const invalueConfig = Object.keys(config).filter((item) => ! config[item]);\n\n // Only proceed if we have everything we need.\n if (0 === invalueConfig.length) {\n // Merge config options with defaults.\n Object.assign(this, options, config);\n\n this.init();\n }\n }\n\n /**\n * Initialize the component.\n */\n init() {\n /**\n * The width at which items are moved to the overflow menu. Used to decide\n * if an item can be moved back to the original location.\n *\n * @type {Array}\n */\n this.breakWidths = [];\n\n /**\n * The overflow button and list wrapper element.\n */\n this.overflowWrapper = this.button.parentElement;\n\n // Be sure the overflow menu is hidden by default.\n this.overflow.setAttribute('hidden', '');\n\n // Kick off the component.\n this.handleResize();\n this.resize = new Throttle(window, 'resize', this.handleResize);\n }\n\n /**\n * Handle resize events.\n */\n handleResize() {\n // Total available space for menu items.\n const availableSpace = (this.overflowWrapper.hasAttribute('hidden'))\n ? this.wrapper.offsetWidth\n : this.wrapper.offsetWidth - this.button.offsetWidth;\n\n if (this.menu.offsetWidth > availableSpace) {\n const lastMenuItem = this.overflowWrapper.previousElementSibling;\n // Attempt to move the last non-overflow item to the overflow menu.\n if (null !== lastMenuItem) {\n this.breakWidths.push(this.menu.offsetWidth);\n\n // Move the item to the overflow menu.\n this.overflow.insertBefore(\n lastMenuItem,\n this.overflow.firstElementChild,\n );\n\n // Show the overflow button.\n this.overflowWrapper.removeAttribute('hidden');\n }\n } else {\n if (availableSpace > this.breakWidths[this.breakWidths.length - 1]) {\n // Move the item back to the menu.\n this.menu.insertBefore(\n this.overflow.firstElementChild,\n this.overflowWrapper,\n );\n\n // Get rid of the associated break width.\n this.breakWidths.pop();\n }\n\n // Hide the overflow if hidden list is empty.\n if (\n 0 === this.breakWidths.length\n || null === this.overflow.firstElementChild\n ) {\n this.overflowWrapper.setAttribute('hidden', '');\n }\n }\n\n // Recur if the visible list is still overflowing the menu.\n if (this.menu.offsetWidth > availableSpace) {\n this.handleResize();\n } else {\n // Run {overflowUpdateCallback}\n this.onOverflowUpdate.call(this, this.overflow.children.length);\n }\n }\n\n /**\n * Destroy this component.\n */\n destroy() {\n this.breakWidths = [];\n\n if (this.resize instanceof Throttle) {\n this.resize.destroy();\n }\n\n this.overflowWrapper.setAttribute('hidden', '');\n\n // Move overflow items back to the menu.\n Array.from(this.overflow.children).forEach((element) => {\n this.menu.insertBefore(element, this.overflowWrapper);\n });\n }\n}\n","/**\n * Class for facilitating accessible components.\n */\nexport default class AriaComponent {\n /**\n * Create an AriaComponent.\n * @constructor\n */\n constructor() {\n /**\n * Component state.\n *\n * @type {object}\n */\n this.state = {};\n\n /**\n * Save search characters\n *\n * @type {string}\n */\n this.searchString = '';\n\n /**\n * Saved reference elements.\n *\n * @type {Array}\n */\n this.referenceElements = [];\n\n // Bind class methods.\n this.setState = this.setState.bind(this);\n this.getState = this.getState.bind(this);\n this.setSelfReference = this.setSelfReference.bind(this);\n this.warnDeprecated = this.warnDeprecated.bind(this);\n }\n\n /**\n * Set component state.\n *\n * @param {object} newState The new state to merge with existing state.\n */\n setState(newState) {\n Object.assign(this.state, newState);\n\n if ('function' === typeof this.stateWasUpdated) {\n this.stateWasUpdated();\n }\n }\n\n /**\n * Set a reference to the class instance on the element upon which the class\n * is instantiated.\n *\n * @param {array} elements An array of elements upon which to add a reference to `this`.\n */\n setSelfReference(elements) {\n const referenceElements = [...elements].map((element) => {\n Object.defineProperty(\n element,\n this.componentName.toLowerCase(),\n { value: this, configurable: true }\n );\n\n return element;\n });\n\n this.referenceElements = [...this.referenceElements, ...referenceElements];\n }\n\n /**\n * Delete self references from component elements.\n */\n deleteSelfReferences() {\n this.referenceElements.forEach((element) => {\n delete element[this.componentName.toLowerCase()];\n });\n }\n\n /**\n * Return the current component state.\n *\n * @return {object}\n */\n getState() {\n return this.state;\n }\n\n /**\n * Warn about deprecated config properties.\n *\n * @param {string} name The name of the class instance.\n * @param {string} unsupported The deprecated config value.\n * @param {string} supported The newly supported config value, if any.\n */\n warnDeprecated(unsupported, supported = false) {\n const use = supported ? `Use ${supported} instead.` : '';\n // eslint-disable-next-line no-console, max-len\n console.warn(\n `${this.componentName}:`,\n `${unsupported} is deprecated.`,\n `${use}`\n );\n }\n}\n","/**\n * Event keyCode values mapped to a key name.\n */\nconst keyCodes = Object.freeze({\n TAB: 9,\n RETURN: 13,\n ESC: 27,\n SPACE: 32,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n});\n\nexport default keyCodes;\n","/**\n * Collect all interactive child elements.\n *\n * @param {HTMLElement} target The element in which to search for interactive children.\n *\n * @return {Array}\n */\nfunction interactiveChildren(target) {\n // List of possible active child element selectors\n const selectors = [\n 'a[href]',\n 'area[href]',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'iframe',\n 'object',\n 'embed',\n '[contenteditable]',\n '[tabindex]:not([tabindex^=\"-\"])',\n ].join(',');\n\n const interactiveElements = target.querySelectorAll(selectors);\n\n return Array.prototype.slice.call(interactiveElements);\n}\n\nexport default interactiveChildren;\n","/**\n * Create an array from a value.\n *\n * @param {Mixed} maybeAnArray An HTMLElement, NodeList, or Array of elements.\n */\nfunction toArray(maybeAnArray) {\n if (Array.isArray(maybeAnArray)) {\n return maybeAnArray;\n }\n\n let shouldBeAnArray = [];\n\n if (maybeAnArray instanceof HTMLElement) {\n // Convert element(s) to an Array.\n shouldBeAnArray = new Array(maybeAnArray);\n } else if (\n maybeAnArray instanceof NodeList\n || maybeAnArray instanceof HTMLCollection\n ) {\n // Array.from(maybeAnArray);\n shouldBeAnArray = Array.prototype.slice.call(maybeAnArray, 0);\n }\n\n return shouldBeAnArray;\n}\n\n/**\n * Remove the tabIndex attribute from all elements.\n *\n * @param {Mixed} items An HTMLElement, NodeList, or array of elements.\n */\nfunction tabIndexAllow(items) {\n const allowedElements = Array.isArray(items) ? items : toArray(items);\n\n allowedElements.forEach((item) => {\n item.removeAttribute('tabindex');\n });\n}\n\n/**\n * Add a negative tabIndex attribute to all elements.\n *\n * @param {Mixed} items An HTMLElement, NodeList, or Array of elements.\n */\nfunction tabIndexDeny(items) {\n const deniedElements = Array.isArray(items) ? items : toArray(items);\n\n deniedElements.forEach((item) => {\n item.setAttribute('tabindex', '-1');\n });\n}\n\n/**\n * Manage items' tabindex.\n *\n * @param {NodeList|Array} items The items whose tabindex may need updating.\n * @param {HTMLElement|NodeList|Array} allow The item to which we'll allow tabbing.\n */\nfunction rovingTabIndex(items, allow) {\n const allowedElements = Array.isArray(allow) ? allow : toArray(allow);\n const allItems = Array.isArray(items) ? items : toArray(items);\n\n tabIndexAllow(allowedElements);\n\n if (0 < allItems.length) {\n const deniedElements = allItems.filter((item) => (\n ! allowedElements.includes(item)\n ));\n tabIndexDeny(deniedElements);\n }\n}\n\nexport {\n rovingTabIndex,\n tabIndexAllow,\n tabIndexDeny,\n toArray,\n};\n","/**\n * Create a passably unique `id` attribute.\n *\n * @param {Number} radix An optional base for converting the Number to a String.\n *\n * @returns {String}\n */\nfunction getUniqueId(radix = 36) {\n const [, attr] = Math.random().toString(radix).split('.');\n return `id_${attr}`;\n}\n\n/**\n * Set the ID attribute if the element does not already have one.\n *\n * @param {HTMLElement} element the element upon which to act.\n */\nfunction setUniqueId(element) {\n if (null !== element && '' === element.id) {\n element.setAttribute('id', getUniqueId());\n }\n}\n\nexport {\n getUniqueId,\n setUniqueId,\n};\n","import { toArray } from './rovingTabIndex';\n\n/**\n * Get the first and last items from and Array or NodeList.\n *\n * @param {array|NodeList} items The Array or NodeList from which to retrieve the items.\n * @return {array} The first and last items.\n */\nexport default function getFirstAndLastItems(items) {\n // Ensure we're working with an Array;\n const arrayOfItems = toArray(items);\n const lastIndex = (arrayOfItems.length - 1);\n\n // Get the first and last items by index.\n const {\n 0: firstItem,\n [lastIndex]: lastItem,\n } = arrayOfItems;\n\n return [firstItem, lastItem];\n}\n","import AriaComponent from '../AriaComponent';\nimport keyCodes from '../lib/keyCodes';\nimport interactiveChildren from '../lib/interactiveChildren';\nimport { tabIndexDeny, tabIndexAllow } from '../lib/rovingTabIndex';\nimport { setUniqueId } from '../lib/uniqueId';\nimport getFirstAndLastItems from '../lib/getFirstAndLastItems';\n\n/**\n * Class for setting up an interactive popup element that can be triggered by a\n * controlling element.\n */\nexport default class Popup extends AriaComponent {\n /**\n * Create a MenuBar.\n * @constructor\n *\n * @param {object} config The config object.\n */\n constructor(config) {\n super(config);\n\n /**\n * The component name.\n *\n * @type {string}\n */\n this.componentName = 'Popup';\n\n /**\n * Component configuration options.\n *\n * @type {object}\n */\n const options = {\n /**\n * The element used to trigger the Popup element.\n *\n * @type {HTMLButtonElement}\n */\n controller: null,\n\n /**\n * The Popup's target element.\n *\n * @type {HTMLElement}\n */\n target: null,\n\n /**\n * The value of `aria-haspopup` must match the role of the Popup container.\n * Options: menu, listbox, tree, grid, or dialog,\n *\n * @type {string}\n */\n type: 'true', // 'true' === 'menu' in UAs that don't support WAI-ARIA 1.1\n\n /**\n * Callback to run after the component initializes.\n *\n * @callback initCallback\n */\n onInit: () => {},\n\n /**\n * Callback to run after component state is updated.\n *\n * @callback stateChangeCallback\n */\n onStateChange: () => {},\n\n /**\n * Callback to run after the component is destroyed.\n *\n * @callback destroyCallback\n */\n onDestroy: () => {},\n };\n\n // Save references to the controller and target.\n Object.assign(this, options, config);\n\n // Intial component state.\n this.state = { expanded: false };\n\n // Bind class methods.\n this.init = this.init.bind(this);\n this.setInteractiveChildren = this.setInteractiveChildren.bind(this);\n this.stateWasUpdated = this.stateWasUpdated.bind(this);\n this.hide = this.hide.bind(this);\n this.show = this.show.bind(this);\n this.controllerClickHandler = this.controllerClickHandler.bind(this);\n this.controllerKeyDownHandler = this.controllerKeyDownHandler.bind(this);\n this.targetKeyDownHandler = this.targetKeyDownHandler.bind(this);\n this.hideOnTabOut = this.hideOnTabOut.bind(this);\n this.hideOnOutsideClick = this.hideOnOutsideClick.bind(this);\n this.destroy = this.destroy.bind(this);\n\n /**\n * Check if the controller is a button, but only if it doesn't already have\n * a role attribute, since we'll be adding the role and allowing focus.\n *\n * @type {bool}\n */\n this.controllerIsNotAButton = (\n 'BUTTON' !== this.controller.nodeName\n && null === this.controller.getAttribute('role')\n );\n\n // Check for a valid controller and target before initializing.\n if (null !== this.controller && null !== this.target) {\n this.init();\n }\n }\n\n /**\n * Collect and prepare the target element's interactive child elements.\n */\n setInteractiveChildren() {\n const { expanded } = this.state;\n /**\n * The target element's interactive child elements.\n *\n * @type {array}\n */\n this.interactiveChildElements = interactiveChildren(this.target);\n\n /*\n * Allow/deny tabbing to interactive children.\n * Focusable content should have tabindex='-1' unless the popup is expanded.\n */\n if (expanded) {\n tabIndexAllow(this.interactiveChildElements);\n } else {\n tabIndexDeny(this.interactiveChildElements);\n }\n\n /*\n * Collect first and last interactive child elements from target and merge\n * them in as instance properties.\n */\n if (0 < this.interactiveChildElements.length) {\n const [\n firstInteractiveChild,\n lastInteractiveChild,\n ] = getFirstAndLastItems(this.interactiveChildElements);\n\n Object.assign(this, { firstInteractiveChild, lastInteractiveChild });\n }\n }\n\n /**\n * Set up the component's DOM attributes and event listeners.\n */\n init() {\n /*\n * A reference to the class instance added to the controller and target\n * elements to enable external interactions with this instance.\n */\n super.setSelfReference([this.controller, this.target]);\n\n // Set up interactive child elements.\n this.setInteractiveChildren();\n\n // Add target attribute.\n setUniqueId(this.target);\n\n // Add controller attributes\n this.controller.setAttribute('aria-haspopup', this.type);\n this.controller.setAttribute('aria-expanded', 'false');\n this.controller.setAttribute('aria-controls', this.target.id);\n setUniqueId(this.controller);\n\n /*\n * Use the button role on non-button elements.\n */\n if (this.controllerIsNotAButton) {\n // https://www.w3.org/TR/wai-aria-1.1/#button\n this.controller.setAttribute('role', 'button');\n this.controller.setAttribute('tabindex', '0');\n }\n\n /*\n * Establishes a relationship when the DOM heirarchy doesn't represent that\n * a relationship exists.\n */\n if (this.target !== this.controller.nextElementSibling) {\n this.controller.setAttribute('aria-owns', this.target.id);\n }\n\n /*\n * Set the taget as hidden by default. Using the `aria-hidden` attribute,\n * rather than the `hidden` attribute, means authors must hide the target\n * element via CSS.\n */\n this.target.setAttribute('aria-hidden', 'true');\n this.target.setAttribute('hidden', '');\n\n // Add event listeners\n this.controller.addEventListener('click', this.controllerClickHandler);\n this.controller.addEventListener('keydown', this.controllerKeyDownHandler);\n this.target.addEventListener('keydown', this.targetKeyDownHandler);\n document.body.addEventListener('click', this.hideOnOutsideClick);\n\n // Run {initCallback}\n this.onInit.call(this);\n }\n\n /**\n * Update the component attributes based on updated state.\n *\n * @param {object} state The component state.\n */\n stateWasUpdated() {\n const { expanded } = this.state;\n\n this.controller.setAttribute('aria-expanded', `${expanded}`);\n\n /*\n * Update Popup and interactive children's attributes.\n */\n if (expanded) {\n this.target.setAttribute('aria-hidden', 'false');\n this.target.removeAttribute('hidden');\n\n tabIndexAllow(this.interactiveChildElements);\n } else {\n this.target.setAttribute('aria-hidden', 'true');\n this.target.setAttribute('hidden', '');\n\n // Focusable content should have tabindex='-1' or be removed from the DOM.\n tabIndexDeny(this.interactiveChildElements);\n }\n\n // Run {stateChangeCallback}\n this.onStateChange.call(this, this.state);\n }\n\n /**\n * Handle keydown events on the Popup controller.\n *\n * @param {Event} event The event object.\n */\n controllerKeyDownHandler(event) {\n const { expanded } = this.state;\n const {\n ESC,\n TAB,\n SPACE,\n RETURN,\n } = keyCodes;\n const { keyCode } = event;\n\n if ([SPACE, RETURN].includes(keyCode)) {\n /*\n * Treat the Spacebar and Return keys as clicks in case the controller is\n * not a