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AAM,KAAEwM,GAAStI,KAAKuF,SACtBvF,KAAKiJ,OAAS,IAAI/F,EAAmBlD,KAAKc,SAG1Cd,KAAKiJ,OAAOnF,OAEZwE,EAAK1I,iBAAiB,qBAAsBI,KAAKmI,gBACnD,GDlDAtK,KAAM,eACNuJ,cAAe,CACbkB,KAAM","sources":["webpack://sns/../sciencenews/node_modules/js-cookie/src/js.cookie.js","webpack://sns/webpack/bootstrap","webpack://sns/webpack/runtime/compat get default export","webpack://sns/webpack/runtime/define property getters","webpack://sns/webpack/runtime/hasOwnProperty shorthand","webpack://sns/../sciencenews/node_modules/js-component-framework/es/domContentLoaded.js","webpack://sns/../sciencenews/node_modules/aria-components/src/AriaComponent.js","webpack://sns/../sciencenews/node_modules/aria-components/src/lib/keyCodes.js","webpack://sns/../sciencenews/node_modules/aria-components/src/lib/rovingTabIndex.js","webpack://sns/../sciencenews/client/src/js/utils/ProgrammaticDialog.js","webpack://sns/../sciencenews/node_modules/aria-components/src/lib/interactiveChildren.js","webpack://sns/../sciencenews/node_modules/aria-components/src/lib/getFirstAndLastItems.js","webpack://sns/../sciencenews/client/src/js/utils/toArray.js","webpack://sns/../sciencenews/node_modules/aria-components/src/lib/uniqueId.js","webpack://sns/../sciencenews/client/src/components/restricted-content/restrictedContentCookieName.js","webpack://sns/../sciencenews/node_modules/js-component-framework/es/componentProvider.js","webpack://sns/../sciencenews/node_modules/js-component-framework/es/componentLoader.js","webpack://sns/../sciencenews/client/src/components/restricted-content/modal-signup/index.js","webpack://sns/../sciencenews/client/src/components/restricted-content/modal-signup/modal-signup.js","webpack://sns/../sciencenews/client/src/js/utils/FormAssemblySubmit.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","// 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;","/**\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 * 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","import { AriaComponent } from 'aria-components';\nimport {\n interactiveChildren,\n keyCodes,\n getFirstAndLastItems,\n tabIndexDeny,\n tabIndexAllow,\n setUniqueId,\n} from 'aria-components/utils';\nimport toArray from 'js/utils/toArray';\n\n/**\n * Class to set up a programmatic Dialog element to be displayed without user interaction.\n */\nexport default class ProgrammaticDialog extends AriaComponent {\n /**\n * Create a Dialog.\n * @constructor\n *\n * @param {object} config The config object.\n */\n constructor(target, config) {\n super(config);\n\n // A target element is required.\n if (null == target) {\n throw new Error('Configuration error: A target element is required.');\n }\n\n /**\n * The dialog element.\n *\n * @type {HTMLElement}\n */\n this.target = target;\n\n /**\n * The component name.\n *\n * @type {string}\n */\n this.componentName = 'ProgrammaticDialog';\n\n /**\n * Options shape.\n *\n * @type {object}\n */\n const options = {\n /**\n * The element(s) to be hidden when the Dialog is visible. The elements\n * wrapping all site content with the sole exception of the dialog element.\n *\n * @type {HTMLElement|NodeList|Array}\n */\n content: [],\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 // Merge config options with defaults and save all as instance properties.\n Object.assign(this, options, config);\n\n // Bind class methods\n this.init = this.init.bind(this);\n this.handleTargetKeydown = this.handleTargetKeydown.bind(this);\n this.hideOnOutsideClick = this.hideOnOutsideClick.bind(this);\n this.handleKeydownEsc = this.handleKeydownEsc.bind(this);\n this.show = this.show.bind(this);\n this.hide = this.hide.bind(this);\n this.destroy = this.destroy.bind(this);\n this.stateWasUpdated = this.stateWasUpdated.bind(this);\n this.setInteractiveChildren = this.setInteractiveChildren.bind(this);\n this.setDialogController = this.setDialogController.bind(this);\n this.controllerClick = this.controllerClick.bind(this);\n\n /*\n * Initialize the component.\n */\n this.init();\n }\n\n /**\n * Set the Dialog controller.\n *\n * By default, the Dialog will not have a controller; use this method on an\n * instance to add a controller.\n */\n setDialogController(controller) {\n this.controller = controller;\n super.setSelfReference([this.controller]);\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 /*\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 this.controller.setAttribute('aria-expanded', 'false');\n\n this.controller.addEventListener('click', this.controllerClick);\n this.controller.addEventListener('keydown', this.controllerKeydown);\n }\n\n /**\n * Collect the Dialog's interactive child elements.\n */\n setInteractiveChildren() {\n this.interactiveChildElements = interactiveChildren(this.target);\n\n const [\n firstInteractiveChild,\n lastInteractiveChild,\n ] = getFirstAndLastItems(this.interactiveChildElements);\n\n // Save as instance properties.\n this.firstInteractiveChild = firstInteractiveChild;\n this.lastInteractiveChild = lastInteractiveChild;\n }\n\n /**\n * Set the component's DOM attributes and event listeners.\n */\n init() {\n // Get the content items if none are provided.\n if (0 === this.content.length || null == this.content) {\n this.content = Array.from(document.body.children)\n .filter((child) => ! child.contains(this.target));\n } else {\n this.content = toArray(this.content);\n }\n\n // If no content is found.\n if (0 === this.content.length) {\n // eslint-disable-next-line max-len\n throw new Error('Configuration error: The Dialog target should not be within the main site content.');\n }\n\n /*\n * A reference to the class instance added to the target element to enable\n * external interactions with this instance.\n */\n super.setSelfReference([this.target]);\n\n /*\n * Collect the Dialog's interactive child elements. This is an initial pass\n * to ensure values exists, but the interactive children will be collected\n * each time the dialog opens, in case the dialog's contents change.\n */\n this.setInteractiveChildren();\n\n // Focusable content should initially have tabindex='-1'.\n tabIndexDeny(this.interactiveChildElements);\n\n // Add target attribute.\n setUniqueId(this.target);\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 // Set additional attributes.\n this.target.setAttribute('role', 'dialog');\n this.target.setAttribute('aria-modal', 'true');\n\n // Add event listeners.\n this.target.addEventListener('keydown', this.handleTargetKeydown);\n\n /**\n * Set initial state.\n *\n * @type {object}\n */\n this.state = { expanded: false };\n\n /* Run {initCallback} */\n this.onInit.call(this);\n }\n\n /**\n * Update element attributes and event listeners when the Popup's state changes.\n * @todo Set target attributes and update roving tabindex.\n *\n * @param {Object} state The component state.\n */\n stateWasUpdated() {\n const { expanded } = this.state;\n const contentLength = this.content.length;\n\n this.setInteractiveChildren();\n\n if (expanded) {\n // Allow focus on the target element.\n this.target.setAttribute('tabindex', '0');\n\n // Hide the outside content.\n for (let i = 0; i < contentLength; i += 1) {\n this.content[i].setAttribute('aria-hidden', 'true');\n }\n\n // Update target element.\n this.target.setAttribute('aria-hidden', 'false');\n this.target.removeAttribute('hidden');\n\n if (null != this.controller) {\n this.controller.setAttribute('aria-expanded', 'true');\n }\n\n tabIndexAllow(this.interactiveChildElements);\n\n this.target.focus();\n } else {\n // Disallow focus on the target element.\n this.target.setAttribute('tabindex', '-1');\n\n // Un-hide the outside content.\n for (let i = 0; i < contentLength; i += 1) {\n this.content[i].removeAttribute('aria-hidden');\n }\n\n // Update target element.\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 if (null != this.controller) {\n this.controller.setAttribute('aria-expanded', 'false');\n this.controller.focus();\n }\n }\n\n /* Run {stateChangeCallback} */\n this.onStateChange.call(this, this.state);\n }\n\n /**\n * Close the dialog on when users click outside of the Dialog element.\n *\n * By default, the Dialog will not close on outside click. This is by design,\n * but can be enabled manually by including an event listener with this method\n * as the callback.\n * document.body.addEventListener('click', dialog.hideOnOutsideClick)\n *\n * @param {Event} event The Event object.\n */\n hideOnOutsideClick(event) {\n const { expanded } = this.state;\n const { target: clicked } = event;\n\n if (\n expanded && ! this.target.contains(clicked)\n && (null != this.controller && ! this.controller.contains(clicked))\n ) {\n this.hide();\n }\n }\n\n /**\n * Close the dialog on ESC key press.\n *\n * By default, the Dialog will not close with the ESC key. This is by design,\n * but can be enabled manually by including an event listener with this method\n * as the callback.\n * document.body.addEventListener('keydown', dialog.handleKeydownEsc)\n *\n * @param {Event} event The Event object.\n */\n handleKeydownEsc(event) {\n const { ESC } = keyCodes;\n const { keyCode } = event;\n\n if (ESC === keyCode) {\n this.hide();\n }\n }\n\n /**\n * Trap key tabs within the dialog.\n *\n * @param {Event} event The Event object.\n */\n handleTargetKeydown(event) {\n const { TAB } = keyCodes;\n const { keyCode, shiftKey } = event;\n const { expanded } = this.state;\n\n if (expanded && keyCode === TAB) {\n const { activeElement } = document;\n\n if (shiftKey && this.firstInteractiveChild === activeElement) {\n event.preventDefault();\n /*\n * Move back from the first interactive child element to the last\n * interactive child element\n */\n this.lastInteractiveChild.focus();\n } else if (! shiftKey && this.lastInteractiveChild === activeElement) {\n event.preventDefault();\n /*\n * Move forward from the last interactive child element to the first\n * interactive child element.\n */\n this.firstInteractiveChild.focus();\n }\n }\n }\n\n /**\n * Handle controller keydown events to patch in button behaviors for\n * non-button elements.\n *\n * @param {Event} event The event object.\n */\n controllerKeydown(event) {\n const {\n SPACE,\n RETURN,\n } = keyCodes;\n const { keyCode } = event;\n\n if ([SPACE, RETURN].includes(keyCode)) {\n event.preventDefault();\n\n /*\n * Treat the Spacebar and Return keys as clicks in case the controller is\n * not a <button>.\n */\n this.show();\n }\n }\n\n /**\n * Handle controller clicks.\n *\n * @param {Event} event The event object.\n */\n controllerClick(event) {\n event.preventDefault();\n this.show();\n }\n\n /**\n * Destroy the Dialog and Popup.\n */\n destroy() {\n // Remove the references to the class instance.\n this.deleteSelfReferences();\n\n // Destroy the Dialog Popup.\n if (this.target.getAttribute('id').includes('id_')) {\n this.target.removeAttribute('id');\n }\n\n // Remove target attributes.\n this.target.removeAttribute('aria-hidden');\n this.target.removeAttribute('hidden');\n this.target.removeAttribute('tabindex');\n this.target.removeAttribute('role');\n this.target.removeAttribute('aria-modal');\n\n // Remove tabindex attribute.\n tabIndexAllow(this.interactiveChildElements);\n\n // Remove the `aria-hidden` attribute from the content wrapper.\n const contentLength = this.content.length;\n for (let i = 0; i < contentLength; i += 1) {\n this.content[i].removeAttribute('aria-hidden');\n }\n\n // Remove event listeners.\n this.target.removeEventListener('keydown', this.handleTargetKeydown);\n\n if (null != this.controller) {\n this.controller.removeAttribute('aria-expanded');\n\n // Remove role and tabindex added to a link controller.\n if (this.controllerIsNotAButton) {\n this.controller.removeAttribute('role');\n this.controller.removeAttribute('tabindex');\n }\n\n this.controller.removeEventListener('click', this.controllerClick);\n this.controller.removeEventListener('keydown', this.controllerKeydown);\n }\n\n // Reset initial state.\n this.state = { expanded: false };\n\n /* Run {destroyCallback} */\n this.onDestroy.call(this);\n }\n\n /**\n * Show the Dialog.\n */\n show() {\n this.setState({ expanded: true });\n }\n\n /**\n * Hide the Dialog.\n */\n hide() {\n this.setState({ expanded: false });\n }\n}\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","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","/**\n * Create an array from a DOM Node or NodeList.\n *\n * @param {Mixed} maybeAnArray An HTMLElement, NodeList, or Array of elements.\n */\nexport default function toArray(maybeAnArray) {\n if (Array.isArray(maybeAnArray)) {\n return maybeAnArray;\n }\n\n if (maybeAnArray instanceof HTMLElement) {\n // Convert a single element to an Array.\n return new Array(maybeAnArray);\n }\n\n if (\n maybeAnArray instanceof NodeList\n || maybeAnArray instanceof HTMLCollection\n ) {\n return Array.from(maybeAnArray);\n }\n\n return [];\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","/**\n * The restricted content cookie name, dependent on the current site.\n */\nexport default `${amScripts.global.sitePrefix}-restricted-content-access`;\n","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}","import { componentProvider } from 'js-component-framework';\nimport ModalSignup from './modal-signup';\nimport './modal-signup.scss';\n\n/*\n * This component is imported in the child theme for the Classroom Questions\n * fauxwall. Rather than removing outright, consider moving to the child theme.\n */\nconst modalSignupConfig = {\n component: ModalSignup,\n name: 'modal-signup',\n querySelector: {\n form: '.login-form',\n },\n};\n\ncomponentProvider(modalSignupConfig);\n","import Cookies from 'js-cookie';\nimport { setFormAssemblyState } from 'js/utils/FormAssemblySubmit';\nimport ProgrammaticDialog from 'js/utils/ProgrammaticDialog';\nimport cookieName from '../restrictedContentCookieName';\n\n/**\n * Component for Modal Signup Form.\n */\nexport default class ModalSignup {\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.handleFormState = this.handleFormState.bind(this);\n\n if ('true' !== Cookies.get(cookieName)) {\n const { form } = this.children;\n\n if ('ready' === form?.faReadyState) {\n this.init();\n } else {\n form.addEventListener('sn.formready', this.init);\n }\n }\n }\n\n /**\n * Handle form submission state.\n *\n * @param {Event} event The event object.\n */\n handleFormState(event) {\n const { detail = {} } = event;\n const { status = '' } = detail;\n\n setFormAssemblyState(this.element, detail);\n\n if ('success' === status) {\n Cookies.set(cookieName, true, { expires: 30 });\n this.dialog.hide();\n }\n }\n\n /**\n * Initialize the FormAssemblySubmit instance.\n */\n init() {\n const { form } = this.children;\n this.dialog = new ProgrammaticDialog(this.element);\n\n // Show the Dialog by default.\n this.dialog.show();\n\n form.addEventListener('sn.formstatechange', this.handleFormState);\n }\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"],"names":["factory","extend","i","result","arguments","length","attributes","key","decode","s","replace","decodeURIComponent","init","converter","api","set","value","document","path","defaults","expires","Date","toUTCString","JSON","stringify","test","e","write","encodeURIComponent","String","escape","stringifiedAttributes","attributeName","split","cookie","get","json","jar","cookies","parts","slice","join","charAt","name","read","parse","getJSON","remove","withConverter","module","exports","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","call","callback","readyState","addEventListener","once","AriaComponent","constructor","this","state","searchString","referenceElements","setState","bind","getState","setSelfReference","warnDeprecated","newState","assign","stateWasUpdated","elements","map","element","componentName","toLowerCase","configurable","deleteSelfReferences","forEach","unsupported","supported","use","console","warn","freeze","TAB","RETURN","ESC","SPACE","END","HOME","LEFT","UP","RIGHT","DOWN","toArray","maybeAnArray","Array","isArray","shouldBeAnArray","HTMLElement","NodeList","HTMLCollection","tabIndexAllow","items","item","removeAttribute","tabIndexDeny","setAttribute","ProgrammaticDialog","target","config","super","Error","content","onInit","onStateChange","onDestroy","handleTargetKeydown","hideOnOutsideClick","handleKeydownEsc","show","hide","destroy","setInteractiveChildren","setDialogController","controllerClick","controller","controllerIsNotAButton","nodeName","getAttribute","controllerKeydown","interactiveChildElements","selectors","interactiveElements","querySelectorAll","interactiveChildren","firstInteractiveChild","lastInteractiveChild","arrayOfItems","lastIndex","firstItem","lastItem","getFirstAndLastItems","from","body","children","filter","child","contains","id","radix","attr","Math","random","toString","getUniqueId","expanded","contentLength","focus","event","clicked","keyCodes","keyCode","shiftKey","activeElement","preventDefault","includes","removeEventListener","amScripts","global","sitePrefix","component","Component","load","querySelector","options","selector","root","componentEls","error","log","keys","elementKey","nodeList","getComponentArgs","args","componentLoader","componentProvider","_ref","handleFormState","Cookies","cookieName","form","faReadyState","detail","status","classes","loading","success","requestAnimationFrame","classList","add","setFormAssemblyState","dialog"],"sourceRoot":""}