Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aurodesignsystem/auro-menu

Package Overview
Dependencies
Maintainers
4
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurodesignsystem/auro-menu - npm Package Compare versions

Comparing version 3.8.0 to 3.8.1

7

CHANGELOG.md
# Semantic Release Automated Changelog
## [3.8.1](https://github.com/AlaskaAirlines/auro-menu/compare/v3.8.0...v3.8.1) (2022-08-17)
### Bug Fixes
* **reset:** reset selected option when value is invalid ([96147fb](https://github.com/AlaskaAirlines/auro-menu/commit/96147fb1a9398504f3de584b634f552764393a1a))
# [3.8.0](https://github.com/AlaskaAirlines/auro-menu/compare/v3.7.1...v3.8.0) (2022-08-15)

@@ -4,0 +11,0 @@

8

dist/auro-menu__bundled.js

@@ -68,3 +68,3 @@ /**

* http://polymer.github.io/PATENTS.txt
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),x=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class _{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new E(this)}_getValue(){const e=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=n[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!x(e))return e}let i="";for(let s=0;s<t;s++){i+=e[s];const t=n[s];if(void 0!==t){const e=t.value;if(w(e)||!x(e))i+="string"==typeof e?e:String(e);else for(const t of e)i+="string"==typeof t?t:String(t)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class E{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===f||w(e)&&e===this.value||(this.value=e,m(e)||(this.committer.dirty=!0))}commit(){for(;m(this.value);){const e=this.value;this.value=f,e(this)}this.value!==f&&this.committer.commit()}}class N{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(c()),this.endNode=e.appendChild(c())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=c()),e.__insert(this.endNode=c())}insertAfterPart(e){e.__insert(this.startNode=c()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}const e=this.__pendingValue;e!==f&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof S?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):x(e)?this.__commitIterable(e):e===v?(this.value=v,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof g&&this.value.template===t)this.value.update(e.values);else{const n=new g(t,e.processor,this.options),i=n._clone();n.update(e.values),this.__commitNode(i),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,i=0;for(const s of e)n=t[i],void 0===n&&(n=new N(this.options),t.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(t[i-1])),n.setValue(s),n.commit(),i++;i<t.length&&(t.length=i,this.clear(n&&n.endNode))}clear(e=this.startNode){t(this.startNode.parentNode,e.nextSibling,this.endNode)}}class k{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}if(this.__pendingValue===f)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=f}}class C extends _{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new A(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class A extends E{}let T=!1;(()=>{try{const e={get capture(){return T=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class I{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}if(this.__pendingValue===f)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=P(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=f}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const P=e=>e&&(T?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
*/const w=e=>null===e||!("object"==typeof e||"function"==typeof e),x=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class _{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new E(this)}_getValue(){const e=this.strings,t=e.length-1,n=this.parts;if(1===t&&""===e[0]&&""===e[1]){const e=n[0].value;if("symbol"==typeof e)return String(e);if("string"==typeof e||!x(e))return e}let i="";for(let s=0;s<t;s++){i+=e[s];const t=n[s];if(void 0!==t){const e=t.value;if(w(e)||!x(e))i+="string"==typeof e?e:String(e);else for(const t of e)i+="string"==typeof t?t:String(t)}}return i+=e[t],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class E{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===f||w(e)&&e===this.value||(this.value=e,m(e)||(this.committer.dirty=!0))}commit(){for(;m(this.value);){const e=this.value;this.value=f,e(this)}this.value!==f&&this.committer.commit()}}class N{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(c()),this.endNode=e.appendChild(c())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=c()),e.__insert(this.endNode=c())}insertAfterPart(e){e.__insert(this.startNode=c()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}const e=this.__pendingValue;e!==f&&(w(e)?e!==this.value&&this.__commitText(e):e instanceof S?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):x(e)?this.__commitIterable(e):e===v?(this.value=v,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof g&&this.value.template===t)this.value.update(e.values);else{const n=new g(t,e.processor,this.options),i=n._clone();n.update(e.values),this.__commitNode(i),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,i=0;for(const s of e)n=t[i],void 0===n&&(n=new N(this.options),t.push(n),0===i?n.appendIntoPart(this):n.insertAfterPart(t[i-1])),n.setValue(s),n.commit(),i++;i<t.length&&(t.length=i,this.clear(n&&n.endNode))}clear(e=this.startNode){t(this.startNode.parentNode,e.nextSibling,this.endNode)}}class k{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}if(this.__pendingValue===f)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=f}}class C extends _{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new A(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class A extends E{}let T=!1;(()=>{try{const e={get capture(){return T=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class I{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;m(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=f,e(this)}if(this.__pendingValue===f)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),i=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=O(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=f}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const O=e=>e&&(T?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
/**

@@ -82,3 +82,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/;function O(e){let t=R.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},R.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const s=e.strings.join(n);return i=t.keyString.get(s),void 0===i&&(i=new o(e,e.getTemplateElement()),t.keyString.set(s,i)),t.stringsArray.set(e.strings,i),i}const R=new Map,M=new WeakMap;
*/;function P(e){let t=R.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},R.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const s=e.strings.join(n);return i=t.keyString.get(s),void 0===i&&(i=new o(e,e.getTemplateElement()),t.keyString.set(s,i)),t.stringsArray.set(e.strings,i),i}const R=new Map,M=new WeakMap;
/**

@@ -161,3 +161,3 @@ * @license

*/
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const Z={};class X extends J{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,n)=>e.reduceRight(((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e)),n),n=t(e,new Set),i=[];n.forEach((e=>i.unshift(e))),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!H){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new G(String(t),K)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?H?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==Z&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return Z}}X.finalized=!0,X.render=(e,n,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const s=i.scopeName,o=M.has(n),r=F&&11===n.nodeType&&!!n.host,a=r&&!W.has(s),c=a?document.createDocumentFragment():n;if(((e,n,i)=>{let s=M.get(n);void 0===s&&(t(n,n.firstChild),M.set(n,s=new N(Object.assign({templateFactory:O},i))),s.appendInto(n)),s.setValue(e),s.commit()})(e,c,Object.assign({templateFactory:j(s)},i)),a){const e=M.get(c);M.delete(c);const i=e.value instanceof g?e.value.template:void 0;$(s,c,i),t(n,n.firstChild),n.appendChild(c),M.set(n,e)}!o&&r&&window.ShadyCSS.styleElement(n.host)},X.shadowRootOptions={mode:"open"};var Q=Y`*,:after,:before{box-sizing:border-box}@media(prefers-reduced-motion:reduce){*,:after,:before{animation-duration:NaNs!important;animation-iteration-count:1!important;transition-duration:NaNs!important}}:focus-visible{outline:0}:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.js-focus-visible :focus:not(.focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption){padding-left:calc(.75rem + 24px + .5rem);padding-left:calc(var(--auro-size-sm) + 24px + var(--auro-size-xs))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box!important;height:0!important;overflow:visible!important;margin:.5rem 0!important;margin:var(--auro-size-xs) 0!important;border-width:0!important;border-top:1px solid rgba(0,0,0,.15)!important;border-top:1px solid var(--auro-color-border-divider-on-light)!important}:host([nocheckmark]) ::slotted(auro-menuoption){padding-left:1rem;padding-left:var(--auro-size-md)}`,ee=Y``;!function(){function e(e){var t=!0,n=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function r(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function a(e){t=!1}function c(){document.addEventListener("mousemove",l),document.addEventListener("mousedown",l),document.addEventListener("mouseup",l),document.addEventListener("pointermove",l),document.addEventListener("pointerdown",l),document.addEventListener("pointerup",l),document.addEventListener("touchmove",l),document.addEventListener("touchstart",l),document.addEventListener("touchend",l)}function l(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",l),document.removeEventListener("mousedown",l),document.removeEventListener("mouseup",l),document.removeEventListener("pointermove",l),document.removeEventListener("pointerdown",l),document.removeEventListener("pointerup",l),document.removeEventListener("touchmove",l),document.removeEventListener("touchstart",l),document.removeEventListener("touchend",l))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&r(e.activeElement),t=!0)}),!0),document.addEventListener("mousedown",a,!0),document.addEventListener("pointerdown",a,!0),document.addEventListener("touchstart",a,!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),c())}),!0),c(),e.addEventListener("focus",(function(e){var n,i,a;o(e.target)&&(t||(i=(n=e.target).type,"INPUT"===(a=n.tagName)&&s[i]&&!n.readOnly||"TEXTAREA"===a&&!n.readOnly||n.isContentEditable))&&r(e.target)}),!0),e.addEventListener("blur",(function(e){var t;o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout((function(){n=!1}),100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}();var te=Y`:host{display:flex;align-items:center;padding:var(--auro-size-xxs) var(--auro-size-md) var(--auro-size-xxs) 0;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host svg{margin-right:var(--auro-size-xs);margin-left:var(--auro-size-xs);fill:var(--auro-color-icon-primary-on-light)!important}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--auro-size-lg)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){color:var(--auro-color-text-disabled-on-light);-webkit-user-select:none;-ms-user-select:none;user-select:none}:host(.active:not([disabled])),:host(:hover:not([disabled])){background-color:var(--auro-color-ui-bkg-hover-on-light);color:var(--auro-color-text-primary-on-light)}:host(.active:not([disabled])) svg,:host(:hover:not([disabled])) svg{fill:var(--auro-color-icon-primary-on-light)!important}:host([selected]:not([disabled])){background-color:var(--auro-color-alert-notification-on-light);color:var(--auro-color-base-white)}:host([selected]:not([disabled])) svg{fill:var(--auro-color-base-white)!important}`,ne=Y``,ie='<svg viewBox="0 0 24 24" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" style="min-width:var(--auro-size-lg);height:var(--auro-size-lg);fill:currentColor" class="ico_squareLarge"><title>Check</title><desc/><path d="M8.53 11.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.083-.023l5.5-6a.75.75 0 0 0-1.106-1.014l-4.97 5.423L8.53 11.97Z"/></svg>';class se extends X{constructor(){super(),this.nocheckmark=!1,this.disabled=!1,this.selected=!1,this.tabIndex=-1,this.dom=(new DOMParser).parseFromString(ie,"text/html"),this.svg=this.dom.body.firstChild}static get properties(){return{nocheckmark:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},tabIndex:{type:Number,reflect:!0}}}static get styles(){return[te,ne]}firstUpdated(){this.setAttribute("role","option"),this.addEventListener("mouseover",(()=>{this.dispatchEvent(new CustomEvent("auroMenuOption-mouseover",{bubbles:!0,cancelable:!1,composed:!0,detail:this}))}))}render(){return V`${this.selected&&!this.nocheckmark?V`${this.svg}`:void 0}<slot></slot>`}}customElements.get("auro-menuoption")||customElements.define("auro-menuoption",se);
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const Z={};class X extends J{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,n)=>e.reduceRight(((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e)),n),n=t(e,new Set),i=[];n.forEach((e=>i.unshift(e))),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map((e=>{if(e instanceof CSSStyleSheet&&!H){const t=Array.prototype.slice.call(e.cssRules).reduce(((e,t)=>e+t.cssText),"");return new G(String(t),K)}return e}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?H?this.renderRoot.adoptedStyleSheets=e.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map((e=>e.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==Z&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)})))}render(){return Z}}X.finalized=!0,X.render=(e,n,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const s=i.scopeName,o=M.has(n),r=F&&11===n.nodeType&&!!n.host,a=r&&!W.has(s),c=a?document.createDocumentFragment():n;if(((e,n,i)=>{let s=M.get(n);void 0===s&&(t(n,n.firstChild),M.set(n,s=new N(Object.assign({templateFactory:P},i))),s.appendInto(n)),s.setValue(e),s.commit()})(e,c,Object.assign({templateFactory:j(s)},i)),a){const e=M.get(c);M.delete(c);const i=e.value instanceof g?e.value.template:void 0;$(s,c,i),t(n,n.firstChild),n.appendChild(c),M.set(n,e)}!o&&r&&window.ShadyCSS.styleElement(n.host)},X.shadowRootOptions={mode:"open"};var Q=Y`*,:after,:before{box-sizing:border-box}@media(prefers-reduced-motion:reduce){*,:after,:before{animation-duration:NaNs!important;animation-iteration-count:1!important;transition-duration:NaNs!important}}:focus-visible{outline:0}:focus-visible{outline:0}:focus:not(:focus-visible){outline:3px solid transparent}.js-focus-visible :focus:not(.focus-visible){outline:3px solid transparent}:host{display:inline-block;width:100%;margin:0;padding:0;vertical-align:middle}:host ::slotted(auro-menuoption){padding-left:calc(.75rem + 24px + .5rem);padding-left:calc(var(--auro-size-sm) + 24px + var(--auro-size-xs))}:host ::slotted([selected]){padding-left:0}:host ::slotted(hr){box-sizing:content-box!important;height:0!important;overflow:visible!important;margin:.5rem 0!important;margin:var(--auro-size-xs) 0!important;border-width:0!important;border-top:1px solid rgba(0,0,0,.15)!important;border-top:1px solid var(--auro-color-border-divider-on-light)!important}:host([nocheckmark]) ::slotted(auro-menuoption){padding-left:1rem;padding-left:var(--auro-size-md)}`,ee=Y``;!function(){function e(e){var t=!0,n=!1,i=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function r(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function a(e){t=!1}function c(){document.addEventListener("mousemove",l),document.addEventListener("mousedown",l),document.addEventListener("mouseup",l),document.addEventListener("pointermove",l),document.addEventListener("pointerdown",l),document.addEventListener("pointerup",l),document.addEventListener("touchmove",l),document.addEventListener("touchstart",l),document.addEventListener("touchend",l)}function l(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",l),document.removeEventListener("mousedown",l),document.removeEventListener("mouseup",l),document.removeEventListener("pointermove",l),document.removeEventListener("pointerdown",l),document.removeEventListener("pointerup",l),document.removeEventListener("touchmove",l),document.removeEventListener("touchstart",l),document.removeEventListener("touchend",l))}document.addEventListener("keydown",(function(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&r(e.activeElement),t=!0)}),!0),document.addEventListener("mousedown",a,!0),document.addEventListener("pointerdown",a,!0),document.addEventListener("touchstart",a,!0),document.addEventListener("visibilitychange",(function(e){"hidden"===document.visibilityState&&(n&&(t=!0),c())}),!0),c(),e.addEventListener("focus",(function(e){var n,i,a;o(e.target)&&(t||(i=(n=e.target).type,"INPUT"===(a=n.tagName)&&s[i]&&!n.readOnly||"TEXTAREA"===a&&!n.readOnly||n.isContentEditable))&&r(e.target)}),!0),e.addEventListener("blur",(function(e){var t;o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(i),i=window.setTimeout((function(){n=!1}),100),(t=e.target).hasAttribute("data-focus-visible-added")&&(t.classList.remove("focus-visible"),t.removeAttribute("data-focus-visible-added")))}),!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}();var te=Y`:host{display:flex;align-items:center;padding:var(--auro-size-xxs) var(--auro-size-md) var(--auro-size-xxs) 0;cursor:pointer;-webkit-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host svg{margin-right:var(--auro-size-xs);margin-left:var(--auro-size-xs);fill:var(--auro-color-icon-primary-on-light)!important}:host ::slotted(.nestingSpacer){display:inline-block;width:var(--auro-size-lg)}:host ::slotted(strong){font-weight:700}:host([hidden]){display:none}:host([static]){pointer-events:none}:host([disabled]:hover){cursor:auto}:host([disabled]){color:var(--auro-color-text-disabled-on-light);-webkit-user-select:none;-ms-user-select:none;user-select:none}:host(.active:not([disabled])),:host(:hover:not([disabled])){background-color:var(--auro-color-ui-bkg-hover-on-light);color:var(--auro-color-text-primary-on-light)}:host(.active:not([disabled])) svg,:host(:hover:not([disabled])) svg{fill:var(--auro-color-icon-primary-on-light)!important}:host([selected]:not([disabled])){background-color:var(--auro-color-alert-notification-on-light);color:var(--auro-color-base-white)}:host([selected]:not([disabled])) svg{fill:var(--auro-color-base-white)!important}`,ne=Y``,ie='<svg viewBox="0 0 24 24" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" role="img" aria-hidden="true" style="min-width:var(--auro-size-lg);height:var(--auro-size-lg);fill:currentColor" class="ico_squareLarge"><title>Check</title><desc/><path d="M8.53 11.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.083-.023l5.5-6a.75.75 0 0 0-1.106-1.014l-4.97 5.423L8.53 11.97Z"/></svg>';class se extends X{constructor(){super(),this.nocheckmark=!1,this.disabled=!1,this.selected=!1,this.tabIndex=-1,this.dom=(new DOMParser).parseFromString(ie,"text/html"),this.svg=this.dom.body.firstChild}static get properties(){return{nocheckmark:{type:Boolean,reflect:!0},selected:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},tabIndex:{type:Number,reflect:!0}}}static get styles(){return[te,ne]}firstUpdated(){this.setAttribute("role","option"),this.addEventListener("mouseover",(()=>{this.dispatchEvent(new CustomEvent("auroMenuOption-mouseover",{bubbles:!0,cancelable:!1,composed:!0,detail:this}))}))}render(){return V`${this.selected&&!this.nocheckmark?V`${this.svg}`:void 0}<slot></slot>`}}customElements.get("auro-menuoption")||customElements.define("auro-menuoption",se);
/*!***************************************************

@@ -169,2 +169,2 @@ * mark.js v8.11.0

*****************************************************/
!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n,i,s,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(e,n){var i=function(){function i(n){t(this,i),this.ctx=n,this.ie=!1;var s=e.navigator.userAgent;(s.indexOf("MSIE")>-1||s.indexOf("Trident")>-1)&&(this.ie=!0)}return r(i,[{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":a(n))&&"function"==typeof n[t]&&n[t]("mark.js: "+e)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",i=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var s in t)if(t.hasOwnProperty(s)){var o=t[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==r&&""!==a&&(e=e.replace(new RegExp("("+r+"|"+a+")","gm"+n),i+"("+this.processSynomyms(r)+"|"+this.processSynomyms(a)+")"+i))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var i=n.charAt(t+1);return/[(|)\\]/.test(i)||""===i?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],i=[];return e.split("").forEach((function(s){n.every((function(n){if(-1!==n.indexOf(s)){if(i.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),i.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,i="string"==typeof n?n:n.value,s="";switch(("string"==typeof n?[]:n.limiters).forEach((function(e){s+="|"+t.escapeStr(e)})),i){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+e+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],i=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var s=t.callNoMatchOnInvalidRanges(e,i),o=s.start,r=s.end;s.valid&&(e.start=o,e.length=r-o,n.push(e),i=r)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,i=void 0,s=!1;return e&&void 0!==e.start?(i=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&i-t>0&&i-n>0?s=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:i,valid:s}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var i=void 0,s=!0,o=n.length,r=t-o,a=parseInt(e.start,10)-r;return(i=(a=a>o?o:a)+parseInt(e.length,10))>o&&(i=o,this.log("End range automatically set to the max value of "+o)),a<0||i-a<0||a>o||i>o?(s=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(a,i).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:i,valid:s}}},{key:"getTextNodes",value:function(e){var t=this,n="",i=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){i.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:i})}))}},{key:"matchesExclude",value:function(e){return s.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,i){var s=this.opt.element?this.opt.element:"mark",o=e.splitText(t),r=o.splitText(i-t),a=n.createElement(s);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=o.textContent,o.parentNode.replaceChild(a,o),r}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,i,s){var o=this;e.nodes.every((function(r,a){var c=e.nodes[a+1];if(void 0===c||c.start>t){if(!i(r.node))return!1;var l=t-r.start,h=(n>r.end?r.end:n)-r.start,u=e.value.substr(0,r.start),d=e.value.substr(h+r.start);if(r.node=o.wrapRangeInTextNode(r.node,l,h),e.value=u+d,e.nodes.forEach((function(t,n){n>=a&&(e.nodes[n].start>0&&n!==a&&(e.nodes[n].start-=h),e.nodes[n].end-=h)})),n-=h,s(r.node.previousSibling,r.start),!(n>r.end))return!1;t=r.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,i,s){var o=this,r=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var s=void 0;null!==(s=e.exec(t.textContent))&&""!==s[r];)if(n(s[r],t)){var a=s.index;if(0!==r)for(var c=1;c<r;c++)a+=s[c].length;t=o.wrapRangeInTextNode(t,a,a+s[r].length),i(t.previousSibling),e.lastIndex=0}})),s()}))}},{key:"wrapMatchesAcrossElements",value:function(e,t,n,i,s){var o=this,r=0===t?0:t+1;this.getTextNodes((function(t){for(var a=void 0;null!==(a=e.exec(t.value))&&""!==a[r];){var c=a.index;if(0!==r)for(var l=1;l<r;l++)c+=a[l].length;var h=c+a[r].length;o.wrapRangeInMappedTextNode(t,c,h,(function(e){return n(a[r],e)}),(function(t,n){e.lastIndex=n,i(t)}))}s()}))}},{key:"wrapRangeFromIndex",value:function(e,t,n,i){var s=this;this.getTextNodes((function(o){var r=o.value.length;e.forEach((function(e,i){var a=s.checkWhitespaceRanges(e,r,o.value),c=a.start,l=a.end;a.valid&&s.wrapRangeInMappedTextNode(o,c,l,(function(n){return t(n,e,o.value.substring(c,l),i)}),(function(t){n(t,e)}))})),i()}))}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,i=n.createDocumentFragment();e.firstChild;)i.appendChild(e.removeChild(e.firstChild));t.replaceChild(i,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var n=this;this.opt=t,this.log('Searching with expression "'+e+'"');var i=0,s="wrapMatches";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),this[s](e,this.opt.ignoreGroups,(function(e,t){return n.opt.filter(t,e,i)}),(function(e){i++,n.opt.each(e)}),(function(){0===i&&n.opt.noMatch(e),n.opt.done(i)}))}},{key:"mark",value:function(e,t){var n=this;this.opt=t;var i=0,s="wrapMatches",o=this.getSeparatedKeywords("string"==typeof e?[e]:e),r=o.keywords,a=o.length,c=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),0===a?this.opt.done(i):function e(t){var o=new RegExp(n.createRegExp(t),"gm"+c),l=0;n.log('Searching with expression "'+o+'"'),n[s](o,1,(function(e,s){return n.opt.filter(s,t,i,l)}),(function(e){l++,i++,n.opt.each(e)}),(function(){0===l&&n.opt.noMatch(t),r[a-1]===t?n.opt.done(i):e(r[r.indexOf(t)+1])}))}(r[0])}},{key:"markRanges",value:function(e,t){var n=this;this.opt=t;var i=0,s=this.checkRanges(e);s&&s.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(s)),this.wrapRangeFromIndex(s,(function(e,t,i,s){return n.opt.filter(e,t,i,s)}),(function(e,t){i++,n.opt.each(e,t)}),(function(){n.opt.done(i)}))):this.opt.done(i)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var n=this.opt.element?this.opt.element:"*";n+="[data-markjs]",this.opt.className&&(n+="."+this.opt.className),this.log('Removal selector "'+n+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,(function(e){t.unwrapMatches(e)}),(function(e){var i=s.matches(e,n),o=t.matchesExclude(e);return!i||o?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}},{key:"opt",set:function(t){this._opt=o({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:e.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return new s(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),i}(),s=function(){function e(n){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=i,this.exclude=s,this.iframesTimeout=o}return r(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(n.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=void 0;try{var s=e.contentWindow;if(i=s.document,!s||!i)throw new Error("iframe inaccessible")}catch(e){n()}i&&t(i)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var i=this,s=!1,o=null,r=function r(){if(!s){s=!0,clearTimeout(o);try{i.isIframeBlank(e)||(e.removeEventListener("load",r),i.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",r),o=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,i=0;this.forEachIframe(e,(function(){return!0}),(function(e){i++,n.waitForIframes(e.querySelector("html"),(function(){--i||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,i){var s=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=t.querySelectorAll("iframe"),a=r.length,c=0;r=Array.prototype.slice.call(r);var l=function(){--a<=0&&o(c)};a||l(),r.forEach((function(t){e.matches(t,s.exclude)?l():s.onIframeReady(t,(function(e){n(t)&&(c++,i(e)),l()}),l)}))}},{key:"createIterator",value:function(e,t,i){return n.createNodeIterator(e,t,i,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,i){var s=!1,o=!1;return i.forEach((function(e,t){e.val===n&&(s=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==s||o?!1===s||o||(i[s].handled=!0):i.push({val:n,handled:!0}),!0):(!1===s&&i.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,i){var s=this;e.forEach((function(e){e.handled||s.getIframeContents(e.val,(function(e){s.createInstanceOnIframe(e).forEachNode(t,n,i)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,i,s){for(var o=this,r=this.createIterator(t,e,i),a=[],c=[],l=void 0,h=void 0;function(){var e=o.getIteratorNode(r);return h=e.prevNode,l=e.node}();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(l,h,e,a)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return c.push(e)}),i)})),c.push(l);c.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(a,e,n,i),s()}},{key:"forEachNode",value:function(e,t,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),r=o.length;r||s(),o.forEach((function(o){var a=function(){i.iterateThroughNodes(e,o,t,n,(function(){--r<=0&&s()}))};i.iframes?i.waitForIframes(o,a):a()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(i){var s=!1;return n.every((function(t){return!i.call(e,t)||(s=!0,!1)})),s}return!1}}]),e}();return e.Mark=function(e){var t=this,n=new i(e);return this.mark=function(e,i){return n.mark(e,i),t},this.markRegExp=function(e,i){return n.markRegExp(e,i),t},this.markRanges=function(e,i){return n.markRanges(e,i),t},this.unmark=function(e){return n.unmark(e),t},this},e.Mark},i=window,s=document,"object"===a(e)&&e.exports?e.exports=n(i,s):n(i,s)}({exports:{}});class oe extends X{constructor(){super(),this.value=void 0,this.optionSelected=void 0,this.matchWord=void 0,this.noCheckmark=!1,this.ready=!1,this.optionActive=void 0,this.rootMenu=!0}static get properties(){return{noCheckmark:{type:Boolean,reflect:!0},optionSelected:{type:Object},optionActive:{type:Object},matchWord:{type:String},ready:{type:Boolean},value:{type:String}}}static get styles(){return[Q,ee]}firstUpdated(){this.addEventListener("keydown",this.handleKeyDown)}updated(e){if(this.noCheckmark){this.querySelectorAll("auro-menu").forEach((e=>{e.setAttribute("noCheckmark","")}));this.querySelectorAll("auro-menuoption").forEach((e=>{e.setAttribute("noCheckmark","")}))}e.has("matchWord")&&this.markOptions(),e.has("value")&&this.selectByValue(this.value)}optionInteractive(e){return!e.hasAttribute("disabled")&&!e.hasAttribute("hidden")&&!e.hasAttribute("static")}markOptions(){let e=[];this.items.forEach((t=>{this.optionInteractive(t)&&!t.hasAttribute("persistent")&&e.push(t)}));const t=new Mark(e);t.unmark(),this.matchWord&&this.matchWord.length>0&&t.mark(this.matchWord,{element:"strong",separateWordSearch:!1,acrossElements:!0})}resetOptionsStates(){this.optionSelected=void 0,this.items.forEach((e=>{e.classList.remove("active"),e.removeAttribute("selected"),e.removeAttribute("aria-selected")}))}handleLocalSelectState(e){e.setAttribute("selected",""),e.classList.add("active"),e.ariaSelected=!0,this.value=e.value,this.optionSelected=e,this.index=this.items.indexOf(e)}notifySelectionChange(){this.dispatchEvent(new CustomEvent("selectedOption",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-selectedOption",{bubbles:!0,cancelable:!1,composed:!0}))}makeSelection(){if(this.items||this.initItems(),this.resetOptionsStates(),this.index>=0){const e=this.items[this.index];e&&this.optionInteractive(e)&&(e.hasAttribute("event")?(this.dispatchEvent(new CustomEvent(e.getAttribute("event"),{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenuCustomEventFired",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-customEventFired",{bubbles:!0,cancelable:!1,composed:!0}))):this.handleLocalSelectState(e))}this.notifySelectionChange()}handleKeyDown(e){switch(e.preventDefault(),e.key){case"ArrowDown":this.selectNextItem("down");break;case"ArrowUp":this.selectNextItem("up");break;case"Enter":this.makeSelection()}}initItems(){this.items=Array.from(this.querySelectorAll("auro-menuoption"))}getSelectedIndex(){const e=this.items.findIndex((e=>e.hasAttribute("selected")&&this.optionInteractive(e)));e>=0&&(this.index=e,this.makeSelection())}selectNextItem(e){if(this.index>=0){this.items[this.index].classList.remove("active");let t=0;"down"===e?t=1:"up"===e&&(t=-1),this.index+=t,this.index>this.items.length-1?this.index=0:this.index<0&&(this.index=this.items.length-1),this.optionInteractive(this.items[this.index])?this.updateActiveOption(this.index):this.selectNextItem(e)}else this.index=0,this.items[this.index].hasAttribute("hidden")||this.items[this.index].hasAttribute("disabled")?this.selectNextItem(e):this.updateActiveOption(this.index)}handleNestedMenus(e){const t=e.querySelectorAll("auro-menu");0!==t.length&&t.forEach((e=>{e.querySelectorAll(":scope > auro-menuoption").forEach((e=>{e.innerHTML=`<span class="nestingSpacer"></span> ${e.innerHTML}`})),this.handleNestedMenus(e)}))}selectByValue(e){let t=!1;if(this.items||this.initItems(),this.index=void 0,this.value&&this.value.length>0){for(let n=0;n<this.items.length;n+=1)this.items[n].value===e&&(t=!0,this.index=n);t||(this.index=void 0,this.dispatchEvent(new CustomEvent("auroMenuSelectValueFailure",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-selectValueFailure",{bubbles:!0,cancelable:!1,composed:!0})))}this.makeSelection()}updateActiveOption(e){this.items.forEach((e=>{e.classList.remove("active")})),this.items[e].classList.add("active"),this.optionActive=this.items[e],this.dispatchEvent(new CustomEvent("auroMenuActivatedOption",{bubbles:!0,cancelable:!1,composed:!0,detail:this.items[e]})),this.dispatchEvent(new CustomEvent("auroMenu-activatedOption",{bubbles:!0,cancelable:!1,composed:!0,detail:this.items[e]}))}handleSlotItems(){this.parentElement&&this.parentElement.closest("auro-menu")&&(this.rootMenu=!1),this.rootMenu&&(this.initItems(),this.setAttribute("role","listbox"),this.handleNestedMenus(this),this.markOptions(),this.index=-1,this.getSelectedIndex(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.makeSelection),this.addEventListener("auroMenuOption-mouseover",(e=>{this.index=this.items.indexOf(e.target),this.updateActiveOption(this.index)})),this.notifyReady())}notifyReady(){this.ready=!0,this.dispatchEvent(new CustomEvent("auroMenu-ready",{bubbles:!0,cancelable:!1,composed:!0}))}render(){return V`<slot @slotchange="${this.handleSlotItems}"></slot>`}}customElements.get("auro-menu")||customElements.define("auro-menu",oe);
!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n,i,s,o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},r=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n=function(e,n){var i=function(){function i(n){t(this,i),this.ctx=n,this.ie=!1;var s=e.navigator.userAgent;(s.indexOf("MSIE")>-1||s.indexOf("Trident")>-1)&&(this.ie=!0)}return r(i,[{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",n=this.opt.log;this.opt.debug&&"object"===(void 0===n?"undefined":a(n))&&"function"==typeof n[t]&&n[t]("mark.js: "+e)}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createRegExp",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),this.createAccuracyRegExp(e)}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",i=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var s in t)if(t.hasOwnProperty(s)){var o=t[s],r="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(s):this.escapeStr(s),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==r&&""!==a&&(e=e.replace(new RegExp("("+r+"|"+a+")","gm"+n),i+"("+this.processSynomyms(r)+"|"+this.processSynomyms(a)+")"+i))}return e}},{key:"processSynomyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,(function(e){return"\\"===e.charAt(0)?"?":""}))).replace(/(?:\\)*\*/g,(function(e){return"\\"===e.charAt(0)?"*":""}))}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,(function(e,t,n){var i=n.charAt(t+1);return/[(|)\\]/.test(i)||""===i?e:e+"\0"}))}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],i=[];return e.split("").forEach((function(s){n.every((function(n){if(-1!==n.indexOf(s)){if(i.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),i.push(n)}return!0}))})),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,i="string"==typeof n?n:n.value,s="";switch(("string"==typeof n?[]:n.limiters).forEach((function(e){s+="|"+t.escapeStr(e)})),i){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(s="\\s"+(s||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+s+"]*)";case"exactly":return"(^|\\s"+s+")("+e+")(?=$|\\s"+s+")"}}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach((function(e){t.opt.separateWordSearch?e.split(" ").forEach((function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)})):e.trim()&&-1===n.indexOf(e)&&n.push(e)})),{keywords:n.sort((function(e,t){return t.length-e.length})),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],i=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var s=t.callNoMatchOnInvalidRanges(e,i),o=s.start,r=s.end;s.valid&&(e.start=o,e.length=r-o,n.push(e),i=r)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,i=void 0,s=!1;return e&&void 0!==e.start?(i=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&i-t>0&&i-n>0?s=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:i,valid:s}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var i=void 0,s=!0,o=n.length,r=t-o,a=parseInt(e.start,10)-r;return(i=(a=a>o?o:a)+parseInt(e.length,10))>o&&(i=o,this.log("End range automatically set to the max value of "+o)),a<0||i-a<0||a>o||i>o?(s=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(a,i).replace(/\s+/g,"")&&(s=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:i,valid:s}}},{key:"getTextNodes",value:function(e){var t=this,n="",i=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){i.push({start:n.length,end:(n+=e.textContent).length,node:e})}),(function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),(function(){e({value:n,nodes:i})}))}},{key:"matchesExclude",value:function(e){return s.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,i){var s=this.opt.element?this.opt.element:"mark",o=e.splitText(t),r=o.splitText(i-t),a=n.createElement(s);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=o.textContent,o.parentNode.replaceChild(a,o),r}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,i,s){var o=this;e.nodes.every((function(r,a){var c=e.nodes[a+1];if(void 0===c||c.start>t){if(!i(r.node))return!1;var l=t-r.start,h=(n>r.end?r.end:n)-r.start,u=e.value.substr(0,r.start),d=e.value.substr(h+r.start);if(r.node=o.wrapRangeInTextNode(r.node,l,h),e.value=u+d,e.nodes.forEach((function(t,n){n>=a&&(e.nodes[n].start>0&&n!==a&&(e.nodes[n].start-=h),e.nodes[n].end-=h)})),n-=h,s(r.node.previousSibling,r.start),!(n>r.end))return!1;t=r.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,i,s){var o=this,r=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var s=void 0;null!==(s=e.exec(t.textContent))&&""!==s[r];)if(n(s[r],t)){var a=s.index;if(0!==r)for(var c=1;c<r;c++)a+=s[c].length;t=o.wrapRangeInTextNode(t,a,a+s[r].length),i(t.previousSibling),e.lastIndex=0}})),s()}))}},{key:"wrapMatchesAcrossElements",value:function(e,t,n,i,s){var o=this,r=0===t?0:t+1;this.getTextNodes((function(t){for(var a=void 0;null!==(a=e.exec(t.value))&&""!==a[r];){var c=a.index;if(0!==r)for(var l=1;l<r;l++)c+=a[l].length;var h=c+a[r].length;o.wrapRangeInMappedTextNode(t,c,h,(function(e){return n(a[r],e)}),(function(t,n){e.lastIndex=n,i(t)}))}s()}))}},{key:"wrapRangeFromIndex",value:function(e,t,n,i){var s=this;this.getTextNodes((function(o){var r=o.value.length;e.forEach((function(e,i){var a=s.checkWhitespaceRanges(e,r,o.value),c=a.start,l=a.end;a.valid&&s.wrapRangeInMappedTextNode(o,c,l,(function(n){return t(n,e,o.value.substring(c,l),i)}),(function(t){n(t,e)}))})),i()}))}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,i=n.createDocumentFragment();e.firstChild;)i.appendChild(e.removeChild(e.firstChild));t.replaceChild(i,e),this.ie?this.normalizeTextNode(t):t.normalize()}},{key:"normalizeTextNode",value:function(e){if(e){if(3===e.nodeType)for(;e.nextSibling&&3===e.nextSibling.nodeType;)e.nodeValue+=e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);else this.normalizeTextNode(e.firstChild);this.normalizeTextNode(e.nextSibling)}}},{key:"markRegExp",value:function(e,t){var n=this;this.opt=t,this.log('Searching with expression "'+e+'"');var i=0,s="wrapMatches";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),this[s](e,this.opt.ignoreGroups,(function(e,t){return n.opt.filter(t,e,i)}),(function(e){i++,n.opt.each(e)}),(function(){0===i&&n.opt.noMatch(e),n.opt.done(i)}))}},{key:"mark",value:function(e,t){var n=this;this.opt=t;var i=0,s="wrapMatches",o=this.getSeparatedKeywords("string"==typeof e?[e]:e),r=o.keywords,a=o.length,c=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(s="wrapMatchesAcrossElements"),0===a?this.opt.done(i):function e(t){var o=new RegExp(n.createRegExp(t),"gm"+c),l=0;n.log('Searching with expression "'+o+'"'),n[s](o,1,(function(e,s){return n.opt.filter(s,t,i,l)}),(function(e){l++,i++,n.opt.each(e)}),(function(){0===l&&n.opt.noMatch(t),r[a-1]===t?n.opt.done(i):e(r[r.indexOf(t)+1])}))}(r[0])}},{key:"markRanges",value:function(e,t){var n=this;this.opt=t;var i=0,s=this.checkRanges(e);s&&s.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(s)),this.wrapRangeFromIndex(s,(function(e,t,i,s){return n.opt.filter(e,t,i,s)}),(function(e,t){i++,n.opt.each(e,t)}),(function(){n.opt.done(i)}))):this.opt.done(i)}},{key:"unmark",value:function(e){var t=this;this.opt=e;var n=this.opt.element?this.opt.element:"*";n+="[data-markjs]",this.opt.className&&(n+="."+this.opt.className),this.log('Removal selector "'+n+'"'),this.iterator.forEachNode(NodeFilter.SHOW_ELEMENT,(function(e){t.unwrapMatches(e)}),(function(e){var i=s.matches(e,n),o=t.matchesExclude(e);return!i||o?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}},{key:"opt",set:function(t){this._opt=o({},{element:"",className:"",exclude:[],iframes:!1,iframesTimeout:5e3,separateWordSearch:!0,diacritics:!0,synonyms:{},accuracy:"partially",acrossElements:!1,caseSensitive:!1,ignoreJoiners:!1,ignoreGroups:0,ignorePunctuation:[],wildcards:"disabled",each:function(){},noMatch:function(){},filter:function(){return!0},done:function(){},debug:!1,log:e.console},t)},get:function(){return this._opt}},{key:"iterator",get:function(){return new s(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),i}(),s=function(){function e(n){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=i,this.exclude=s,this.iframesTimeout=o}return r(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(n.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach((function(t){var n=e.filter((function(e){return e.contains(t)})).length>0;-1!==e.indexOf(t)||n||e.push(t)})),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},i=void 0;try{var s=e.contentWindow;if(i=s.document,!s||!i)throw new Error("iframe inaccessible")}catch(e){n()}i&&t(i)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var i=this,s=!1,o=null,r=function r(){if(!s){s=!0,clearTimeout(o);try{i.isIframeBlank(e)||(e.removeEventListener("load",r),i.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",r),o=setTimeout(r,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,i=0;this.forEachIframe(e,(function(){return!0}),(function(e){i++,n.waitForIframes(e.querySelector("html"),(function(){--i||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,i){var s=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=t.querySelectorAll("iframe"),a=r.length,c=0;r=Array.prototype.slice.call(r);var l=function(){--a<=0&&o(c)};a||l(),r.forEach((function(t){e.matches(t,s.exclude)?l():s.onIframeReady(t,(function(e){n(t)&&(c++,i(e)),l()}),l)}))}},{key:"createIterator",value:function(e,t,i){return n.createNodeIterator(e,t,i,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:(null===t||e.nextNode())&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,i){var s=!1,o=!1;return i.forEach((function(e,t){e.val===n&&(s=t,o=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==s||o?!1===s||o||(i[s].handled=!0):i.push({val:n,handled:!0}),!0):(!1===s&&i.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,i){var s=this;e.forEach((function(e){e.handled||s.getIframeContents(e.val,(function(e){s.createInstanceOnIframe(e).forEachNode(t,n,i)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,i,s){for(var o=this,r=this.createIterator(t,e,i),a=[],c=[],l=void 0,h=void 0;function(){var e=o.getIteratorNode(r);return h=e.prevNode,l=e.node}();)this.iframes&&this.forEachIframe(t,(function(e){return o.checkIframeFilter(l,h,e,a)}),(function(t){o.createInstanceOnIframe(t).forEachNode(e,(function(e){return c.push(e)}),i)})),c.push(l);c.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(a,e,n,i),s()}},{key:"forEachNode",value:function(e,t,n){var i=this,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),r=o.length;r||s(),o.forEach((function(o){var a=function(){i.iterateThroughNodes(e,o,t,n,(function(){--r<=0&&s()}))};i.iframes?i.waitForIframes(o,a):a()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(i){var s=!1;return n.every((function(t){return!i.call(e,t)||(s=!0,!1)})),s}return!1}}]),e}();return e.Mark=function(e){var t=this,n=new i(e);return this.mark=function(e,i){return n.mark(e,i),t},this.markRegExp=function(e,i){return n.markRegExp(e,i),t},this.markRanges=function(e,i){return n.markRanges(e,i),t},this.unmark=function(e){return n.unmark(e),t},this},e.Mark},i=window,s=document,"object"===a(e)&&e.exports?e.exports=n(i,s):n(i,s)}({exports:{}});class oe extends X{constructor(){super(),this.value=void 0,this.optionSelected=void 0,this.matchWord=void 0,this.noCheckmark=!1,this.ready=!1,this.optionActive=void 0,this.rootMenu=!0}static get properties(){return{noCheckmark:{type:Boolean,reflect:!0},optionSelected:{type:Object},optionActive:{type:Object},matchWord:{type:String},ready:{type:Boolean},value:{type:String}}}static get styles(){return[Q,ee]}firstUpdated(){this.addEventListener("keydown",this.handleKeyDown)}updated(e){if(this.noCheckmark){this.querySelectorAll("auro-menu").forEach((e=>{e.setAttribute("noCheckmark","")}));this.querySelectorAll("auro-menuoption").forEach((e=>{e.setAttribute("noCheckmark","")}))}e.has("matchWord")&&this.markOptions(),e.has("value")&&this.selectByValue(this.value)}optionInteractive(e){return!e.hasAttribute("disabled")&&!e.hasAttribute("hidden")&&!e.hasAttribute("static")}markOptions(){let e=[];this.items.forEach((t=>{this.optionInteractive(t)&&!t.hasAttribute("persistent")&&e.push(t)}));const t=new Mark(e);t.unmark(),this.matchWord&&this.matchWord.length>0&&t.mark(this.matchWord,{element:"strong",separateWordSearch:!1,acrossElements:!0})}resetOptionsStates(){this.optionSelected=void 0,this.items.forEach((e=>{e.classList.remove("active"),e.removeAttribute("selected"),e.removeAttribute("aria-selected")}))}handleLocalSelectState(e){e.setAttribute("selected",""),e.classList.add("active"),e.ariaSelected=!0,this.value=e.value,this.optionSelected=e,this.index=this.items.indexOf(e)}notifySelectionChange(){this.dispatchEvent(new CustomEvent("selectedOption",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-selectedOption",{bubbles:!0,cancelable:!1,composed:!0}))}makeSelection(){if(this.items||this.initItems(),this.resetOptionsStates(),this.index>=0){const e=this.items[this.index];e&&this.optionInteractive(e)&&(e.hasAttribute("event")?(this.dispatchEvent(new CustomEvent(e.getAttribute("event"),{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenuCustomEventFired",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-customEventFired",{bubbles:!0,cancelable:!1,composed:!0}))):this.handleLocalSelectState(e))}this.notifySelectionChange()}handleKeyDown(e){switch(e.preventDefault(),e.key){case"ArrowDown":this.selectNextItem("down");break;case"ArrowUp":this.selectNextItem("up");break;case"Enter":this.makeSelection()}}initItems(){this.items=Array.from(this.querySelectorAll("auro-menuoption"))}getSelectedIndex(){const e=this.items.findIndex((e=>e.hasAttribute("selected")&&this.optionInteractive(e)));e>=0&&(this.index=e,this.makeSelection())}selectNextItem(e){if(this.index>=0){this.items[this.index].classList.remove("active");let t=0;"down"===e?t=1:"up"===e&&(t=-1),this.index+=t,this.index>this.items.length-1?this.index=0:this.index<0&&(this.index=this.items.length-1),this.optionInteractive(this.items[this.index])?this.updateActiveOption(this.index):this.selectNextItem(e)}else this.index=0,this.items[this.index].hasAttribute("hidden")||this.items[this.index].hasAttribute("disabled")?this.selectNextItem(e):this.updateActiveOption(this.index)}handleNestedMenus(e){const t=e.querySelectorAll("auro-menu");0!==t.length&&t.forEach((e=>{e.querySelectorAll(":scope > auro-menuoption").forEach((e=>{e.innerHTML=`<span class="nestingSpacer"></span> ${e.innerHTML}`})),this.handleNestedMenus(e)}))}selectByValue(e){let t=!1;if(this.items||this.initItems(),this.index=void 0,this.value&&this.value.length>0){for(let n=0;n<this.items.length;n+=1)this.items[n].value===e&&(t=!0,this.index=n);t?this.makeSelection():(this.index=void 0,this.dispatchEvent(new CustomEvent("auroMenuSelectValueFailure",{bubbles:!0,cancelable:!1,composed:!0})),this.dispatchEvent(new CustomEvent("auroMenu-selectValueFailure",{bubbles:!0,cancelable:!1,composed:!0})))}else this.resetOptionsStates()}updateActiveOption(e){this.items.forEach((e=>{e.classList.remove("active")})),this.items[e].classList.add("active"),this.optionActive=this.items[e],this.dispatchEvent(new CustomEvent("auroMenuActivatedOption",{bubbles:!0,cancelable:!1,composed:!0,detail:this.items[e]})),this.dispatchEvent(new CustomEvent("auroMenu-activatedOption",{bubbles:!0,cancelable:!1,composed:!0,detail:this.items[e]}))}handleSlotItems(){this.parentElement&&this.parentElement.closest("auro-menu")&&(this.rootMenu=!1),this.rootMenu&&(this.initItems(),this.setAttribute("role","listbox"),this.handleNestedMenus(this),this.markOptions(),this.index=-1,this.getSelectedIndex(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.makeSelection),this.addEventListener("auroMenuOption-mouseover",(e=>{this.index=this.items.indexOf(e.target),this.updateActiveOption(this.index)})),this.notifyReady())}notifyReady(){this.ready=!0,this.dispatchEvent(new CustomEvent("auroMenu-ready",{bubbles:!0,cancelable:!1,composed:!0}))}render(){return V`<slot @slotchange="${this.handleSlotItems}"></slot>`}}customElements.get("auro-menu")||customElements.define("auro-menu",oe);

@@ -385,6 +385,8 @@ // Copyright (c) 2021 Alaska Airlines. All right reserved. Licensed under the Apache-2.0 license

}));
} else {
this.makeSelection();
}
} else {
this.resetOptionsStates();
}
this.makeSelection();
}

@@ -391,0 +393,0 @@

@@ -10,3 +10,3 @@ {

"name": "@aurodesignsystem/auro-menu",
"version": "3.8.0",
"version": "3.8.1",
"description": "auro-menu HTML custom element",

@@ -13,0 +13,0 @@ "repository": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc