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3B,IAAI,CAACA,KAAK,CAACC,SAAS,EAAE;IACpB;EACF;EACA3B,oDAAU,CAACC,IAAI,CAAC,CAAC;EACjBsB,kDAAU,CAACtB,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC,C","sources":["webpack://eqm-v2/./src/js/card-helper.js","webpack://eqm-v2/./src/js/util/dom-ready.js","webpack://eqm-v2/./node_modules/micromodal/dist/micromodal.es.js","webpack://eqm-v2/webpack/bootstrap","webpack://eqm-v2/webpack/runtime/make namespace object","webpack://eqm-v2/./src/js/app.js"],"sourcesContent":["const CardHelper = {\n init() {\n this.card = null;\n this.link = null;\n this.mousedowntime = 0;\n\n const body = document.querySelector('body');\n\n body.addEventListener('click', this.handleCardClick.bind(this));\n\n // Works better with drag scrolling if available\n // body.addEventListener('mousedown', this.handleCardMouseDown.bind(this));\n // body.addEventListener('mouseup', this.handleCardMouseUp.bind(this));\n },\n\n handleCardClick(evt) {\n const target = evt.target;\n this.card = target.closest('[class*=\"card-helper\"]');\n\n if (!this.card) {\n return;\n }\n\n // Exclude direct clicks on links or buttons\n if (target.closest('a') || target.closest('input') || target.closest('button')) {\n return;\n }\n this.link = this.card.querySelector('a');\n if (!this.link) {\n return;\n }\n\n this.link.click();\n\n },\n\n handleCardMouseDown(evt) {\n const target = evt.target;\n this.card = target.closest('[class*=\"card\"]');\n // Not a card? Bail out.\n if (!this.card) {\n return;\n }\n // Exclude direct clicks on links or buttons\n if (target.closest('a') || target.closest('input') || target.closest('button')) {\n return;\n }\n this.link = this.card.querySelector('a');\n if (!this.link) {\n return;\n }\n this.mousedowntime = new Date().getTime();\n },\n\n handleCardMouseUp() {\n if (!this.link) {\n return;\n }\n const mouseuptime = new Date().getTime();\n if (mouseuptime - this.mousedowntime < 200) {\n this.link.click();\n }\n },\n};\n\nexport default CardHelper;\n","// Handles firing DOMReady events on scripts loaded asynchronously\n\nconst DOMReady = (callback) => {\n document.readyState === 'interactive' || document.readyState === 'complete'\n ? callback()\n : document.addEventListener('DOMContentLoaded', callback);\n};\n\nexport default DOMReady;\n","function e(e,t){for(var o=0;oe.length)&&(t=e.length);for(var o=0,n=new Array(t);o0&&this.registerTriggers.apply(this,t(a)),this.onClick=this.onClick.bind(this),this.onKeydown=this.onKeydown.bind(this)}var i,a,r;return i=o,(a=[{key:\"registerTriggers\",value:function(){for(var e=this,t=arguments.length,o=new Array(t),n=0;n0&&void 0!==arguments[0]?arguments[0]:null;if(this.activeElement=document.activeElement,this.modal.setAttribute(\"aria-hidden\",\"false\"),this.modal.classList.add(this.config.openClass),this.scrollBehaviour(\"disable\"),this.addEventListeners(),this.config.awaitOpenAnimation){var o=function t(){e.modal.removeEventListener(\"animationend\",t,!1),e.setFocusToFirstNode()};this.modal.addEventListener(\"animationend\",o,!1)}else this.setFocusToFirstNode();this.config.onShow(this.modal,this.activeElement,t)}},{key:\"closeModal\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this.modal;if(this.modal.setAttribute(\"aria-hidden\",\"true\"),this.removeEventListeners(),this.scrollBehaviour(\"enable\"),this.activeElement&&this.activeElement.focus&&this.activeElement.focus(),this.config.onClose(this.modal,this.activeElement,e),this.config.awaitCloseAnimation){var o=this.config.openClass;this.modal.addEventListener(\"animationend\",(function e(){t.classList.remove(o),t.removeEventListener(\"animationend\",e,!1)}),!1)}else t.classList.remove(this.config.openClass)}},{key:\"closeModalById\",value:function(e){this.modal=document.getElementById(e),this.modal&&this.closeModal()}},{key:\"scrollBehaviour\",value:function(e){if(this.config.disableScroll){var t=document.querySelector(\"body\");switch(e){case\"enable\":Object.assign(t.style,{overflow:\"\"});break;case\"disable\":Object.assign(t.style,{overflow:\"hidden\"})}}}},{key:\"addEventListeners\",value:function(){this.modal.addEventListener(\"touchstart\",this.onClick),this.modal.addEventListener(\"click\",this.onClick),document.addEventListener(\"keydown\",this.onKeydown)}},{key:\"removeEventListeners\",value:function(){this.modal.removeEventListener(\"touchstart\",this.onClick),this.modal.removeEventListener(\"click\",this.onClick),document.removeEventListener(\"keydown\",this.onKeydown)}},{key:\"onClick\",value:function(e){(e.target.hasAttribute(this.config.closeTrigger)||e.target.parentNode.hasAttribute(this.config.closeTrigger))&&(e.preventDefault(),e.stopPropagation(),this.closeModal(e))}},{key:\"onKeydown\",value:function(e){27===e.keyCode&&this.closeModal(e),9===e.keyCode&&this.retainFocus(e)}},{key:\"getFocusableNodes\",value:function(){var e=this.modal.querySelectorAll(n);return Array.apply(void 0,t(e))}},{key:\"setFocusToFirstNode\",value:function(){var e=this;if(!this.config.disableFocus){var t=this.getFocusableNodes();if(0!==t.length){var o=t.filter((function(t){return!t.hasAttribute(e.config.closeTrigger)}));o.length>0&&o[0].focus(),0===o.length&&t[0].focus()}}}},{key:\"retainFocus\",value:function(e){var t=this.getFocusableNodes();if(0!==t.length)if(t=t.filter((function(e){return null!==e.offsetParent})),this.modal.contains(document.activeElement)){var o=t.indexOf(document.activeElement);e.shiftKey&&0===o&&(t[t.length-1].focus(),e.preventDefault()),!e.shiftKey&&t.length>0&&o===t.length-1&&(t[0].focus(),e.preventDefault())}else t[0].focus()}}])&&e(i.prototype,a),r&&e(i,r),o}(),a=null,r=function(e){if(!document.getElementById(e))return console.warn(\"MicroModal: ❗Seems like you have missed %c'\".concat(e,\"'\"),\"background-color: #f8f9fa;color: #50596c;font-weight: bold;\",\"ID somewhere in your code. Refer example below to resolve it.\"),console.warn(\"%cExample:\",\"background-color: #f8f9fa;color: #50596c;font-weight: bold;\",'
')),!1},s=function(e,t){if(function(e){e.length<=0&&(console.warn(\"MicroModal: ❗Please specify at least one %c'micromodal-trigger'\",\"background-color: #f8f9fa;color: #50596c;font-weight: bold;\",\"data attribute.\"),console.warn(\"%cExample:\",\"background-color: #f8f9fa;color: #50596c;font-weight: bold;\",''))}(e),!t)return!0;for(var o in t)r(o);return!0},{init:function(e){var o=Object.assign({},{openTrigger:\"data-micromodal-trigger\"},e),n=t(document.querySelectorAll(\"[\".concat(o.openTrigger,\"]\"))),r=function(e,t){var o=[];return e.forEach((function(e){var n=e.attributes[t].value;void 0===o[n]&&(o[n]=[]),o[n].push(e)})),o}(n,o.openTrigger);if(!0!==o.debugMode||!1!==s(n,r))for(var l in r){var c=r[l];o.targetModal=l,o.triggers=t(c),a=new i(o)}},show:function(e,t){var o=t||{};o.targetModal=e,!0===o.debugMode&&!1===r(e)||(a&&a.removeEventListeners(),(a=new i(o)).showModal())},close:function(e){e?a.closeModalById(e):a.closeModal()}});\"undefined\"!=typeof window&&(window.MicroModal=l);export default l;\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","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","\nimport DOMReady from \"./util/dom-ready\";\nimport MicroModal from 'micromodal'; // es6 module\nimport CardHelper from \"./card-helper\";\n// import BioSearch from \"../../template-parts/blocks/bios\";\n// import FastSearch from \"../../template-parts/components/search/search\";\n\nDOMReady(() => {\n // TODO: This needs to be true on storybook, but false on live. Need to move to an environment variable\n console.log('EVENT', event)\n if (!event.isTrusted) {\n return\n }\n CardHelper.init();\n MicroModal.init();\n});\n"],"names":["CardHelper","init","card","link","mousedowntime","body","document","querySelector","addEventListener","handleCardClick","bind","evt","target","closest","click","handleCardMouseDown","Date","getTime","handleCardMouseUp","mouseuptime","DOMReady","callback","readyState","MicroModal","console","log","event","isTrusted"],"sourceRoot":""}