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Aa,aAAc,cACvCT,KAAKC,MAAMS,UAEXV,KAAKK,UAAUG,IAAI,WACnBR,KAAKK,UAAUE,OAAO,UACtBP,KAAKG,OAAOM,aAAa,aAAc,eACvCT,KAAKC,MAAMU,OACZ,GAEF,EAGIC,eAAenC,IAAI,eACpBmC,eAAeC,OAAO,aAAclB,EAAW,CAC3CmB,QAAS,O","sources":["webpack://easternstandard/./node_modules/@alexspirgel/children-loaded/src/index.js","webpack://easternstandard/webpack/bootstrap","webpack://easternstandard/./custom-blocks/locked/page-hero/scripts/src/script.js"],"sourcesContent":["module.exports = (function () {\n\n\t// Initialize a weak map to hold promises.\n\tconst childrenLoadedPromises = new WeakMap();\n\n\t/**\n\t * Checks to see if children elements are loaded.\n\t * @param {object} element - Element to look for children within.\n\t * @return {boolean} Whether the children elements are loaded or not.\n\t */\n\n\tconst childrenLoadedSynchronous = (element) => {\n\n\t\t// Document ready states reference: https://developer.mozilla.org/en-US/docs/Web/API/Document/readyState\n\t\tif (document.readyState === 'interactive' || document.readyState === 'complete') {\n\t\t\t// Children elements are assumed to be loaded.\n\t\t\treturn true;\n\t\t}\n\n\t\t// While the element exists.\n\t\twhile (element) {\n\t\t\t// If the next sibling element exists.\n\t\t\tif (element.nextSibling) {\n\t\t\t\t// The original passed element and its children have been loaded.\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t// Set the element to the parent element.\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\t// If code execution gets here, it's assumed children elements are not loaded.\n\t\treturn false;\n\n\t};\n\n\t/**\n\t * An asynchronous wrapper for the childrenLoadedSynchronous function.\n\t * @param {object} element - Element to look for children within.\n\t * @param {boolean} [forceNewPromise=false] - Option to invalidate existing promises.\n\t * @return {*} True if children are loaded, otherwise a promise.\n\t */\n\n\tconst childrenLoaded = (element, forceNewPromise = false) => {\n\n\t\t// If children are loaded immediately.\n\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// If an existing promise for the passed element does not exist yet or if a new promise is being forced.\n\t\telse if (!childrenLoadedPromises.get(element) || forceNewPromise) {\n\t\t\t// Create a new promise.\n\t\t\tconst childrenLoadedPromise = new Promise((resolve) => {\n\t\t\t\t// Create a new mutation observer.\n\t\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\t\t// When children are loaded.\n\t\t\t\t\tif (childrenLoadedSynchronous(element)) {\n\t\t\t\t\t\t// Disconnect the mutation observer.\n\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t// Resolve the promise.\n\t\t\t\t\t\tresolve(true);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t// Watch for child element updates.\n\t\t\t\tobserver.observe(element, {\n\t\t\t\t\tchildList: true\n\t\t\t\t});\n\t\t\t});\n\t\t\t// Set the promise weak map entry for the passed element.\n\t\t\tchildrenLoadedPromises.set(element, childrenLoadedPromise);\n\t\t}\n\n\t\t// Return the promise for the passed element.\n\t\t// Multiple asynchronous calls of childrenLoaded for the same element should return the same promise.\n\t\treturn childrenLoadedPromises.get(element);\n\n\t};\n\n\t// Attach the synchronous function to the export for optional use.\n\tchildrenLoaded.synchronous = childrenLoadedSynchronous;\n\t// Add shorthand alias for synchronous.\n\tchildrenLoaded.sync = childrenLoaded.synchronous;\n\t// Return the asynchronous function as the export.\n\treturn childrenLoaded;\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","const childrenLoaded = require(\"@alexspirgel/children-loaded\");\n\nclass HeroVideo extends HTMLDivElement {\n\tconstructor() {\n\t\tsuper();\n\t}\n\n\tasync connectedCallback() {\n\t\tawait childrenLoaded(this);\n\t\tthis.video = this.querySelector(\"video\");\n\t\tthis.button = this.querySelector(\"button\");\n\t\tthis.button.addEventListener(\"click\", () => {\n\t\t\tif (this.classList.contains(\"playing\")) {\n\t\t\t\tthis.classList.remove(\"playing\");\n\t\t\t\tthis.classList.add(\"paused\");\n\t\t\t\tthis.button.setAttribute(\"aria-label\", \"Play Video\");\n\t\t\t\tthis.video.pause();\n\t\t\t} else {\n\t\t\t\tthis.classList.add(\"playing\");\n\t\t\t\tthis.classList.remove(\"paused\");\n\t\t\t\tthis.button.setAttribute(\"aria-label\", \"Pause Video\");\n\t\t\t\tthis.video.play();\n\t\t\t}\n\t\t});\n\t}\n}\n\nif (!customElements.get(\"hero-video\")) {\n customElements.define(\"hero-video\", HeroVideo, {\n extends: \"div\",\n });\n}\n"],"names":["module","exports","childrenLoadedPromises","WeakMap","childrenLoadedSynchronous","element","document","readyState","nextSibling","parentNode","childrenLoaded","forceNewPromise","get","childrenLoadedPromise","Promise","resolve","observer","MutationObserver","disconnect","observe","childList","set","sync","synchronous","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","HeroVideo","HTMLDivElement","constructor","super","async","this","video","querySelector","button","addEventListener","classList","contains","remove","add","setAttribute","pause","play","customElements","define","extends"],"sourceRoot":""}