@ewc-lib/ewc-singleselect 1.0.11-alpha → 1.0.13-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,6 +9,8 @@ A customizable single-select component built with LitElement and TailwindCSS. Th
9
9
  - **Search Functionality**: Includes a search field when there are 10 or more options (configurable).
10
10
  - **Keyboard Navigation**: Supports navigation using arrow keys, Enter, Space, Tab, and Escape.
11
11
  - **Accessible**: Uses appropriate ARIA roles and attributes for accessibility.
12
+ - **Single Open Instance**: Within the same document, opening one `ewc-singleselect` closes any other open `ewc-singleselect`.
13
+ - **Inline HTML Labels**: Option names support limited inline formatting with `<sub>`, `<sup>`, `<em>`, `<i>`, `<strong>`, and `<b>`.
12
14
  - **Inactive State**: Disables selection for inactive options.
13
15
  - **Customizable Appearance**: Supports light and dark themes.
14
16
  - **Version Information**: The component version can be retrieved using the `ewc-version` attribute.
@@ -38,7 +40,7 @@ import '@ewc-lib/ewc-singleselect';
38
40
  options='[
39
41
  [{"code": "EU27_2020", "name": "European Union", "status": "active"}],
40
42
  [
41
- {"code": "AT", "name": "Austria", "status": "active"},
43
+ {"code": "AT", "name": "Kilograms of CO<sub>2</sub> equivalent per capita", "status": "active"},
42
44
  {"code": "BE", "name": "Belgium", "status": "active"},
43
45
  ...
44
46
  ]
@@ -52,6 +54,8 @@ import '@ewc-lib/ewc-singleselect';
52
54
  ></ewc-singleselect>
53
55
  ```
54
56
 
57
+ Inline HTML in `name` is rendered in the dropdown and in the selected value display.
58
+
55
59
  ### Retrieving Version Information
56
60
 
57
61
  The component version can be accessed through the `ewc-version` attribute:
@@ -62,9 +66,15 @@ const version = singleSelect?.getAttribute('ewc-version');
62
66
  console.log('Component version:', version); // e.g., "1.0.0-alpha"
63
67
  ```
64
68
 
69
+ ### Open State Behavior
70
+
71
+ If multiple `ewc-singleselect` components are rendered in the same document, only one of them can remain open at a time. Opening one singleselect automatically closes any other open singleselect on the page.
72
+
65
73
  ### Attributes
66
74
 
67
75
  - `options`: JSON array of option groups. Each option object should have a `code`, `name`, and `status`.
76
+ - `name` may include a limited set of inline tags: `<sub>`, `<sup>`, `<em>`, `<i>`, `<strong>`, and `<b>`.
77
+ - Other tags are stripped, and search/width calculation still use the plain-text equivalent.
68
78
  - `defaultOption`: Default selected option code.
69
79
  - `activeOption`: Initially active option code. Changing this attribute programmatically updates the current selection without dispatching the `option-selected` event and without moving focus to the component.
70
80
  - `dropdownHeight`: Height of the dropdown list (e.g., "200px").
@@ -6,10 +6,21 @@ export interface SelectOption {
6
6
  }
7
7
  export interface OptionGroup {
8
8
  label: string;
9
+ code?: string;
10
+ status?: "active" | "inactive";
9
11
  options: (SelectOption | OptionGroup)[];
10
12
  }
11
13
  export declare class SingleSelect extends LitElement {
12
14
  static version: string;
15
+ private static nextInstanceId;
16
+ private static openInstance;
17
+ private static readonly EMPTY_COMPONENT_WIDTH;
18
+ private static readonly MIN_COMPONENT_WIDTH;
19
+ private static readonly FALLBACK_TEXT_LEFT_PADDING;
20
+ private static readonly FALLBACK_TEXT_RIGHT_PADDING;
21
+ private static readonly FALLBACK_BORDER_WIDTH;
22
+ private static readonly FALLBACK_BUTTON_WIDTH;
23
+ private static readonly ALLOWED_OPTION_NAME_TAGS;
13
24
  options: (SelectOption[][] | OptionGroup[]);
14
25
  selectedOption: string;
15
26
  isExpanded: boolean;
@@ -32,6 +43,10 @@ export declare class SingleSelect extends LitElement {
32
43
  private _initialDefaultOption;
33
44
  private _initialActiveOption;
34
45
  private _componentWidth;
46
+ private readonly _instanceId;
47
+ private readonly _fallbackLabelId;
48
+ private readonly _selectedTextId;
49
+ private readonly _optionListId;
35
50
  static styles: CSSStyleSheet[];
36
51
  constructor();
37
52
  connectedCallback(): void;
@@ -41,6 +56,15 @@ export declare class SingleSelect extends LitElement {
41
56
  firstUpdated(): void;
42
57
  private determineInitialSearchVisibility;
43
58
  disconnectedCallback(): void;
59
+ private parsePixelValue;
60
+ private escapeHtml;
61
+ private sanitizeAllowedOptionNode;
62
+ private getSanitizedOptionNameHtml;
63
+ private getOptionNamePlainText;
64
+ private getOptionDisplayText;
65
+ private renderOptionName;
66
+ private getSelectedOptionItem;
67
+ private applyComponentWidth;
44
68
  private _updateWidth;
45
69
  private _handleShadowClick;
46
70
  private handleClickOutside;
@@ -52,9 +76,16 @@ export declare class SingleSelect extends LitElement {
52
76
  private toggleDropdown;
53
77
  private filterGroups;
54
78
  private search;
55
- private getSelectedOptionNames;
79
+ private getSelectedOptionText;
80
+ private renderSelectedOptionContent;
81
+ private ensureId;
82
+ private getAssociatedLabelIds;
83
+ private getButtonLabelledBy;
84
+ private getFallbackLabelText;
56
85
  private getFirstFocusableOptionElement;
57
86
  private handleKeyDown;
87
+ private rendersVisibleRow;
88
+ private hasVisibleInteractiveContent;
58
89
  private renderItem;
59
90
  private renderOptionList;
60
91
  private updateOptionStatusInGroups;
@@ -0,0 +1 @@
1
+ export {};
package/dist/main.cjs.js CHANGED
@@ -1,87 +1,108 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function b(r,t,e,o){var i=arguments.length,s=i<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,e):o,n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,t,e,o);else for(var l=r.length-1;l>=0;l--)(n=r[l])&&(s=(i<3?n(s):i>3?n(t,e,s):n(t,e))||s);return i>3&&s&&Object.defineProperty(t,e,s),s}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function x(n,t,e,i){var o=arguments.length,s=o<3?t:i===null?i=Object.getOwnPropertyDescriptor(t,e):i,r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,t,e,i);else for(var l=n.length-1;l>=0;l--)(r=n[l])&&(s=(o<3?r(s):o>3?r(t,e,s):r(t,e))||s);return o>3&&s&&Object.defineProperty(t,e,s),s}/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const B=globalThis,X=B.ShadowRoot&&(B.ShadyCSS===void 0||B.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),lt=new WeakMap;let kt=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(X&&t===void 0){const o=e!==void 0&&e.length===1;o&&(t=lt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&lt.set(e,t))}return t}toString(){return this.cssText}};const At=r=>new kt(typeof r=="string"?r:r+"",void 0,vt),Ot=(r,t)=>{if(X)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const o=document.createElement("style"),i=B.litNonce;i!==void 0&&o.setAttribute("nonce",i),o.textContent=e.cssText,r.appendChild(o)}},ct=X?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const o of t.cssRules)e+=o.cssText;return At(e)})(r):r;/**
5
+ */const X=globalThis,nt=X.ShadowRoot&&(X.ShadyCSS===void 0||X.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,xt=Symbol(),ct=new WeakMap;let Ot=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==xt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(nt&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=ct.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ct.set(e,t))}return t}toString(){return this.cssText}};const Et=n=>new Ot(typeof n=="string"?n:n+"",void 0,xt),It=(n,t)=>{if(nt)n.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=X.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,n.appendChild(i)}},dt=nt?n=>n:n=>n instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return Et(e)})(n):n;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const{is:Et,defineProperty:Ct,getOwnPropertyDescriptor:zt,getOwnPropertyNames:Rt,getOwnPropertySymbols:Pt,getPrototypeOf:It}=Object,A=globalThis,ht=A.trustedTypes,Ut=ht?ht.emptyScript:"",V=A.reactiveElementPolyfillSupport,M=(r,t)=>r,W={toAttribute(r,t){switch(t){case Boolean:r=r?Ut:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},Q=(r,t)=>!Et(r,t),dt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:Q};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),A.litPropertyMetadata??(A.litPropertyMetadata=new WeakMap);class P extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=dt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const o=Symbol(),i=this.getPropertyDescriptor(t,o,e);i!==void 0&&Ct(this.prototype,t,i)}}static getPropertyDescriptor(t,e,o){const{get:i,set:s}=zt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get(){return i==null?void 0:i.call(this)},set(n){const l=i==null?void 0:i.call(this);s.call(this,n),this.requestUpdate(t,l,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??dt}static _$Ei(){if(this.hasOwnProperty(M("elementProperties")))return;const t=It(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(M("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(M("properties"))){const e=this.properties,o=[...Rt(e),...Pt(e)];for(const i of o)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[o,i]of e)this.elementProperties.set(o,i)}this._$Eh=new Map;for(const[e,o]of this.elementProperties){const i=this._$Eu(e,o);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const o=new Set(t.flat(1/0).reverse());for(const i of o)e.unshift(ct(i))}else t!==void 0&&e.push(ct(t));return e}static _$Eu(t,e){const o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ot(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var o;return(o=e.hostConnected)==null?void 0:o.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var o;return(o=e.hostDisconnected)==null?void 0:o.call(e)})}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EC(t,e){var s;const o=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,o);if(i!==void 0&&o.reflect===!0){const n=(((s=o.converter)==null?void 0:s.toAttribute)!==void 0?o.converter:W).toAttribute(e,o.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){var s;const o=this.constructor,i=o._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=o.getPropertyOptions(i),l=typeof n.converter=="function"?{fromAttribute:n.converter}:((s=n.converter)==null?void 0:s.fromAttribute)!==void 0?n.converter:W;this._$Em=i,this[i]=l.fromAttribute(e,n.type),this._$Em=null}}requestUpdate(t,e,o){if(t!==void 0){if(o??(o=this.constructor.getPropertyOptions(t)),!(o.hasChanged??Q)(this[t],e))return;this.P(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,n]of this._$Ep)this[s]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[s,n]of i)n.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],n)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(i=>{var s;return(s=i.hostUpdate)==null?void 0:s.call(i)}),this.update(e)):this._$EU()}catch(i){throw t=!1,this._$EU(),i}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(o=>{var i;return(i=o.hostUpdated)==null?void 0:i.call(o)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}P.elementStyles=[],P.shadowRootOptions={mode:"open"},P[M("elementProperties")]=new Map,P[M("finalized")]=new Map,V==null||V({ReactiveElement:P}),(A.reactiveElementVersions??(A.reactiveElementVersions=[])).push("2.0.4");/**
9
+ */const{is:Tt,defineProperty:Ct,getOwnPropertyDescriptor:Lt,getOwnPropertyNames:Rt,getOwnPropertySymbols:Nt,getPrototypeOf:Pt}=Object,N=globalThis,ht=N.trustedTypes,zt=ht?ht.emptyScript:"",et=N.reactiveElementPolyfillSupport,F=(n,t)=>n,Z={toAttribute(n,t){switch(t){case Boolean:n=n?zt:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,t){let e=n;switch(t){case Boolean:e=n!==null;break;case Number:e=n===null?null:Number(n);break;case Object:case Array:try{e=JSON.parse(n)}catch{e=null}}return e}},at=(n,t)=>!Tt(n,t),pt={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:at};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),N.litPropertyMetadata??(N.litPropertyMetadata=new WeakMap);class B extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=pt){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Ct(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){const{get:o,set:s}=Lt(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return o==null?void 0:o.call(this)},set(r){const l=o==null?void 0:o.call(this);s.call(this,r),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??pt}static _$Ei(){if(this.hasOwnProperty(F("elementProperties")))return;const t=Pt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(F("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(F("properties"))){const e=this.properties,i=[...Rt(e),...Nt(e)];for(const o of i)this.createProperty(o,e[o])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(dt(o))}else t!==void 0&&e.push(dt(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return It(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostConnected)==null?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var s;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const r=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Z).toAttribute(e,i.type);this._$Em=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var s;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const r=i.getPropertyOptions(o),l=typeof r.converter=="function"?{fromAttribute:r.converter}:((s=r.converter)==null?void 0:s.fromAttribute)!==void 0?r.converter:Z;this._$Em=o,this[o]=l.fromAttribute(e,r.type),this._$Em=null}}requestUpdate(t,e,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??at)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,r]of this._$Ep)this[s]=r;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[s,r]of o)r.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],r)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(i=this._$EO)==null||i.forEach(o=>{var s;return(s=o.hostUpdate)==null?void 0:s.call(o)}),this.update(e)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}B.elementStyles=[],B.shadowRootOptions={mode:"open"},B[F("elementProperties")]=new Map,B[F("finalized")]=new Map,et==null||et({ReactiveElement:B}),(N.reactiveElementVersions??(N.reactiveElementVersions=[])).push("2.0.4");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */const H=globalThis,F=H.trustedTypes,pt=F?F.createPolicy("lit-html",{createHTML:r=>r}):void 0,yt="$lit$",k=`lit$${Math.random().toFixed(9).slice(2)}$`,xt="?"+k,Tt=`<${xt}>`,R=document,D=()=>R.createComment(""),j=r=>r===null||typeof r!="object"&&typeof r!="function",tt=Array.isArray,Mt=r=>tt(r)||typeof(r==null?void 0:r[Symbol.iterator])=="function",J=`[
14
- \f\r]`,T=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ut=/-->/g,wt=/>/g,C=RegExp(`>|${J}(?:([^\\s"'>=/]+)(${J}*=${J}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),ft=/'/g,gt=/"/g,$t=/^(?:script|style|textarea|title)$/i,Ht=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),_=Ht(1),I=Symbol.for("lit-noChange"),f=Symbol.for("lit-nothing"),bt=new WeakMap,z=R.createTreeWalker(R,129);function _t(r,t){if(!tt(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return pt!==void 0?pt.createHTML(t):t}const Nt=(r,t)=>{const e=r.length-1,o=[];let i,s=t===2?"<svg>":t===3?"<math>":"",n=T;for(let l=0;l<e;l++){const a=r[l];let p,u,h=-1,v=0;for(;v<a.length&&(n.lastIndex=v,u=n.exec(a),u!==null);)v=n.lastIndex,n===T?u[1]==="!--"?n=ut:u[1]!==void 0?n=wt:u[2]!==void 0?($t.test(u[2])&&(i=RegExp("</"+u[2],"g")),n=C):u[3]!==void 0&&(n=C):n===C?u[0]===">"?(n=i??T,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,p=u[1],n=u[3]===void 0?C:u[3]==='"'?gt:ft):n===gt||n===ft?n=C:n===ut||n===wt?n=T:(n=C,i=void 0);const y=n===C&&r[l+1].startsWith("/>")?" ":"";s+=n===T?a+Tt:h>=0?(o.push(p),a.slice(0,h)+yt+a.slice(h)+k+y):a+k+(h===-2?l:y)}return[_t(r,s+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]};class L{constructor({strings:t,_$litType$:e},o){let i;this.parts=[];let s=0,n=0;const l=t.length-1,a=this.parts,[p,u]=Nt(t,e);if(this.el=L.createElement(p,o),z.currentNode=this.el.content,e===2||e===3){const h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(i=z.nextNode())!==null&&a.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(const h of i.getAttributeNames())if(h.endsWith(yt)){const v=u[n++],y=i.getAttribute(h).split(k),E=/([.?@])?(.*)/.exec(v);a.push({type:1,index:s,name:E[2],strings:y,ctor:E[1]==="."?jt:E[1]==="?"?Lt:E[1]==="@"?qt:G}),i.removeAttribute(h)}else h.startsWith(k)&&(a.push({type:6,index:s}),i.removeAttribute(h));if($t.test(i.tagName)){const h=i.textContent.split(k),v=h.length-1;if(v>0){i.textContent=F?F.emptyScript:"";for(let y=0;y<v;y++)i.append(h[y],D()),z.nextNode(),a.push({type:2,index:++s});i.append(h[v],D())}}}else if(i.nodeType===8)if(i.data===xt)a.push({type:2,index:s});else{let h=-1;for(;(h=i.data.indexOf(k,h+1))!==-1;)a.push({type:7,index:s}),h+=k.length-1}s++}}static createElement(t,e){const o=R.createElement("template");return o.innerHTML=t,o}}function U(r,t,e=r,o){var n,l;if(t===I)return t;let i=o!==void 0?(n=e.o)==null?void 0:n[o]:e.l;const s=j(t)?void 0:t._$litDirective$;return(i==null?void 0:i.constructor)!==s&&((l=i==null?void 0:i._$AO)==null||l.call(i,!1),s===void 0?i=void 0:(i=new s(r),i._$AT(r,e,o)),o!==void 0?(e.o??(e.o=[]))[o]=i:e.l=i),i!==void 0&&(t=U(r,i._$AS(r,t.values),i,o)),t}class Dt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:o}=this._$AD,i=((t==null?void 0:t.creationScope)??R).importNode(e,!0);z.currentNode=i;let s=z.nextNode(),n=0,l=0,a=o[0];for(;a!==void 0;){if(n===a.index){let p;a.type===2?p=new q(s,s.nextSibling,this,t):a.type===1?p=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(p=new Bt(s,this,t)),this._$AV.push(p),a=o[++l]}n!==(a==null?void 0:a.index)&&(s=z.nextNode(),n++)}return z.currentNode=R,i}p(t){let e=0;for(const o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}}class q{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,o,i){this.type=2,this._$AH=f,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=i,this.v=(i==null?void 0:i.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=U(this,t,e),j(t)?t===f||t==null||t===""?(this._$AH!==f&&this._$AR(),this._$AH=f):t!==this._$AH&&t!==I&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Mt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==f&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(R.createTextNode(t)),this._$AH=t}$(t){var s;const{values:e,_$litType$:o}=t,i=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=L.createElement(_t(o.h,o.h[0]),this.options)),o);if(((s=this._$AH)==null?void 0:s._$AD)===i)this._$AH.p(e);else{const n=new Dt(i,this),l=n.u(this.options);n.p(e),this.T(l),this._$AH=n}}_$AC(t){let e=bt.get(t.strings);return e===void 0&&bt.set(t.strings,e=new L(t)),e}k(t){tt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let o,i=0;for(const s of t)i===e.length?e.push(o=new q(this.O(D()),this.O(D()),this,this.options)):o=e[i],o._$AI(s),i++;i<e.length&&(this._$AR(o&&o._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var o;for((o=this._$AP)==null?void 0:o.call(this,!1,!0,e);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class G{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,i,s){this.type=1,this._$AH=f,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=s,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=f}_$AI(t,e=this,o,i){const s=this.strings;let n=!1;if(s===void 0)t=U(this,t,e,0),n=!j(t)||t!==this._$AH&&t!==I,n&&(this._$AH=t);else{const l=t;let a,p;for(t=s[0],a=0;a<s.length-1;a++)p=U(this,l[o+a],e,a),p===I&&(p=this._$AH[a]),n||(n=!j(p)||p!==this._$AH[a]),p===f?t=f:t!==f&&(t+=(p??"")+s[a+1]),this._$AH[a]=p}n&&!i&&this.j(t)}j(t){t===f?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class jt extends G{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===f?void 0:t}}class Lt extends G{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==f)}}class qt extends G{constructor(t,e,o,i,s){super(t,e,o,i,s),this.type=5}_$AI(t,e=this){if((t=U(this,t,e,0)??f)===I)return;const o=this._$AH,i=t===f&&o!==f||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==f&&(o===f||i);i&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Bt{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){U(this,t)}}const K=H.litHtmlPolyfillSupport;K==null||K(L,q),(H.litHtmlVersions??(H.litHtmlVersions=[])).push("3.2.0");const Wt=(r,t,e)=>{const o=(e==null?void 0:e.renderBefore)??t;let i=o._$litPart$;if(i===void 0){const s=(e==null?void 0:e.renderBefore)??null;o._$litPart$=i=new q(t.insertBefore(D(),s),s,void 0,e??{})}return i._$AI(r),i};/**
13
+ */const q=globalThis,Q=q.trustedTypes,ut=Q?Q.createPolicy("lit-html",{createHTML:n=>n}):void 0,$t="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+R,Dt=`<${_t}>`,D=document,G=()=>D.createComment(""),K=n=>n===null||typeof n!="object"&&typeof n!="function",lt=Array.isArray,Mt=n=>lt(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",it=`[
14
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ft=/-->/g,wt=/>/g,P=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,bt=/"/g,At=/^(?:script|style|textarea|title)$/i,Ht=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),I=Ht(1),M=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),mt=new WeakMap,z=D.createTreeWalker(D,129);function kt(n,t){if(!lt(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return ut!==void 0?ut.createHTML(t):t}const Ut=(n,t)=>{const e=n.length-1,i=[];let o,s=t===2?"<svg>":t===3?"<math>":"",r=j;for(let l=0;l<e;l++){const a=n[l];let h,u,d=-1,m=0;for(;m<a.length&&(r.lastIndex=m,u=r.exec(a),u!==null);)m=r.lastIndex,r===j?u[1]==="!--"?r=ft:u[1]!==void 0?r=wt:u[2]!==void 0?(At.test(u[2])&&(o=RegExp("</"+u[2],"g")),r=P):u[3]!==void 0&&(r=P):r===P?u[0]===">"?(r=o??j,d=-1):u[1]===void 0?d=-2:(d=r.lastIndex-u[2].length,h=u[1],r=u[3]===void 0?P:u[3]==='"'?bt:gt):r===bt||r===gt?r=P:r===ft||r===wt?r=j:(r=P,o=void 0);const b=r===P&&n[l+1].startsWith("/>")?" ":"";s+=r===j?a+Dt:d>=0?(i.push(h),a.slice(0,d)+$t+a.slice(d)+R+b):a+R+(d===-2?l:b)}return[kt(n,s+(n[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class J{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const l=t.length-1,a=this.parts,[h,u]=Ut(t,e);if(this.el=J.createElement(h,i),z.currentNode=this.el.content,e===2||e===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(o=z.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(const d of o.getAttributeNames())if(d.endsWith($t)){const m=u[r++],b=o.getAttribute(d).split(R),k=/([.?@])?(.*)/.exec(m);a.push({type:1,index:s,name:k[2],strings:b,ctor:k[1]==="."?Wt:k[1]==="?"?jt:k[1]==="@"?Ft:tt}),o.removeAttribute(d)}else d.startsWith(R)&&(a.push({type:6,index:s}),o.removeAttribute(d));if(At.test(o.tagName)){const d=o.textContent.split(R),m=d.length-1;if(m>0){o.textContent=Q?Q.emptyScript:"";for(let b=0;b<m;b++)o.append(d[b],G()),z.nextNode(),a.push({type:2,index:++s});o.append(d[m],G())}}}else if(o.nodeType===8)if(o.data===_t)a.push({type:2,index:s});else{let d=-1;for(;(d=o.data.indexOf(R,d+1))!==-1;)a.push({type:7,index:s}),d+=R.length-1}s++}}static createElement(t,e){const i=D.createElement("template");return i.innerHTML=t,i}}function W(n,t,e=n,i){var r,l;if(t===M)return t;let o=i!==void 0?(r=e.o)==null?void 0:r[i]:e.l;const s=K(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==s&&((l=o==null?void 0:o._$AO)==null||l.call(o,!1),s===void 0?o=void 0:(o=new s(n),o._$AT(n,e,i)),i!==void 0?(e.o??(e.o=[]))[i]=o:e.l=o),o!==void 0&&(t=W(n,o._$AS(n,t.values),o,i)),t}class Bt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,o=((t==null?void 0:t.creationScope)??D).importNode(e,!0);z.currentNode=o;let s=z.nextNode(),r=0,l=0,a=i[0];for(;a!==void 0;){if(r===a.index){let h;a.type===2?h=new Y(s,s.nextSibling,this,t):a.type===1?h=new a.ctor(s,a.name,a.strings,this,t):a.type===6&&(h=new qt(s,this,t)),this._$AV.push(h),a=i[++l]}r!==(a==null?void 0:a.index)&&(s=z.nextNode(),r++)}return z.currentNode=D,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,e,i,o){this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this.v=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=W(this,t,e),K(t)?t===g||t==null||t===""?(this._$AH!==g&&this._$AR(),this._$AH=g):t!==this._$AH&&t!==M&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Mt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==g&&K(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){var s;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=J.createElement(kt(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===o)this._$AH.p(e);else{const r=new Bt(o,this),l=r.u(this.options);r.p(e),this.T(l),this._$AH=r}}_$AC(t){let e=mt.get(t.strings);return e===void 0&&mt.set(t.strings,e=new J(t)),e}k(t){lt(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new Y(this.O(G()),this.O(G()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this.v=t,(e=this._$AP)==null||e.call(this,t))}}class tt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,s){this.type=1,this._$AH=g,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=g}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(s===void 0)t=W(this,t,e,0),r=!K(t)||t!==this._$AH&&t!==M,r&&(this._$AH=t);else{const l=t;let a,h;for(t=s[0],a=0;a<s.length-1;a++)h=W(this,l[i+a],e,a),h===M&&(h=this._$AH[a]),r||(r=!K(h)||h!==this._$AH[a]),h===g?t=g:t!==g&&(t+=(h??"")+s[a+1]),this._$AH[a]=h}r&&!o&&this.j(t)}j(t){t===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Wt extends tt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===g?void 0:t}}class jt extends tt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==g)}}class Ft extends tt{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){if((t=W(this,t,e,0)??g)===M)return;const i=this._$AH,o=t===g&&i!==g||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,s=t!==g&&(i===g||o);o&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class qt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){W(this,t)}}const ot=q.litHtmlPolyfillSupport;ot==null||ot(J,Y),(q.litHtmlVersions??(q.litHtmlVersions=[])).push("3.2.0");const Vt=(n,t,e)=>{const i=(e==null?void 0:e.renderBefore)??t;let o=i._$litPart$;if(o===void 0){const s=(e==null?void 0:e.renderBefore)??null;i._$litPart$=o=new Y(t.insertBefore(G(),s),s,void 0,e??{})}return o._$AI(n),o};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */class N extends P{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return I}}var mt;N._$litElement$=!0,N.finalized=!0,(mt=globalThis.litElementHydrateSupport)==null||mt.call(globalThis,{LitElement:N});const Y=globalThis.litElementPolyfillSupport;Y==null||Y({LitElement:N});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
19
+ */class V extends B{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=Vt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return M}}var yt;V._$litElement$=!0,V.finalized=!0,(yt=globalThis.litElementHydrateSupport)==null||yt.call(globalThis,{LitElement:V});const st=globalThis.litElementPolyfillSupport;st==null||st({LitElement:V});(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const Ft=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
23
+ */const Gt=n=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(n,t)}):customElements.define(n,t)};/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const Gt={attribute:!0,type:String,converter:W,reflect:!1,hasChanged:Q},Vt=(r=Gt,t,e)=>{const{kind:o,metadata:i}=e;let s=globalThis.litPropertyMetadata.get(i);if(s===void 0&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(e.name,r),o==="accessor"){const{name:n}=e;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,a,r)},init(l){return l!==void 0&&this.P(n,void 0,r),l}}}if(o==="setter"){const{name:n}=e;return function(l){const a=this[n];t.call(this,l),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+o)};function m(r){return(t,e)=>typeof e=="object"?Vt(r,t,e):((o,i,s)=>{const n=i.hasOwnProperty(s);return i.constructor.createProperty(s,n?{...o,wrapped:!0}:o),n?Object.getOwnPropertyDescriptor(i,s):void 0})(r,t,e)}/**
27
+ */const Kt={attribute:!0,type:String,converter:Z,reflect:!1,hasChanged:at},Jt=(n=Kt,t,e)=>{const{kind:i,metadata:o}=e;let s=globalThis.litPropertyMetadata.get(o);if(s===void 0&&globalThis.litPropertyMetadata.set(o,s=new Map),s.set(e.name,n),i==="accessor"){const{name:r}=e;return{set(l){const a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,n)},init(l){return l!==void 0&&this.P(r,void 0,n),l}}}if(i==="setter"){const{name:r}=e;return function(l){const a=this[r];t.call(this,l),this.requestUpdate(r,a,n)}}throw Error("Unsupported decorator location: "+i)};function $(n){return(t,e)=>typeof e=="object"?Jt(n,t,e):((i,o,s)=>{const r=o.hasOwnProperty(s);return o.constructor.createProperty(s,r?{...i,wrapped:!0}:i),r?Object.getOwnPropertyDescriptor(o,s):void 0})(n,t,e)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function Jt(r){return m({...r,state:!0,attribute:!1})}/**
31
+ */function Yt(n){return $({...n,state:!0,attribute:!1})}/**
32
32
  * @license
33
33
  * Copyright 2017 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */const Kt=(r,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,e),e);/**
35
+ */const Xt=(n,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(n,t,e),e);/**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function Yt(r){return(t,e)=>Kt(t,e,{async get(){var o;return await this.updateComplete,((o=this.renderRoot)==null?void 0:o.querySelector(r))??null}})}const Zt=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.m-2{margin:.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mb-1{margin-bottom:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-10\\.5{height:2.625rem}.h-11{height:2.75rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-48{max-height:12rem}.w-11{width:2.75rem}.w-5{width:1.25rem}.w-\\[93\\%\\]{width:93%}.w-full{width:100%}.min-w-11{min-width:2.75rem}.max-w-\\[93\\%\\]{max-width:93%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-top:.25rem;scroll-padding-bottom:.25rem}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-ewc-msBorder{--tw-border-opacity: 1;border-color:rgb(81 85 96 / var(--tw-border-opacity))}.border-ewc-msBorderInvert{--tw-border-opacity: 1;border-color:rgb(168 170 175 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-ewc-availableHover,.bg-ewc-blue{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-white{fill:#fff}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-2\\.75{padding:.6875}.px-2{padding-left:.5rem;padding-right:.5rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.pl-2{padding-left:.5rem}.pr-12{padding-right:3rem}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.text-ewc-available,.text-ewc-msText{--tw-text-opacity: 1;color:rgb(23 26 34 / var(--tw-text-opacity))}.text-ewc-notAvailable{--tw-text-opacity: 1;color:rgb(81 85 96 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ewc-focus:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(14 71 203 / var(--tw-ring-opacity))}.ewc-focus-invert:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.ewc-hover:hover,.ewc-hover-invert:hover{opacity:.8}.hover\\:bg-\\[\\#CFDAF5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.hover\\:bg-ewc-notAvailableHover:hover{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:bg-\\[\\#CFDAF5\\]:focus{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.focus\\:bg-ewc-notAvailableHover:focus{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.focus\\:text-black:focus{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.focus\\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}`;var Z,O;exports.SingleSelect=(O=class extends N{get invertColors(){return this._invertColors}set invertColors(t){typeof t=="string"?this._invertColors=t.toLowerCase()==="true":this._invertColors=t}constructor(){super(),this.options=[],this.selectedOption="",this.isExpanded=!1,this.defaultOption="",this.activeOption="",this.dropdownHeight="",this.selectedLabel="options selected",this.searchMode="",this._searchText="",this.useParentWidth=!1,this._shouldShowSearch=!1,this._dropdownPosition="bottom",this._invertColors=!1,this._originalOptions=[],this._initialOptions=[],this._initialDefaultOption="",this._initialActiveOption="",this._componentWidth=250,this._handleShadowClick=t=>{t.stopPropagation()},this.handleClickOutside=t=>{var e,o;(o=(e=this.shadowRoot)==null?void 0:e.querySelector("#searchInput"))!=null&&o.contains(t.target)||this.shadowRoot&&!this.shadowRoot.contains(t.target)&&this.closeDropdownWithoutFocus()},this.constructor.styles[0].replaceSync(Zt),this.addEventListener("keydown",this.handleKeyDown)}connectedCallback(){super.connectedCallback(),this.setAttribute("ewc-version",Z.version)}updated(t){var e;if(super.updated(t),t.has("searchMode")&&(this._shouldShowSearch=this.determineInitialSearchVisibility()),(t.has("useParentWidth")||t.has("options"))&&this._updateWidth(),t.has("activeOption")&&this.activeOption){const i=this.flattenOptions(this._originalOptions).find(s=>s.code===this.activeOption);i&&i.status==="active"&&this.toggleSelection(i,!1,!1)}if(this.dropdownElement.then(o=>{var i;o&&((i=this.shadowRoot)==null||i.addEventListener("click",this._handleShadowClick),document.addEventListener("click",this.handleClickOutside))}),t.has("isExpanded")&&this.isExpanded){const o=(e=this.shadowRoot)==null?void 0:e.querySelector("#dropdown");o==null||o.addEventListener("keydown",this.handleKeyDown)}}normalizeOptions(t){return!t||t.length===0?[]:Array.isArray(t[0])&&Array.isArray(t[0])?t.map(e=>({label:"",options:e})):t}flattenOptions(t){let e=[];for(const o of t)for(const i of o.options)"code"in i?e.push(i):e=e.concat(this.flattenOptions([i]));return e}firstUpdated(){const t=this.normalizeOptions(this.options.length?this.options:JSON.parse(this.getAttribute("options")||"[]"));this._originalOptions=JSON.parse(JSON.stringify(t)),this._initialOptions=JSON.parse(JSON.stringify(t)),this.options=[...this._originalOptions],this._initialDefaultOption=this.defaultOption,this._initialActiveOption=this.activeOption,this.selectedOption||(this.selectedOption=this.activeOption?this.activeOption:this.defaultOption),this._shouldShowSearch=this.determineInitialSearchVisibility(),this.requestUpdate(),this._updateWidth()}determineInitialSearchVisibility(){return this.searchMode==="force"?!0:this.searchMode==="false"?!1:this.flattenOptions(this._originalOptions).length>=10}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.shadowRoot)==null||t.removeEventListener("click",this._handleShadowClick),document.removeEventListener("click",this.handleClickOutside)}_updateWidth(){var s;const t=this.flattenOptions(this._originalOptions);if(t.length===0){this.style.width="250px",this.style.maxWidth="100%";return}const e=t.reduce((n,l)=>l.name.length>n.length?l.name:n,""),i=document.createElement("canvas").getContext("2d");if(i){this.style.display="block";const n=(s=this.shadowRoot)==null?void 0:s.querySelector("#selectedText");if(n){const l=window.getComputedStyle(n);i.font=`${l.fontSize} ${l.fontFamily}`;const p=i.measureText(e).width+72;this._componentWidth=Math.max(p,150),this.useParentWidth?(this.style.width="100%",this.style.minWidth="0"):(this.style.width=`${this._componentWidth}px`,this.style.minWidth="0",this.style.maxWidth="100%")}else this.style.width="150px",this.style.maxWidth="100%"}else this.style.width="150px",this.style.maxWidth="100%"}resetSearch(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#searchInput");t&&(t.value="",t.dispatchEvent(new Event("input"))),this.options=[...this._originalOptions],this.requestUpdate()}}focusSearchInput(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#searchInput");t&&t.focus()}}focusMultiSelect(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#select");t&&t.focus()}}closeDropdown(){this.isExpanded=!1,this.resetSearch(),this.focusMultiSelect()}closeDropdownWithoutFocus(){this.isExpanded=!1,this.resetSearch()}toggleDropdown(){this.isExpanded=!this.isExpanded,this.isExpanded?(this._dropdownPosition="bottom",setTimeout(()=>{this.focusSearchInput()},0)):(this.resetSearch(),this.focusMultiSelect())}filterGroups(t,e){const o=[];for(const i of t){const s=[];for(const n of i.options)if("code"in n)n.name.toLowerCase().includes(e)&&s.push(n);else{const l=this.filterGroups([n],e);l.length>0&&s.push(l[0])}s.length>0&&o.push({...i,options:s})}return o}search(t){const e=t.target.value.toLowerCase();e?this.options=this.filterGroups(this._originalOptions,e):this.options=[...this._originalOptions],this.requestUpdate()}getSelectedOptionNames(){if(this.selectedOption){const t=this.flattenOptions(this._originalOptions).find(e=>e.code===this.selectedOption);return t?t.name:""}else return this.selectedLabel}getFirstFocusableOptionElement(){return this.shadowRoot&&Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(e=>{const o=e.closest('div[role="option"]'),i=o==null?void 0:o.getAttribute("data-option-code");if(i){const s=this.flattenOptions(this.options).find(n=>n.code===i);return(s==null?void 0:s.status)==="active"}return!1})[0]||null}handleKeyDown(t){var i,s,n,l,a,p,u,h,v,y,E,et,ot,it,st,rt,nt,at;if(!this.shadowRoot)return;const e=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(d=>{const c=d.closest('div[role="option"]'),x=c==null?void 0:c.getAttribute("data-option-code");if(x){const w=this.flattenOptions(this.options).find(g=>g.code===x);return(w==null?void 0:w.status)==="active"}return!1});let o=e.findIndex(d=>{var c;return d===((c=this.shadowRoot)==null?void 0:c.activeElement)});switch(t.key){case"ArrowDown":if(t.preventDefault(),this.isExpanded){const d=(s=this.shadowRoot)==null?void 0:s.activeElement;if((d==null?void 0:d.id)==="searchInput")o=0,(n=e[o])==null||n.focus();else if(o===e.length-1){const c=(l=this.shadowRoot)==null?void 0:l.querySelector("#searchInput");c?c.focus():(o=0,(a=e[o])==null||a.focus())}else o===-1?(o=0,(p=e[o])==null||p.focus()):(o++,(u=e[o])==null||u.focus())}else{this.isExpanded=!0,this.options=[...this._originalOptions];const d=(i=this.shadowRoot)==null?void 0:i.querySelector("#searchInput");d&&(d.value="",d.dispatchEvent(new Event("input"))),this.requestUpdate(),setTimeout(()=>{this.focusSearchInput()},0)}break;case"ArrowUp":if(t.preventDefault(),this.isExpanded){const d=(h=this.shadowRoot)==null?void 0:h.querySelector("#searchInput"),c=(v=this.shadowRoot)==null?void 0:v.activeElement;(c==null?void 0:c.id)==="searchInput"?(o=e.length-1,(y=e[o])==null||y.focus()):o===0?d?d.focus():(o=e.length-1,(E=e[o])==null||E.focus()):o===-1?(o=e.length-1,(et=e[o])==null||et.focus()):(o--,(ot=e[o])==null||ot.focus())}break;case"Enter":case" ":if(t.preventDefault(),this.isExpanded){let c=((st=this.shadowRoot)==null?void 0:st.activeElement).closest('div[role="option"]');if(c!=null&&c.hasAttribute("data-option-code")){const x=c.getAttribute("data-option-code");if(x){const w=this.flattenOptions(this.options).find(g=>g.code===x);(w==null?void 0:w.status)==="active"&&this.toggleSelection(w)}}}else{this.isExpanded=!0,this.options=[...this._originalOptions];const d=(it=this.shadowRoot)==null?void 0:it.querySelector("#searchInput");d&&(d.value="",d.dispatchEvent(new Event("input"))),this.requestUpdate(),setTimeout(()=>{this.focusSearchInput()},0)}break;case"Escape":this.isExpanded&&(t.preventDefault(),this.closeDropdown());break;case"Tab":if(this.isExpanded){const d=(rt=this.shadowRoot)==null?void 0:rt.activeElement;if((d==null?void 0:d.id)==="searchInput")if(t.preventDefault(),t.shiftKey){const c=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(x=>{const w=x.closest('div[role="option"]'),g=w==null?void 0:w.getAttribute("data-option-code");if(g){const $=this.flattenOptions(this.options).find(S=>S.code===g);return($==null?void 0:$.status)==="active"}return!1});if(c.length>0){c[c.length-1].focus();return}}else{const c=this.getFirstFocusableOptionElement();c&&c.focus()}else{const c=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(g=>{const $=g.getAttribute("data-option-code"),S=this.flattenOptions(this.options).find(St=>St.code===$);return(S==null?void 0:S.status)==="active"}),x=d==null?void 0:d.closest('div[role="option"]'),w=x?c.indexOf(x):-1;if(t.shiftKey)if(w>0){t.preventDefault();const g=c[w-1];g&&g.focus()}else w===0&&(t.preventDefault(),this.focusSearchInput());else if(w<c.length-1){t.preventDefault();const g=c[w+1];if(g)g.focus();else{const $=(nt=this.shadowRoot)==null?void 0:nt.querySelector("#searchInput");if($)$.focus();else{const S=this.getFirstFocusableOptionElement();S&&S.focus()}}}else if(w===c.length-1){t.preventDefault();const g=(at=this.shadowRoot)==null?void 0:at.querySelector("#searchInput");if(g)g.focus();else{const $=this.getFirstFocusableOptionElement();$&&$.focus()}}}}break}}renderItem(t,e=0){const o=e*1.5;if("code"in t){const i=t;return _`
39
+ */function Zt(n){return(t,e)=>Xt(t,e,{async get(){var i;return await this.updateComplete,((i=this.renderRoot)==null?void 0:i.querySelector(n))??null}})}/**
40
+ * @license
41
+ * Copyright 2018 Google LLC
42
+ * SPDX-License-Identifier: BSD-3-Clause
43
+ */const vt=n=>n??g;/**
44
+ * @license
45
+ * Copyright 2017 Google LLC
46
+ * SPDX-License-Identifier: BSD-3-Clause
47
+ */const Qt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},te=n=>(...t)=>({_$litDirective$:n,values:t});class ee{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this.t=t,this._$AM=e,this.i=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
48
+ * @license
49
+ * Copyright 2017 Google LLC
50
+ * SPDX-License-Identifier: BSD-3-Clause
51
+ */class rt extends ee{constructor(t){if(super(t),this.it=g,t.type!==Qt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===g||t==null)return this._t=void 0,this.it=t;if(t===M)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}rt.directiveName="unsafeHTML",rt.resultType=1;const ie=te(rt),oe=`*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Arial,sans-serif;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}[type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-width:1px;border-radius:0;padding:.5rem .75rem;font-size:1rem;line-height:1.5rem;--tw-shadow: 0 0 #0000}[type=text]:focus,input:where(:not([type])):focus,[type=email]:focus,[type=url]:focus,[type=password]:focus,[type=number]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=month]:focus,[type=search]:focus,[type=tel]:focus,[type=time]:focus,[type=week]:focus,[multiple]:focus,textarea:focus,select:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-color:#2563eb}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-top:0;padding-bottom:0}select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:initial;background-position:initial;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;user-select:none;flex-shrink:0;height:1rem;width:1rem;color:#2563eb;background-color:#fff;border-color:#6b7280;border-width:1px;--tw-shadow: 0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset: var(--tw-empty, );--tw-ring-offset-width: 2px;--tw-ring-offset-color: #fff;--tw-ring-color: #2563eb;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}[type=checkbox]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e")}@media (forced-colors: active){[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:hover,[type=checkbox]:checked:focus,[type=radio]:checked:hover,[type=radio]:checked:focus{border-color:transparent;background-color:currentColor}[type=checkbox]:indeterminate{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:center;background-repeat:no-repeat}@media (forced-colors: active){[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:hover,[type=checkbox]:indeterminate:focus{border-color:transparent;background-color:currentColor}[type=file]{background:unset;border-color:inherit;border-width:0;border-radius:0;padding:0;font-size:unset;line-height:inherit}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-0{top:0}.z-20{z-index:20}.m-2{margin:.5rem}.mb-1{margin-bottom:.25rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.box-border{box-sizing:border-box}.block{display:block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.size-5{width:1.25rem;height:1.25rem}.h-10\\.5{height:2.625rem}.h-11{height:2.75rem}.h-5{height:1.25rem}.h-full{height:100%}.max-h-48{max-height:12rem}.min-h-10{min-height:2.5rem}.w-11{width:2.75rem}.w-5{width:1.25rem}.w-\\[93\\%\\]{width:93%}.w-full{width:100%}.min-w-11{min-width:2.75rem}.max-w-\\[93\\%\\]{max-width:93%}.shrink-0{flex-shrink:0}.rotate-180{--tw-rotate: 180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.cursor-auto{cursor:auto}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.scroll-py-1{scroll-padding-top:.25rem;scroll-padding-bottom:.25rem}.appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-items-center{justify-items:center}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-br-sm{border-bottom-right-radius:.125rem}.rounded-tr-sm{border-top-right-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-none{border-style:none}.border-ewc-msBorder{--tw-border-opacity: 1;border-color:rgb(81 85 96 / var(--tw-border-opacity))}.border-ewc-msBorderInvert{--tw-border-opacity: 1;border-color:rgb(168 170 175 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.bg-ewc-availableHover,.bg-ewc-blue{--tw-bg-opacity: 1;background-color:rgb(14 71 203 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.fill-current{fill:currentColor}.fill-white{fill:#fff}.p-1{padding:.25rem}.p-2\\.75{padding:.6875}.px-2{padding-left:.5rem;padding-right:.5rem}.py-0{padding-top:0;padding-bottom:0}.pl-2{padding-left:.5rem}.pr-12{padding-right:3rem}.pt-2{padding-top:.5rem}.text-left{text-align:left}.align-middle{vertical-align:middle}.text-\\[16px\\]{font-size:16px}.font-bold{font-weight:700}.font-normal{font-weight:400}.italic{font-style:italic}.text-ewc-available,.text-ewc-msText{--tw-text-opacity: 1;color:rgb(23 26 34 / var(--tw-text-opacity))}.text-ewc-notAvailable{--tw-text-opacity: 1;color:rgb(81 85 96 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.ewc-focus:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(14 71 203 / var(--tw-ring-opacity))}.ewc-focus-invert:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000);--tw-ring-inset: inset;--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.ewc-hover:hover,.ewc-hover-invert:hover{opacity:.8}.hover\\:bg-\\[\\#CFDAF5\\]:hover{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.hover\\:bg-ewc-notAvailableHover:hover{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.hover\\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:bg-\\[\\#CFDAF5\\]:focus{--tw-bg-opacity: 1;background-color:rgb(207 218 245 / var(--tw-bg-opacity))}.focus\\:bg-ewc-notAvailableHover:focus{--tw-bg-opacity: 1;background-color:rgb(125 128 136 / var(--tw-bg-opacity))}.focus\\:text-black:focus{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.focus\\:text-white:focus{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}`;var f,y;exports.SingleSelect=(y=class extends V{get invertColors(){return this._invertColors}set invertColors(t){typeof t=="string"?this._invertColors=t.toLowerCase()==="true":this._invertColors=t}constructor(){super(),this.options=[],this.selectedOption="",this.isExpanded=!1,this.defaultOption="",this.activeOption="",this.dropdownHeight="",this.selectedLabel="options selected",this.searchMode="",this._searchText="",this.useParentWidth=!1,this._shouldShowSearch=!1,this._dropdownPosition="bottom",this._invertColors=!1,this._originalOptions=[],this._initialOptions=[],this._initialDefaultOption="",this._initialActiveOption="",this._componentWidth=250,this._instanceId=`ewc-singleselect-${f.nextInstanceId++}`,this._fallbackLabelId=`${this._instanceId}-label`,this._selectedTextId=`${this._instanceId}-selected-text`,this._optionListId=`${this._instanceId}-option-list`,this._handleShadowClick=t=>{t.stopPropagation()},this.handleClickOutside=t=>{var e,i;(i=(e=this.shadowRoot)==null?void 0:e.querySelector("#searchInput"))!=null&&i.contains(t.target)||this.shadowRoot&&!this.shadowRoot.contains(t.target)&&this.closeDropdownWithoutFocus()},this.constructor.styles[0].replaceSync(oe),this.addEventListener("keydown",this.handleKeyDown)}connectedCallback(){super.connectedCallback(),this.setAttribute("ewc-version",f.version)}updated(t){var e;if(super.updated(t),t.has("searchMode")&&(this._shouldShowSearch=this.determineInitialSearchVisibility()),(t.has("useParentWidth")||t.has("options"))&&this._updateWidth(),t.has("activeOption")&&this.activeOption){const o=this.flattenOptions(this._originalOptions).find(s=>s.code===this.activeOption);o&&o.status==="active"&&this.toggleSelection(o,!1,!1)}if(this.dropdownElement.then(i=>{var o;i&&((o=this.shadowRoot)==null||o.addEventListener("click",this._handleShadowClick),document.addEventListener("click",this.handleClickOutside))}),t.has("isExpanded")&&this.isExpanded){const i=(e=this.shadowRoot)==null?void 0:e.querySelector("#dropdown");i==null||i.addEventListener("keydown",this.handleKeyDown)}}normalizeOptions(t){return!t||t.length===0?[]:Array.isArray(t[0])&&Array.isArray(t[0])?t.map(e=>({label:"",options:e})):t}flattenOptions(t){let e=[];for(const i of t){i.code&&e.push(i);for(const o of i.options)"options"in o?e=e.concat(this.flattenOptions([o])):e.push(o)}return e}firstUpdated(){const t=this.normalizeOptions(this.options.length?this.options:JSON.parse(this.getAttribute("options")||"[]"));this._originalOptions=JSON.parse(JSON.stringify(t)),this._initialOptions=JSON.parse(JSON.stringify(t)),this.options=[...this._originalOptions],this._initialDefaultOption=this.defaultOption,this._initialActiveOption=this.activeOption,this.selectedOption||(this.selectedOption=this.activeOption?this.activeOption:this.defaultOption),this._shouldShowSearch=this.determineInitialSearchVisibility(),this.requestUpdate(),this._updateWidth()}determineInitialSearchVisibility(){return this.searchMode==="force"?!0:this.searchMode==="false"?!1:this.flattenOptions(this._originalOptions).length>=10}disconnectedCallback(){var t;super.disconnectedCallback(),f.openInstance===this&&(f.openInstance=null),(t=this.shadowRoot)==null||t.removeEventListener("click",this._handleShadowClick),document.removeEventListener("click",this.handleClickOutside)}parsePixelValue(t,e){const i=Number.parseFloat(t);return Number.isFinite(i)?i:e}escapeHtml(t){return t.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}sanitizeAllowedOptionNode(t){if(t.nodeType===Node.TEXT_NODE)return this.escapeHtml(t.textContent||"");if(t.nodeType!==Node.ELEMENT_NODE)return"";const e=t,i=e.tagName.toLowerCase();if(i==="script"||i==="style"||i==="template")return"";const o=Array.from(e.childNodes).map(s=>this.sanitizeAllowedOptionNode(s)).join("");return f.ALLOWED_OPTION_NAME_TAGS.has(i)?`<${i}>${o}</${i}>`:o}getSanitizedOptionNameHtml(t){const e=document.createElement("template");return e.innerHTML=t,Array.from(e.content.childNodes).map(i=>this.sanitizeAllowedOptionNode(i)).join("")}getOptionNamePlainText(t){var i;const e=document.createElement("template");return e.innerHTML=this.getSanitizedOptionNameHtml(t),((i=e.content.textContent)==null?void 0:i.replace(/\s+/g," ").trim())||""}getOptionDisplayText(t){return"name"in t?this.getOptionNamePlainText(t.name):t.label}renderOptionName(t){const e=this.getSanitizedOptionNameHtml(t);return e?ie(e):this.getOptionNamePlainText(t)}getSelectedOptionItem(){if(this.selectedOption)return this.flattenOptions(this._originalOptions).find(t=>t.code===this.selectedOption)}applyComponentWidth(t){this._componentWidth=Math.max(Math.ceil(t),f.MIN_COMPONENT_WIDTH),this.useParentWidth?(this.style.width="100%",this.style.minWidth=`${this._componentWidth}px`):(this.style.width=`${this._componentWidth}px`,this.style.minWidth="0"),this.style.maxWidth="100%"}_updateWidth(){var T,C,_,O;const t=this.flattenOptions(this._originalOptions);if(t.length===0){this.applyComponentWidth(f.EMPTY_COMPONENT_WIDTH);return}const i=document.createElement("canvas").getContext("2d"),o=(T=this.shadowRoot)==null?void 0:T.querySelector(`#${this._selectedTextId}`),s=(C=this.shadowRoot)==null?void 0:C.querySelector("#select"),r=(O=(_=this.shadowRoot)==null?void 0:_.querySelector("#dropdownButton"))==null?void 0:O.parentElement;if(!i||!o||!s){this.applyComponentWidth(f.MIN_COMPONENT_WIDTH);return}this.style.display="block";const l=window.getComputedStyle(o),a=window.getComputedStyle(s),h=r?window.getComputedStyle(r):null;i.font=[l.fontStyle,l.fontWeight,l.fontSize,l.fontFamily].filter(Boolean).join(" ");const u=[...t.map(E=>this.getOptionDisplayText(E)),this.selectedLabel].reduce((E,U)=>Math.max(E,i.measureText(U).width),0),d=this.parsePixelValue(l.paddingLeft,f.FALLBACK_TEXT_LEFT_PADDING),m=this.parsePixelValue(l.paddingRight,f.FALLBACK_TEXT_RIGHT_PADDING),b=this.parsePixelValue(a.borderLeftWidth,f.FALLBACK_BORDER_WIDTH)+this.parsePixelValue(a.borderRightWidth,f.FALLBACK_BORDER_WIDTH),k=r?r.getBoundingClientRect().width||this.parsePixelValue((h==null?void 0:h.width)||"",f.FALLBACK_BUTTON_WIDTH):f.FALLBACK_BUTTON_WIDTH,H=Math.max(m,k);this.applyComponentWidth(u+d+H+b)}resetSearch(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#searchInput");t&&(t.value="",t.dispatchEvent(new Event("input"))),this.options=[...this._originalOptions],this.requestUpdate()}}focusSearchInput(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#searchInput");t&&t.focus()}}focusMultiSelect(){if(this.shadowRoot){const t=this.shadowRoot.querySelector("#select");t&&t.focus()}}closeDropdown(){this.isExpanded=!1,f.openInstance===this&&(f.openInstance=null),this.resetSearch(),this.focusMultiSelect()}closeDropdownWithoutFocus(){this.isExpanded=!1,f.openInstance===this&&(f.openInstance=null),this.resetSearch()}toggleDropdown(){this.isExpanded=!this.isExpanded,this.isExpanded?(f.openInstance&&f.openInstance!==this&&f.openInstance.closeDropdownWithoutFocus(),f.openInstance=this,this._dropdownPosition="bottom",setTimeout(()=>{this.focusSearchInput()},0)):(f.openInstance===this&&(f.openInstance=null),this.resetSearch(),this.focusMultiSelect())}filterGroups(t,e){const i=[];for(const o of t){const s=[],r=o.label.toLowerCase().includes(e);for(const l of o.options)if("options"in l){const a=this.filterGroups([l],e);a.length>0&&s.push(a[0])}else(this.getOptionNamePlainText(l.name).toLowerCase().includes(e)||r)&&s.push(l);(s.length>0||r)&&i.push({...o,options:s})}return i}search(t){const e=t.target.value.toLowerCase();e?this.options=this.filterGroups(this._originalOptions,e):this.options=[...this._originalOptions],this.requestUpdate()}getSelectedOptionText(){const t=this.getSelectedOptionItem();return t?this.getOptionDisplayText(t):this.selectedLabel}renderSelectedOptionContent(){const t=this.getSelectedOptionItem();return t&&"name"in t?this.renderOptionName(t.name):this.selectedLabel}ensureId(t,e){return t.id||(t.id=`${this._instanceId}-${e}`),t.id}getAssociatedLabelIds(){const t=this.getAttribute("aria-labelledby");if(t!=null&&t.trim())return t.split(/\s+/).filter(Boolean);if(this.id){const i=Array.from(document.querySelectorAll("label[for]")).find(o=>o.getAttribute("for")===this.id);if(i)return[this.ensureId(i,"external-label")]}const e=this.closest("label");return e instanceof HTMLElement?[this.ensureId(e,"wrapping-label")]:[]}getButtonLabelledBy(){const t=this.getAssociatedLabelIds();return t.length>0?[...new Set(t)].join(" "):this._fallbackLabelId}getFallbackLabelText(){const t=this.getAttribute("aria-label");return t!=null&&t.trim()?t.trim():"Select option"}getFirstFocusableOptionElement(){return this.shadowRoot&&Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(e=>{const i=e.closest('div[role="option"]'),o=i==null?void 0:i.getAttribute("data-option-code");if(o){const s=this.flattenOptions(this.options).find(r=>r.code===o);return(s==null?void 0:s.status)==="active"}return!1})[0]||null}handleKeyDown(t){var o,s,r,l,a,h,u,d,m,b,k,H,T,C,_,O,E,U;if(!this.shadowRoot)return;const e=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(p=>{const c=p.closest('div[role="option"]'),A=c==null?void 0:c.getAttribute("data-option-code");if(A){const w=this.flattenOptions(this.options).find(v=>v.code===A);return(w==null?void 0:w.status)==="active"}return!1});let i=e.findIndex(p=>{var c;return p===((c=this.shadowRoot)==null?void 0:c.activeElement)});switch(t.key){case"ArrowDown":if(t.preventDefault(),this.isExpanded){const p=(s=this.shadowRoot)==null?void 0:s.activeElement;if((p==null?void 0:p.id)==="searchInput")i=0,(r=e[i])==null||r.focus();else if(i===e.length-1){const c=(l=this.shadowRoot)==null?void 0:l.querySelector("#searchInput");c?c.focus():(i=0,(a=e[i])==null||a.focus())}else i===-1?(i=0,(h=e[i])==null||h.focus()):(i++,(u=e[i])==null||u.focus())}else{this.isExpanded=!0,this.options=[...this._originalOptions];const p=(o=this.shadowRoot)==null?void 0:o.querySelector("#searchInput");p&&(p.value="",p.dispatchEvent(new Event("input"))),this.requestUpdate(),setTimeout(()=>{this.focusSearchInput()},0)}break;case"ArrowUp":if(t.preventDefault(),this.isExpanded){const p=(d=this.shadowRoot)==null?void 0:d.querySelector("#searchInput"),c=(m=this.shadowRoot)==null?void 0:m.activeElement;(c==null?void 0:c.id)==="searchInput"?(i=e.length-1,(b=e[i])==null||b.focus()):i===0?p?p.focus():(i=e.length-1,(k=e[i])==null||k.focus()):i===-1?(i=e.length-1,(H=e[i])==null||H.focus()):(i--,(T=e[i])==null||T.focus())}break;case"Enter":case" ":if(t.preventDefault(),this.isExpanded){let c=((_=this.shadowRoot)==null?void 0:_.activeElement).closest('div[role="option"]');if(c!=null&&c.hasAttribute("data-option-code")){const A=c.getAttribute("data-option-code");if(A){const w=this.flattenOptions(this.options).find(v=>v.code===A);(w==null?void 0:w.status)==="active"&&this.toggleSelection(w)}}}else{this.isExpanded=!0,this.options=[...this._originalOptions];const p=(C=this.shadowRoot)==null?void 0:C.querySelector("#searchInput");p&&(p.value="",p.dispatchEvent(new Event("input"))),this.requestUpdate(),setTimeout(()=>{this.focusSearchInput()},0)}break;case"Escape":this.isExpanded&&(t.preventDefault(),this.closeDropdown());break;case"Tab":if(this.isExpanded){const p=(O=this.shadowRoot)==null?void 0:O.activeElement;if((p==null?void 0:p.id)==="searchInput")if(t.preventDefault(),t.shiftKey){const c=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(A=>{const w=A.closest('div[role="option"]'),v=w==null?void 0:w.getAttribute("data-option-code");if(v){const S=this.flattenOptions(this.options).find(L=>L.code===v);return(S==null?void 0:S.status)==="active"}return!1});if(c.length>0){c[c.length-1].focus();return}}else{const c=this.getFirstFocusableOptionElement();c&&c.focus()}else{const c=Array.from(this.shadowRoot.querySelectorAll('div[role="option"]')).filter(v=>{const S=v.getAttribute("data-option-code"),L=this.flattenOptions(this.options).find(St=>St.code===S);return(L==null?void 0:L.status)==="active"}),A=p==null?void 0:p.closest('div[role="option"]'),w=A?c.indexOf(A):-1;if(t.shiftKey)if(w>0){t.preventDefault();const v=c[w-1];v&&v.focus()}else w===0&&(t.preventDefault(),this.focusSearchInput());else if(w<c.length-1){t.preventDefault();const v=c[w+1];if(v)v.focus();else{const S=(E=this.shadowRoot)==null?void 0:E.querySelector("#searchInput");if(S)S.focus();else{const L=this.getFirstFocusableOptionElement();L&&L.focus()}}}else if(w===c.length-1){t.preventDefault();const v=(U=this.shadowRoot)==null?void 0:U.querySelector("#searchInput");if(v)v.focus();else{const S=this.getFirstFocusableOptionElement();S&&S.focus()}}}}break}}rendersVisibleRow(t){return"options"in t?!!(t.label||t.code)||t.options.some(e=>this.rendersVisibleRow(e)):!0}hasVisibleInteractiveContent(t){return"options"in t?!!t.code||t.options.some(e=>this.hasVisibleInteractiveContent(e)):!0}renderItem(t,e=0,i=!1,o="0"){const s="options"in t,r="code"in t&&t.code!==void 0,l=(e+1)*16,a=s?t.label:this.getOptionNamePlainText(t.name),h=r?t.code:null,u=r?t.status:"active",d=s&&!!t.label,m=r&&h===this.selectedOption;let b="text-[16px] ";d?(b+="font-bold ",r||(b+="italic ")):b+="font-normal ";const k=i?"border-t border-gray-300 mt-2 pt-2":"",H=r?u==="active"?"0":"-1":void 0,T=`${this._instanceId}-group-label-${o.replace(/[^a-zA-Z0-9_-]/g,"-")}`,C=I`
52
+ <div
53
+ role="option"
54
+ aria-selected="${vt(m?"true":"false")}"
55
+ class="min-h-10 px-2 py-0 scroll-py-1 scroll-smooth flex items-center justify-between ewc-focus
56
+ ${r?u==="inactive"?"cursor-not-allowed text-ewc-notAvailable hover:bg-ewc-notAvailableHover hover:text-white focus:bg-ewc-notAvailableHover focus:text-white focus:outline-none":`cursor-pointer text-ewc-available focus:outline-none hover:bg-[#CFDAF5] hover:text-black focus:bg-[#CFDAF5] focus:text-black ${m?"bg-ewc-availableHover text-white":""}`:"cursor-default text-ewc-available"} ${b} ${k}"
57
+ data-group-label="${d?"true":"false"}"
58
+ data-option-code="${h||""}"
59
+ style="padding-left: ${l}px;"
60
+ tabindex="${vt(H)}"
61
+ @click="${_=>{r&&u==="active"&&(_.preventDefault(),_.stopPropagation(),this.toggleSelection(t))}}"
62
+ >
63
+ <label
64
+ class="min-h-10 h-full flex items-center w-full group justify-between whitespace-normal ${r&&u==="active"?"cursor-pointer":"cursor-default"}"
65
+ data-option-code="${h||""}"
66
+ tabindex="-1"
67
+ >
68
+ <span class="ml-2 break-words"> ${s?a:this.renderOptionName(t.name)} </span>
69
+ ${m?I`<svg
70
+ xmlns="http://www.w3.org/2000/svg"
71
+ class="h-5 w-5 shrink-0 fill-current mr-2"
72
+ viewBox="0 0 20 20"
73
+ fill="currentColor"
74
+ >
75
+ <path
76
+ fill-rule="evenodd"
77
+ d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
78
+ clip-rule="evenodd"
79
+ />
80
+ </svg>`:""}
81
+ </label>
82
+ </div>`;if(s){const _=t,O=_.label||r;let E=i&&!O;const U=e+(O?1:0),p=_.options.map((c,A)=>{const w=E&&this.rendersVisibleRow(c);return w&&(E=!1),this.renderItem(c,U,w,`${o}-${A}`)});return!r&&_.label?I`
83
+ <div role="group" aria-labelledby="${T}">
84
+ <div
85
+ id="${T}"
86
+ class="min-h-10 px-2 py-0 scroll-py-1 scroll-smooth flex items-center justify-between cursor-default text-ewc-available ${b} ${k}"
87
+ data-group-label="true"
88
+ style="padding-left: ${l}px;"
89
+ >
40
90
  <div
41
- role="option"
42
- aria-selected="${i.code===this.selectedOption}"
43
- class="p-2 scroll-py-1 scroll-smooth flex items-center justify-between ewc-focus
44
- ${i.status==="inactive"?"cursor-not-allowed text-ewc-notAvailable hover:bg-ewc-notAvailableHover hover:text-white focus:bg-ewc-notAvailableHover focus:text-white focus:outline-none":`cursor-pointer text-ewc-available focus:outline-none hover:bg-[#CFDAF5] hover:text-black focus:bg-[#CFDAF5] focus:text-black ${i.code===this.selectedOption?"bg-ewc-availableHover text-white":""}`}"
45
- data-option-code="${i.code}"
46
- style="padding-left: ${.5+o}rem;"
47
- tabindex="0"
48
- @click="${s=>{i.status==="active"&&(s.preventDefault(),s.stopPropagation(),this.toggleSelection(i))}}"
91
+ class="min-h-10 h-full flex items-center w-full group justify-between whitespace-normal cursor-default"
49
92
  >
50
- <label
51
- for="option-${i.code}"
52
- class="flex items-center w-full group justify-between whitespace-normal ${i.status==="active"?"cursor-pointer":"cursor-not-allowed text-ewc-disabled"}"
53
- data-option-code="${i.code}"
54
- tabindex="-1"
55
- @click="${s=>{i.status==="active"&&(s.preventDefault(),s.stopPropagation(),this.toggleSelection(i))}}"
56
- >
57
- <span class="ml-2 break-words"> ${i.name} </span>
58
- ${i.code===this.selectedOption?_`<svg
59
- xmlns="http://www.w3.org/2000/svg"
60
- class="h-5 w-5 shrink-0 fill-current mr-2"
61
- viewBox="0 0 20 20"
62
- fill="currentColor"
63
- >
64
- <path
65
- fill-rule="evenodd"
66
- d="M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z"
67
- clip-rule="evenodd"
68
- />
69
- </svg>`:""}
70
- </label>
71
- </div>`}else{const i=t,s=this.renderLabel?this.renderLabel(i):i.label;return _`
72
- ${i.label?_`
73
- <div class="px-2 py-1 font-semibold text-gray-500 text-sm" style="padding-left: ${.5+o}rem;">
74
- ${s}
75
- </div>
76
- `:""}
77
- ${i.options.map(n=>this.renderItem(n,e+(i.label?1:0)))}
78
- `}}renderOptionList(){return _`
79
- ${this.options.map((t,e)=>_`
80
- ${this.renderItem(t)}
81
- ${e<this.options.length-1?_`<hr class="border-t border-gray-300 my-2" />`:""}
82
- `)}
83
- `}updateOptionStatusInGroups(t,e){return t.map(o=>{const i=o.options.map(s=>"code"in s?s.code===e?{...s,status:s.status==="active"?"inactive":"active"}:s:this.updateOptionStatusInGroups([s],e)[0]);return{...o,options:i}})}toggleOptionStatus(t){this.options=this.updateOptionStatusInGroups(this.options,t),this._originalOptions=this.updateOptionStatusInGroups(this._originalOptions,t);const o=this.flattenOptions(this.options).find(i=>i.code===t);(o==null?void 0:o.status)==="inactive"&&this.selectedOption===t&&(this.selectedOption=""),this.requestUpdate(),this.dispatchEvent(new CustomEvent("option-status-change",{detail:{optionCode:t,status:o==null?void 0:o.status}}))}toggleSelection(t,e=!0,o=!0){var s;if(t.status!=="active")return;this.selectedOption!==t.code&&(this.selectedOption=t.code,e&&this.dispatchEvent(new CustomEvent("option-selected",{detail:{option:t}})));const i=(s=this.shadowRoot)==null?void 0:s.querySelector("#searchInput");if(i){const n=new Event("input",{bubbles:!0,cancelable:!0,composed:!0});i.dispatchEvent(n)}this.requestUpdate(),o?this.closeDropdown():this.closeDropdownWithoutFocus()}shouldShowSearch(){return this._shouldShowSearch}resetSelect(){this.options=JSON.parse(JSON.stringify(this._initialOptions)),this.selectedOption=this._initialDefaultOption,this.activeOption=this._initialActiveOption,this.dispatchEvent(new CustomEvent("reset-select",{detail:{defaultOption:this._initialDefaultOption,activeOption:this._initialActiveOption}})),this.requestUpdate()}render(){return _`
93
+ <span class="ml-2 break-words">${this.renderLabel?this.renderLabel(_):a}</span>
94
+ </div>
95
+ </div>
96
+ ${p}
97
+ </div>
98
+ `:I`
99
+ ${O?C:""}
100
+ ${p}
101
+ `}else return C}renderOptionList(){let t=!1,e=!1;return I`
102
+ ${this.options.map((i,o)=>{const s=this.rendersVisibleRow(i),r=this.hasVisibleInteractiveContent(i),l=t&&e&&r,a=this.renderItem(i,0,l,`${o}`);return t=s,e=r,a})}
103
+ `}updateOptionStatusInGroups(t,e){return t.map(i=>{let o={...i};return i.code===e&&(o.status=i.status==="active"?"inactive":"active"),o.options=i.options.map(s=>"options"in s?this.updateOptionStatusInGroups([s],e)[0]:s.code===e?{...s,status:s.status==="active"?"inactive":"active"}:s),o})}toggleOptionStatus(t){this.options=this.updateOptionStatusInGroups(this.options,t),this._originalOptions=this.updateOptionStatusInGroups(this._originalOptions,t);const i=this.flattenOptions(this.options).find(o=>o.code===t);(i==null?void 0:i.status)==="inactive"&&this.selectedOption===t&&(this.selectedOption=""),this.requestUpdate(),this.dispatchEvent(new CustomEvent("option-status-change",{detail:{optionCode:t,status:i==null?void 0:i.status}}))}toggleSelection(t,e=!0,i=!0){var s;if(t.status!=="active")return;this.selectedOption!==t.code&&(this.selectedOption=t.code,e&&this.dispatchEvent(new CustomEvent("option-selected",{detail:{option:t}})));const o=(s=this.shadowRoot)==null?void 0:s.querySelector("#searchInput");if(o){const r=new Event("input",{bubbles:!0,cancelable:!0,composed:!0});o.dispatchEvent(r)}this.requestUpdate(),i?this.closeDropdown():this.closeDropdownWithoutFocus()}shouldShowSearch(){return this._shouldShowSearch}resetSelect(){this.options=JSON.parse(JSON.stringify(this._initialOptions)),this.selectedOption=this._initialDefaultOption,this.activeOption=this._initialActiveOption,this.dispatchEvent(new CustomEvent("reset-select",{detail:{defaultOption:this._initialDefaultOption,activeOption:this._initialActiveOption}})),this.requestUpdate()}render(){return I`
84
104
  <div class="relative bg-white rounded">
105
+ ${this.getAssociatedLabelIds().length===0?I`<span id="${this._fallbackLabelId}" class="sr-only">${this.getFallbackLabelText()}</span>`:""}
85
106
  <button
86
107
  id="select"
87
108
  class="w-full h-11 border cursor-pointer align-middle flex relative rounded ewc-hover
@@ -91,11 +112,11 @@
91
112
  aria-expanded="${this.isExpanded}"
92
113
  role="combobox"
93
114
  aria-haspopup="listbox"
94
- aria-controls="optionList"
95
- aria-label="${this.getSelectedOptionNames()}"
115
+ aria-controls="${this._optionListId}"
116
+ aria-labelledby="${this.getButtonLabelledBy()}"
96
117
  >
97
- <div id="selectedText" class="flex text-ewc-msText items-center text-left h-full pl-2 pr-12 relative w-full overflow-hidden whitespace-nowrap text-ellipsis">
98
- <span class="truncate">${this.getSelectedOptionNames()}</span>
118
+ <div id="${this._selectedTextId}" class="flex text-ewc-msText items-center text-left h-full pl-2 pr-12 relative w-full overflow-hidden whitespace-nowrap text-ellipsis">
119
+ <span class="truncate">${this.renderSelectedOptionContent()}</span>
99
120
  </div>
100
121
  <div
101
122
  class="items-center bg-ewc-blue flex h-10.5 absolute top-0 right-0 w-11 rounded-tr-sm rounded-br-sm"
@@ -109,13 +130,13 @@
109
130
  </div>
110
131
  </div>
111
132
  </button>
112
- ${this.isExpanded?_`
133
+ ${this.isExpanded?I`
113
134
  <div
114
135
  id="dropdown"
115
136
  class="absolute block justify-items-center left-0 w-full rounded shadow bg-white cursor-auto border-none box-border border-ewc-msBorder z-20 ${this._dropdownPosition==="top"?"bottom-full mb-1":"mt-1"}"
116
137
  style="max-height: 80vh; overflow: hidden;"
117
138
  >
118
- ${this.shouldShowSearch()?_`
139
+ ${this.shouldShowSearch()?I`
119
140
  <input
120
141
  id="searchInput"
121
142
  type="text"
@@ -128,7 +149,7 @@
128
149
  />
129
150
  `:""}
130
151
  <div
131
- id="optionList"
152
+ id="${this._optionListId}"
132
153
  role="listbox"
133
154
  aria-label="Options"
134
155
  style="
@@ -141,5 +162,5 @@
141
162
  </div>
142
163
  `:""}
143
164
  </div>
144
- `}},Z=O,O.version="1.0.11-alpha",O.styles=[new CSSStyleSheet],O);b([m({type:Array})],exports.SingleSelect.prototype,"options",void 0);b([m({type:String})],exports.SingleSelect.prototype,"selectedOption",void 0);b([m({type:Boolean})],exports.SingleSelect.prototype,"isExpanded",void 0);b([m({type:String})],exports.SingleSelect.prototype,"defaultOption",void 0);b([m({type:String})],exports.SingleSelect.prototype,"activeOption",void 0);b([m({type:String})],exports.SingleSelect.prototype,"dropdownHeight",void 0);b([m({type:String})],exports.SingleSelect.prototype,"invertColors",null);b([m({type:String})],exports.SingleSelect.prototype,"selectedLabel",void 0);b([m({type:String})],exports.SingleSelect.prototype,"searchMode",void 0);b([m({type:String})],exports.SingleSelect.prototype,"_searchText",void 0);b([m({type:Boolean,converter:r=>r==="true"})],exports.SingleSelect.prototype,"useParentWidth",void 0);b([m({attribute:!1})],exports.SingleSelect.prototype,"renderLabel",void 0);b([m({type:Boolean})],exports.SingleSelect.prototype,"_shouldShowSearch",void 0);b([Jt()],exports.SingleSelect.prototype,"_dropdownPosition",void 0);b([Yt("#dropdown")],exports.SingleSelect.prototype,"dropdownElement",void 0);exports.SingleSelect=Z=b([Ft("ewc-singleselect")],exports.SingleSelect);
165
+ `}},f=y,y.version="1.0.13-alpha",y.nextInstanceId=0,y.openInstance=null,y.EMPTY_COMPONENT_WIDTH=250,y.MIN_COMPONENT_WIDTH=150,y.FALLBACK_TEXT_LEFT_PADDING=8,y.FALLBACK_TEXT_RIGHT_PADDING=48,y.FALLBACK_BORDER_WIDTH=1,y.FALLBACK_BUTTON_WIDTH=44,y.ALLOWED_OPTION_NAME_TAGS=new Set(["sub","sup","em","i","strong","b"]),y.styles=[new CSSStyleSheet],y);x([$({type:Array})],exports.SingleSelect.prototype,"options",void 0);x([$({type:String})],exports.SingleSelect.prototype,"selectedOption",void 0);x([$({type:Boolean})],exports.SingleSelect.prototype,"isExpanded",void 0);x([$({type:String})],exports.SingleSelect.prototype,"defaultOption",void 0);x([$({type:String})],exports.SingleSelect.prototype,"activeOption",void 0);x([$({type:String})],exports.SingleSelect.prototype,"dropdownHeight",void 0);x([$({type:String})],exports.SingleSelect.prototype,"invertColors",null);x([$({type:String})],exports.SingleSelect.prototype,"selectedLabel",void 0);x([$({type:String})],exports.SingleSelect.prototype,"searchMode",void 0);x([$({type:String})],exports.SingleSelect.prototype,"_searchText",void 0);x([$({type:Boolean,converter:n=>n==="true"})],exports.SingleSelect.prototype,"useParentWidth",void 0);x([$({attribute:!1})],exports.SingleSelect.prototype,"renderLabel",void 0);x([$({type:Boolean})],exports.SingleSelect.prototype,"_shouldShowSearch",void 0);x([Yt()],exports.SingleSelect.prototype,"_dropdownPosition",void 0);x([Zt("#dropdown")],exports.SingleSelect.prototype,"dropdownElement",void 0);exports.SingleSelect=f=x([Gt("ewc-singleselect")],exports.SingleSelect);
145
166
  //# sourceMappingURL=main.cjs.js.map