Socket
Socket
Sign inDemoInstall

@aurodesignsystem/auro-menu

Package Overview
Dependencies
47
Maintainers
4
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0 to 3.2.0

demo/partials/matchWord.js

15

CHANGELOG.md
# Semantic Release Automated Changelog
# [3.2.0](https://github.com/AlaskaAirlines/auro-menu/compare/v3.1.0...v3.2.0) (2022-03-21)
### Bug Fixes
* **aria:** correct invalid use of aria-selected ([c84e1f1](https://github.com/AlaskaAirlines/auro-menu/commit/c84e1f19002c8076a7e65ddf1ed18a0810c319f7))
* **styles:** all menuoptions prevent text selection ([8240bdc](https://github.com/AlaskaAirlines/auro-menu/commit/8240bdc63d659df7d8ee378c851fef2a11036e34))
### Features
* **API:** add optionSelected property ([56f0415](https://github.com/AlaskaAirlines/auro-menu/commit/56f041557c4e83ad2cece5d5fd18fbdc99788dfd))
* **matching:** highlight matched string parts in options ([ccf6f12](https://github.com/AlaskaAirlines/auro-menu/commit/ccf6f12c4e9a999a6136306b25170bf6b067a192))
* **nesting:** support nested menus ([2dd3433](https://github.com/AlaskaAirlines/auro-menu/commit/2dd34334d8d90457fa32d41f66615d9ce85e67fc))
# [3.1.0](https://github.com/AlaskaAirlines/auro-menu/compare/v3.0.0...v3.1.0) (2022-03-01)

@@ -4,0 +19,0 @@

@@ -44,2 +44,74 @@ # Menu

## Using matchWord to highlight displayValue string parts
The `auro-menu` component supports the use of the `matchWord` attribute to highlight string parts of each menuoption that are equal to `matchWord`. The matching algorithm is case insensitive (e.g., `n` matches `N`).
<div class="exampleWrapper">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./partials/matchWord.html) -->
<!-- The below content is automatically added from ./partials/matchWord.html -->
<auro-input id="matchWordInput" required>
<span slot="label">Enter a value to match in the menu</span>
</auro-input>
<br />
<auro-menu id="matchWordMenu">
<auro-menuoption value="stops">Stops</auro-menuoption>
<auro-menuoption value="price">Price</auro-menuoption>
<auro-menuoption value="duration">Duration</auro-menuoption>
<auro-menuoption value="departure">Departure</auro-menuoption>
<auro-menu>
<auro-menuoption value="apples">Apples</auro-menuoption>
<auro-menuoption value="oranges">Oranges</auro-menuoption>
<auro-menuoption value="peaches">Peaches</auro-menuoption>
</auro-menu>
<auro-menuoption value="arrival">Arrival</auro-menuoption>
</auro-menu>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion lowProfile justifyRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./partials/matchWord.js) -->
<!-- The below code snippet is automatically added from ./partials/matchWord.js -->
```js
let matchWordInput;
let matchWordMenu;
function matchWords() {
matchWordInput = document.querySelector('#matchWordInput');
matchWordMenu = document.querySelector('#matchWordMenu');
matchWordInput.addEventListener('keyup', updateMatch);
}
function updateMatch() {
matchWordMenu.matchWord = matchWordInput.value;
}
```
<!-- AURO-GENERATED-CONTENT:END -->
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./partials/matchWord.html) -->
<!-- The below code snippet is automatically added from ./partials/matchWord.html -->
```html
<auro-input id="matchWordInput" required>
<span slot="label">Enter a value to match in the menu</span>
</auro-input>
<br />
<auro-menu id="matchWordMenu">
<auro-menuoption value="stops">Stops</auro-menuoption>
<auro-menuoption value="price">Price</auro-menuoption>
<auro-menuoption value="duration">Duration</auro-menuoption>
<auro-menuoption value="departure">Departure</auro-menuoption>
<auro-menu>
<auro-menuoption value="apples">Apples</auro-menuoption>
<auro-menuoption value="oranges">Oranges</auro-menuoption>
<auro-menuoption value="peaches">Peaches</auro-menuoption>
</auro-menu>
<auro-menuoption value="arrival">Arrival</auro-menuoption>
</auro-menu>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
## Options with horizontal separator

@@ -94,2 +166,87 @@

## Nesting auro-menus to create sub-menus
The `auro-menu` element supports the placement of an `auro-menu` inside of another `auro-menu`. There is no technical limit to the level of nesting.
<div class="exampleWrapper">
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./partials/nestedMenu.html) -->
<!-- The below content is automatically added from ./partials/nestedMenu.html -->
<auro-menu id="alpha">
<auro-menuoption value="stops">Stops</auro-menuoption>
<auro-menuoption value="price">Price</auro-menuoption>
<auro-menuoption value="duration">Duration</auro-menuoption>
<hr>
<auro-menu id="beta">
<auro-menuoption value="apples">Apples</auro-menuoption>
<auro-menuoption value="oranges">Oranges</auro-menuoption>
<auro-menuoption value="pears">Pears</auro-menuoption>
<auro-menuoption value="grapes">Grapes</auro-menuoption>
<auro-menuoption value="kiwi">Kiwi</auro-menuoption>
<hr>
<auro-menu id="charlie">
<auro-menuoption value="person">Person</auro-menuoption>
<auro-menuoption value="woman">Woman</auro-menuoption>
<auro-menuoption value="man">Man</auro-menuoption>
<auro-menuoption value="camera">Camera</auro-menuoption>
<auro-menuoption value="tv">TV</auro-menuoption>
</auro-menu>
</auro-menu>
<hr>
<auro-menuoption value="departure">Departure</auro-menuoption>
<auro-menuoption value="arrival">Arrival</auro-menuoption>
<hr>
<auro-menu id="delta">
<auro-menuoption value="cars">Cars</auro-menuoption>
<auro-menuoption value="trucks">Trucks</auro-menuoption>
<auro-menuoption value="boats">Boats</auro-menuoption>
<auro-menuoption value="planes">Planes</auro-menuoption>
<auro-menuoption value="motorcycles">Motorcycles</auro-menuoption>
</auro-menu>
</auro-menu>
<!-- AURO-GENERATED-CONTENT:END -->
</div>
<auro-accordion lowProfile justifyRight>
<span slot="trigger">See code</span>
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./partials/nestedMenu.html) -->
<!-- The below code snippet is automatically added from ./partials/nestedMenu.html -->
```html
<auro-menu id="alpha">
<auro-menuoption value="stops">Stops</auro-menuoption>
<auro-menuoption value="price">Price</auro-menuoption>
<auro-menuoption value="duration">Duration</auro-menuoption>
<hr>
<auro-menu id="beta">
<auro-menuoption value="apples">Apples</auro-menuoption>
<auro-menuoption value="oranges">Oranges</auro-menuoption>
<auro-menuoption value="pears">Pears</auro-menuoption>
<auro-menuoption value="grapes">Grapes</auro-menuoption>
<auro-menuoption value="kiwi">Kiwi</auro-menuoption>
<hr>
<auro-menu id="charlie">
<auro-menuoption value="person">Person</auro-menuoption>
<auro-menuoption value="woman">Woman</auro-menuoption>
<auro-menuoption value="man">Man</auro-menuoption>
<auro-menuoption value="camera">Camera</auro-menuoption>
<auro-menuoption value="tv">TV</auro-menuoption>
</auro-menu>
</auro-menu>
<hr>
<auro-menuoption value="departure">Departure</auro-menuoption>
<auro-menuoption value="arrival">Arrival</auro-menuoption>
<hr>
<auro-menu id="delta">
<auro-menuoption value="cars">Cars</auro-menuoption>
<auro-menuoption value="trucks">Trucks</auro-menuoption>
<auro-menuoption value="boats">Boats</auro-menuoption>
<auro-menuoption value="planes">Planes</auro-menuoption>
<auro-menuoption value="motorcycles">Motorcycles</auro-menuoption>
</auro-menu>
</auro-menu>
```
<!-- AURO-GENERATED-CONTENT:END -->
</auro-accordion>
## An auro-menuoption element w/disabled state

@@ -96,0 +253,0 @@

31

dist/auro-menu__bundled.js

@@ -14,3 +14,3 @@ /**

*/
const e="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,t=(e,t,s=null)=>{for(;t!==s;){const s=t.nextSibling;e.removeChild(t),t=s}},s=`{{lit-${String(Math.random()).slice(2)}}}`,i=`\x3c!--${s}--\x3e`,n=new RegExp(`${s}|${i}`);class r{constructor(e,t){this.parts=[],this.element=t;const i=[],r=[],a=document.createTreeWalker(t.content,133,null,!1);let c=0,h=-1,u=0;const{strings:p,values:{length:m}}=e;for(;u<m;){const e=a.nextNode();if(null!==e){if(h++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:s}=t;let i=0;for(let e=0;e<s;e++)o(t[e].name,"$lit$")&&i++;for(;i-- >0;){const t=p[u],s=d.exec(t)[2],i=s.toLowerCase()+"$lit$",r=e.getAttribute(i);e.removeAttribute(i);const o=r.split(n);this.parts.push({type:"attribute",index:h,name:s,strings:o}),u+=o.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),a.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(s)>=0){const s=e.parentNode,r=t.split(n),a=r.length-1;for(let t=0;t<a;t++){let i,n=r[t];if(""===n)i=l();else{const e=d.exec(n);null!==e&&o(e[2],"$lit$")&&(n=n.slice(0,e.index)+e[1]+e[2].slice(0,-"$lit$".length)+e[3]),i=document.createTextNode(n)}s.insertBefore(i,e),this.parts.push({type:"node",index:++h})}""===r[a]?(s.insertBefore(l(),e),i.push(e)):e.data=r[a],u+=a}}else if(8===e.nodeType)if(e.data===s){const t=e.parentNode;null!==e.previousSibling&&h!==c||(h++,t.insertBefore(l(),e)),c=h,this.parts.push({type:"node",index:h}),null===e.nextSibling?e.data="":(i.push(e),h--),u++}else{let t=-1;for(;-1!==(t=e.data.indexOf(s,t+1));)this.parts.push({type:"node",index:-1}),u++}}else a.currentNode=r.pop()}for(const e of i)e.parentNode.removeChild(e)}}const o=(e,t)=>{const s=e.length-t.length;return s>=0&&e.slice(s)===t},a=e=>-1!==e.index,l=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function c(e,t){const{element:{content:s},parts:i}=e,n=document.createTreeWalker(s,133,null,!1);let r=u(i),o=i[r],a=-1,l=0;const d=[];let c=null;for(;n.nextNode();){a++;const e=n.currentNode;for(e.previousSibling===c&&(c=null),t.has(e)&&(d.push(e),null===c&&(c=e)),null!==c&&l++;void 0!==o&&o.index===a;)o.index=null!==c?-1:o.index-l,r=u(i,r),o=i[r]}d.forEach((e=>e.parentNode.removeChild(e)))}const h=e=>{let t=11===e.nodeType?0:1;const s=document.createTreeWalker(e,133,null,!1);for(;s.nextNode();)t++;return t},u=(e,t=-1)=>{for(let s=t+1;s<e.length;s++){const t=e[s];if(a(t))return s}return-1};
const e="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,t=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},n=`{{lit-${String(Math.random()).slice(2)}}}`,s=`\x3c!--${n}--\x3e`,i=new RegExp(`${n}|${s}`);class r{constructor(e,t){this.parts=[],this.element=t;const s=[],r=[],a=document.createTreeWalker(t.content,133,null,!1);let d=0,u=-1,h=0;const{strings:p,values:{length:m}}=e;for(;h<m;){const e=a.nextNode();if(null!==e){if(u++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let s=0;for(let e=0;e<n;e++)o(t[e].name,"$lit$")&&s++;for(;s-- >0;){const t=p[h],n=l.exec(t)[2],s=n.toLowerCase()+"$lit$",r=e.getAttribute(s);e.removeAttribute(s);const o=r.split(i);this.parts.push({type:"attribute",index:u,name:n,strings:o}),h+=o.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),a.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(n)>=0){const n=e.parentNode,r=t.split(i),a=r.length-1;for(let t=0;t<a;t++){let s,i=r[t];if(""===i)s=c();else{const e=l.exec(i);null!==e&&o(e[2],"$lit$")&&(i=i.slice(0,e.index)+e[1]+e[2].slice(0,-"$lit$".length)+e[3]),s=document.createTextNode(i)}n.insertBefore(s,e),this.parts.push({type:"node",index:++u})}""===r[a]?(n.insertBefore(c(),e),s.push(e)):e.data=r[a],h+=a}}else if(8===e.nodeType)if(e.data===n){const t=e.parentNode;null!==e.previousSibling&&u!==d||(u++,t.insertBefore(c(),e)),d=u,this.parts.push({type:"node",index:u}),null===e.nextSibling?e.data="":(s.push(e),u--),h++}else{let t=-1;for(;-1!==(t=e.data.indexOf(n,t+1));)this.parts.push({type:"node",index:-1}),h++}}else a.currentNode=r.pop()}for(const e of s)e.parentNode.removeChild(e)}}const o=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},a=e=>-1!==e.index,c=()=>document.createComment(""),l=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function d(e,t){const{element:{content:n},parts:s}=e,i=document.createTreeWalker(n,133,null,!1);let r=h(s),o=s[r],a=-1,c=0;const l=[];let d=null;for(;i.nextNode();){a++;const e=i.currentNode;for(e.previousSibling===d&&(d=null),t.has(e)&&(l.push(e),null===d&&(d=e)),null!==d&&c++;void 0!==o&&o.index===a;)o.index=null!==d?-1:o.index-c,r=h(s,r),o=s[r]}l.forEach((e=>e.parentNode.removeChild(e)))}const u=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},h=(e,t=-1)=>{for(let n=t+1;n<e.length;n++){const t=e[n];if(a(t))return n}return-1};
/**

@@ -29,3 +29,3 @@ * @license

*/
const p=new WeakMap,m=e=>"function"==typeof e&&p.has(e),v={},f={};
const p=new WeakMap,m=e=>"function"==typeof e&&p.has(e),f={},v={};
/**

@@ -44,3 +44,3 @@ * @license

*/
class g{constructor(e,t,s){this.__parts=[],this.template=e,this.processor=t,this.options=s}update(e){let t=0;for(const s of this.__parts)void 0!==s&&s.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const t=e?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),s=[],i=this.template.parts,n=document.createTreeWalker(t,133,null,!1);let r,o=0,l=0,d=n.nextNode();for(;o<i.length;)if(r=i[o],a(r)){for(;l<r.index;)l++,"TEMPLATE"===d.nodeName&&(s.push(d),n.currentNode=d.content),null===(d=n.nextNode())&&(n.currentNode=s.pop(),d=n.nextNode());if("node"===r.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(d.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(d,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return e&&(document.adoptNode(t),customElements.upgrade(t)),t}}
class g{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const t=e?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),n=[],s=this.template.parts,i=document.createTreeWalker(t,133,null,!1);let r,o=0,c=0,l=i.nextNode();for(;o<s.length;)if(r=s[o],a(r)){for(;c<r.index;)c++,"TEMPLATE"===l.nodeName&&(n.push(l),i.currentNode=l.content),null===(l=i.nextNode())&&(i.currentNode=n.pop(),l=i.nextNode());if("node"===r.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(l.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return e&&(document.adoptNode(t),customElements.upgrade(t)),t}}
/**

@@ -58,3 +58,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const y=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),_=` ${s} `;class b{constructor(e,t,s,i){this.strings=e,this.values=t,this.type=s,this.processor=i}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],o=e.lastIndexOf("\x3c!--");n=(o>-1||n)&&-1===e.indexOf("--\x3e",o+1);const a=d.exec(e);t+=null===a?e+(n?_:i):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+s}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==y&&(t=y.createHTML(t)),e.innerHTML=t,e}}
*/const y=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),S=` ${n} `;class w{constructor(e,t,n,s){this.strings=e,this.values=t,this.type=n,this.processor=s}getHTML(){const e=this.strings.length-1;let t="",i=!1;for(let r=0;r<e;r++){const e=this.strings[r],o=e.lastIndexOf("\x3c!--");i=(o>-1||i)&&-1===e.indexOf("--\x3e",o+1);const a=l.exec(e);t+=null===a?e+(i?S:s):e.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+n}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");let t=this.getHTML();return void 0!==y&&(t=y.createHTML(t)),e.innerHTML=t,e}}
/**

@@ -72,3 +72,3 @@ * @license

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

@@ -86,3 +86,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/;function O(e){let t=V.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},V.set(e.type,t));let i=t.stringsArray.get(e.strings);if(void 0!==i)return i;const n=e.strings.join(s);return i=t.keyString.get(n),void 0===i&&(i=new r(e,e.getTemplateElement()),t.keyString.set(n,i)),t.stringsArray.set(e.strings,i),i}const V=new Map,U=new WeakMap;
*/;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 s=t.stringsArray.get(e.strings);if(void 0!==s)return s;const i=e.strings.join(n);return s=t.keyString.get(i),void 0===s&&(s=new r(e,e.getTemplateElement()),t.keyString.set(i,s)),t.stringsArray.set(e.strings,s),s}const R=new Map,L=new WeakMap;
/**

@@ -100,3 +100,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/const I=new
*/const M=new
/**

@@ -115,3 +115,3 @@ * @license

*/
class{handleAttributeExpressions(e,t,s,i){const n=t[0];if("."===n){return new P(e,t.slice(1),s).parts}if("@"===n)return[new L(e,t.slice(1),i.eventContext)];if("?"===n)return[new C(e,t.slice(1),s)];return new x(e,t,s).parts}handleTextExpression(e){return new N(e)}};
class{handleAttributeExpressions(e,t,n,s){const i=t[0];if("."===i){return new T(e,t.slice(1),n).parts}if("@"===i)return[new P(e,t.slice(1),s.eventContext)];if("?"===i)return[new k(e,t.slice(1),n)];return new b(e,t,n).parts}handleTextExpression(e){return new N(e)}};
/**

@@ -129,3 +129,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const M=(e,...t)=>new b(e,t,"html",I)
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const U=(e,...t)=>new w(e,t,"html",M)
/**

@@ -143,3 +143,3 @@ * @license

* http://polymer.github.io/PATENTS.txt
*/,R=(e,t)=>`${e}--${t}`;let z=!0;void 0===window.ShadyCSS?z=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),z=!1);const $=e=>t=>{const i=R(t.type,e);let n=V.get(i);void 0===n&&(n={stringsArray:new WeakMap,keyString:new Map},V.set(i,n));let o=n.stringsArray.get(t.strings);if(void 0!==o)return o;const a=t.strings.join(s);if(o=n.keyString.get(a),void 0===o){const s=t.getTemplateElement();z&&window.ShadyCSS.prepareTemplateDom(s,e),o=new r(t,s),n.keyString.set(a,o)}return n.stringsArray.set(t.strings,o),o},j=["html","svg"],q=new Set,D=(e,t,s)=>{q.add(e);const i=s?s.element:document.createElement("template"),n=t.querySelectorAll("style"),{length:r}=n;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(i,e);const o=document.createElement("style");for(let e=0;e<r;e++){const t=n[e];t.parentNode.removeChild(t),o.textContent+=t.textContent}(e=>{j.forEach((t=>{const s=V.get(R(t,e));void 0!==s&&s.keyString.forEach((e=>{const{element:{content:t}}=e,s=new Set;Array.from(t.querySelectorAll("style")).forEach((e=>{s.add(e)})),c(e,s)}))}))})(e);const a=i.content;s?function(e,t,s=null){const{element:{content:i},parts:n}=e;if(null==s)return void i.appendChild(t);const r=document.createTreeWalker(i,133,null,!1);let o=u(n),a=0,l=-1;for(;r.nextNode();)for(l++,r.currentNode===s&&(a=h(t),s.parentNode.insertBefore(t,s));-1!==o&&n[o].index===l;){if(a>0){for(;-1!==o;)n[o].index+=a,o=u(n,o);return}o=u(n,o)}}(s,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(i,e);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(s){a.insertBefore(o,a.firstChild);const e=new Set;e.add(o),c(s,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const F={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},B=(e,t)=>t!==e&&(t==t||e==e),H={attribute:!0,type:String,converter:F,reflect:!1,hasChanged:B};class W extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach(((t,s)=>{const i=this._attributeNameForProperty(s,t);void 0!==i&&(this._attributeToPropertyMap.set(i,s),e.push(i))})),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(((e,t)=>this._classProperties.set(t,e)))}}static createProperty(e,t=H){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const s="symbol"==typeof e?Symbol():`__${e}`,i=this.getPropertyDescriptor(e,s,t);void 0!==i&&Object.defineProperty(this.prototype,e,i)}static getPropertyDescriptor(e,t,s){return{get(){return this[t]},set(i){const n=this[e];this[t]=i,this.requestUpdateInternal(e,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||H}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const s of t)this.createProperty(s,e[s])}}static _attributeNameForProperty(e,t){const s=t.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,s=B){return s(e,t)}static _propertyValueFromAttribute(e,t){const s=t.type,i=t.converter||F,n="function"==typeof i?i:i.fromAttribute;return n?n(e,s):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const s=t.type,i=t.converter;return(i&&i.toAttribute||F.toAttribute)(e,s)}initialize(){this._updateState=0,this._updatePromise=new Promise((e=>this._enableUpdatingResolver=e)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((e,t)=>this[t]=e)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,s){t!==s&&this._attributeToProperty(e,s)}_propertyToAttribute(e,t,s=H){const i=this.constructor,n=i._attributeNameForProperty(e,s);if(void 0!==n){const e=i._propertyValueToAttribute(t,s);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(n):this.setAttribute(n,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const s=this.constructor,i=s._attributeToPropertyMap.get(e);if(void 0!==i){const e=s.getPropertyOptions(i);this._updateState=16|this._updateState,this[i]=s._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,s){let i=!0;if(void 0!==e){const n=this.constructor;s=s||n.getPropertyOptions(e),n._valueHasChanged(this[e],t,s.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==s.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,s))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((e,t)=>this._propertyToAttribute(t,this[t],e))),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}W.finalized=!0;
*/,V=(e,t)=>`${e}--${t}`;let j=!0;void 0===window.ShadyCSS?j=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),j=!1);const F=e=>t=>{const s=V(t.type,e);let i=R.get(s);void 0===i&&(i={stringsArray:new WeakMap,keyString:new Map},R.set(s,i));let o=i.stringsArray.get(t.strings);if(void 0!==o)return o;const a=t.strings.join(n);if(o=i.keyString.get(a),void 0===o){const n=t.getTemplateElement();j&&window.ShadyCSS.prepareTemplateDom(n,e),o=new r(t,n),i.keyString.set(a,o)}return i.stringsArray.set(t.strings,o),o},z=["html","svg"],W=new Set,$=(e,t,n)=>{W.add(e);const s=n?n.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:r}=i;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(s,e);const o=document.createElement("style");for(let e=0;e<r;e++){const t=i[e];t.parentNode.removeChild(t),o.textContent+=t.textContent}(e=>{z.forEach((t=>{const n=R.get(V(t,e));void 0!==n&&n.keyString.forEach((e=>{const{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach((e=>{n.add(e)})),d(e,n)}))}))})(e);const a=s.content;n?function(e,t,n=null){const{element:{content:s},parts:i}=e;if(null==n)return void s.appendChild(t);const r=document.createTreeWalker(s,133,null,!1);let o=h(i),a=0,c=-1;for(;r.nextNode();)for(c++,r.currentNode===n&&(a=u(t),n.parentNode.insertBefore(t,n));-1!==o&&i[o].index===c;){if(a>0){for(;-1!==o;)i[o].index+=a,o=h(i,o);return}o=h(i,o)}}(n,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(s,e);const c=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==c)t.insertBefore(c.cloneNode(!0),t.firstChild);else if(n){a.insertBefore(o,a.firstChild);const e=new Set;e.add(o),d(n,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const D={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},q=(e,t)=>t!==e&&(t==t||e==e),J={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:q};class B extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach(((t,n)=>{const s=this._attributeNameForProperty(n,t);void 0!==s&&(this._attributeToPropertyMap.set(s,n),e.push(s))})),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach(((e,t)=>this._classProperties.set(t,e)))}}static createProperty(e,t=J){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():`__${e}`,s=this.getPropertyDescriptor(e,n,t);void 0!==s&&Object.defineProperty(this.prototype,e,s)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(s){const i=this[e];this[t]=s,this.requestUpdateInternal(e,i,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||J}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=q){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,s=t.converter||D,i="function"==typeof s?s:s.fromAttribute;return i?i(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,s=t.converter;return(s&&s.toAttribute||D.toAttribute)(e,n)}initialize(){this._updateState=0,this._updatePromise=new Promise((e=>this._enableUpdatingResolver=e)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((e,t)=>this[t]=e)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=J){const s=this.constructor,i=s._attributeNameForProperty(e,n);if(void 0!==i){const e=s._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(i):this.setAttribute(i,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,s=n._attributeToPropertyMap.get(e);if(void 0!==s){const e=n.getPropertyOptions(s);this._updateState=16|this._updateState,this[s]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}requestUpdateInternal(e,t,n){let s=!0;if(void 0!==e){const i=this.constructor;n=n||i.getPropertyOptions(e),i._valueHasChanged(this[e],t,n.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,n))):s=!1}!this._hasRequestedUpdate&&s&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this.requestUpdateInternal(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((e,t)=>this._propertyToAttribute(t,this[t],e))),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}B.finalized=!0;
/**

@@ -155,3 +155,3 @@ @license

*/
const J=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol();class G{constructor(e,t){if(t!==K)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(J?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const X=(e,...t)=>{const s=t.reduce(((t,s,i)=>t+(e=>{if(e instanceof G)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+e[i+1]),e[0]);return new G(s,K)};
const H=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol();class G{constructor(e,t){if(t!==K)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(H?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const Y=(e,...t)=>{const n=t.reduce(((t,n,s)=>t+(e=>{if(e instanceof G)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(n)+e[s+1]),e[0]);return new G(n,K)};
/**

@@ -170,2 +170,9 @@ * @license

*/
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const Y={};class Z extends W{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,s)=>e.reduceRight(((e,s)=>Array.isArray(s)?t(s,e):(e.add(s),e)),s),s=t(e,new Set),i=[];s.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&&!J){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?J?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!==Y&&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 Y}}Z.finalized=!0,Z.render=(e,s,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=U.has(s),o=z&&11===s.nodeType&&!!s.host,a=o&&!q.has(n),l=a?document.createDocumentFragment():s;if(((e,s,i)=>{let n=U.get(s);void 0===n&&(t(s,s.firstChild),U.set(s,n=new N(Object.assign({templateFactory:O},i))),n.appendInto(s)),n.setValue(e),n.commit()})(e,l,Object.assign({templateFactory:$(n)},i)),a){const e=U.get(l);U.delete(l);const i=e.value instanceof g?e.value.template:void 0;D(n,l,i),t(s,s.firstChild),s.appendChild(l),U.set(s,e)}!r&&o&&window.ShadyCSS.styleElement(s.host)},Z.shadowRootOptions={mode:"open"};var Q=X`*,: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%;padding:0;margin: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){overflow:visible!important;height:0!important;box-sizing:content-box!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;margin:.5rem 0!important;margin:var(--auro-size-xs) 0!important}`,ee=X``;!function(){function e(e){var t=!0,s=!1,i=null,n={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 r(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function o(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function a(e){t=!1}function l(){document.addEventListener("mousemove",d),document.addEventListener("mousedown",d),document.addEventListener("mouseup",d),document.addEventListener("pointermove",d),document.addEventListener("pointerdown",d),document.addEventListener("pointerup",d),document.addEventListener("touchmove",d),document.addEventListener("touchstart",d),document.addEventListener("touchend",d)}function d(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,document.removeEventListener("mousemove",d),document.removeEventListener("mousedown",d),document.removeEventListener("mouseup",d),document.removeEventListener("pointermove",d),document.removeEventListener("pointerdown",d),document.removeEventListener("pointerup",d),document.removeEventListener("touchmove",d),document.removeEventListener("touchstart",d),document.removeEventListener("touchend",d))}document.addEventListener("keydown",(function(s){s.metaKey||s.altKey||s.ctrlKey||(r(e.activeElement)&&o(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&&(s&&(t=!0),l())}),!0),l(),e.addEventListener("focus",(function(e){var s,i,a;r(e.target)&&(t||(i=(s=e.target).type,"INPUT"===(a=s.tagName)&&n[i]&&!s.readOnly||"TEXTAREA"===a&&!s.readOnly||s.isContentEditable))&&o(e.target)}),!0),e.addEventListener("blur",(function(e){var t;r(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(s=!0,window.clearTimeout(i),i=window.setTimeout((function(){s=!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=X`:host{display:flex;align-items:center;padding:var(--auro-size-xxs) var(--auro-size-md) var(--auro-size-xxs) 0;cursor:pointer;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host svg{margin-right:var(--auro-size-xs);margin-left:var(--auro-size-sm);fill:var(--auro-color-icon-primary-on-light)!important}:host(:hover:not([disabled])){background-color:var(--auro-color-brand-neutral-100);color:var(--auro-color-text-primary-on-light)}:host(:focus:not([disabled])){background-color:var(--auro-color-alert-notification-on-light);color:var(--auro-color-base-white)}:host(:focus:not([disabled])) svg{fill:var(--auro-color-base-white)!important}: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}`,se=X``,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 ne extends Z{constructor(){super(),this.tabIndex=-1,this.dom=(new DOMParser).parseFromString(ie,"text/html"),this.svg=this.dom.body.firstChild}static get properties(){return{selected:{type:Boolean},disabled:{type:Boolean},value:{type:String,reflect:!0},tabIndex:{type:Number,reflect:!0}}}static get styles(){return[te,se]}render(){return M`${this.selected?M`${this.svg}`:void 0}<slot></slot>`}}customElements.get("auro-menuoption")||customElements.define("auro-menuoption",ne);class re extends Z{constructor(){super(),this.value=void 0}static get styles(){return[Q,ee]}firstUpdated(){this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.handleClick),this.addEventListener("click",this.selectedOption)}handleClick(e){this.index=this.items.indexOf(e.target),e.target.disabled||(this.items.forEach((e=>{e.tabIndex=-1,e.removeAttribute("selected"),e.removeAttribute("aria-selected")})),e.target.tabIndex=0,e.target.setAttribute("selected",""),e.target.ariaSelected=!0,this.value=e.target.value)}handleKeyDown(e){switch(e.preventDefault(),this.items.forEach((t=>{"Enter"===e.key&&(t.removeAttribute("selected"),t.removeAttribute("aria-selected"),t.tabIndex=-1)})),e.key){case"ArrowDown":this.selectNextItem(this.index===this.items.length-1?0:this.index+1,"Down");break;case"ArrowUp":this.selectNextItem(0===this.index?this.items.length-1:this.index-1,"Up");break;case"Enter":e.target.setAttribute("selected",""),e.target.ariaSelected=!0,e.target.tabIndex=0,this.value=e.target.value}}selectNextItem(e,t){let s=e;for(;s<this.items.length;"Down"===t?s+=1:s-=1){s=-1===s?this.items.length-1:s;const e=this.items[s];if(!e.disabled){e.click(),e.focus(),this.index=s;break}}}selectedOption(){this.dispatchEvent(new CustomEvent("selectedOption",{bubbles:!0,cancelable:!1,composed:!0,detail:{value:this.value}}))}handleSlotItems(){this.items=Array.from(this.querySelectorAll("auro-menuoption")),this.initializeIndex(),this.selectedOption()}initializeIndex(){const e=this.items.findIndex((e=>e.hasAttribute("selected")&&!e.hasAttribute("disabled"))),t=this.items.findIndex((e=>!e.hasAttribute("disabled")));this.index=e>=0?e:t,this.setAttribute("role","menu"),this.items.map((e=>e.setAttribute("role","menuitem"))),this.index>=0&&(this.items[this.index].tabIndex=0),this.items[this.index].selected&&(this.items[this.index].ariaSelected=!0,this.value=this.items[this.index].value)}render(){return M`<slot @slotchange="${this.handleSlotItems}"></slot>`}}customElements.get("auro-menu")||customElements.define("auro-menu",re);
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const Z={};class X extends B{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),s=[];n.forEach((e=>s.unshift(e))),this._styles=s}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,s)=>{if(!s||"object"!=typeof s||!s.scopeName)throw new Error("The `scopeName` option is required.");const i=s.scopeName,r=L.has(n),o=j&&11===n.nodeType&&!!n.host,a=o&&!W.has(i),c=a?document.createDocumentFragment():n;if(((e,n,s)=>{let i=L.get(n);void 0===i&&(t(n,n.firstChild),L.set(n,i=new N(Object.assign({templateFactory:O},s))),i.appendInto(n)),i.setValue(e),i.commit()})(e,c,Object.assign({templateFactory:F(i)},s)),a){const e=L.get(c);L.delete(c);const s=e.value instanceof g?e.value.template:void 0;$(i,c,s),t(n,n.firstChild),n.appendChild(c),L.set(n,e)}!r&&o&&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%;padding:0;margin: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){overflow:visible!important;height:0!important;box-sizing:content-box!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;margin:.5rem 0!important;margin:var(--auro-size-xs) 0!important}`,ee=Y``;!function(){function e(e){var t=!0,n=!1,s=null,i={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 r(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function o(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||(r(e.activeElement)&&o(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,s,a;r(e.target)&&(t||(s=(n=e.target).type,"INPUT"===(a=n.tagName)&&i[s]&&!n.readOnly||"TEXTAREA"===a&&!n.readOnly||n.isContentEditable))&&o(e.target)}),!0),e.addEventListener("blur",(function(e){var t;r(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(s),s=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-tap-highlight-color:transparent;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host slot{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}: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([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``,se='<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 ie extends X{constructor(){super(),this.tabIndex=-1,this.dom=(new DOMParser).parseFromString(se,"text/html"),this.svg=this.dom.body.firstChild}static get properties(){return{selected:{type:Boolean},disabled:{type:Boolean},value:{type:String,reflect:!0},tabIndex:{type:Number,reflect:!0}}}static get styles(){return[te,ne]}firstUpdated(){this.setAttribute("role","option")}render(){return U`${this.selected?U`${this.svg}`:void 0}<slot></slot>`}}customElements.get("auro-menuoption")||customElements.define("auro-menuoption",ie);
/*!***************************************************
* mark.js v8.11.0
* https://github.com/julmot/mark.js
* Copyright (c) 2014–2017, Julian Motz
* Released under the MIT license https://git.io/vwTVl
*****************************************************/
!function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n,s,i,r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},o=function(){function e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),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 s=function(){function s(n){t(this,s),this.ctx=n,this.ie=!1;var i=e.navigator.userAgent;(i.indexOf("MSIE")>-1||i.indexOf("Trident")>-1)&&(this.ie=!0)}return o(s,[{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",s=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var r=t[i],o="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(r):this.escapeStr(r);""!==o&&""!==a&&(e=e.replace(new RegExp("("+o+"|"+a+")","gm"+n),s+"("+this.processSynomyms(o)+"|"+this.processSynomyms(a)+")"+s))}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 s=n.charAt(t+1);return/[(|)\\]/.test(s)||""===s?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ŽŻŹ"],s=[];return e.split("").forEach((function(i){n.every((function(n){if(-1!==n.indexOf(i)){if(s.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),s.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,s="string"==typeof n?n:n.value,i="";switch(("string"==typeof n?[]:n.limiters).forEach((function(e){i+="|"+t.escapeStr(e)})),s){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}},{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=[],s=0;return e.sort((function(e,t){return e.start-t.start})).forEach((function(e){var i=t.callNoMatchOnInvalidRanges(e,s),r=i.start,o=i.end;i.valid&&(e.start=r,e.length=o-r,n.push(e),s=o)})),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,s=void 0,i=!1;return e&&void 0!==e.start?(s=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&s-t>0&&s-n>0?i=!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:s,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var s=void 0,i=!0,r=n.length,o=t-r,a=parseInt(e.start,10)-o;return(s=(a=a>r?r:a)+parseInt(e.length,10))>r&&(s=r,this.log("End range automatically set to the max value of "+r)),a<0||s-a<0||a>r||s>r?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(a,s).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:a,end:s,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",s=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,(function(e){s.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:s})}))}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,s){var i=this.opt.element?this.opt.element:"mark",r=e.splitText(t),o=r.splitText(s-t),a=n.createElement(i);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=r.textContent,r.parentNode.replaceChild(a,r),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,s,i){var r=this;e.nodes.every((function(o,a){var c=e.nodes[a+1];if(void 0===c||c.start>t){if(!s(o.node))return!1;var l=t-o.start,d=(n>o.end?o.end:n)-o.start,u=e.value.substr(0,o.start),h=e.value.substr(d+o.start);if(o.node=r.wrapRangeInTextNode(o.node,l,d),e.value=u+h,e.nodes.forEach((function(t,n){n>=a&&(e.nodes[n].start>0&&n!==a&&(e.nodes[n].start-=d),e.nodes[n].end-=d)})),n-=d,i(o.node.previousSibling,o.start),!(n>o.end))return!1;t=o.end}return!0}))}},{key:"wrapMatches",value:function(e,t,n,s,i){var r=this,o=0===t?0:t+1;this.getTextNodes((function(t){t.nodes.forEach((function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[o];)if(n(i[o],t)){var a=i.index;if(0!==o)for(var c=1;c<o;c++)a+=i[c].length;t=r.wrapRangeInTextNode(t,a,a+i[o].length),s(t.previousSibling),e.lastIndex=0}})),i()}))}},{key:"wrapMatchesAcrossElements",value:function(e,t,n,s,i){var r=this,o=0===t?0:t+1;this.getTextNodes((function(t){for(var a=void 0;null!==(a=e.exec(t.value))&&""!==a[o];){var c=a.index;if(0!==o)for(var l=1;l<o;l++)c+=a[l].length;var d=c+a[o].length;r.wrapRangeInMappedTextNode(t,c,d,(function(e){return n(a[o],e)}),(function(t,n){e.lastIndex=n,s(t)}))}i()}))}},{key:"wrapRangeFromIndex",value:function(e,t,n,s){var i=this;this.getTextNodes((function(r){var o=r.value.length;e.forEach((function(e,s){var a=i.checkWhitespaceRanges(e,o,r.value),c=a.start,l=a.end;a.valid&&i.wrapRangeInMappedTextNode(r,c,l,(function(n){return t(n,e,r.value.substring(c,l),s)}),(function(t){n(t,e)}))})),s()}))}},{key:"unwrapMatches",value:function(e){for(var t=e.parentNode,s=n.createDocumentFragment();e.firstChild;)s.appendChild(e.removeChild(e.firstChild));t.replaceChild(s,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 s=0,i="wrapMatches";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),this[i](e,this.opt.ignoreGroups,(function(e,t){return n.opt.filter(t,e,s)}),(function(e){s++,n.opt.each(e)}),(function(){0===s&&n.opt.noMatch(e),n.opt.done(s)}))}},{key:"mark",value:function(e,t){var n=this;this.opt=t;var s=0,i="wrapMatches",r=this.getSeparatedKeywords("string"==typeof e?[e]:e),o=r.keywords,a=r.length,c=this.opt.caseSensitive?"":"i";this.opt.acrossElements&&(i="wrapMatchesAcrossElements"),0===a?this.opt.done(s):function e(t){var r=new RegExp(n.createRegExp(t),"gm"+c),l=0;n.log('Searching with expression "'+r+'"'),n[i](r,1,(function(e,i){return n.opt.filter(i,t,s,l)}),(function(e){l++,s++,n.opt.each(e)}),(function(){0===l&&n.opt.noMatch(t),o[a-1]===t?n.opt.done(s):e(o[o.indexOf(t)+1])}))}(o[0])}},{key:"markRanges",value:function(e,t){var n=this;this.opt=t;var s=0,i=this.checkRanges(e);i&&i.length?(this.log("Starting to mark with the following ranges: "+JSON.stringify(i)),this.wrapRangeFromIndex(i,(function(e,t,s,i){return n.opt.filter(e,t,s,i)}),(function(e,t){s++,n.opt.each(e,t)}),(function(){n.opt.done(s)}))):this.opt.done(s)}},{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 s=i.matches(e,n),r=t.matchesExclude(e);return!s||r?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),this.opt.done)}},{key:"opt",set:function(t){this._opt=r({},{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 i(this.ctx,this.opt.iframes,this.opt.exclude,this.opt.iframesTimeout)}}]),s}(),i=function(){function e(n){var s=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=s,this.exclude=i,this.iframesTimeout=r}return o(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(){},s=void 0;try{var i=e.contentWindow;if(s=i.document,!i||!s)throw new Error("iframe inaccessible")}catch(e){n()}s&&t(s)}},{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 s=this,i=!1,r=null,o=function o(){if(!i){i=!0,clearTimeout(r);try{s.isIframeBlank(e)||(e.removeEventListener("load",o),s.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",o),r=setTimeout(o,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,s=0;this.forEachIframe(e,(function(){return!0}),(function(e){s++,n.waitForIframes(e.querySelector("html"),(function(){--s||t()}))}),(function(e){e||t()}))}},{key:"forEachIframe",value:function(t,n,s){var i=this,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=t.querySelectorAll("iframe"),a=o.length,c=0;o=Array.prototype.slice.call(o);var l=function(){--a<=0&&r(c)};a||l(),o.forEach((function(t){e.matches(t,i.exclude)?l():i.onIframeReady(t,(function(e){n(t)&&(c++,s(e)),l()}),l)}))}},{key:"createIterator",value:function(e,t,s){return n.createNodeIterator(e,t,s,!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,s){var i=!1,r=!1;return s.forEach((function(e,t){e.val===n&&(i=t,r=e.handled)})),this.compareNodeIframe(e,t,n)?(!1!==i||r?!1===i||r||(s[i].handled=!0):s.push({val:n,handled:!0}),!0):(!1===i&&s.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,s){var i=this;e.forEach((function(e){e.handled||i.getIframeContents(e.val,(function(e){i.createInstanceOnIframe(e).forEachNode(t,n,s)}))}))}},{key:"iterateThroughNodes",value:function(e,t,n,s,i){for(var r=this,o=this.createIterator(t,e,s),a=[],c=[],l=void 0,d=void 0;function(){var e=r.getIteratorNode(o);return d=e.prevNode,l=e.node}();)this.iframes&&this.forEachIframe(t,(function(e){return r.checkIframeFilter(l,d,e,a)}),(function(t){r.createInstanceOnIframe(t).forEachNode(e,(function(e){return c.push(e)}),s)})),c.push(l);c.forEach((function(e){n(e)})),this.iframes&&this.handleOpenIframes(a,e,n,s),i()}},{key:"forEachNode",value:function(e,t,n){var s=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},r=this.getContexts(),o=r.length;o||i(),r.forEach((function(r){var a=function(){s.iterateThroughNodes(e,r,t,n,(function(){--o<=0&&i()}))};s.iframes?s.waitForIframes(r,a):a()}))}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,s=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(s){var i=!1;return n.every((function(t){return!s.call(e,t)||(i=!0,!1)})),i}return!1}}]),e}();return e.Mark=function(e){var t=this,n=new s(e);return this.mark=function(e,s){return n.mark(e,s),t},this.markRegExp=function(e,s){return n.markRegExp(e,s),t},this.markRanges=function(e,s){return n.markRanges(e,s),t},this.unmark=function(e){return n.unmark(e),t},this},e.Mark},s=window,i=document,"object"===a(e)&&e.exports?e.exports=n(s,i):n(s,i)}({exports:{}});class re extends X{constructor(){super(),this.value=void 0,this.optionSelected=void 0,this.rootMenu=!0}static get properties(){return{optionSelected:{type:Object},matchWord:{type:String}}}static get styles(){return[Q,ee]}firstUpdated(){this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.makeSelection)}updated(e){e.has("matchWord")&&this.markOptions()}markOptions(){const e=new Mark(this.items);e.unmark(),this.matchWord&&this.matchWord.length>0&&e.mark(this.matchWord,{element:"strong",separateWordSearch:!1,acrossElements:!0})}resetOptionsStates(){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)}makeSelection(e){let t={};t=e.target?e.target:e,t.disabled||(this.resetOptionsStates(),this.handleLocalSelectState(t),this.dispatchEvent(new CustomEvent("selectedOption",{bubbles:!0,cancelable:!1,composed:!0})))}handleKeyDown(e){switch(e.preventDefault(),e.key){case"ArrowDown":this.selectNextItem("down");break;case"ArrowUp":this.selectNextItem("up");break;case"Enter":this.makeSelection(this.items[this.index])}}getSelectedIndex(){let e=this.items.findIndex((e=>e.hasAttribute("selected")&&!e.hasAttribute("disabled")));return-1===e&&(e=this.items.findIndex((e=>!e.hasAttribute("disabled")))),e>=0&&(this.index=e),e}selectNextItem(e){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.items[this.index].disabled?this.selectNextItem(e):this.items[this.index].classList.add("active")}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)}))}handleSlotItems(){this.parentElement.closest("auro-menu")&&(this.rootMenu=!1),this.rootMenu&&(this.items=Array.from(this.querySelectorAll("auro-menuoption")),this.setAttribute("role","listbox"),this.handleNestedMenus(this),this.markOptions(),this.getSelectedIndex(),this.selectNextItem(),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mousedown",this.makeSelection))}render(){return U`<slot @slotchange="${this.handleSlotItems}"></slot>`}}customElements.get("auro-menu")||customElements.define("auro-menu",re);

@@ -11,3 +11,3 @@ /* eslint-disable no-magic-numbers */

import './auro-menuoption';
import "focus-visible/dist/focus-visible.min.js";
import "mark.js/dist/mark.min";

@@ -18,2 +18,4 @@ // See https://git.io/JJ6SJ for "How to document your components using JSDoc"

* @attr {String} value - Specifies the value to be sent to a server.
* @attr {Object} optionSelected - Specifies the current selected menuOption.
* @attr {String} matchWord - Specifies the a string used to highlight matched string parts in options.
* @fires selectedOption - Value for selected menu option.

@@ -27,10 +29,17 @@ * @slot Slot for insertion of menu options.

this.value = undefined;
this.optionSelected = undefined;
/**
* @private
*/
this.rootMenu = true;
}
// static get properties() {
// return {
static get properties() {
return {
optionSelected: { type: Object },
matchWord: { type: String }
};
}
// };
// }
static get styles() {

@@ -45,28 +54,81 @@ return [

this.addEventListener('keydown', this.handleKeyDown);
this.addEventListener('mousedown', this.handleClick);
this.addEventListener('click', this.selectedOption);
this.addEventListener('mousedown', this.makeSelection);
}
updated(changedProperties) {
if (changedProperties.has('matchWord')) {
this.markOptions();
}
}
/**
* Manage click events.
* Event fires, but attributes are not changed on elements with the disabled attribute.
* @private
* @param {Object} event - Event object from the browser.
* @returns {void} When called will update the DOM with visible suggest text matches.
*/
handleClick(event) {
markOptions() {
const markInstance = new Mark(this.items); // eslint-disable-line
this.index = this.items.indexOf(event.target);
markInstance.unmark();
if (!event.target.disabled) {
this.items.forEach((item) => {
item.tabIndex = -1;
item.removeAttribute('selected');
item.removeAttribute('aria-selected');
if (this.matchWord && this.matchWord.length > 0) {
markInstance.mark(this.matchWord, {
'element': 'strong',
'separateWordSearch': false,
'acrossElements': true
});
}
}
event.target.tabIndex = 0;
event.target.setAttribute('selected', '');
event.target.ariaSelected = true;
this.value = event.target.value;
/**
* Reset all attributes on all menuoptions.
* @private
*/
resetOptionsStates() {
this.items.forEach((item) => {
item.classList.remove('active');
item.removeAttribute('selected');
item.removeAttribute('aria-selected');
});
}
/**
* Set the attributes on the selected menuoption, the menu value and stored option.
* @param {Object} option - The menuoption to be selected.
* @private
*/
handleLocalSelectState(option) {
option.setAttribute('selected', '');
option.classList.add('active');
option.ariaSelected = true;
this.value = option.value;
this.optionSelected = option;
this.index = this.items.indexOf(option);
}
/**
* Process actions for making making a menuoption selection.
* @param {Object} evt - The event or option to be selected.
* @private
*/
makeSelection(evt) {
// Handle if a click/key event is passed or if the target is directly passed
let option = {};
if (evt.target) {
option = evt.target;
} else {
option = evt;
}
// only handle options that are not disabled
if (!option.disabled) {
this.resetOptionsStates();
this.handleLocalSelectState(option);
this.dispatchEvent(new CustomEvent('selectedOption', {
bubbles: true,
cancelable: false,
composed: true,
}));
}
}

@@ -82,11 +144,2 @@

// With each keyboard 'enter' event, reset attr settings on options.
this.items.forEach((item) => {
if (event.key === `Enter`) {
item.removeAttribute('selected');
item.removeAttribute('aria-selected');
item.tabIndex = -1;
}
});
// With ArrowDown/ArrowUp events, pass new value to selectNextItem()

@@ -96,14 +149,11 @@ // With Enter event, set value and apply attrs

case "ArrowDown":
this.selectNextItem(this.index === this.items.length - 1 ? 0 : this.index + 1, "Down");
this.selectNextItem('down');
break;
case "ArrowUp":
this.selectNextItem(this.index === 0 ? this.items.length - 1 : this.index - 1, "Up");
this.selectNextItem('up');
break;
case "Enter":
event.target.setAttribute('selected', '');
event.target.ariaSelected = true;
event.target.tabIndex = 0;
this.value = event.target.value;
this.makeSelection(this.items[this.index]);
break;

@@ -116,3 +166,23 @@ default:

/**
* Using value of current this.index, on keyboard event, evaluates index
* @private
* @returns { Number } Returns the index value of the selected item or first non-disabled menuoption.
*/
getSelectedIndex() {
// find the first `selected` and not `disabled` option
let index = this.items.findIndex((item) => item.hasAttribute('selected') && !item.hasAttribute('disabled'));
if (index === -1) {
// make index be the next non-`disabled` option
index = this.items.findIndex((item) => !item.hasAttribute('disabled'));
}
if (index >= 0) {
this.index = index;
}
return index;
}
/**
* Using value of current this.index evaluates index
* of next :focus to set based on array of this.items ignoring items

@@ -124,35 +194,56 @@ * with disabled attr.

* @private
* @param {Number} index - Index value from array of elements.
* @param {String} moveDirection - Up or Down based on keyboard event.
*/
selectNextItem(index, moveDirection) {
let currentIndex = index;
selectNextItem(moveDirection) {
// remove focus-visible from current selection
this.items[this.index].classList.remove('active');
for (currentIndex; currentIndex < this.items.length; moveDirection === "Down" ? currentIndex += 1 : currentIndex -= 1) {
currentIndex = currentIndex === -1 ? this.items.length - 1 : currentIndex;
const selectedItem = this.items[currentIndex];
// calculate which is the selection we should focus next
let increment = 0;
if (!selectedItem.disabled) {
selectedItem.click();
selectedItem.focus();
this.index = currentIndex;
break;
}
if (moveDirection === 'down') {
increment = 1;
} else if (moveDirection === 'up') {
increment = -1;
}
this.index += increment;
// keep looping inside the array of options
if (this.index > this.items.length - 1) {
this.index = 0;
} else if (this.index < 0) {
this.index = this.items.length - 1;
}
// check if new index is disabled, if so, execute again
if (this.items[this.index].disabled) {
this.selectNextItem(moveDirection);
} else {
// apply focus to new index
this.items[this.index].classList.add('active');
}
}
/**
* Custom event that returns the selected option's value.
* Use event to trigger the state of wrapping elements.
* Used for applying indentation to each level of nested menu.
* @private
* @param {String} menu - Root level menu object.
*/
selectedOption() {
this.dispatchEvent(new CustomEvent('selectedOption', {
bubbles: true,
cancelable: false,
composed: true,
detail: {
value: this.value
}
}));
handleNestedMenus(menu) {
const nestedMenus = menu.querySelectorAll('auro-menu');
if (nestedMenus.length === 0) {
return;
}
nestedMenus.forEach((nestedMenu) => {
const options = nestedMenu.querySelectorAll(':scope > auro-menuoption');
options.forEach((option) => {
option.innerHTML = `<span class="nestingSpacer"></span> ${option.innerHTML}`;
});
this.handleNestedMenus(nestedMenu);
});
}

@@ -165,26 +256,24 @@

handleSlotItems() {
this.items = Array.from(this.querySelectorAll('auro-menuoption'));
this.initializeIndex();
this.selectedOption();
}
/**
* This function will iterate over the array of items in the slot find the selected
* option that is not disabled and apply tabindex='0' to set tab order.
* @private
*/
initializeIndex() {
const index = this.items.findIndex((item) => item.hasAttribute('selected') && !item.hasAttribute('disabled'));
const nextEnabledIndex = this.items.findIndex((item) => !item.hasAttribute('disabled'));
this.index = index >= 0 ? index : nextEnabledIndex;
this.setAttribute('role', 'menu');
this.items.map((item) => item.setAttribute('role', 'menuitem'));
if (this.index >= 0) {
this.items[this.index].tabIndex = 0;
/**
* Determine if this is the root of the menu/submenu layout.
*/
if (this.parentElement.closest('auro-menu')) {
this.rootMenu = false;
}
if (this.items[this.index].selected) {
this.items[this.index].ariaSelected = true;
this.value = this.items[this.index].value;
/**
* If this is the root menu (not a nested menu) handle events, states and styling.
*/
if (this.rootMenu) {
this.items = Array.from(this.querySelectorAll('auro-menuoption'));
this.setAttribute('role', 'listbox');
this.handleNestedMenus(this);
this.markOptions();
this.getSelectedIndex();
this.selectNextItem();
this.addEventListener('keydown', this.handleKeyDown);
this.addEventListener('mousedown', this.makeSelection);
}

@@ -191,0 +280,0 @@ }

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

firstUpdated() {
this.setAttribute('role', 'option');
}
render() {

@@ -63,0 +67,0 @@ return html`

import {css} from 'lit-element';
export default css`:host{display:flex;align-items:center;padding:var(--auro-size-xxs) var(--auro-size-md) var(--auro-size-xxs) 0;cursor:pointer;-webkit-tap-highlight-color:transparent}:host slot{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host svg{margin-right:var(--auro-size-xs);margin-left:var(--auro-size-sm);fill:var(--auro-color-icon-primary-on-light) !important}:host(:hover:not([disabled])){background-color:var(--auro-color-brand-neutral-100);color:var(--auro-color-text-primary-on-light)}:host(:focus:not([disabled])){background-color:var(--auro-color-alert-notification-on-light);color:var(--auro-color-base-white)}:host(:focus:not([disabled])) svg{fill:var(--auro-color-base-white) !important}: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}`;
export default css`:host{display:flex;align-items:center;padding:var(--auro-size-xxs) var(--auro-size-md) var(--auro-size-xxs) 0;cursor:pointer;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-ms-user-select:none;user-select:none}:host slot{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}: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([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(:hover:not([disabled])),:host(.active:not([disabled])){background-color:var(--auro-color-ui-bkg-hover-on-light);color:var(--auro-color-text-primary-on-light)}:host(:hover:not([disabled])) svg,:host(.active: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}`;

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

"name": "@aurodesignsystem/auro-menu",
"version": "3.1.0",
"version": "3.2.0",
"description": "auro-menu HTML custom element",

@@ -25,3 +25,4 @@ "repository": {

"lit-element": "^2.5.1",
"lit-html": "^1.4.1"
"lit-html": "^1.4.1",
"mark.js": "8.11.0"
},

@@ -28,0 +29,0 @@ "peerDependencies": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc