diff --git a/docs/core/makeup-keyboard-trap/index.min.js b/docs/core/makeup-keyboard-trap/index.min.js index 64542173..4807ffbf 100644 --- a/docs/core/makeup-keyboard-trap/index.min.js +++ b/docs/core/makeup-keyboard-trap/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/core/makeup-keyboard-trap/index.min.js.map b/docs/core/makeup-keyboard-trap/index.min.js.map index 50f1ae05..b9441334 100644 --- a/docs/core/makeup-keyboard-trap/index.min.js.map +++ b/docs/core/makeup-keyboard-trap/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-keyboard-trap/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,GAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9Ga;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;UCnCA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;ACtBa;;AAEb,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/./docs/core/makeup-keyboard-trap/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\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","\"use strict\";\n\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// REQUIRE\n// const keyboardTrap = require('makeup-keyboard-trap');\n\n// IMPORT\n\nconst trap = document.getElementById(\"trap\");\nconst btn = document.querySelector(\"button\");\nbtn.addEventListener(\"click\", function () {\n if (this.getAttribute(\"aria-pressed\") === \"true\") {\n keyboardTrap.untrap();\n } else {\n keyboardTrap.trap(this.parentNode);\n }\n});\ndocument.addEventListener(\"keyboardTrap\", function (e) {\n console.log(this, e);\n});\ndocument.addEventListener(\"keyboardUntrap\", function (e) {\n console.log(this, e);\n});\ntrap.addEventListener(\"keyboardUntrap\", function (e) {\n console.log(this, e);\n btn.innerText = \"Trap\";\n btn.setAttribute(\"aria-pressed\", \"false\");\n});\ntrap.addEventListener(\"keyboardTrap\", function (e) {\n console.log(this, e);\n btn.innerText = \"Untrap\";\n btn.setAttribute(\"aria-pressed\", \"true\");\n});"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-keyboard-trap/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,GAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;UCnCA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;ACtBa;;AAEb,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,CAAC,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/./docs/core/makeup-keyboard-trap/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\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","\"use strict\";\n\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// REQUIRE\n// const keyboardTrap = require('makeup-keyboard-trap');\n\n// IMPORT\n\nconst trap = document.getElementById(\"trap\");\nconst btn = document.querySelector(\"button\");\nbtn.addEventListener(\"click\", function () {\n if (this.getAttribute(\"aria-pressed\") === \"true\") {\n keyboardTrap.untrap();\n } else {\n keyboardTrap.trap(this.parentNode);\n }\n});\ndocument.addEventListener(\"keyboardTrap\", function (e) {\n console.log(this, e);\n});\ndocument.addEventListener(\"keyboardUntrap\", function (e) {\n console.log(this, e);\n});\ntrap.addEventListener(\"keyboardUntrap\", function (e) {\n console.log(this, e);\n btn.innerText = \"Trap\";\n btn.setAttribute(\"aria-pressed\", \"false\");\n});\ntrap.addEventListener(\"keyboardTrap\", function (e) {\n console.log(this, e);\n btn.innerText = \"Untrap\";\n btn.setAttribute(\"aria-pressed\", \"true\");\n});"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/core/makeup-modal/index.min.js b/docs/core/makeup-modal/index.min.js index 51f33590..1ff7d4c4 100644 --- a/docs/core/makeup-modal/index.min.js +++ b/docs/core/makeup-modal/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/core/makeup-modal/index.min.js.map b/docs/core/makeup-modal/index.min.js.map index cec54f3d..59664460 100644 --- a/docs/core/makeup-modal/index.min.js.map +++ b/docs/core/makeup-modal/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-modal/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,GAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9Ga;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,GAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;AC7Ga;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,GAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;UC5HA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;ACtBa;;AAEb,oCAAoC,mBAAO,CAAC,GAAc;AAC1D,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,CAAC,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/./docs/core/makeup-modal/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\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","\"use strict\";\n\nvar modal = _interopRequireWildcard(require(\"makeup-modal\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// REQUIRE\n// const modal = require('makeup-modal');\n\n// IMPORT\n\nconst modal1 = document.getElementById(\"modal-1\");\nconst modal2 = document.getElementById(\"modal-2\");\nconst modal3 = document.getElementById(\"modal-3\");\nconst button1 = document.getElementById(\"button-1\");\nconst button2 = document.getElementById(\"button-2\");\nconst button3 = document.getElementById(\"button-3\");\nconst unmodalButton = document.getElementById(\"button-unmodal\");\nconst hoistCheckbox = document.getElementById(\"hoist-checkbox\");\nconst wrapCheckbox = document.getElementById(\"wrap-checkbox\");\nconst hiddenCheckbox = document.getElementById(\"hidden-checkbox\");\nmodal1.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal2.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal3.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal1.addEventListener(\"makeup-unmodal\", e => console.log(e));\nmodal2.addEventListener(\"makeup-unmodal\", e => console.log(e));\nmodal3.addEventListener(\"makeup-unmodal\", e => console.log(e));\nbutton1.addEventListener(\"click\", () => {\n modal.modal(modal1, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nbutton2.addEventListener(\"click\", () => {\n modal.modal(modal2, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nbutton3.addEventListener(\"click\", () => {\n modal.modal(modal3, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nunmodalButton.addEventListener(\"click\", () => {\n modal.unmodal();\n});"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-modal/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,GAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,GAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;AC7Ga;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,GAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;UC5HA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;ACtBa;;AAEb,oCAAoC,mBAAO,CAAC,GAAc;AAC1D,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,CAAC;AACD;AACA;AACA,CAAC,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/./docs/core/makeup-modal/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\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","\"use strict\";\n\nvar modal = _interopRequireWildcard(require(\"makeup-modal\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// REQUIRE\n// const modal = require('makeup-modal');\n\n// IMPORT\n\nconst modal1 = document.getElementById(\"modal-1\");\nconst modal2 = document.getElementById(\"modal-2\");\nconst modal3 = document.getElementById(\"modal-3\");\nconst button1 = document.getElementById(\"button-1\");\nconst button2 = document.getElementById(\"button-2\");\nconst button3 = document.getElementById(\"button-3\");\nconst unmodalButton = document.getElementById(\"button-unmodal\");\nconst hoistCheckbox = document.getElementById(\"hoist-checkbox\");\nconst wrapCheckbox = document.getElementById(\"wrap-checkbox\");\nconst hiddenCheckbox = document.getElementById(\"hidden-checkbox\");\nmodal1.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal2.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal3.addEventListener(\"makeup-modal\", e => console.log(e));\nmodal1.addEventListener(\"makeup-unmodal\", e => console.log(e));\nmodal2.addEventListener(\"makeup-unmodal\", e => console.log(e));\nmodal3.addEventListener(\"makeup-unmodal\", e => console.log(e));\nbutton1.addEventListener(\"click\", () => {\n modal.modal(modal1, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nbutton2.addEventListener(\"click\", () => {\n modal.modal(modal2, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nbutton3.addEventListener(\"click\", () => {\n modal.modal(modal3, {\n hoist: hoistCheckbox.checked,\n useHiddenProperty: hiddenCheckbox.checked,\n wrap: wrapCheckbox.checked\n });\n});\nunmodalButton.addEventListener(\"click\", () => {\n modal.unmodal();\n});"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-alert-dialog/index.min.js b/docs/ui/makeup-alert-dialog/index.min.js index 2a010767..31aa33c8 100644 --- a/docs/ui/makeup-alert-dialog/index.min.js +++ b/docs/ui/makeup-alert-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-alert-dialog/index.min.js.map b/docs/ui/makeup-alert-dialog/index.min.js.map index 1e47d279..d5d803a9 100644 --- a/docs/ui/makeup-alert-dialog/index.min.js.map +++ b/docs/ui/makeup-alert-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-alert-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;AC1Ca;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;ACAlC,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/ui/makeup-alert-dialog/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/alert-dialog.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/dist/alert-dialog/alert-dialog.css?1d20","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-alert-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultAlertOptions = {\n baseClass: \"alert-dialog\",\n baseClassModifier: \"alert\",\n quickDismiss: false,\n acknowledgeButtonSelector: \".alert-dialog__acknowledge\",\n windowSelector: \".alert-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultAlertOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._acknowledgeButtonEl = this._el.querySelector(this._options.acknowledgeButtonSelector);\n this._onAcknowledgeButtonClickListener = _onAcknowledgeButtonClick.bind(this);\n this._acknowledgeButtonEl.addEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._acknowledgeButtonEl.removeEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n acknowledge() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-acknowledge\"));\n }\n destroy() {\n super.destroy();\n this._onAcknowledgeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onAcknowledgeButtonClick() {\n this.acknowledge();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","require('./dist/alert-dialog/alert-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/alert-dialog\");\nvar _makeupAlertDialog = _interopRequireDefault(require(\"makeup-alert-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// STYLES\n\n// REQUIRE\n//const AlertDialog = require('makeup-alert-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".alert-dialog\").forEach(function (el, i) {\n const widget = new _makeupAlertDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-alert-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;AC1Ca;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;ACAlC,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/ui/makeup-alert-dialog/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/alert-dialog.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/dist/alert-dialog/alert-dialog.css?1d20","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-alert-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultAlertOptions = {\n baseClass: \"alert-dialog\",\n baseClassModifier: \"alert\",\n quickDismiss: false,\n acknowledgeButtonSelector: \".alert-dialog__acknowledge\",\n windowSelector: \".alert-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultAlertOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._acknowledgeButtonEl = this._el.querySelector(this._options.acknowledgeButtonSelector);\n this._onAcknowledgeButtonClickListener = _onAcknowledgeButtonClick.bind(this);\n this._acknowledgeButtonEl.addEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._acknowledgeButtonEl.removeEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n acknowledge() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-acknowledge\"));\n }\n destroy() {\n super.destroy();\n this._onAcknowledgeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onAcknowledgeButtonClick() {\n this.acknowledge();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","require('./dist/alert-dialog/alert-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/alert-dialog\");\nvar _makeupAlertDialog = _interopRequireDefault(require(\"makeup-alert-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// STYLES\n\n// REQUIRE\n//const AlertDialog = require('makeup-alert-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".alert-dialog\").forEach(function (el, i) {\n const widget = new _makeupAlertDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-confirm-dialog/index.min.js b/docs/ui/makeup-confirm-dialog/index.min.js index 84dde33e..553bbce7 100644 --- a/docs/ui/makeup-confirm-dialog/index.min.js +++ b/docs/ui/makeup-confirm-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-confirm-dialog/index.min.js.map b/docs/ui/makeup-confirm-dialog/index.min.js.map index 9643194c..0960607d 100644 --- a/docs/ui/makeup-confirm-dialog/index.min.js.map +++ b/docs/ui/makeup-confirm-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-confirm-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAA0B;;;;;;;;;ACArB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxDA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA0C;;;;;;;;;;ACAlD;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAA2B;AACnC,kDAAkD,mBAAO,CAAC,GAAuB;AACjF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./packages/ui/makeup-confirm-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/confirm-dialog/confirm-dialog.css?448d","webpack://root/./node_modules/@ebay/skin/confirm-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-confirm-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultOptions = {\n baseClass: \"confirm-dialog\",\n closeButtonSelector: \".confirm-dialog__close\",\n quickDismiss: true,\n confirmButtonSelector: \".confirm-dialog__confirm\",\n focusManagementIndex: 1,\n rejectButtonSelector: \".confirm-dialog__reject\",\n windowSelector: \".confirm-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._confirmButtonEl = this._el.querySelector(this._options.confirmButtonSelector);\n this._rejectButtonEl = this._el.querySelector(this._options.rejectButtonSelector);\n this._onConfirmButtonClickListener = _onConfirmButtonClick.bind(this);\n this._onRejectButtonClickListener = _onRejectButtonClick.bind(this);\n this._confirmButtonEl.addEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.addEventListener(\"click\", this._onRejectButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._confirmButtonEl.removeEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.removeEventListener(\"click\", this._onRejectButtonClickListener);\n }\n confirm() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-confirm\"));\n }\n reject() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-reject\"));\n }\n destroy() {\n super.destroy();\n this._onConfirmButtonClickListener = null;\n this._onRejectButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onConfirmButtonClick() {\n this.confirm();\n}\nfunction _onRejectButtonClick() {\n this.reject();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/confirm-dialog/confirm-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/confirm-dialog\");\nvar _makeupConfirmDialog = _interopRequireDefault(require(\"makeup-confirm-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const ConfirmDialog = require('makeup-confirm-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".confirm-dialog\").forEach(function (el, i) {\n const widget = new _makeupConfirmDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-confirm-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAA0B;;;;;;;;;ACArB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxDA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA0C;;;;;;;;;;ACAlD;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAA2B;AACnC,kDAAkD,mBAAO,CAAC,GAAuB;AACjF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./packages/ui/makeup-confirm-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/confirm-dialog/confirm-dialog.css?448d","webpack://root/./node_modules/@ebay/skin/confirm-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-confirm-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultOptions = {\n baseClass: \"confirm-dialog\",\n closeButtonSelector: \".confirm-dialog__close\",\n quickDismiss: true,\n confirmButtonSelector: \".confirm-dialog__confirm\",\n focusManagementIndex: 1,\n rejectButtonSelector: \".confirm-dialog__reject\",\n windowSelector: \".confirm-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._confirmButtonEl = this._el.querySelector(this._options.confirmButtonSelector);\n this._rejectButtonEl = this._el.querySelector(this._options.rejectButtonSelector);\n this._onConfirmButtonClickListener = _onConfirmButtonClick.bind(this);\n this._onRejectButtonClickListener = _onRejectButtonClick.bind(this);\n this._confirmButtonEl.addEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.addEventListener(\"click\", this._onRejectButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._confirmButtonEl.removeEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.removeEventListener(\"click\", this._onRejectButtonClickListener);\n }\n confirm() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-confirm\"));\n }\n reject() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-reject\"));\n }\n destroy() {\n super.destroy();\n this._onConfirmButtonClickListener = null;\n this._onRejectButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onConfirmButtonClick() {\n this.confirm();\n}\nfunction _onRejectButtonClick() {\n this.reject();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/confirm-dialog/confirm-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/confirm-dialog\");\nvar _makeupConfirmDialog = _interopRequireDefault(require(\"makeup-confirm-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const ConfirmDialog = require('makeup-confirm-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".confirm-dialog\").forEach(function (el, i) {\n const widget = new _makeupConfirmDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-dialog-button/index.min.js b/docs/ui/makeup-dialog-button/index.min.js index cbd35d95..f57386fb 100644 --- a/docs/ui/makeup-dialog-button/index.min.js +++ b/docs/ui/makeup-dialog-button/index.min.js @@ -35,6 +35,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -81,6 +82,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -114,6 +116,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-dialog-button/index.min.js.map b/docs/ui/makeup-dialog-button/index.min.js.map index 1818ed35..814882ba 100644 --- a/docs/ui/makeup-dialog-button/index.min.js.map +++ b/docs/ui/makeup-dialog-button/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-dialog-button/index.min.js","mappings":";;;;;;;;AAAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAAsC;;;;;;;;ACA9C,mBAAO,CAAC,IAA0B;;;;;;;;;ACArB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxDA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ea;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;ACzCA;;;;;;;;ACAA,mBAAO,CAAC,IAAwC;;;;;;;;;ACAnC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,kBAAe;;;;;;;;;ACtBF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AC3CA,mBAAO,CAAC,IAAgC;;;;;;;;ACAxC,mBAAO,CAAC,GAAsB;;;;;;;;;ACAjB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;AC1Ca;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;AC5HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;ACDlB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;AChDA;;;;;;;;ACAA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,GAAgD;;;;;;;;;ACA3C;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAAsC;;;;;;;;;ACAjC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA,kBAAe;;;;;;;;;;ACvBf;;;;;;;;;;ACAA;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsC;;;;;;;;ACA9C,mBAAO,CAAC,IAA0C;;;;;;;;ACAlD,mBAAO,CAAC,IAA4C;;;;;;;;;;ACApD;;;;;;;;ACAA,mBAAO,CAAC,IAA4B;;;;;;;;;ACAvB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA4C;;;;;;;;;;ACApD;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,IAAyB;AACjC,mBAAO,CAAC,IAA2B;AACnC,mBAAO,CAAC,IAA0B;AAClC,mBAAO,CAAC,IAA8B;AACtC,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,GAAyB;AACjC,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,IAAyB;AACjC,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,kDAAkD,mBAAO,CAAC,GAAuB;AACjF,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,qDAAqD,mBAAO,CAAC,IAA0B;AACvF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./node_modules/@ebay/skin/dist/link/link.css?4616","webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/panel-dialog.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./packages/ui/makeup-confirm-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/fullscreen-dialog/fullscreen-dialog.css?df3a","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/ui/makeup-dialog-button/dist/cjs/index.js","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/drawer-dialog/drawer-dialog.css?5b6e","webpack://root/./node_modules/@ebay/skin/drawer-dialog.js","webpack://root/./packages/ui/makeup-panel-dialog/dist/cjs/index.js","webpack://root/./packages/ui/makeup-drawer-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./node_modules/@ebay/skin/link.js","webpack://root/./packages/ui/makeup-alert-dialog/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/utility/utility.css?6c3b","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./packages/ui/makeup-toast-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/panel-dialog/panel-dialog.css?ed5b","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/dist/snackbar-dialog/snackbar-dialog.css?c7bb","webpack://root/./node_modules/@ebay/skin/fullscreen-dialog.js","webpack://root/./packages/ui/makeup-snackbar-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/alert-dialog.js","webpack://root/./packages/ui/makeup-fullscreen-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/dist/alert-dialog/alert-dialog.css?1d20","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/confirm-dialog/confirm-dialog.css?448d","webpack://root/./node_modules/@ebay/skin/toast-dialog.js","webpack://root/./node_modules/@ebay/skin/confirm-dialog.js","webpack://root/./node_modules/@ebay/skin/snackbar-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/utility.js","webpack://root/./packages/ui/makeup-input-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/textbox.js","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/toast-dialog/toast-dialog.css?81ab","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/textbox/textbox.css?d7ec","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-dialog-button/index.compiled.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/panel-dialog/panel-dialog.css');\n","require('./dist/button/button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultOptions = {\n baseClass: \"confirm-dialog\",\n closeButtonSelector: \".confirm-dialog__close\",\n quickDismiss: true,\n confirmButtonSelector: \".confirm-dialog__confirm\",\n focusManagementIndex: 1,\n rejectButtonSelector: \".confirm-dialog__reject\",\n windowSelector: \".confirm-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._confirmButtonEl = this._el.querySelector(this._options.confirmButtonSelector);\n this._rejectButtonEl = this._el.querySelector(this._options.rejectButtonSelector);\n this._onConfirmButtonClickListener = _onConfirmButtonClick.bind(this);\n this._onRejectButtonClickListener = _onRejectButtonClick.bind(this);\n this._confirmButtonEl.addEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.addEventListener(\"click\", this._onRejectButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._confirmButtonEl.removeEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.removeEventListener(\"click\", this._onRejectButtonClickListener);\n }\n confirm() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-confirm\"));\n }\n reject() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-reject\"));\n }\n destroy() {\n super.destroy();\n this._onConfirmButtonClickListener = null;\n this._onRejectButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onConfirmButtonClick() {\n this.confirm();\n}\nfunction _onRejectButtonClick() {\n this.reject();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst defaultOptions = {\n customElementMode: false\n};\nclass _default {\n constructor(widgetEl, dialog, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._el = widgetEl;\n this._el.setAttribute(\"aria-haspopup\", \"dialog\");\n this._dialog = dialog;\n this._onClickListener = _onClick.bind(this);\n this._onDialogCloseListener = _onDialogClose.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this._el.classList.add(\"dialog-button--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._el, {\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._el.addEventListener(\"click\", this._onClickListener);\n this._dialog._el.addEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\");\n this._dialog._el.removeEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onClickListener = null;\n this._onDialogCloseListener = null;\n this._onMutationListener = null;\n }\n}\nexports.default = _default;\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this._el.dispatchEvent(new CustomEvent(\"makeup-dialog-button-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nfunction _onClick() {\n this._dialog.open();\n}\nfunction _onDialogClose() {\n if (this._dialog.modal === true) {\n this._el.focus();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/drawer-dialog/drawer-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultPanelOptions = {\n baseClass: \"panel-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".panel-dialog__close\",\n doneButtonSelector: \".panel-dialog__done\",\n windowSelector: \".panel-dialog__window\",\n transitionsModifier: \"mask-fade-slow\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultPanelOptions, selectedOptions));\n }\n}\nexports.default = _default;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultDrawerOptions = {\n baseClass: \"drawer-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".drawer-dialog__close\",\n focusManagementIndex: 1,\n resizeButtonSelector: \".drawer-dialog__handle\",\n windowSelector: \".drawer-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultDrawerOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._resizeButtonEl = this._el.querySelector(this._options.resizeButtonSelector);\n this._onResizeButtonClickListener = _onResizeButtonClick.bind(this);\n this._resizeButtonEl.addEventListener(\"click\", this._onResizeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._resizeButtonEl.removeEventListener(\"click\", this._onResizeButtonClickListener);\n }\n resize() {\n this._el.querySelector(\".drawer-dialog__window\").classList.toggle(\"drawer-dialog__window--expanded\");\n this._el.dispatchEvent(new CustomEvent(\"dialog-resize\"));\n }\n destroy() {\n super.destroy();\n this._onResizeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onResizeButtonClick() {\n this.resize();\n}\n","require('./../dist/tokens/evo-light.css');\n","require('./dist/link/link.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultAlertOptions = {\n baseClass: \"alert-dialog\",\n baseClassModifier: \"alert\",\n quickDismiss: false,\n acknowledgeButtonSelector: \".alert-dialog__acknowledge\",\n windowSelector: \".alert-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultAlertOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._acknowledgeButtonEl = this._el.querySelector(this._options.acknowledgeButtonSelector);\n this._onAcknowledgeButtonClickListener = _onAcknowledgeButtonClick.bind(this);\n this._acknowledgeButtonEl.addEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._acknowledgeButtonEl.removeEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n acknowledge() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-acknowledge\"));\n }\n destroy() {\n super.destroy();\n this._onAcknowledgeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onAcknowledgeButtonClick() {\n this.acknowledge();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultToastOptions = {\n baseClass: \"toast-dialog\",\n closeButtonSelector: \".toast-dialog__close\",\n ctaButtonSelector: \".toast-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultToastOptions, selectedOptions));\n }\n _show() {\n super._show();\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/fullscreen-dialog/fullscreen-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultSnackbarOptions = {\n autoDismissTimer: 6000,\n baseClass: \"snackbar-dialog\",\n ctaButtonSelector: \".snackbar-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultSnackbarOptions, selectedOptions));\n this._autoDismissTimeout = null;\n }\n _show() {\n var _this = this;\n super._show();\n this._autoDismissTimeout = setTimeout(function () {\n let widget = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this;\n return widget.close();\n }, this._options.autoDismissTimer);\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","require('./dist/alert-dialog/alert-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultFullscreenOptions = {\n baseClass: \"fullscreen-dialog\",\n quickDismiss: false,\n closeButtonSelector: \".fullscreen-dialog__close\",\n transitionsModifier: \"transition\",\n windowSelector: \".fullscreen-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultFullscreenOptions, selectedOptions, {\n modal: true\n }));\n }\n}\nexports.default = _default;\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/toast-dialog/toast-dialog.css');\n","require('./dist/confirm-dialog/confirm-dialog.css');\n","require('./dist/snackbar-dialog/snackbar-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/utility/utility.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultInputOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"input\",\n submitButtonSelector: \".lightbox-dialog__submit\",\n cancelButtonSelector: \".lightbox-dialog__cancel\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultInputOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._submitButtonEl = this._el.querySelector(this._options.submitButtonSelector);\n this._cancelButtonEl = this._el.querySelector(this._options.cancelButtonSelector);\n this._onSubmitButtonClickListener = _onSubmitButtonClick.bind(this);\n this._onCancelButtonClickListener = _onCancelButtonClick.bind(this);\n this._submitButtonEl.addEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.addEventListener(\"click\", this._onCancelButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._submitButtonEl.removeEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.removeEventListener(\"click\", this._onCancelButtonClickListener);\n }\n submit() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-submit\"));\n }\n cancel() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cancel\"));\n }\n destroy() {\n super.destroy();\n this._onSubmitButtonClickListener = null;\n this._onCancelButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onSubmitButtonClick() {\n this.submit();\n}\nfunction _onCancelButtonClick() {\n this.cancel();\n}\n","require('./dist/textbox/textbox.css');\n","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/utility\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/link\");\nrequire(\"@ebay/skin/textbox\");\nrequire(\"@ebay/skin/alert-dialog\");\nrequire(\"@ebay/skin/confirm-dialog\");\nrequire(\"@ebay/skin/drawer-dialog\");\nrequire(\"@ebay/skin/fullscreen-dialog\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nrequire(\"@ebay/skin/panel-dialog\");\nrequire(\"@ebay/skin/snackbar-dialog\");\nrequire(\"@ebay/skin/toast-dialog\");\nvar _makeupDialogButton = _interopRequireDefault(require(\"makeup-dialog-button\"));\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nvar _makeupAlertDialog = _interopRequireDefault(require(\"makeup-alert-dialog\"));\nvar _makeupConfirmDialog = _interopRequireDefault(require(\"makeup-confirm-dialog\"));\nvar _makeupDrawerDialog = _interopRequireDefault(require(\"makeup-drawer-dialog\"));\nvar _makeupFullscreenDialog = _interopRequireDefault(require(\"makeup-fullscreen-dialog\"));\nvar _makeupInputDialog = _interopRequireDefault(require(\"makeup-input-dialog\"));\nvar _makeupPanelDialog = _interopRequireDefault(require(\"makeup-panel-dialog\"));\nvar _makeupSnackbarDialog = _interopRequireDefault(require(\"makeup-snackbar-dialog\"));\nvar _makeupToastDialog = _interopRequireDefault(require(\"makeup-toast-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// STYLES\n\n// REQUIRE\n/*\nconst DialogButton = require('makeup-dialog-button');\nconst LightboxDialog = require('makeup-lightbox-dialog');\nconst AlertDialog = require('makeup-alert-dialog');\nconst ConfirmDialog = require('makeup-confirm-dialog');\nconst DrawerDialog = require('makeup-drawer-dialog');\nconst FullscreenDialog = require('makeup-fullscreen-dialog');\nconst InputDialog = require('makeup-input-dialog');\nconst PanelDialog = require('makeup-panel-dialog');\nconst SnackbarDialog = require('makeup-snackbar-dialog');\nconst ToastDialog = require('makeup-toast-dialog');\n*/\n\n// IMPORT\n\nconst log = e => console.log(e); // eslint-disable-line no-console\n\nwindow.onload = function () {\n document.querySelectorAll(\".dialog-button\").forEach(function (el, i) {\n const dialogId = el.dataset.makeupFor;\n const dialogEl = document.getElementById(dialogId);\n const dialogClassList = dialogEl.classList;\n let dialogWidget;\n if (dialogClassList.contains(\"confirm-dialog\")) {\n dialogWidget = new _makeupConfirmDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"alert-dialog\")) {\n dialogWidget = new _makeupAlertDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"lightbox-dialog--input\")) {\n dialogWidget = new _makeupInputDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"fullscreen-dialog\")) {\n dialogWidget = new _makeupFullscreenDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"snackbar-dialog\")) {\n dialogWidget = new _makeupSnackbarDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"toast-dialog\")) {\n dialogWidget = new _makeupToastDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"drawer-dialog\")) {\n dialogWidget = new _makeupDrawerDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"panel-dialog\")) {\n dialogWidget = new _makeupPanelDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"lightbox-dialog\")) {\n dialogWidget = new _makeupLightboxDialog.default(dialogEl);\n }\n const buttonWidget = new _makeupDialogButton.default(el, dialogWidget);\n dialogWidget._el.addEventListener(\"dialog-open\", log);\n dialogWidget._el.addEventListener(\"dialog-close\", log);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-dialog-button/index.min.js","mappings":";;;;;;;;AAAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAAsC;;;;;;;;ACA9C,mBAAO,CAAC,IAA0B;;;;;;;;;ACArB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACxDA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AC7Ea;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;;ACzCA;;;;;;;;ACAA,mBAAO,CAAC,IAAwC;;;;;;;;;ACAnC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,kBAAe;;;;;;;;;ACtBF;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AC3CA,mBAAO,CAAC,IAAgC;;;;;;;;ACAxC,mBAAO,CAAC,GAAsB;;;;;;;;;ACAjB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;AC1Ca;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;AC5HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;ACDlB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;AChDA;;;;;;;;ACAA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,GAAgD;;;;;;;;;ACA3C;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAAsC;;;;;;;;;ACAjC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA,kBAAe;;;;;;;;;;ACvBf;;;;;;;;;;ACAA;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsC;;;;;;;;ACA9C,mBAAO,CAAC,IAA0C;;;;;;;;ACAlD,mBAAO,CAAC,IAA4C;;;;;;;;;;ACApD;;;;;;;;ACAA,mBAAO,CAAC,IAA4B;;;;;;;;;ACAvB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA4C;;;;;;;;;;ACApD;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,IAAyB;AACjC,mBAAO,CAAC,IAA2B;AACnC,mBAAO,CAAC,IAA0B;AAClC,mBAAO,CAAC,IAA8B;AACtC,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,GAAyB;AACjC,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,IAAyB;AACjC,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,kDAAkD,mBAAO,CAAC,GAAuB;AACjF,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,qDAAqD,mBAAO,CAAC,IAA0B;AACvF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA,iCAAiC;;AAEjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./node_modules/@ebay/skin/dist/link/link.css?4616","webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/panel-dialog.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./packages/ui/makeup-confirm-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/fullscreen-dialog/fullscreen-dialog.css?df3a","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/ui/makeup-dialog-button/dist/cjs/index.js","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/drawer-dialog/drawer-dialog.css?5b6e","webpack://root/./node_modules/@ebay/skin/drawer-dialog.js","webpack://root/./packages/ui/makeup-panel-dialog/dist/cjs/index.js","webpack://root/./packages/ui/makeup-drawer-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./node_modules/@ebay/skin/link.js","webpack://root/./packages/ui/makeup-alert-dialog/dist/cjs/index.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/utility/utility.css?6c3b","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./packages/ui/makeup-toast-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/panel-dialog/panel-dialog.css?ed5b","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/dist/snackbar-dialog/snackbar-dialog.css?c7bb","webpack://root/./node_modules/@ebay/skin/fullscreen-dialog.js","webpack://root/./packages/ui/makeup-snackbar-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/alert-dialog.js","webpack://root/./packages/ui/makeup-fullscreen-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/dist/alert-dialog/alert-dialog.css?1d20","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/confirm-dialog/confirm-dialog.css?448d","webpack://root/./node_modules/@ebay/skin/toast-dialog.js","webpack://root/./node_modules/@ebay/skin/confirm-dialog.js","webpack://root/./node_modules/@ebay/skin/snackbar-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/utility.js","webpack://root/./packages/ui/makeup-input-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/textbox.js","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/toast-dialog/toast-dialog.css?81ab","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/textbox/textbox.css?d7ec","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-dialog-button/index.compiled.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/panel-dialog/panel-dialog.css');\n","require('./dist/button/button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultOptions = {\n baseClass: \"confirm-dialog\",\n closeButtonSelector: \".confirm-dialog__close\",\n quickDismiss: true,\n confirmButtonSelector: \".confirm-dialog__confirm\",\n focusManagementIndex: 1,\n rejectButtonSelector: \".confirm-dialog__reject\",\n windowSelector: \".confirm-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._confirmButtonEl = this._el.querySelector(this._options.confirmButtonSelector);\n this._rejectButtonEl = this._el.querySelector(this._options.rejectButtonSelector);\n this._onConfirmButtonClickListener = _onConfirmButtonClick.bind(this);\n this._onRejectButtonClickListener = _onRejectButtonClick.bind(this);\n this._confirmButtonEl.addEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.addEventListener(\"click\", this._onRejectButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._confirmButtonEl.removeEventListener(\"click\", this._onConfirmButtonClickListener);\n this._rejectButtonEl.removeEventListener(\"click\", this._onRejectButtonClickListener);\n }\n confirm() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-confirm\"));\n }\n reject() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-reject\"));\n }\n destroy() {\n super.destroy();\n this._onConfirmButtonClickListener = null;\n this._onRejectButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onConfirmButtonClick() {\n this.confirm();\n}\nfunction _onRejectButtonClick() {\n this.reject();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nconst defaultOptions = {\n customElementMode: false\n};\nclass _default {\n constructor(widgetEl, dialog, selectedOptions) {\n this._options = Object.assign({}, defaultOptions, selectedOptions);\n this._el = widgetEl;\n this._el.setAttribute(\"aria-haspopup\", \"dialog\");\n this._dialog = dialog;\n this._onClickListener = _onClick.bind(this);\n this._onDialogCloseListener = _onDialogClose.bind(this);\n this._onMutationListener = _onMutation.bind(this);\n this._el.classList.add(\"dialog-button--js\");\n if (!this._options.customElementMode) {\n this._mutationObserver = new MutationObserver(this._onMutationListener);\n this._observeMutations();\n this._observeEvents();\n }\n }\n _observeMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.observe(this._el, {\n attributes: true,\n childList: false,\n subtree: false\n });\n }\n }\n _unobserveMutations() {\n if (!this._options.customElementMode) {\n this._mutationObserver.disconnect();\n }\n }\n _observeEvents() {\n if (this._destroyed !== true) {\n this._el.addEventListener(\"click\", this._onClickListener);\n this._dialog._el.addEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\");\n this._dialog._el.removeEventListener(\"dialog-close\", this._onDialogCloseListener);\n }\n destroy() {\n this._destroyed = true;\n this._unobserveMutations();\n this._unobserveEvents();\n this._onClickListener = null;\n this._onDialogCloseListener = null;\n this._onMutationListener = null;\n }\n}\nexports.default = _default;\nfunction _onMutation(mutationsList) {\n for (const mutation of mutationsList) {\n if (mutation.type === \"attributes\") {\n this._el.dispatchEvent(new CustomEvent(\"makeup-dialog-button-mutation\", {\n detail: {\n attributeName: mutation.attributeName\n }\n }));\n }\n }\n}\nfunction _onClick() {\n this._dialog.open();\n}\nfunction _onDialogClose() {\n if (this._dialog.modal === true) {\n this._el.focus();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/drawer-dialog/drawer-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultPanelOptions = {\n baseClass: \"panel-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".panel-dialog__close\",\n doneButtonSelector: \".panel-dialog__done\",\n windowSelector: \".panel-dialog__window\",\n transitionsModifier: \"mask-fade-slow\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultPanelOptions, selectedOptions));\n }\n}\nexports.default = _default;\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultDrawerOptions = {\n baseClass: \"drawer-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".drawer-dialog__close\",\n focusManagementIndex: 1,\n resizeButtonSelector: \".drawer-dialog__handle\",\n windowSelector: \".drawer-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultDrawerOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._resizeButtonEl = this._el.querySelector(this._options.resizeButtonSelector);\n this._onResizeButtonClickListener = _onResizeButtonClick.bind(this);\n this._resizeButtonEl.addEventListener(\"click\", this._onResizeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._resizeButtonEl.removeEventListener(\"click\", this._onResizeButtonClickListener);\n }\n resize() {\n this._el.querySelector(\".drawer-dialog__window\").classList.toggle(\"drawer-dialog__window--expanded\");\n this._el.dispatchEvent(new CustomEvent(\"dialog-resize\"));\n }\n destroy() {\n super.destroy();\n this._onResizeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onResizeButtonClick() {\n this.resize();\n}\n","require('./../dist/tokens/evo-light.css');\n","require('./dist/link/link.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultAlertOptions = {\n baseClass: \"alert-dialog\",\n baseClassModifier: \"alert\",\n quickDismiss: false,\n acknowledgeButtonSelector: \".alert-dialog__acknowledge\",\n windowSelector: \".alert-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultAlertOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._acknowledgeButtonEl = this._el.querySelector(this._options.acknowledgeButtonSelector);\n this._onAcknowledgeButtonClickListener = _onAcknowledgeButtonClick.bind(this);\n this._acknowledgeButtonEl.addEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._acknowledgeButtonEl.removeEventListener(\"click\", this._onAcknowledgeButtonClickListener);\n }\n acknowledge() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-acknowledge\"));\n }\n destroy() {\n super.destroy();\n this._onAcknowledgeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onAcknowledgeButtonClick() {\n this.acknowledge();\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultToastOptions = {\n baseClass: \"toast-dialog\",\n closeButtonSelector: \".toast-dialog__close\",\n ctaButtonSelector: \".toast-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultToastOptions, selectedOptions));\n }\n _show() {\n super._show();\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/fullscreen-dialog/fullscreen-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultSnackbarOptions = {\n autoDismissTimer: 6000,\n baseClass: \"snackbar-dialog\",\n ctaButtonSelector: \".snackbar-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultSnackbarOptions, selectedOptions));\n this._autoDismissTimeout = null;\n }\n _show() {\n var _this = this;\n super._show();\n this._autoDismissTimeout = setTimeout(function () {\n let widget = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this;\n return widget.close();\n }, this._options.autoDismissTimer);\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","require('./dist/alert-dialog/alert-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultFullscreenOptions = {\n baseClass: \"fullscreen-dialog\",\n quickDismiss: false,\n closeButtonSelector: \".fullscreen-dialog__close\",\n transitionsModifier: \"transition\",\n windowSelector: \".fullscreen-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultFullscreenOptions, selectedOptions, {\n modal: true\n }));\n }\n}\nexports.default = _default;\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/toast-dialog/toast-dialog.css');\n","require('./dist/confirm-dialog/confirm-dialog.css');\n","require('./dist/snackbar-dialog/snackbar-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/utility/utility.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultInputOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"input\",\n submitButtonSelector: \".lightbox-dialog__submit\",\n cancelButtonSelector: \".lightbox-dialog__cancel\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultInputOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._submitButtonEl = this._el.querySelector(this._options.submitButtonSelector);\n this._cancelButtonEl = this._el.querySelector(this._options.cancelButtonSelector);\n this._onSubmitButtonClickListener = _onSubmitButtonClick.bind(this);\n this._onCancelButtonClickListener = _onCancelButtonClick.bind(this);\n this._submitButtonEl.addEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.addEventListener(\"click\", this._onCancelButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._submitButtonEl.removeEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.removeEventListener(\"click\", this._onCancelButtonClickListener);\n }\n submit() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-submit\"));\n }\n cancel() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cancel\"));\n }\n destroy() {\n super.destroy();\n this._onSubmitButtonClickListener = null;\n this._onCancelButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onSubmitButtonClick() {\n this.submit();\n}\nfunction _onCancelButtonClick() {\n this.cancel();\n}\n","require('./dist/textbox/textbox.css');\n","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/utility\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/link\");\nrequire(\"@ebay/skin/textbox\");\nrequire(\"@ebay/skin/alert-dialog\");\nrequire(\"@ebay/skin/confirm-dialog\");\nrequire(\"@ebay/skin/drawer-dialog\");\nrequire(\"@ebay/skin/fullscreen-dialog\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nrequire(\"@ebay/skin/panel-dialog\");\nrequire(\"@ebay/skin/snackbar-dialog\");\nrequire(\"@ebay/skin/toast-dialog\");\nvar _makeupDialogButton = _interopRequireDefault(require(\"makeup-dialog-button\"));\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nvar _makeupAlertDialog = _interopRequireDefault(require(\"makeup-alert-dialog\"));\nvar _makeupConfirmDialog = _interopRequireDefault(require(\"makeup-confirm-dialog\"));\nvar _makeupDrawerDialog = _interopRequireDefault(require(\"makeup-drawer-dialog\"));\nvar _makeupFullscreenDialog = _interopRequireDefault(require(\"makeup-fullscreen-dialog\"));\nvar _makeupInputDialog = _interopRequireDefault(require(\"makeup-input-dialog\"));\nvar _makeupPanelDialog = _interopRequireDefault(require(\"makeup-panel-dialog\"));\nvar _makeupSnackbarDialog = _interopRequireDefault(require(\"makeup-snackbar-dialog\"));\nvar _makeupToastDialog = _interopRequireDefault(require(\"makeup-toast-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// STYLES\n\n// REQUIRE\n/*\nconst DialogButton = require('makeup-dialog-button');\nconst LightboxDialog = require('makeup-lightbox-dialog');\nconst AlertDialog = require('makeup-alert-dialog');\nconst ConfirmDialog = require('makeup-confirm-dialog');\nconst DrawerDialog = require('makeup-drawer-dialog');\nconst FullscreenDialog = require('makeup-fullscreen-dialog');\nconst InputDialog = require('makeup-input-dialog');\nconst PanelDialog = require('makeup-panel-dialog');\nconst SnackbarDialog = require('makeup-snackbar-dialog');\nconst ToastDialog = require('makeup-toast-dialog');\n*/\n\n// IMPORT\n\nconst log = e => console.log(e); // eslint-disable-line no-console\n\nwindow.onload = function () {\n document.querySelectorAll(\".dialog-button\").forEach(function (el, i) {\n const dialogId = el.dataset.makeupFor;\n const dialogEl = document.getElementById(dialogId);\n const dialogClassList = dialogEl.classList;\n let dialogWidget;\n if (dialogClassList.contains(\"confirm-dialog\")) {\n dialogWidget = new _makeupConfirmDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"alert-dialog\")) {\n dialogWidget = new _makeupAlertDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"lightbox-dialog--input\")) {\n dialogWidget = new _makeupInputDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"fullscreen-dialog\")) {\n dialogWidget = new _makeupFullscreenDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"snackbar-dialog\")) {\n dialogWidget = new _makeupSnackbarDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"toast-dialog\")) {\n dialogWidget = new _makeupToastDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"drawer-dialog\")) {\n dialogWidget = new _makeupDrawerDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"panel-dialog\")) {\n dialogWidget = new _makeupPanelDialog.default(dialogEl);\n } else if (dialogClassList.contains(\"lightbox-dialog\")) {\n dialogWidget = new _makeupLightboxDialog.default(dialogEl);\n }\n const buttonWidget = new _makeupDialogButton.default(el, dialogWidget);\n dialogWidget._el.addEventListener(\"dialog-open\", log);\n dialogWidget._el.addEventListener(\"dialog-close\", log);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-drawer-dialog/index.min.js b/docs/ui/makeup-drawer-dialog/index.min.js index f716d6de..e8365136 100644 --- a/docs/ui/makeup-drawer-dialog/index.min.js +++ b/docs/ui/makeup-drawer-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-drawer-dialog/index.min.js.map b/docs/ui/makeup-drawer-dialog/index.min.js.map index c9c5aa95..75749ac2 100644 --- a/docs/ui/makeup-drawer-dialog/index.min.js.map +++ b/docs/ui/makeup-drawer-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-drawer-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;AC9GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,GAAsB;;;;;;;;;;ACA9B;;;;;;;;ACAA,mBAAO,CAAC,IAAwC;;;;;;;;;ACAnC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AC3CA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA0B;AAClC,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/icon/icon.css?674d","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/icon.js","webpack://root/./node_modules/@ebay/skin/dist/drawer-dialog/drawer-dialog.css?5b6e","webpack://root/./node_modules/@ebay/skin/drawer-dialog.js","webpack://root/./packages/ui/makeup-drawer-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-drawer-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./dist/icon/icon.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/drawer-dialog/drawer-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultDrawerOptions = {\n baseClass: \"drawer-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".drawer-dialog__close\",\n focusManagementIndex: 1,\n resizeButtonSelector: \".drawer-dialog__handle\",\n windowSelector: \".drawer-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultDrawerOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._resizeButtonEl = this._el.querySelector(this._options.resizeButtonSelector);\n this._onResizeButtonClickListener = _onResizeButtonClick.bind(this);\n this._resizeButtonEl.addEventListener(\"click\", this._onResizeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._resizeButtonEl.removeEventListener(\"click\", this._onResizeButtonClickListener);\n }\n resize() {\n this._el.querySelector(\".drawer-dialog__window\").classList.toggle(\"drawer-dialog__window--expanded\");\n this._el.dispatchEvent(new CustomEvent(\"dialog-resize\"));\n }\n destroy() {\n super.destroy();\n this._onResizeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onResizeButtonClick() {\n this.resize();\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/drawer-dialog\");\nvar _makeupDrawerDialog = _interopRequireDefault(require(\"makeup-drawer-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const DrawerDialog = require('makeup-drawer-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".drawer-dialog\").forEach(function (el, i) {\n const widget = new _makeupDrawerDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-drawer-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;ACpHA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,GAAsB;;;;;;;;;;ACA9B;;;;;;;;ACAA,mBAAO,CAAC,IAAwC;;;;;;;;;ACAnC;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AC3CA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA0B;AAClC,iDAAiD,mBAAO,CAAC,IAAsB;AAC/E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/icon/icon.css?674d","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/icon.js","webpack://root/./node_modules/@ebay/skin/dist/drawer-dialog/drawer-dialog.css?5b6e","webpack://root/./node_modules/@ebay/skin/drawer-dialog.js","webpack://root/./packages/ui/makeup-drawer-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-drawer-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./dist/icon/icon.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/drawer-dialog/drawer-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultDrawerOptions = {\n baseClass: \"drawer-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".drawer-dialog__close\",\n focusManagementIndex: 1,\n resizeButtonSelector: \".drawer-dialog__handle\",\n windowSelector: \".drawer-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultDrawerOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._resizeButtonEl = this._el.querySelector(this._options.resizeButtonSelector);\n this._onResizeButtonClickListener = _onResizeButtonClick.bind(this);\n this._resizeButtonEl.addEventListener(\"click\", this._onResizeButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._resizeButtonEl.removeEventListener(\"click\", this._onResizeButtonClickListener);\n }\n resize() {\n this._el.querySelector(\".drawer-dialog__window\").classList.toggle(\"drawer-dialog__window--expanded\");\n this._el.dispatchEvent(new CustomEvent(\"dialog-resize\"));\n }\n destroy() {\n super.destroy();\n this._onResizeButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onResizeButtonClick() {\n this.resize();\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/drawer-dialog\");\nvar _makeupDrawerDialog = _interopRequireDefault(require(\"makeup-drawer-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const DrawerDialog = require('makeup-drawer-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".drawer-dialog\").forEach(function (el, i) {\n const widget = new _makeupDrawerDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-fullscreen-dialog/index.min.js b/docs/ui/makeup-fullscreen-dialog/index.min.js index ff2ce869..0b2833cc 100644 --- a/docs/ui/makeup-fullscreen-dialog/index.min.js +++ b/docs/ui/makeup-fullscreen-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-fullscreen-dialog/index.min.js.map b/docs/ui/makeup-fullscreen-dialog/index.min.js.map index 5b5fa219..fa6979f4 100644 --- a/docs/ui/makeup-fullscreen-dialog/index.min.js.map +++ b/docs/ui/makeup-fullscreen-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-fullscreen-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;AC9GA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,GAAsB;;;;;;;;ACA9B,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;ACAlC,mBAAO,CAAC,GAAgD;;;;;;;;;ACA3C;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA,kBAAe;;;;;;;;;;ACvBf;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA8B;AACtC,qDAAqD,mBAAO,CAAC,IAA0B;AACvF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/icon/icon.css?674d","webpack://root/./node_modules/@ebay/skin/dist/fullscreen-dialog/fullscreen-dialog.css?df3a","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/icon.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/fullscreen-dialog.js","webpack://root/./packages/ui/makeup-fullscreen-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-fullscreen-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./dist/icon/icon.css');\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","require('./dist/fullscreen-dialog/fullscreen-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultFullscreenOptions = {\n baseClass: \"fullscreen-dialog\",\n quickDismiss: false,\n closeButtonSelector: \".fullscreen-dialog__close\",\n transitionsModifier: \"transition\",\n windowSelector: \".fullscreen-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultFullscreenOptions, selectedOptions, {\n modal: true\n }));\n }\n}\nexports.default = _default;\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/fullscreen-dialog\");\nvar _makeupFullscreenDialog = _interopRequireDefault(require(\"makeup-fullscreen-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const FullscreenDialog = require('makeup-fullscreen-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".fullscreen-dialog\").forEach(function (el, i) {\n const widget = new _makeupFullscreenDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-fullscreen-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;ACpHA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,GAAsB;;;;;;;;ACA9B,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;ACAlC,mBAAO,CAAC,GAAgD;;;;;;;;;ACA3C;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA,kBAAe;;;;;;;;;;ACvBf;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA8B;AACtC,qDAAqD,mBAAO,CAAC,IAA0B;AACvF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/icon/icon.css?674d","webpack://root/./node_modules/@ebay/skin/dist/fullscreen-dialog/fullscreen-dialog.css?df3a","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/icon.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/fullscreen-dialog.js","webpack://root/./packages/ui/makeup-fullscreen-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-fullscreen-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./dist/icon/icon.css');\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","require('./dist/fullscreen-dialog/fullscreen-dialog.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultFullscreenOptions = {\n baseClass: \"fullscreen-dialog\",\n quickDismiss: false,\n closeButtonSelector: \".fullscreen-dialog__close\",\n transitionsModifier: \"transition\",\n windowSelector: \".fullscreen-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultFullscreenOptions, selectedOptions, {\n modal: true\n }));\n }\n}\nexports.default = _default;\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/fullscreen-dialog\");\nvar _makeupFullscreenDialog = _interopRequireDefault(require(\"makeup-fullscreen-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const FullscreenDialog = require('makeup-fullscreen-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".fullscreen-dialog\").forEach(function (el, i) {\n const widget = new _makeupFullscreenDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-input-dialog/index.min.js b/docs/ui/makeup-input-dialog/index.min.js index 09d9c443..956c43da 100644 --- a/docs/ui/makeup-input-dialog/index.min.js +++ b/docs/ui/makeup-input-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-input-dialog/index.min.js.map b/docs/ui/makeup-input-dialog/index.min.js.map index faedea23..ecf7ff04 100644 --- a/docs/ui/makeup-input-dialog/index.min.js.map +++ b/docs/ui/makeup-input-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-input-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,IAAoB;AAC5B,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./packages/ui/makeup-input-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/textbox.js","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/textbox/textbox.css?d7ec","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-input-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultInputOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"input\",\n submitButtonSelector: \".lightbox-dialog__submit\",\n cancelButtonSelector: \".lightbox-dialog__cancel\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultInputOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._submitButtonEl = this._el.querySelector(this._options.submitButtonSelector);\n this._cancelButtonEl = this._el.querySelector(this._options.cancelButtonSelector);\n this._onSubmitButtonClickListener = _onSubmitButtonClick.bind(this);\n this._onCancelButtonClickListener = _onCancelButtonClick.bind(this);\n this._submitButtonEl.addEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.addEventListener(\"click\", this._onCancelButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._submitButtonEl.removeEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.removeEventListener(\"click\", this._onCancelButtonClickListener);\n }\n submit() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-submit\"));\n }\n cancel() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cancel\"));\n }\n destroy() {\n super.destroy();\n this._onSubmitButtonClickListener = null;\n this._onCancelButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onSubmitButtonClick() {\n this.submit();\n}\nfunction _onCancelButtonClick() {\n this.cancel();\n}\n","require('./dist/textbox/textbox.css');\n","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nrequire(\"@ebay/skin/textbox\");\nvar _makeupInputDialog = _interopRequireDefault(require(\"makeup-input-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const InputDialog = require('makeup-input-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".lightbox-dialog--input\").forEach(function (el, i) {\n const widget = new _makeupInputDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-input-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACtDA,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAA4B;AACpC,mBAAO,CAAC,IAAoB;AAC5B,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./packages/ui/makeup-input-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/textbox.js","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/textbox/textbox.css?d7ec","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-input-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultInputOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"input\",\n submitButtonSelector: \".lightbox-dialog__submit\",\n cancelButtonSelector: \".lightbox-dialog__cancel\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultInputOptions, selectedOptions));\n }\n _observeEvents() {\n super._observeEvents();\n this._submitButtonEl = this._el.querySelector(this._options.submitButtonSelector);\n this._cancelButtonEl = this._el.querySelector(this._options.cancelButtonSelector);\n this._onSubmitButtonClickListener = _onSubmitButtonClick.bind(this);\n this._onCancelButtonClickListener = _onCancelButtonClick.bind(this);\n this._submitButtonEl.addEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.addEventListener(\"click\", this._onCancelButtonClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._submitButtonEl.removeEventListener(\"click\", this._onSubmitButtonClickListener);\n this._cancelButtonEl.removeEventListener(\"click\", this._onCancelButtonClickListener);\n }\n submit() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-submit\"));\n }\n cancel() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cancel\"));\n }\n destroy() {\n super.destroy();\n this._onSubmitButtonClickListener = null;\n this._onCancelButtonClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onSubmitButtonClick() {\n this.submit();\n}\nfunction _onCancelButtonClick() {\n this.cancel();\n}\n","require('./dist/textbox/textbox.css');\n","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nrequire(\"@ebay/skin/textbox\");\nvar _makeupInputDialog = _interopRequireDefault(require(\"makeup-input-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const InputDialog = require('makeup-input-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".lightbox-dialog--input\").forEach(function (el, i) {\n const widget = new _makeupInputDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-lightbox-dialog/index.min.js b/docs/ui/makeup-lightbox-dialog/index.min.js index 01362ff9..2aa0484c 100644 --- a/docs/ui/makeup-lightbox-dialog/index.min.js +++ b/docs/ui/makeup-lightbox-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-lightbox-dialog/index.min.js.map b/docs/ui/makeup-lightbox-dialog/index.min.js.map index 2fcda9a5..462ddaec 100644 --- a/docs/ui/makeup-lightbox-dialog/index.min.js.map +++ b/docs/ui/makeup-lightbox-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-lightbox-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA4B;AACpC,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-lightbox-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const LightboxDialog = require('makeup-lightbox-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".lightbox-dialog\").forEach(function (el, i) {\n const widget = new _makeupLightboxDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-lightbox-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;ACzCA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AC1HA;;;;;;;;ACAA,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAA4B;AACpC,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/lightbox-dialog/lightbox-dialog.css?d75e","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/lightbox-dialog.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-lightbox-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/lightbox-dialog/lightbox-dialog.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/lightbox-dialog\");\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const LightboxDialog = require('makeup-lightbox-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".lightbox-dialog\").forEach(function (el, i) {\n const widget = new _makeupLightboxDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-panel-dialog/index.min.js b/docs/ui/makeup-panel-dialog/index.min.js index ed4012ed..9952a581 100644 --- a/docs/ui/makeup-panel-dialog/index.min.js +++ b/docs/ui/makeup-panel-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-panel-dialog/index.min.js.map b/docs/ui/makeup-panel-dialog/index.min.js.map index cc311872..cafbcff1 100644 --- a/docs/ui/makeup-panel-dialog/index.min.js.map +++ b/docs/ui/makeup-panel-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-panel-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;ACzCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,kBAAe;;;;;;;;ACtBf,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;;ACD/B;;;;;;;;ACAA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,GAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/panel-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./packages/ui/makeup-panel-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/dist/panel-dialog/panel-dialog.css?ed5b","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-panel-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/panel-dialog/panel-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultPanelOptions = {\n baseClass: \"panel-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".panel-dialog__close\",\n doneButtonSelector: \".panel-dialog__done\",\n windowSelector: \".panel-dialog__window\",\n transitionsModifier: \"mask-fade-slow\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultPanelOptions, selectedOptions));\n }\n}\nexports.default = _default;\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/panel-dialog\");\nvar _makeupPanelDialog = _interopRequireDefault(require(\"makeup-panel-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const PanelDialog = require('makeup-panel-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".panel-dialog\").forEach(function (el, i) {\n const widget = new _makeupPanelDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-panel-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;AChEa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA;;;;;;;;;ACzCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA,kBAAe;;;;;;;;ACtBf,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;;ACD/B;;;;;;;;ACAA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,GAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/panel-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./packages/ui/makeup-lightbox-dialog/dist/cjs/index.js","webpack://root/./packages/ui/makeup-panel-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/dist/panel-dialog/panel-dialog.css?ed5b","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-panel-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/panel-dialog/panel-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultLightboxOptions = {\n baseClass: \"lightbox-dialog\",\n baseClassModifier: \"\",\n quickDismiss: true,\n closeButtonSelector: \".lightbox-dialog__close\",\n windowSelector: \".lightbox-dialog__window\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultLightboxOptions, selectedOptions, {\n modal: true\n }));\n }\n _observeEvents() {\n super._observeEvents();\n this._onClickListener = _onClick.bind(this);\n this._el.addEventListener(\"click\", this._onClickListener);\n }\n _unobserveEvents() {\n super._unobserveEvents();\n this._el.removeEventListener(\"click\", this._onClickListener);\n }\n destroy() {\n super.destroy();\n this._onClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onClick(e) {\n if (this._options.quickDismiss === true && e.target === this._el) {\n this.close();\n }\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupLightboxDialog = _interopRequireDefault(require(\"makeup-lightbox-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultPanelOptions = {\n baseClass: \"panel-dialog\",\n quickDismiss: true,\n closeButtonSelector: \".panel-dialog__close\",\n doneButtonSelector: \".panel-dialog__done\",\n windowSelector: \".panel-dialog__window\",\n transitionsModifier: \"mask-fade-slow\"\n};\nclass _default extends _makeupLightboxDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultPanelOptions, selectedOptions));\n }\n}\nexports.default = _default;\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/panel-dialog\");\nvar _makeupPanelDialog = _interopRequireDefault(require(\"makeup-panel-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const PanelDialog = require('makeup-panel-dialog');\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".panel-dialog\").forEach(function (el, i) {\n const widget = new _makeupPanelDialog.default(el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-snackbar-dialog/index.min.js b/docs/ui/makeup-snackbar-dialog/index.min.js index 7baecfec..d0ac96ca 100644 --- a/docs/ui/makeup-snackbar-dialog/index.min.js +++ b/docs/ui/makeup-snackbar-dialog/index.min.js @@ -35,6 +35,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -81,6 +82,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -114,6 +116,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-snackbar-dialog/index.min.js.map b/docs/ui/makeup-snackbar-dialog/index.min.js.map index 7c34ba0b..2b592a18 100644 --- a/docs/ui/makeup-snackbar-dialog/index.min.js.map +++ b/docs/ui/makeup-snackbar-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-snackbar-dialog/index.min.js","mappings":";;;;;;;;AAAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;AC9GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,IAAgC;;;;;;;;ACAxC,mBAAO,CAAC,GAAsB;;;;;;;;;ACAjB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;AC5HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;ACtDA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAA4B;AACpC,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./node_modules/@ebay/skin/dist/link/link.css?4616","webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./node_modules/@ebay/skin/link.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/utility/utility.css?6c3b","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/dist/snackbar-dialog/snackbar-dialog.css?c7bb","webpack://root/./packages/ui/makeup-snackbar-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/snackbar-dialog.js","webpack://root/./node_modules/@ebay/skin/utility.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-snackbar-dialog/index.compiled.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./../dist/tokens/evo-light.css');\n","require('./dist/link/link.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultSnackbarOptions = {\n autoDismissTimer: 6000,\n baseClass: \"snackbar-dialog\",\n ctaButtonSelector: \".snackbar-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultSnackbarOptions, selectedOptions));\n this._autoDismissTimeout = null;\n }\n _show() {\n var _this = this;\n super._show();\n this._autoDismissTimeout = setTimeout(function () {\n let widget = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this;\n return widget.close();\n }, this._options.autoDismissTimer);\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./dist/snackbar-dialog/snackbar-dialog.css');\n","require('./dist/utility/utility.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/utility\");\nrequire(\"@ebay/skin/link\");\nrequire(\"@ebay/skin/snackbar-dialog\");\nvar _makeupSnackbarDialog = _interopRequireDefault(require(\"makeup-snackbar-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const SnackbarDialog = require('makeup-snackbar-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".snackbar-dialog\").forEach(function (el, i) {\n const widget = new _makeupSnackbarDialog.default(el);\n console.log(widget, el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-snackbar-dialog/index.min.js","mappings":";;;;;;;;AAAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;;;ACpHA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,IAAgC;;;;;;;;ACAxC,mBAAO,CAAC,GAAsB;;;;;;;;;ACAjB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;AC5HA;;;;;;;;ACAA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;ACD/B,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;;;ACtDA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAA4C;;;;;;;;ACApD,mBAAO,CAAC,IAA4B;;;;;;;;ACApC,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAoB;AAC5B,mBAAO,CAAC,IAAiB;AACzB,mBAAO,CAAC,IAA4B;AACpC,mDAAmD,mBAAO,CAAC,IAAwB;AACnF,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./node_modules/@ebay/skin/dist/link/link.css?4616","webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./node_modules/@ebay/skin/link.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/utility/utility.css?6c3b","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./node_modules/@ebay/skin/dist/snackbar-dialog/snackbar-dialog.css?c7bb","webpack://root/./packages/ui/makeup-snackbar-dialog/dist/cjs/index.js","webpack://root/./docs/docs.css?378e","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/snackbar-dialog.js","webpack://root/./node_modules/@ebay/skin/utility.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-snackbar-dialog/index.compiled.js"],"sourcesContent":["// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./../dist/tokens/evo-light.css');\n","require('./dist/link/link.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","// extracted by mini-css-extract-plugin\nexport {};","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultSnackbarOptions = {\n autoDismissTimer: 6000,\n baseClass: \"snackbar-dialog\",\n ctaButtonSelector: \".snackbar-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultSnackbarOptions, selectedOptions));\n this._autoDismissTimeout = null;\n }\n _show() {\n var _this = this;\n super._show();\n this._autoDismissTimeout = setTimeout(function () {\n let widget = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this;\n return widget.close();\n }, this._options.autoDismissTimer);\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./dist/snackbar-dialog/snackbar-dialog.css');\n","require('./dist/utility/utility.css');\n","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/utility\");\nrequire(\"@ebay/skin/link\");\nrequire(\"@ebay/skin/snackbar-dialog\");\nvar _makeupSnackbarDialog = _interopRequireDefault(require(\"makeup-snackbar-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const SnackbarDialog = require('makeup-snackbar-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".snackbar-dialog\").forEach(function (el, i) {\n const widget = new _makeupSnackbarDialog.default(el);\n console.log(widget, el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/ui/makeup-toast-dialog/index.min.js b/docs/ui/makeup-toast-dialog/index.min.js index 4fbe1f7a..a8bd3293 100644 --- a/docs/ui/makeup-toast-dialog/index.min.js +++ b/docs/ui/makeup-toast-dialog/index.min.js @@ -25,6 +25,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -71,6 +72,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -104,6 +106,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/docs/ui/makeup-toast-dialog/index.min.js.map b/docs/ui/makeup-toast-dialog/index.min.js.map index 130c9b9a..dbf60a02 100644 --- a/docs/ui/makeup-toast-dialog/index.min.js.map +++ b/docs/ui/makeup-toast-dialog/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"makeup-toast-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;AC9GA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;ACDlB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AChDA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;;ACAA;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./packages/ui/makeup-toast-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/toast-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/dist/toast-dialog/toast-dialog.css?81ab","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-toast-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultToastOptions = {\n baseClass: \"toast-dialog\",\n closeButtonSelector: \".toast-dialog__close\",\n ctaButtonSelector: \".toast-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultToastOptions, selectedOptions));\n }\n _show() {\n super._show();\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./dist/toast-dialog/toast-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/toast-dialog\");\nvar _makeupToastDialog = _interopRequireDefault(require(\"makeup-toast-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const ToastDialog = require('makeup-toast-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".toast-dialog\").forEach(function (el, i) {\n const widget = new _makeupToastDialog.default(el);\n console.log(widget, el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"makeup-toast-dialog/index.min.js","mappings":";;;;;;;AAAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,eAAe;AACf,YAAY;AACZ,cAAc;AACd,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;;;;;;;;ACpHA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,aAAa;AACb,eAAe;AACf,2CAA2C,mBAAO,CAAC,GAAsB;AACzE,+CAA+C,mBAAO,CAAC,IAA0B;AACjF,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;;;;;;;;AC7GA;;;;;;;;;;ACAA;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,oBAAoB;AACpB,mBAAmB;AACnB,8BAA8B;AAC9B;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;AChEA,mBAAO,CAAC,IAAgC;;;;;;;;;ACA3B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,YAAY;AACZ,cAAc;AACd,mCAAmC,mBAAO,CAAC,IAAW;AACtD,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC;;AAElC;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;AC5HA,mBAAO,CAAC,IAAsB;AAC9B,mBAAO,CAAC,IAAuB;;;;;;;;;ACDlB;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,2CAA2C,mBAAO,CAAC,IAAe;AAClE,qCAAqC,iCAAiC;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;;;;;;;;AChDA,mBAAO,CAAC,IAA0B;;;;;;;;;;ACAlC;;;;;;;;ACAA,mBAAO,CAAC,IAAoC;;;;;;;;;ACA/B;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;;;;;;;;;ACnCa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,aAAa;AACxB,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,aAAa;AACxB,YAAY;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB,YAAY,UAAU;AACtB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,IAAI;AACJ,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC1HA,mBAAO,CAAC,IAAsC;;;;;;;;;;ACA9C;;;;;;;;;;ACAA;;;;;;;;ACAA,mBAAO,CAAC,IAA+B;;;;;;;;;;ACAvC;;;;;;;;;ACAa;;AAEb,8CAA6C;AAC7C;AACA,CAAC,EAAC;AACF,kBAAe;AACf,oCAAoC,mBAAO,CAAC,IAAc;AAC1D,+CAA+C,mBAAO,CAAC,IAAmB;AAC1E,yCAAyC,mBAAO,CAAC,IAAiB;AAClE,qCAAqC,iCAAiC;AACtE,yCAAyC,4EAA4E,oDAAoD,uCAAuC,gBAAgB,+BAA+B,4EAA4E,qBAAqB,+BAA+B,eAAe,wCAAwC,2JAA2J,WAAW;AAC5lB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC;AACpC;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wBAAwB,IAAI,kCAAkC;AACxH;AACA;AACA;AACA;AACA,8BAA8B,wBAAwB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qEAAqE,wBAAwB;AAC7F,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAe;AACf;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;UC7IA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;ACNa;;AAEb,mBAAO,CAAC,IAAgB;AACxB,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,IAAmB;AAC3B,mBAAO,CAAC,GAAmB;AAC3B,mBAAO,CAAC,IAAwB;AAChC,mBAAO,CAAC,IAAyB;AACjC,gDAAgD,mBAAO,CAAC,IAAqB;AAC7E,qCAAqC,iCAAiC;AACtE;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH,E","sources":["webpack://root/./packages/core/makeup-keyboard-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/button.js","webpack://root/./node_modules/@ebay/skin/dist/global/global.css?e001","webpack://root/./packages/core/makeup-modal/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-light.css?9c33","webpack://root/./node_modules/@ebay/skin/dist/icon-button/icon-button.css?7a74","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/util.js","webpack://root/./node_modules/@ebay/skin/tokens/evo-light.js","webpack://root/./packages/core/makeup-screenreader-trap/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/tokens.js","webpack://root/./packages/ui/makeup-toast-dialog/dist/cjs/index.js","webpack://root/./node_modules/@ebay/skin/global.js","webpack://root/./docs/docs.css?378e","webpack://root/./node_modules/@ebay/skin/icon-button.js","webpack://root/./packages/core/makeup-focusables/dist/cjs/index.js","webpack://root/./packages/ui/makeup-dialog/dist/cjs/transition.js","webpack://root/./node_modules/@ebay/skin/toast-dialog.js","webpack://root/./node_modules/@ebay/skin/dist/button/button.css?9a44","webpack://root/./node_modules/@ebay/skin/dist/toast-dialog/toast-dialog.css?81ab","webpack://root/./node_modules/@ebay/skin/tokens/evo-core.js","webpack://root/./node_modules/@ebay/skin/dist/tokens/evo-core.css?7a96","webpack://root/./packages/ui/makeup-dialog/dist/cjs/index.js","webpack://root/webpack/bootstrap","webpack://root/webpack/runtime/make namespace object","webpack://root/./docs/ui/makeup-toast-dialog/index.compiled.js"],"sourcesContent":["\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.refresh = refresh;\nexports.trap = trap;\nexports.untrap = untrap;\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// for the element that will be trapped\nlet trappedEl;\n\n// for the trap boundary/bumper elements\nlet topTrap;\nlet outerTrapBefore;\nlet innerTrapBefore;\nlet innerTrapAfter;\nlet outerTrapAfter;\nlet botTrap;\nlet _observer = new MutationObserver(refresh);\n\n// for the first and last focusable element inside the trap\nlet firstFocusableElement;\nlet lastFocusableElement;\nfunction createTrapBoundary() {\n const trapBoundary = document.createElement(\"div\");\n trapBoundary.setAttribute(\"aria-hidden\", \"true\");\n trapBoundary.setAttribute(\"tabindex\", \"0\");\n trapBoundary.className = \"keyboard-trap-boundary\";\n return trapBoundary;\n}\nfunction setFocusToFirstFocusableElement() {\n firstFocusableElement.focus();\n}\nfunction setFocusToLastFocusableElement() {\n lastFocusableElement.focus();\n}\nfunction createTraps() {\n topTrap = createTrapBoundary();\n outerTrapBefore = topTrap.cloneNode();\n innerTrapBefore = topTrap.cloneNode();\n innerTrapAfter = topTrap.cloneNode();\n outerTrapAfter = topTrap.cloneNode();\n botTrap = topTrap.cloneNode();\n topTrap.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapBefore.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n innerTrapBefore.addEventListener(\"focus\", setFocusToLastFocusableElement);\n innerTrapAfter.addEventListener(\"focus\", setFocusToFirstFocusableElement);\n outerTrapAfter.addEventListener(\"focus\", setFocusToLastFocusableElement);\n botTrap.addEventListener(\"focus\", setFocusToLastFocusableElement);\n}\nfunction untrap() {\n if (trappedEl) {\n topTrap = safeDetach(topTrap);\n outerTrapBefore = safeDetach(outerTrapBefore);\n innerTrapBefore = safeDetach(innerTrapBefore);\n innerTrapAfter = safeDetach(innerTrapAfter);\n outerTrapAfter = safeDetach(outerTrapAfter);\n botTrap = safeDetach(botTrap);\n trappedEl.classList.remove(\"keyboard-trap--active\");\n\n // let observers know the keyboard is no longer trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n _observer.disconnect();\n }\n return trappedEl;\n}\nfunction safeDetach(el) {\n const parent = el.parentNode;\n return parent ? parent.removeChild(el) : el;\n}\nfunction trap(el) {\n if (!topTrap) {\n createTraps();\n } else {\n untrap();\n }\n trappedEl = el;\n\n // when bundled up with isomorphic components on the server, this code is run,\n // so we must check if 'document' is defined.\n const body = typeof document === \"undefined\" ? null : document.body;\n const focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n body.insertBefore(topTrap, body.childNodes[0]);\n trappedEl.parentNode.insertBefore(outerTrapBefore, trappedEl);\n trappedEl.insertBefore(innerTrapBefore, trappedEl.childNodes[0]);\n trappedEl.appendChild(innerTrapAfter);\n trappedEl.parentNode.insertBefore(outerTrapAfter, trappedEl.nextElementSibling);\n body.appendChild(botTrap);\n\n // let observers know the keyboard is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"keyboardTrap\", {\n bubbles: true\n }));\n trappedEl.classList.add(\"keyboard-trap--active\");\n _observer.observe(el, {\n childList: true,\n subtree: true\n });\n return trappedEl;\n}\nfunction refresh() {\n if (topTrap && trappedEl) {\n let focusableElements = (0, _makeupFocusables.default)(trappedEl, true);\n focusableElements = focusableElements.filter(function (el) {\n return !el.classList.contains(\"keyboard-trap-boundary\");\n });\n firstFocusableElement = focusableElements[0];\n lastFocusableElement = focusableElements[focusableElements.length - 1];\n }\n}\n","require('./dist/button/button.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.modal = modal;\nexports.unmodal = unmodal;\nvar keyboardTrap = _interopRequireWildcard(require(\"makeup-keyboard-trap\"));\nvar screenreaderTrap = _interopRequireWildcard(require(\"makeup-screenreader-trap\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultOptions = {\n hoist: false,\n useHiddenProperty: false,\n wrap: false\n};\nconst tags = {\n SCRIPT: \"script\",\n LINK: \"link\"\n};\nlet modalEl;\nlet hoistedPlaceholderEl;\nlet inertContentEl;\nlet originalPositionIndexes = [];\nfunction isRootLevel(el) {\n return el.parentNode.tagName.toLowerCase() === \"body\";\n}\nfunction unhoist() {\n if (hoistedPlaceholderEl) {\n hoistedPlaceholderEl.replaceWith(modalEl);\n hoistedPlaceholderEl = null;\n }\n}\nfunction hoist() {\n if (!hoistedPlaceholderEl && !isRootLevel(modalEl)) {\n hoistedPlaceholderEl = document.createElement(\"div\");\n hoistedPlaceholderEl.setAttribute(\"data-makeup-modal\", \"placeholder\");\n modalEl.parentElement.insertBefore(hoistedPlaceholderEl, modalEl);\n document.body.appendChild(modalEl);\n }\n}\nfunction wrap() {\n if (!inertContentEl && isRootLevel(modalEl)) {\n inertContentEl = document.createElement(\"div\");\n inertContentEl.setAttribute(\"data-makeup-modal\", \"inert\");\n [...document.body.children].forEach((child, index) => {\n // checking for the script and link tags is necessary because moving them could cause issues.\n // for example, moving a script to the top of the body could freeze the page while the script loads.\n if (!(child === modalEl || child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n inertContentEl.appendChild(child);\n originalPositionIndexes.push(index);\n }\n });\n document.body.prepend(inertContentEl);\n }\n}\nfunction unwrap() {\n if (inertContentEl) {\n [...inertContentEl.children].forEach(child => {\n if (!(child.tagName.toLowerCase() === tags.SCRIPT || child.tagName === tags.LINK)) {\n const index = originalPositionIndexes.shift();\n if (index > document.body.children.length) {\n document.body.appendChild(child);\n } else {\n document.body.insertBefore(child, document.body.children[index + 1]);\n }\n }\n });\n inertContentEl.remove();\n inertContentEl = null;\n originalPositionIndexes = [];\n }\n}\nfunction unmodal() {\n if (modalEl) {\n keyboardTrap.untrap(modalEl);\n screenreaderTrap.untrap(modalEl);\n unwrap();\n unhoist();\n document.body.removeAttribute(\"data-makeup-modal\");\n modalEl.removeAttribute(\"data-makeup-modal\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-unmodal\", {\n bubbles: false\n }));\n modalEl = null;\n }\n return modalEl;\n}\nfunction modal(el, options) {\n const _options = Object.assign({}, defaultOptions, options);\n unmodal();\n modalEl = el;\n if (_options.hoist) {\n hoist();\n }\n if (_options.wrap) {\n wrap();\n }\n screenreaderTrap.trap(modalEl, options);\n\n // no need to create keyboard traps when inert content is using hidden property\n if (!_options.useHiddenProperty) {\n keyboardTrap.trap(modalEl);\n }\n document.body.setAttribute(\"data-makeup-modal\", \"true\");\n modalEl.setAttribute(\"data-makeup-modal\", \"widget\");\n modalEl.dispatchEvent(new CustomEvent(\"makeup-modal\", {\n bubbles: false\n }));\n return modalEl;\n}\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.getAncestors = getAncestors;\nexports.getSiblings = getSiblings;\nexports.getSiblingsOfAncestors = getSiblingsOfAncestors;\n// filter function for ancestor elements\nconst filterAncestor = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"body\" && item.tagName.toLowerCase() !== \"html\";\n\n// filter function for sibling elements\nconst filterSibling = item => item.nodeType === 1 && item.tagName.toLowerCase() !== \"script\";\n\n// reducer to flatten arrays\nconst flattenArrays = (a, b) => a.concat(b);\n\n// recursive function to get previous sibling nodes of given element\nfunction getPreviousSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const previousSibling = el.previousSibling;\n if (!previousSibling) {\n return siblings;\n }\n siblings.push(previousSibling);\n return getPreviousSiblings(previousSibling, siblings);\n}\n\n// recursive function to get next sibling nodes of given element\nfunction getNextSiblings(el) {\n let siblings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextSibling = el.nextSibling;\n if (!nextSibling) {\n return siblings;\n }\n siblings.push(nextSibling);\n return getNextSiblings(nextSibling, siblings);\n}\n\n// returns all sibling element nodes of given element\nfunction getSiblings(el) {\n const allSiblings = getPreviousSiblings(el).concat(getNextSiblings(el));\n return allSiblings.filter(filterSibling);\n}\n\n// recursive function to get all ancestor nodes of given element\nfunction getAllAncestors(el) {\n let ancestors = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n const nextAncestor = el.parentNode;\n if (!nextAncestor) {\n return ancestors;\n }\n ancestors.push(nextAncestor);\n return getAllAncestors(nextAncestor, ancestors);\n}\n\n// get ancestor nodes of given element\nfunction getAncestors(el) {\n return getAllAncestors(el).filter(filterAncestor);\n}\n\n// get siblings of ancestors (i.e. aunts and uncles) of given el\nfunction getSiblingsOfAncestors(el) {\n return getAncestors(el).map(item => getSiblings(item)).reduce(flattenArrays, []);\n}\n","require('./../dist/tokens/evo-light.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.trap = trap;\nexports.untrap = untrap;\nvar util = _interopRequireWildcard(require(\"./util.js\"));\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\n// the main landmark\nlet mainEl;\n\n// the element that will be trapped\nlet trappedEl;\n\n// collection of elements that get 'dirtied' with aria-hidden attr or hidden prop\nlet dirtyObjects;\n\n// filter function for svg elements\nconst filterSvg = item => item.tagName.toLowerCase() !== \"svg\";\nfunction showElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"false\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", false);\n }\n return preparedElement;\n}\nfunction hideElementPrep(el, useHiddenProperty) {\n let preparedElement;\n if (useHiddenProperty === false) {\n preparedElement = prepareElement(el, \"aria-hidden\", \"true\");\n } else {\n preparedElement = prepareElement(el, \"hidden\", true);\n }\n return preparedElement;\n}\nfunction prepareElement(el, attributeName, dirtyValue) {\n const isProperty = typeof dirtyValue === \"boolean\";\n return {\n el,\n attributeName,\n cleanValue: isProperty ? el[attributeName] : el.getAttribute(attributeName),\n dirtyValue,\n isProperty\n };\n}\nfunction dirtyElement(preparedObj) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.dirtyValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.dirtyValue);\n }\n}\nfunction cleanElement(preparedObj) {\n if (preparedObj.cleanValue) {\n if (preparedObj.isProperty === true) {\n preparedObj.el[preparedObj.attributeName] = preparedObj.cleanValue;\n } else {\n preparedObj.el.setAttribute(preparedObj.attributeName, preparedObj.cleanValue);\n }\n } else {\n preparedObj.el.removeAttribute(preparedObj.attributeName);\n }\n}\nfunction untrap() {\n if (trappedEl) {\n // restore 'dirtied' elements to their original state\n dirtyObjects.forEach(item => cleanElement(item));\n dirtyObjects = [];\n\n // 're-enable' the main landmark\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"main\");\n }\n\n // let observers know the screenreader is now untrapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderUntrap\", {\n bubbles: true\n }));\n trappedEl = null;\n }\n}\nconst defaultOptions = {\n useHiddenProperty: false\n};\nfunction trap(el, selectedOptions) {\n // ensure current trap is deactivated\n untrap();\n const options = Object.assign({}, defaultOptions, selectedOptions);\n\n // update the trapped el reference\n trappedEl = el;\n\n // update the main landmark reference\n mainEl = document.querySelector('main, [role=\"main\"]');\n\n // we must remove the main landmark to avoid issues on voiceover iOS\n if (mainEl) {\n mainEl.setAttribute(\"role\", \"presentation\");\n }\n\n // cache all ancestors, siblings & siblings of ancestors for trappedEl\n const ancestors = util.getAncestors(trappedEl);\n let siblings = util.getSiblings(trappedEl);\n let siblingsOfAncestors = util.getSiblingsOfAncestors(trappedEl);\n\n // if using hidden property, filter out SVG elements as they do not support this property\n if (options.useHiddenProperty === true) {\n siblings = siblings.filter(filterSvg);\n siblingsOfAncestors = siblingsOfAncestors.filter(filterSvg);\n }\n\n // prepare elements\n dirtyObjects = [showElementPrep(trappedEl, options.useHiddenProperty)].concat(ancestors.map(item => showElementPrep(item, options.useHiddenProperty))).concat(siblings.map(item => hideElementPrep(item, options.useHiddenProperty))).concat(siblingsOfAncestors.map(item => hideElementPrep(item, options.useHiddenProperty)));\n\n // update DOM\n dirtyObjects.forEach(item => dirtyElement(item));\n\n // let observers know the screenreader is now trapped\n trappedEl.dispatchEvent(new CustomEvent(\"screenreaderTrap\", {\n bubbles: true\n }));\n}\n","require('./tokens/evo-core.js');\nrequire('./tokens/evo-light.js');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _makeupDialog = _interopRequireDefault(require(\"makeup-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nconst defaultToastOptions = {\n baseClass: \"toast-dialog\",\n closeButtonSelector: \".toast-dialog__close\",\n ctaButtonSelector: \".toast-dialog__cta\",\n transitionsModifier: \"transition\"\n};\nclass _default extends _makeupDialog.default {\n constructor(el) {\n let selectedOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super(el, Object.assign({}, defaultToastOptions, selectedOptions));\n }\n _show() {\n super._show();\n }\n _observeEvents() {\n super._observeEvents();\n this._ctaEl = this._el.querySelector(this._options.ctaButtonSelector);\n if (this._ctaEl) {\n this._onCtaClickListener = _onCtaButtonClick.bind(this);\n this._ctaEl.addEventListener(\"click\", this._onCtaClickListener);\n }\n }\n _unobserveEvents() {\n super._unobserveEvents();\n if (this._ctaEl) {\n this._ctaEl.removeEventListener(\"click\", this._onCtaClickListener);\n }\n }\n cta() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-cta\"));\n }\n destroy() {\n super.destroy();\n this._onCtaClickListener = null;\n }\n}\nexports.default = _default;\nfunction _onCtaButtonClick() {\n this.cta();\n}\n","require('./dist/global/global.css');\n","// extracted by mini-css-extract-plugin\nexport {};","require('./dist/icon-button/icon-button.css');\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _default;\nconst focusableElList = [\"a[href]\", \"area[href]\", \"button:not([disabled])\", \"embed\", \"iframe\", \"input:not([disabled])\", \"object\", \"select:not([disabled])\", \"textarea:not([disabled])\", \"*[tabindex]\", \"*[contenteditable]\"];\nconst focusableElSelector = focusableElList.join();\nfunction _default(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let callback = arguments.length > 2 ? arguments[2] : undefined;\n if (callback) {\n const request = requestAnimationFrame(() => {\n callback(getFocusables(el, keyboardOnly));\n });\n return () => {\n cancelAnimationFrame(request);\n };\n }\n return getFocusables(el, keyboardOnly);\n}\nfunction getFocusables(el) {\n let keyboardOnly = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let focusableEls = Array.prototype.slice.call(el.querySelectorAll(focusableElSelector));\n\n // filter out elements with display: none or nested in a display: none parent\n focusableEls = focusableEls.filter(function (focusableEl) {\n return !!(focusableEl.offsetWidth || focusableEl.offsetHeight || focusableEl.getClientRects().length);\n });\n if (keyboardOnly === true) {\n focusableEls = focusableEls.filter(function (focusableEl) {\n return focusableEl.getAttribute(\"tabindex\") !== \"-1\";\n });\n }\n return focusableEls;\n}\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = transition;\n/**\n * Author: Mr D.Piercey\n */\nconst TRANSITION_END = \"transitionend\";\nconst IMMEDIATE_TRANSITION_REG = /0m?s(?:, )?/g;\n/**\n * Applies a primer `-init` class before starting a transition\n * to make transitioning properties that are not animatable easier.\n *\n * **Order**\n * 1. Add class: \"$name-init\"\n * 2. Wait one frame.\n * 3. Remove class \"$name-init\".\n * 4. Add class \"$name\".\n * 5. Wait for animation to finish.\n * 6. Remove class \"$name\".\n *\n * @param {HTMLElement} el The root element that contains the animation.\n * @param {string} name The base className to use for the transition.\n * @param {Function} cb A callback called after the transition as ended.\n */\n\nfunction transition(el, baseClass, cb) {\n let ended;\n let pending;\n let ran = 0;\n const classList = el.classList;\n const initClass = \"\".concat(baseClass, \"-init\");\n let cancelFrame = nextFrame(function () {\n el.addEventListener(TRANSITION_END, listener, true);\n classList.add(baseClass);\n classList.remove(initClass);\n pending = getTransitionCount(el);\n cancelFrame = undefined;\n if (pending === 0) {\n cancel();\n }\n });\n classList.add(initClass);\n return cancel;\n /**\n * Cancels the current transition and resets the className.\n */\n\n function cancel() {\n if (ended) {\n return;\n }\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n if (cancelFrame) {\n cancelFrame();\n classList.remove(initClass);\n } else {\n classList.remove(baseClass);\n }\n }\n /**\n * Handles a single transition end event.\n * Once all child transitions have ended the overall animation is completed.\n */\n\n function listener() {\n if (++ran === pending) {\n ended = true;\n el.removeEventListener(TRANSITION_END, listener, true);\n classList.remove(baseClass);\n if (cb) {\n cb();\n }\n }\n }\n}\n\n/**\n * Walks the tree of an element and counts how many transitions have been applied.\n *\n * @param {HTMLElement} el\n * @return {number}\n */\n\nfunction getTransitionCount(el) {\n let count = window.getComputedStyle(el).transitionDuration.replace(IMMEDIATE_TRANSITION_REG, \"\") ? 1 : 0;\n let child = el.firstElementChild;\n while (child) {\n count += getTransitionCount(child);\n child = child.nextElementSibling;\n }\n return count;\n}\n/**\n * Runs a function during the next animation frame.\n *\n * @param {function} fn a function to run on the next animation frame.\n * @return {function} a function to cancel the callback.\n */\n\nfunction nextFrame(fn) {\n let frame;\n let cancelFrame;\n if (window.requestAnimationFrame) {\n frame = requestAnimationFrame(function () {\n frame = requestAnimationFrame(fn);\n });\n cancelFrame = cancelAnimationFrame;\n } else {\n frame = setTimeout(fn, 26); // 16ms to simulate RAF, 10ms to ensure called after the frame.\n\n cancelFrame = clearTimeout;\n }\n return function () {\n if (frame) {\n cancelFrame(frame);\n frame = undefined;\n }\n };\n}\n","require('./dist/toast-dialog/toast-dialog.css');\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","require('./../dist/tokens/evo-core.css');\n","// extracted by mini-css-extract-plugin\nexport {};","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar Modal = _interopRequireWildcard(require(\"makeup-modal\"));\nvar _makeupFocusables = _interopRequireDefault(require(\"makeup-focusables\"));\nvar _transition = _interopRequireDefault(require(\"./transition.js\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\nfunction _interopRequireWildcard(e, t) { if (\"function\" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) \"default\" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }\nconst defaultDialogOptions = {\n baseClass: \"dialog\",\n closeButtonSelector: \".dialog__close\",\n focusManagementIndex: 0,\n modal: false,\n quickDismiss: true,\n transitionsModifier: \"mask-fade\"\n};\nclass _default {\n constructor(widgetEl, selectedOptions) {\n this._options = Object.assign({}, defaultDialogOptions, selectedOptions);\n this._el = widgetEl;\n if (this._options.modal === true) {\n this._el.setAttribute(\"aria-modal\", \"true\");\n }\n this._windowEl = this._el.querySelector(this._options.windowSelector);\n this._closeButtonEl = this._el.querySelector(this._options.closeButtonSelector);\n this._hasTransitions = this._el.classList.contains(`${this._options.baseClass}--${this._options.transitionsModifier}`);\n this._onCloseButtonClickListener = _onCloseButtonClick.bind(this);\n this._onKeyDownListener = _onKeyDown.bind(this);\n this._onOpenTransitionEndCallback = _onOpenTransitionEnd.bind(this);\n this._onCloseTransitionEndCallback = _onCloseTransitionEnd.bind(this);\n this._el.classList.add(`${this._options.baseClass}--js`);\n if (!this.hidden) {\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n this._observeEvents();\n }\n }\n get focusables() {\n return (0, _makeupFocusables.default)(this._windowEl);\n }\n get modal() {\n return this._el.getAttribute(\"aria-modal\") === \"true\";\n }\n get hidden() {\n return this._el.hidden;\n }\n open() {\n this._show();\n this._el.dispatchEvent(new CustomEvent(\"dialog-open\"));\n }\n close() {\n this._hide();\n this._el.dispatchEvent(new CustomEvent(\"dialog-close\"));\n }\n _show() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--show`, this._onOpenTransitionEndCallback);\n } else {\n if (this.modal) {\n setTimeout(() => _doModalFocusManagement(this), 50);\n }\n this._el.hidden = false;\n }\n this._observeEvents();\n }\n _hide() {\n if (this._hasTransitions) {\n if (this._cancelTransition) {\n this._cancelTransition();\n }\n this._cancelTransition = (0, _transition.default)(this._el, `${this._options.baseClass}--hide`, this._onCloseTransitionEndCallback);\n } else {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n }\n this._autoDismissTimeout = null;\n this._unobserveEvents();\n }\n _observeEvents() {\n document.addEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n _unobserveEvents() {\n this._el.removeEventListener(\"click\", this._onCloseButtonClickListener);\n document.removeEventListener(\"keydown\", this._onKeyDownListener);\n if (this._closeButtonEl) {\n this._closeButtonEl.addEventListener(\"click\", this._onCloseButtonClickListener);\n }\n }\n destroy() {\n this._destroyed = true;\n this._unobserveEvents();\n this._onCloseButtonClickListener = null;\n this._onKeyDownListener = null;\n this._onOpenTransitionEndCallback = null;\n this._onCloseTransitionEndCallback = null;\n this._autoDismissTimeout = null;\n }\n}\nexports.default = _default;\nfunction _doModalFocusManagement(dialogWidget) {\n const autoFocusEl = dialogWidget._el.querySelector(\"[autofocus]\");\n if (autoFocusEl) {\n autoFocusEl.focus();\n } else {\n dialogWidget.focusables[dialogWidget._options.focusManagementIndex].focus();\n }\n Modal.modal(dialogWidget._el);\n}\nfunction _onOpenTransitionEnd() {\n this._el.hidden = false;\n this._cancelTransition = undefined;\n if (this.modal) {\n _doModalFocusManagement(this);\n }\n}\nfunction _onCloseTransitionEnd() {\n if (this.modal) {\n Modal.unmodal();\n }\n this._el.hidden = true;\n this._cancelTransition = undefined;\n}\nfunction _onKeyDown(e) {\n if (this._options.quickDismiss === true && e.keyCode === 27) {\n this.close();\n }\n}\nfunction _onCloseButtonClick() {\n this.close();\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","// define __esModule on exports\n__webpack_require__.r = (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};","\"use strict\";\n\nrequire(\"../../docs.css\");\nrequire(\"@ebay/skin/tokens\");\nrequire(\"@ebay/skin/global\");\nrequire(\"@ebay/skin/button\");\nrequire(\"@ebay/skin/icon-button\");\nrequire(\"@ebay/skin/toast-dialog\");\nvar _makeupToastDialog = _interopRequireDefault(require(\"makeup-toast-dialog\"));\nfunction _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }\n// REQUIRE\n// const ToastDialog = require('makeup-toast-dialog').default;\n\n// IMPORT\n\nwindow.onload = function () {\n document.querySelectorAll(\".toast-dialog\").forEach(function (el, i) {\n const widget = new _makeupToastDialog.default(el);\n console.log(widget, el);\n });\n};"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/packages/core/makeup-keyboard-trap/dist/cjs/index.js b/packages/core/makeup-keyboard-trap/dist/cjs/index.js index 3e311403..7423886f 100644 --- a/packages/core/makeup-keyboard-trap/dist/cjs/index.js +++ b/packages/core/makeup-keyboard-trap/dist/cjs/index.js @@ -18,6 +18,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -64,6 +65,7 @@ function untrap() { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -97,6 +99,10 @@ function trap(el) { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/packages/core/makeup-keyboard-trap/dist/mjs/index.js b/packages/core/makeup-keyboard-trap/dist/mjs/index.js index 1d607343..45df9ff4 100644 --- a/packages/core/makeup-keyboard-trap/dist/mjs/index.js +++ b/packages/core/makeup-keyboard-trap/dist/mjs/index.js @@ -6,6 +6,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); let firstFocusableElement; let lastFocusableElement; function createTrapBoundary() { @@ -46,6 +47,7 @@ function untrap() { trappedEl.classList.remove("keyboard-trap--active"); trappedEl.dispatchEvent(new CustomEvent("keyboardUntrap", { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -72,6 +74,10 @@ function trap(el) { body.appendChild(botTrap); trappedEl.dispatchEvent(new CustomEvent("keyboardTrap", { bubbles: true })); trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true + }); return trappedEl; } function refresh() { diff --git a/packages/core/makeup-keyboard-trap/src/index.js b/packages/core/makeup-keyboard-trap/src/index.js index 600b866e..320ed9c9 100644 --- a/packages/core/makeup-keyboard-trap/src/index.js +++ b/packages/core/makeup-keyboard-trap/src/index.js @@ -10,6 +10,7 @@ let innerTrapBefore; let innerTrapAfter; let outerTrapAfter; let botTrap; +let _observer = new MutationObserver(refresh); // for the first and last focusable element inside the trap let firstFocusableElement; @@ -64,6 +65,7 @@ function untrap() { trappedEl.dispatchEvent(new CustomEvent("keyboardUntrap", { bubbles: true })); trappedEl = null; + _observer.disconnect(); } return trappedEl; } @@ -102,6 +104,11 @@ function trap(el) { trappedEl.classList.add("keyboard-trap--active"); + _observer.observe(el, { + childList: true, + subtree: true, + }); + return trappedEl; }