!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports):"function"==typeofdefine&&define.amd?define(["exports"],t):(e="undefined"!=typeofglobalThis?globalThis:e||self,function(){varn=e.tabbable,o=e.tabbable={};t(o),o.noConflict=function(){returne.tabbable=n,o}}())}(this,(function(e){"use strict";vart=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],n=t.join(","),o="undefined"==typeofElement,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(e){returne.getRootNode()}:function(e){returne.ownerDocument},i=function(e,t,o){vara=Array.prototype.slice.apply(e.querySelectorAll(n));returnt&&r.call(e,n)&&a.unshift(e),a=a.filter(o)},l=functione(t,o,a){for(vari=[],l=Array.from(t);l.length;){varu=l.shift();if("SLOT"===u.tagName){varc=u.assignedElements(),d=e(c.length?c:u.children,!0,a);a.flatten?i.push.apply(i,d):i.push({scope:u,candidates:d})}else{r.call(u,n)&&a.filter(u)&&(o||!t.includes(u))&&i.push(u);varf=u.shadowRoot||"function"==typeofa.getShadowRoot&&a.getShadowRoot(u),s=!a.shadowRootFilter||a.shadowRootFilter(u);if(f&&s){varp=e(!0===f?u.children:f.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scope:u,candidates:p})}elsel.unshift.apply(l,u.children)}}returni},u=function(e,t){returne.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},c=function(e,t){returne.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},f=function(e){returnfunction(e){returnd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;vart,n=e.form||a(e),o=function(e){returnn.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeofwindow&&void0!==window.CSS&&"function"==typeofwindow.CSS.escape)t=o(window.CSS.escape(e.name));elsetry{t=o(e.name)}catch(e){returnconsole.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}varr=function(e,t){for(varn=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)returne[n]}(t,e.form);return!r||r===e}(e)},s=function(e){vart=e.getBoundingClientRect(),n=t.width,o=t.height;return0===n&&0===o},p=function(e,t){varn=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;vari=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)returns(e)}else{if("function"==typeofo){for(varl=e;e;){varu=e.parentElement,c=a(e);if(u&&!u.shadowRoot&&!0===o(u))returns(e);e=e.assignedSlot?e.assignedSlot:u||c===e.ownerDocument?u:c.host}e=l}if(function(e){for(vart,n=a(e).host,o=!!(null!==(t=n)&&void0!==t&&t.ownerDocument.contains(n)||e.ownerDocument.contains(e));!o&&n;){varr;o=!(null===(r=n=a(n).host)||void0===r||!r.ownerDocument.contains(n))}returno}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},h=function(e,t){return!(t.disabled||function(e){returnd(e)&&"hidden"===e.type}(t)||p(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(vart=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(varn=0;n<t.children.length;n++){varo=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(f(t)||u(t)<0||!h(e,t))},b=function(e){vart=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},y=functione(t){varn=[],o=[];returnt.forEach((function(t,r){vara=!!t.scope,i=a?t.scope:t,l=u(i,a),c=a?e(t.candidates):i;0===l?a?n.push.apply(n,c):n.push(i):o.push({documentOrder:r,tabIndex:l,item:t,isScope:a,content:c})})),o.sort(c).reduce((function(e,t){returnt.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},g=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):i(e,t.includeContainer,h.bind(null,t))},e.isFocusable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,g)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,n)&&m(t,e)},e.tabbable=function(e,t){varn;returnn=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):i(e,t.includeContainer,m.bind(null,t)),y(n)},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeofexports&&"undefined"!=typeofmodule?t(exports):"function"==typeofdefine&&define.amd?define(["exports"],t):(e="undefined"!=typeofglobalThis?globalThis:e||self,function(){varn=e.tabbable,o=e.tabbable={};t(o),o.noConflict=function(){returne.tabbable=n,o}}())}(this,(function(e){"use strict";vart=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],n=t.join(","),o="undefined"==typeofElement,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,a=!o&&Element.prototype.getRootNode?function(e){returne.getRootNode()}:function(e){returne.ownerDocument},i=function(e,t,o){vara=Array.prototype.slice.apply(e.querySelectorAll(n));returnt&&r.call(e,n)&&a.unshift(e),a=a.filter(o)},l=functione(t,o,a){for(vari=[],l=Array.from(t);l.length;){varu=l.shift();if("SLOT"===u.tagName){varc=u.assignedElements(),d=e(c.length?c:u.children,!0,a);a.flatten?i.push.apply(i,d):i.push({scopeParent:u,candidates:d})}else{r.call(u,n)&&a.filter(u)&&(o||!t.includes(u))&&i.push(u);varf=u.shadowRoot||"function"==typeofa.getShadowRoot&&a.getShadowRoot(u),s=!a.shadowRootFilter||a.shadowRootFilter(u);if(f&&s){varp=e(!0===f?u.children:f.children,!0,a);a.flatten?i.push.apply(i,p):i.push({scopeParent:u,candidates:p})}elsel.unshift.apply(l,u.children)}}returni},u=function(e,t){returne.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},c=function(e,t){returne.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},d=function(e){return"INPUT"===e.tagName},f=function(e){returnfunction(e){returnd(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;vart,n=e.form||a(e),o=function(e){returnn.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeofwindow&&void0!==window.CSS&&"function"==typeofwindow.CSS.escape)t=o(window.CSS.escape(e.name));elsetry{t=o(e.name)}catch(e){returnconsole.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}varr=function(e,t){for(varn=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)returne[n]}(t,e.form);return!r||r===e}(e)},s=function(e){vart=e.getBoundingClientRect(),n=t.width,o=t.height;return0===n&&0===o},p=function(e,t){varn=t.displayCheck,o=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;vari=r.call(e,"details>summary:first-of-type")?e.parentElement:e;if(r.call(i,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)returns(e)}else{if("function"==typeofo){for(varl=e;e;){varu=e.parentElement,c=a(e);if(u&&!u.shadowRoot&&!0===o(u))returns(e);e=e.assignedSlot?e.assignedSlot:u||c===e.ownerDocument?u:c.host}e=l}if(function(e){for(vart,n=a(e).host,o=!!(null!==(t=n)&&void0!==t&&t.ownerDocument.contains(n)||e.ownerDocument.contains(e));!o&&n;){varr;o=!(null===(r=n=a(n).host)||void0===r||!r.ownerDocument.contains(n))}returno}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},h=function(e,t){return!(t.disabled||function(e){returnd(e)&&"hidden"===e.type}(t)||p(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(vart=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(varn=0;n<t.children.length;n++){varo=t.children.item(n);if("LEGEND"===o.tagName)return!!r.call(t,"fieldset[disabled] *")||!o.contains(e)}return!0}t=t.parentElement}return!1}(t))},m=function(e,t){return!(f(t)||u(t)<0||!h(e,t))},b=function(e){vart=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},y=functione(t){varn=[],o=[];returnt.forEach((function(t,r){vara=!!t.scopeParent,i=a?t.scopeParent:t,l=u(i,a),c=a?e(t.candidates):i;0===l?a?n.push.apply(n,c):n.push(i):o.push({documentOrder:r,tabIndex:l,item:t,isScope:a,content:c})})),o.sort(c).reduce((function(e,t){returnt.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},g=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):i(e,t.includeContainer,h.bind(null,t))},e.isFocusable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,g)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)thrownewError("No node provided");return!1!==r.call(e,n)&&m(t,e)},e.tabbable=function(e,t){varn;returnn=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:m.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:b}):i(e,t.includeContainer,m.bind(null,t)),y(n)},Object.defineProperty(e,"__esModule",{value:!0})}));