/*! For license information please see 3397.cc10248a8cd5123d.js.LICENSE.txt */ export const ids=["3397"];export const modules={70176:function(){window.JSCompiler_renameProperty=function(e,t){return e}},97333:function(e,t,i){i.d(t,{Kk:function(){return a},Rq:function(){return l},iY:function(){return d}});i(75656),i(50100),i(18084),i(70176);let s,r,n=/(url\()([^)]*)(\))/g,o=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function a(e,t){if(e&&o.test(e))return e;if("//"===e)return e;if(void 0===s){s=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",s="http://a/c%20d"===e.href}catch(e){}}if(t||(t=document.baseURI||window.location.href),s)try{return new URL(e,t).href}catch(t){return e}return r||(r=document.implementation.createHTMLDocument("temp"),r.base=r.createElement("base"),r.head.appendChild(r.base),r.anchor=r.createElement("a"),r.body.appendChild(r.anchor)),r.base.href=t,r.anchor.href=e,r.anchor.href||e}function l(e,t){return e.replace(n,(function(e,i,s,r){return i+"'"+a(s.replace(/["']/g,""),t)+"'"+r}))}function d(e){return e.substring(0,e.lastIndexOf("/")+1)}},70617:function(e,t,i){i.r(t),i.d(t,{allowTemplateFromDomModule:function(){return g},cancelSyntheticClickEvents:function(){return O},fastDomIf:function(){return k},getSanitizeDOMValue:function(){return u},legacyNoObservedAttributes:function(){return M},legacyOptimizations:function(){return v},legacyUndefined:function(){return I},legacyWarnings:function(){return C},orderedComputed:function(){return E},passiveTouchGestures:function(){return _},removeNestedTemplates:function(){return V},rootPath:function(){return l},sanitizeDOMValue:function(){return h},setAllowTemplateFromDomModule:function(){return y},setCancelSyntheticClickEvents:function(){return A},setFastDomIf:function(){return N},setLegacyNoObservedAttributes:function(){return F},setLegacyOptimizations:function(){return b},setLegacyUndefined:function(){return S},setLegacyWarnings:function(){return w},setOrderedComputed:function(){return T},setPassiveTouchGestures:function(){return p},setRemoveNestedTemplates:function(){return z},setRootPath:function(){return d},setSanitizeDOMValue:function(){return c},setStrictTemplatePolicy:function(){return f},setSuppressTemplateNotifications:function(){return R},setSyncInitialRender:function(){return P},setUseAdoptedStyleSheetsWithBuiltCSS:function(){return B},strictTemplatePolicy:function(){return m},supportsAdoptingStyleSheets:function(){return a},suppressTemplateNotifications:function(){return L},syncInitialRender:function(){return x},useAdoptedStyleSheetsWithBuiltCSS:function(){return D},useNativeCSSProperties:function(){return n},useNativeCustomElements:function(){return o},useShadow:function(){return r}});i(70176);var s=i(97333);const r=!window.ShadyDOM||!window.ShadyDOM.inUse,n=Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),o=!window.customElements.polyfillWrapFlushCallback,a=r&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const e=new CSSStyleSheet;e.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})();let l=window.Polymer&&window.Polymer.rootPath||(0,s.iY)(document.baseURI||window.location.href);const d=function(e){l=e};let h=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;const c=function(e){h=e},u=function(){return h};let _=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;const p=function(e){_=e};let m=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;const f=function(e){m=e};let g=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;const y=function(e){g=e};let v=window.Polymer&&window.Polymer.legacyOptimizations||!1;const b=function(e){v=e};let C=window.Polymer&&window.Polymer.legacyWarnings||!1;const w=function(e){C=e};let x=window.Polymer&&window.Polymer.syncInitialRender||!1;const P=function(e){x=e};let I=window.Polymer&&window.Polymer.legacyUndefined||!1;const S=function(e){I=e};let E=window.Polymer&&window.Polymer.orderedComputed||!1;const T=function(e){E=e};let O=!0;const A=function(e){O=e};let V=window.Polymer&&window.Polymer.removeNestedTemplates||!1;const z=function(e){V=e};let k=window.Polymer&&window.Polymer.fastDomIf||!1;const N=function(e){k=e};let L=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;const R=function(e){L=e};let M=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;const F=function(e){M=e};let D=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;const B=function(e){D=e}},2394:function(e,t,i){i.d(t,{t:()=>l});var s=i("45779"),r=(i("39527"),i("36993"),i("57243")),n=i("67753");const o=Symbol("valueNotInitialized");class a extends n.sR{constructor(e){if(super(e),e.type!==s.pX.ELEMENT)throw new Error(`\`${this.constructor.name}\` must be bound to an element.`);this.previousValue=o}render(e,t){return r.Ld}update(e,[t,i]){if(!this.hasChanged(i))return r.Ld;this.host=e.options&&e.options.host,this.element=e.element,this.renderer=t;return this.previousValue===o?this.addRenderer():this.runRenderer(),this.previousValue=Array.isArray(i)?[...i]:i,r.Ld}reconnected(){this.addRenderer()}disconnected(){this.removeRenderer()}addRenderer(){throw new Error("The `addRenderer` method must be implemented.")}runRenderer(){throw new Error("The `runRenderer` method must be implemented.")}removeRenderer(){throw new Error("The `removeRenderer` method must be implemented.")}renderRenderer(e,...t){const i=this.renderer.call(this.host,...t);(0,r.sY)(i,e,{host:this.host})}hasChanged(e){return Array.isArray(e)?!Array.isArray(this.previousValue)||(this.previousValue.length!==e.length||e.some(((e,t)=>e!==this.previousValue[t]))):this.previousValue!==e}}const l=(0,s.XM)(class extends a{addRenderer(){this.element.renderer=(e,t,i)=>{this.renderRenderer(e,i.item,i,t)}}runRenderer(){this.element.requestContentUpdate()}removeRenderer(){this.element.renderer=null}})},96166:function(e,t,i){i("92519"),i("42179"),i("89256"),i("24931"),i("88463"),i("57449"),i("19814"),i("39527"),i("41360");window.Vaadin||={},window.Vaadin.featureFlags||={};const s={};function r(e,t="24.6.2"){if(Object.defineProperty(e,"version",{get:()=>t}),e.experimental){const t="string"==typeof e.experimental?e.experimental:`${i=e.is.split("-").slice(1).join("-"),i.replace(/-[a-z]/gu,(e=>e[1].toUpperCase()))}Component`;if(!window.Vaadin.featureFlags[t]&&!s[t])return s[t]=new Set,s[t].add(e),void Object.defineProperty(window.Vaadin.featureFlags,t,{get:()=>0===s[t].size,set(e){e&&s[t].size>0&&(s[t].forEach((e=>{customElements.define(e.is,e)})),s[t].clear())}});if(s[t])return void s[t].add(e)}var i;const r=customElements.get(e.is);if(r){const t=r.version;t&&e.version&&t===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${r.version} is already in use. Something will probably break.`)}else customElements.define(e.is,e)}class n extends HTMLElement{static get is(){return"vaadin-material-styles"}}r(n);i("92745"),i("99790"),i("67670"),i("34810"),i("13334"),i("36993");var o=i("57243");const a=[],l=new Set,d=new Set;function h(e){return e&&Object.prototype.hasOwnProperty.call(e,"__themes")}function c(e,t){return(e||"").split(" ").some((e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t)))}function u(e){return e.map((e=>e.cssText)).join("\n")}const _="vaadin-themable-mixin-style";function p(e){l.forEach((t=>{const i=t.deref();i instanceof e?function(e){if(!e.shadowRoot)return;const t=e.constructor;if(e instanceof o.oi)[...e.shadowRoot.querySelectorAll("style")].forEach((e=>e.remove())),(0,o.ec)(e.shadowRoot,t.elementStyles);else{const i=e.shadowRoot.getElementById(_),s=t.prototype._template;i.textContent=s.content.getElementById(_).textContent}}(i):i||l.delete(t)}))}function m(e){if(e.prototype instanceof o.oi)e.elementStyles=e.finalizeStyles(e.styles);else{e.prototype._template.content.getElementById(_).textContent=u(e.getStylesForThis())}d.forEach((t=>{const i=customElements.get(t);i!==e&&i.prototype instanceof e&&m(i)}))}function f(e,t,i={}){t=function(e=[]){return[e].flat(1/0).filter((e=>e instanceof o.c3||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(e,t,i):a.push({themeFor:e,styles:t,include:i.include,moduleId:i.moduleId}),e&&d.forEach((i=>{if(c(e,i)&&function(e){return h(customElements.get(e))}(i)){const e=customElements.get(i);!function(e,t){const i=e.__themes;return!(!i||!t)&&i.some((e=>e.styles.some((e=>t.some((t=>t.cssText===e.cssText))))))}(e,t)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),m(e),p(e)}}))}const g=(e,...t)=>{((e,...t)=>{const i=document.createElement("style");i.id=e,i.textContent=t.map((e=>e.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`material-${e}`,t)};f("",o.iv` :host { /* Text colors */ --material-body-text-color: var(--light-theme-text-color, rgba(0, 0, 0, 0.87)); --material-secondary-text-color: var(--light-theme-secondary-color, rgba(0, 0, 0, 0.54)); --material-disabled-text-color: var(--light-theme-disabled-color, rgba(0, 0, 0, 0.38)); /* Primary colors */ --material-primary-color: var(--primary-color, #6200ee); --material-primary-contrast-color: var(--dark-theme-base-color, #fff); --material-primary-text-color: var(--material-primary-color); /* Error colors */ --material-error-color: var(--error-color, #b00020); --material-error-text-color: var(--material-error-color); /* Background colors */ --material-background-color: var(--light-theme-background-color, #fff); --material-secondary-background-color: var(--light-theme-secondary-background-color, #f5f5f5); --material-disabled-color: rgba(0, 0, 0, 0.26); /* Divider colors */ --material-divider-color: rgba(0, 0, 0, 0.12); /* Undocumented internal properties (prefixed with three dashes) */ /* Text field tweaks */ --_material-text-field-input-line-background-color: initial; --_material-text-field-input-line-opacity: initial; --_material-text-field-input-line-hover-opacity: initial; --_material-text-field-focused-label-opacity: initial; /* Button tweaks */ --_material-button-raised-background-color: initial; --_material-button-outline-color: initial; /* Grid tweaks */ --_material-grid-row-hover-background-color: initial; /* Split layout tweaks */ --_material-split-layout-splitter-background-color: initial; background-color: var(--material-background-color); color: var(--material-body-text-color); } [theme~='dark'] { /* Text colors */ --material-body-text-color: var(--dark-theme-text-color, rgba(255, 255, 255, 1)); --material-secondary-text-color: var(--dark-theme-secondary-color, rgba(255, 255, 255, 0.7)); --material-disabled-text-color: var(--dark-theme-disabled-color, rgba(255, 255, 255, 0.5)); /* Primary colors */ --material-primary-color: var(--light-primary-color, #7e3ff2); --material-primary-text-color: #b794f6; /* Error colors */ --material-error-color: var(--error-color, #de2839); --material-error-text-color: var(--material-error-color); /* Background colors */ --material-background-color: var(--dark-theme-background-color, #303030); --material-secondary-background-color: var(--dark-theme-secondary-background-color, #3b3b3b); --material-disabled-color: rgba(255, 255, 255, 0.3); /* Divider colors */ --material-divider-color: rgba(255, 255, 255, 0.12); /* Undocumented internal properties (prefixed with three dashes) */ /* Text field tweaks */ --_material-text-field-input-line-background-color: #fff; --_material-text-field-input-line-opacity: 0.7; --_material-text-field-input-line-hover-opacity: 1; --_material-text-field-focused-label-opacity: 1; /* Button tweaks */ --_material-button-raised-background-color: rgba(255, 255, 255, 0.08); --_material-button-outline-color: rgba(255, 255, 255, 0.2); /* Grid tweaks */ --_material-grid-row-hover-background-color: rgba(255, 255, 255, 0.08); --_material-grid-row-selected-overlay-opacity: 0.16; /* Split layout tweaks */ --_material-split-layout-splitter-background-color: rgba(255, 255, 255, 0.8); background-color: var(--material-background-color); color: var(--material-body-text-color); } a { color: inherit; } `,{moduleId:"material-color-light"});f("",o.iv` :host { /* Text colors */ --material-body-text-color: var(--dark-theme-text-color, rgba(255, 255, 255, 1)); --material-secondary-text-color: var(--dark-theme-secondary-color, rgba(255, 255, 255, 0.7)); --material-disabled-text-color: var(--dark-theme-disabled-color, rgba(255, 255, 255, 0.5)); /* Primary colors */ --material-primary-color: var(--light-primary-color, #7e3ff2); --material-primary-text-color: #b794f6; /* Error colors */ --material-error-color: var(--error-color, #de2839); --material-error-text-color: var(--material-error-color); /* Background colors */ --material-background-color: var(--dark-theme-background-color, #303030); --material-secondary-background-color: var(--dark-theme-secondary-background-color, #3b3b3b); --material-disabled-color: rgba(255, 255, 255, 0.3); /* Divider colors */ --material-divider-color: rgba(255, 255, 255, 0.12); /* Undocumented internal properties (prefixed with three dashes) */ /* Text field tweaks */ --_material-text-field-input-line-background-color: #fff; --_material-text-field-input-line-opacity: 0.7; --_material-text-field-input-line-hover-opacity: 1; --_material-text-field-focused-label-opacity: 1; /* Button tweaks */ --_material-button-raised-background-color: rgba(255, 255, 255, 0.08); --_material-button-outline-color: rgba(255, 255, 255, 0.2); /* Grid tweaks */ --_material-grid-row-hover-background-color: rgba(255, 255, 255, 0.08); --_material-grid-row-selected-overlay-opacity: 0.16; /* Split layout tweaks */ --_material-split-layout-splitter-background-color: rgba(255, 255, 255, 0.8); background-color: var(--material-background-color); color: var(--material-body-text-color); } `,{moduleId:"material-color-dark"});g("color-base",o.iv` :host { /* Text colors */ --material-body-text-color: var(--light-theme-text-color, rgba(0, 0, 0, 0.87)); --material-secondary-text-color: var(--light-theme-secondary-color, rgba(0, 0, 0, 0.54)); --material-disabled-text-color: var(--light-theme-disabled-color, rgba(0, 0, 0, 0.38)); /* Primary colors */ --material-primary-color: var(--primary-color, #6200ee); --material-primary-contrast-color: var(--dark-theme-base-color, #fff); --material-primary-text-color: var(--material-primary-color); /* Error colors */ --material-error-color: var(--error-color, #b00020); --material-error-text-color: var(--material-error-color); /* Background colors */ --material-background-color: var(--light-theme-background-color, #fff); --material-secondary-background-color: var(--light-theme-secondary-background-color, #f5f5f5); --material-disabled-color: rgba(0, 0, 0, 0.26); /* Divider colors */ --material-divider-color: rgba(0, 0, 0, 0.12); } `);const y=[],v=new Set,b=new Set;function C(e){return e&&Object.prototype.hasOwnProperty.call(e,"__themes")}function w(e,t){return(e||"").split(" ").some((e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t)))}function x(e){return e.map((e=>e.cssText)).join("\n")}const P="vaadin-themable-mixin-style";function I(e){v.forEach((t=>{const i=t.deref();i instanceof e?function(e){if(!e.shadowRoot)return;const t=e.constructor;if(e instanceof o.oi)[...e.shadowRoot.querySelectorAll("style")].forEach((e=>e.remove())),(0,o.ec)(e.shadowRoot,t.elementStyles);else{const i=e.shadowRoot.getElementById(P),s=t.prototype._template;i.textContent=s.content.getElementById(P).textContent}}(i):i||v.delete(t)}))}function S(e){if(e.prototype instanceof o.oi)e.elementStyles=e.finalizeStyles(e.styles);else{e.prototype._template.content.getElementById(P).textContent=x(e.getStylesForThis())}b.forEach((t=>{const i=customElements.get(t);i!==e&&i.prototype instanceof e&&S(i)}))}const E=o.iv` :host { display: flex; align-items: center; box-sizing: border-box; min-height: 36px; padding: 8px 32px 8px 10px; overflow: hidden; font-family: var(--material-font-family); font-size: var(--material-small-font-size); line-height: 24px; } /* It's the list-box's responsibility to add the focus style */ :host([focused]) { outline: none; } /* Checkmark */ [part='checkmark']::before { display: var(--_material-item-selected-icon-display, none); content: ''; font-family: material-icons; font-size: 24px; line-height: 1; font-weight: 400; width: 24px; text-align: center; margin-right: 10px; color: var(--material-secondary-text-color); flex: none; } :host([selected]) [part='checkmark']::before { content: var(--material-icons-check); } @media (any-hover: hover) { :host(:hover:not([disabled])) { background-color: var(--material-secondary-background-color); } } :host([focused]:not([disabled])) { background-color: var(--material-divider-color); } /* Disabled */ :host([disabled]) { color: var(--material-disabled-text-color); cursor: default; pointer-events: none; } /* RTL specific styles */ :host([dir='rtl']) { padding: 8px 10px 8px 32px; } :host([dir='rtl']) [part='checkmark']::before { margin-right: 0; margin-left: 10px; } `;!function(e,t,i={}){t=function(e=[]){return[e].flat(1/0).filter((e=>e instanceof o.c3||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(e,t,i):y.push({themeFor:e,styles:t,include:i.include,moduleId:i.moduleId}),e&&b.forEach((i=>{if(w(e,i)&&function(e){return C(customElements.get(e))}(i)){const e=customElements.get(i);!function(e,t){const i=e.__themes;return!(!i||!t)&&i.some((e=>e.styles.some((e=>t.some((t=>t.cssText===e.cssText))))))}(e,t)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),S(e),I(e)}}))}("vaadin-item",E,{moduleId:"material-item"});const T=e=>class extends e{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,i){super.attributeChangedCallback(e,t,i),"theme"===e&&this._set_theme(i)}},O=[],A=new Set,V=new Set;function z(e){return e&&Object.prototype.hasOwnProperty.call(e,"__themes")}function k(e,t){return(e||"").split(" ").some((e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t)))}function N(e){return e.map((e=>e.cssText)).join("\n")}const L="vaadin-themable-mixin-style";function R(e){A.forEach((t=>{const i=t.deref();i instanceof e?function(e){if(!e.shadowRoot)return;const t=e.constructor;if(e instanceof o.oi)[...e.shadowRoot.querySelectorAll("style")].forEach((e=>e.remove())),(0,o.ec)(e.shadowRoot,t.elementStyles);else{const i=e.shadowRoot.getElementById(L),s=t.prototype._template;i.textContent=s.content.getElementById(L).textContent}}(i):i||A.delete(t)}))}function M(e){if(e.prototype instanceof o.oi)e.elementStyles=e.finalizeStyles(e.styles);else{e.prototype._template.content.getElementById(L).textContent=N(e.getStylesForThis())}V.forEach((t=>{const i=customElements.get(t);i!==e&&i.prototype instanceof e&&M(i)}))}function F(e,t,i={}){t=function(e=[]){return[e].flat(1/0).filter((e=>e instanceof o.c3||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(e,t,i):O.push({themeFor:e,styles:t,include:i.include,moduleId:i.moduleId}),e&&V.forEach((i=>{if(k(e,i)&&function(e){return z(customElements.get(e))}(i)){const e=customElements.get(i);!function(e,t){const i=e.__themes;return!(!i||!t)&&i.some((e=>e.styles.some((e=>t.some((t=>t.cssText===e.cssText))))))}(e,t)?window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),M(e),R(e)}}))}function D(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():O}function B(e=""){let t=0;return e.startsWith("lumo-")||e.startsWith("material-")?t=1:e.startsWith("vaadin-")&&(t=2),t}function H(e){const t=[];return e.include&&[].concat(e.include).forEach((e=>{const i=D().find((t=>t.moduleId===e));i?t.push(...H(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`)}),e.styles),t}function $(e){const t=`${e}-default-theme`,i=D().filter((i=>i.moduleId!==t&&k(i.themeFor,e))).map((e=>({...e,styles:[...H(e),...e.styles],includePriority:B(e.moduleId)}))).sort(((e,t)=>t.includePriority-e.includePriority));return i.length>0?i:D().filter((e=>e.moduleId===t))}const U=e=>class extends(T(e)){constructor(){super(),A.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&V.add(this.is),this.elementStyles)return;const e=this.prototype._template;e&&!z(this)&&function(e,t){const i=document.createElement("style");i.id=L,i.textContent=N(e),t.content.appendChild(i)}(this.getStylesForThis(),e)}static finalizeStyles(e){const t=this.getStylesForThis();return e?[...[e].flat(1/0),...t]:t}static getStylesForThis(){const t=e.__themes||[],i=Object.getPrototypeOf(this.prototype),s=(i?i.constructor.__themes:[])||[];this.__themes=[...t,...s,...$(this.is)];const r=this.__themes.flatMap((e=>e.styles));return r.filter(((e,t)=>t===r.lastIndexOf(e)))}};F("vaadin-combo-box-item",[E,o.iv` :host { cursor: pointer; -webkit-tap-highlight-color: transparent; padding: 4px 10px; --_material-item-selected-icon-display: block; } `],{moduleId:"material-combo-box-item"});const j=o.iv` [part~='loader'] { height: 2px; background: var(--material-background-color) linear-gradient( 90deg, transparent 0%, transparent 20%, var(--material-primary-color) 20%, var(--material-primary-color) 40%, transparent 40%, transparent 60%, var(--material-primary-color) 60%, var(--material-primary-color) 80%, transparent 80%, transparent 100% ) 0 0 / 400% 100% repeat-x; opacity: 0; } :host(:not([loading])) [part~='loader'] { display: none; } :host([loading]) [part='loader'] { animation: 3s linear infinite material-loader-progress, 0.3s 0.1s both material-loader-fade-in; } [part='loader']::before { content: ''; display: block; height: 100%; opacity: 0.16; background: var(--material-primary-color); } @keyframes material-loader-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } } @keyframes material-loader-progress { 0% { background-position: 0 0; background-size: 300% 100%; } 33% { background-position: -100% 0; background-size: 400% 100%; } 67% { background-position: -200% 0; background-size: 250% 100%; } 100% { background-position: -300% 0; background-size: 300% 100%; } } /* RTL specific styles */ @keyframes material-loader-progress-rtl { 0% { background-position: 100% 0; background-size: 300% 100%; } 33% { background-position: 200% 0; background-size: 400% 100%; } 67% { background-position: 300% 0; background-size: 250% 100%; } 100% { background-position: 400% 0; background-size: 300% 100%; } } :host([loading][dir='rtl']) [part='loader'] { animation: 3s linear infinite material-loader-progress-rtl, 0.3s 0.1s both material-loader-fade-in; } `;g("shadow",o.iv` /* prettier-ignore */ :host { /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */ --material-shadow-elevation-2dp: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); --material-shadow-elevation-3dp: 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 1px 8px 0 rgba(0, 0, 0, 0.12), 0 3px 3px -2px rgba(0, 0, 0, 0.4); --material-shadow-elevation-4dp: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); --material-shadow-elevation-6dp: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 0 1px 18px 0 rgba(0, 0, 0, 0.12), 0 3px 5px -1px rgba(0, 0, 0, 0.4); --material-shadow-elevation-8dp: 0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12), 0 5px 5px -3px rgba(0, 0, 0, 0.4); --material-shadow-elevation-12dp: 0 12px 16px 1px rgba(0, 0, 0, 0.14), 0 4px 22px 3px rgba(0, 0, 0, 0.12), 0 6px 7px -4px rgba(0, 0, 0, 0.4); --material-shadow-elevation-16dp: 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12), 0 8px 10px -5px rgba(0, 0, 0, 0.4); --material-shadow-elevation-24dp: 0 24px 38px 3px rgba(0, 0, 0, 0.14), 0 9px 46px 8px rgba(0, 0, 0, 0.12), 0 11px 15px -7px rgba(0, 0, 0, 0.4); } `);const q=o.iv` :host { top: 16px; right: 16px; /* TODO (@jouni): remove unnecessary multiplication after https://github.com/vaadin/vaadin-overlay/issues/90 is fixed */ bottom: calc(1px * var(--vaadin-overlay-viewport-bottom) + 16px); left: 16px; } [part='overlay'] { background-color: var(--material-background-color); border-radius: 4px; box-shadow: var(--material-shadow-elevation-4dp); color: var(--material-body-text-color); font-family: var(--material-font-family); font-size: var(--material-body-font-size); font-weight: 400; } [part='content'] { padding: 8px 0; } [part='backdrop'] { opacity: 0.2; animation: 0.2s vaadin-overlay-backdrop-enter; will-change: opacity; } @keyframes vaadin-overlay-backdrop-enter { 0% { opacity: 0; } } `;f("",q,{moduleId:"material-overlay"});const W=q;f("",W,{moduleId:"material-menu-overlay"});F("vaadin-combo-box-overlay",[W,o.iv` [part='overlay'] { position: relative; overflow: visible; border-top-left-radius: 0; border-top-right-radius: 0; } [part='content'] { padding: 0; } `,j,o.iv` [part~='loader'] { position: absolute; z-index: 1; top: -2px; left: 0; right: 0; } `,o.iv` :host { --_vaadin-combo-box-items-container-border-width: 8px 0; --_vaadin-combo-box-items-container-border-style: solid; } `],{moduleId:"material-combo-box-overlay"});i("70176");var Y=i("70617");let G=0;function K(){}K.prototype.__mixinApplications,K.prototype.__mixinSet;const J=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let i=G++;return function(s){let r=s.__mixinSet;if(r&&r[i])return s;let n=t,o=n.get(s);if(!o){o=e(s),n.set(s,o);let t=Object.create(o.__mixinSet||r||null);t[i]=!0,o.__mixinSet=t}return o}};var X=i("97333");let Q={},Z={};function ee(e,t){Q[e]=Z[e.toLowerCase()]=t}function te(e){return Q[e]||Z[e.toLowerCase()]}class ie extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let i=te(e);return i&&t?i.querySelector(t):i}return null}attributeChangedCallback(e,t,i,s){t!==i&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=(0,X.Kk)(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=(0,X.iY)(t)}return this.__assetpath}register(e){if(e=e||this.id){if(Y.strictTemplatePolicy&&void 0!==te(e))throw ee(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,ee(e,this),(t=this).querySelector("style")&&console.warn("dom-module %s has style outside template",t.id)}var t}}ie.prototype.modules=Q,customElements.define("dom-module",ie);const se="shady-unscoped";function re(e){return ie.import(e)}function ne(e){let t=e.body?e.body:e;const i=(0,X.Rq)(t.textContent,e.baseURI),s=document.createElement("style");return s.textContent=i,s}function oe(e){const t=e.trim().split(/\s+/),i=[];for(let e=0;eShadyDOM.patch(e):e=>e;function ce(e){return e.indexOf(".")>=0}function ue(e){let t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function _e(e,t){return 0===e.indexOf(t+".")}function pe(e,t){return 0===t.indexOf(e+".")}function me(e,t,i){return t+i.slice(e.length)}function fe(e){if(Array.isArray(e)){let t=[];for(let i=0;i1){for(let e=0;ee[1].toUpperCase())))}function Pe(e){return be[e]||(be[e]=e.replace(we,"-$1").toLowerCase())}i("88972");let Ie=0,Se=0,Ee=[],Te=0,Oe=!1,Ae=document.createTextNode("");new window.MutationObserver((function(){Oe=!1;const e=Ee.length;for(let t=0;t{throw e}))}}Ee.splice(0,e),Se+=e})).observe(Ae,{characterData:!0});const Ve={run:e=>(Oe||(Oe=!0,Ae.textContent=Te++),Ee.push(e),Ie++),cancel(e){const t=e-Se;if(t>=0){if(!Ee[t])throw new Error("invalid async handle: "+e);Ee[t]=null}}},ze=J((e=>class extends e{static createProperties(e){const t=this.prototype;for(let i in e)i in t||t._createPropertyAccessor(i)}static attributeNameForProperty(e){return e.toLowerCase()}static typeForProperty(e){}_createPropertyAccessor(e,t){this._addPropertyToAttributeMap(e),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,this._definePropertyAccessor(e,t))}_addPropertyToAttributeMap(e){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let t=this.__dataAttributes[e];return t||(t=this.constructor.attributeNameForProperty(e),this.__dataAttributes[t]=e),t}_definePropertyAccessor(e,t){Object.defineProperty(this,e,{get(){return this.__data[e]},set:t?function(){}:function(t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let e in this.__dataHasAccessor)this.hasOwnProperty(e)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[e]=this[e],delete this[e])}_initializeInstanceProperties(e){Object.assign(this,e)}_setProperty(e,t){this._setPendingProperty(e,t)&&this._invalidateProperties()}_getProperty(e){return this.__data[e]}_setPendingProperty(e,t,i){let s=this.__data[e],r=this._shouldPropertyChange(e,t,s);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(e in this.__dataOld)&&(this.__dataOld[e]=s),this.__data[e]=t,this.__dataPending[e]=t),r}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Ve.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const e=this.__data,t=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(e,t,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,i)),this.__dataCounter--}_shouldPropertiesChange(e,t,i){return Boolean(t)}_propertiesChanged(e,t,i){}_shouldPropertyChange(e,t,i){return i!==t&&(i==i||t==t)}attributeChangedCallback(e,t,i,s){t!==i&&this._attributeToProperty(e,i),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,i,s)}_attributeToProperty(e,t,i){if(!this.__serializing){const s=this.__dataAttributes,r=s&&s[e]||e;this[r]=this._deserializeValue(t,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(e,t,i){this.__serializing=!0,i=arguments.length<3?this[e]:i,this._valueToNodeAttribute(this,i,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,i){const s=this._serializeValue(t);"class"!==i&&"name"!==i&&"slot"!==i||(e=he(e)),void 0===s?e.removeAttribute(i):e.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(e){return"boolean"==typeof e?e?"":void 0:null!=e?e.toString():void 0}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}})),ke={};let Ne=HTMLElement.prototype;for(;Ne;){let e=Object.getOwnPropertyNames(Ne);for(let t=0;ttrustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;const Re=J((e=>{const t=ze(e);return class extends t{static createPropertiesForAttributes(){let e=this.observedAttributes;for(let t=0;t{const e=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(t,i,s)=>{const r=i.getAttribute(s);e&&s.startsWith("on-")?t.setAttribute(s,e.createScript(r,s)):t.setAttribute(s,r)}})();function $e(e){let t=e.getAttribute("is");if(t&&Me[t]){let i=e;for(i.removeAttribute("is"),e=i.ownerDocument.createElement(t),i.parentNode.replaceChild(e,i),e.appendChild(i);i.attributes.length;){const{name:t}=i.attributes[0];He(e,i,t),i.removeAttribute(t)}}return e}function Ue(e,t){let i=t.parentInfo&&Ue(e,t.parentInfo);if(!i)return e;for(let e=i.firstChild,s=0;e;e=e.nextSibling)if(t.parentIndex===s++)return e}function je(e,t,i,s){s.id&&(t[s.id]=i)}function qe(e,t,i){if(i.events&&i.events.length)for(let s,r=0,n=i.events;rclass extends e{static _parseTemplate(e,t){if(!e._templateInfo){let i=e._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(t),i.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,i,{parent:null})}return e._templateInfo}static _parseTemplateContent(e,t,i){return this._parseTemplateNode(e.content,t,i)}static _parseTemplateNode(e,t,i){let s=!1,r=e;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(t.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,t,i)||s,Be(r),r.firstChild&&this._parseTemplateChildNodes(r,t,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,t,i)||s),s||i.noted}static _parseTemplateChildNodes(e,t,i){if("script"!==e.localName&&"style"!==e.localName)for(let s,r=e.firstChild,n=0;r;r=s){if("template"==r.localName&&(r=$e(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,e.removeChild(i),i=s;if(t.stripWhiteSpace&&!r.textContent.trim()){e.removeChild(r);continue}}let o={parentIndex:n,parentInfo:i};this._parseTemplateNode(r,t,o)&&(o.infoIndex=t.nodeInfoList.push(o)-1),r.parentNode&&n++}}static _parseTemplateNestedTemplate(e,t,i){let s=e,r=this._parseTemplate(s,t);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(e,t,i){let s=!1,r=Array.from(e.attributes);for(let n,o=r.length-1;n=r[o];o--)s=this._parseTemplateNodeAttribute(e,t,i,n.name,n.value)||s;return s}static _parseTemplateNodeAttribute(e,t,i,s,r){return"on-"===s.slice(0,3)?(e.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(e){let t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,t){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);let i=(t=t||this.constructor._parseTemplate(e)).nodeInfoList,s=t.content||e.content,r=document.importNode(s,!0);r.__noInsertionPoint=!t.hasInsertionPoint;let n=r.nodeList=new Array(i.length);r.$={};for(let e,s=0,o=i.length;s!e.literal)).length+(s.dynamicFn?1:0)}for(let e in s)t[e]||r.push(e);return{counts:i,ready:r,total:n}}(e);for(;s=n.shift();){t.set(s,t.size);const e=i[s];e&&e.forEach((e=>{const t=e.info.methodInfo;--o,0==--r[t]&&n.push(t)}))}if(0!==o){const t=e;console.warn(`Computed graph for ${t.localName} incomplete; circular?`)}e.constructor.__orderedComputedDeps=t}return t}(e),o=[];for(let e in t)ht(e,r,o,n,s);let a;for(;a=o.shift();)ct(e,"",t,i,a)&&ht(a.methodInfo,r,o,n,s);Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let n=t;for(;et(e,r,n,i,s);)Object.assign(i,e.__dataOld),Object.assign(t,e.__dataPending),n=e.__dataPending,e.__dataPending=null}}const dt=(e,t,i)=>{let s=0,r=t.length-1,n=-1;for(;s<=r;){const o=s+r>>1,a=i.get(t[o].methodInfo)-i.get(e.methodInfo);if(a<0)s=o+1;else{if(!(a>0)){n=o;break}r=o-1}}n<0&&(n=r+1),t.splice(n,0,e)},ht=(e,t,i,s,r)=>{const n=t[r?ue(e):e];if(n)for(let t=0;td.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[t];t=me(d.source,l.target,t),a._setPendingPropertyOrPath(t,s,!1,!0)&&e._enqueueClient(a)}else{let o=r.evaluator._evaluateBinding(e,d,t,i,s,n);o!==Ke&&function(e,t,i,s,r){r=function(e,t,i,s){if(i.isCompound){let r=e.__dataCompoundStorage[i.target];r[s.compoundIndex]=t,t=r.join("")}"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==e.localName&&"textarea"!==e.localName)||(t=null==t?"":t));return t}(t,r,i,s),Y.sanitizeDOMValue&&(r=(0,Y.sanitizeDOMValue)(r,i.target,i.kind,t));if("attribute"==i.kind)e._valueToNodeAttribute(t,r,i.target);else{let s=i.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[s]?t[Je.READ_ONLY]&&t[Je.READ_ONLY][s]||t._setPendingProperty(s,r)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,s,r)}}(e,a,l,d,o)}}function mt(e,t){if(t.isCompound){let i=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),s=t.parts,r=new Array(s.length);for(let e=0;e="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=t.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(t),i.literal=!0}return i.literal||(i.rootProperty=ue(t),i.structured=ce(t),i.structured&&(i.wildcard=".*"==t.slice(-2),i.wildcard&&(i.name=t.slice(0,-2)))),i}function St(e,t,i){let s=ye(e,i);return void 0===s&&(s=t[i]),s}function Et(e,t,i,s){const r={indexSplices:s};Y.legacyUndefined&&!e._overrideLegacyUndefined&&(t.splices=r),e.notifyPath(i+".splices",r),e.notifyPath(i+".length",t.length),Y.legacyUndefined&&!e._overrideLegacyUndefined&&(r.indexSplices=[])}function Tt(e,t,i,s,r,n){Et(e,t,i,[{index:s,addedCount:r,removed:n,object:t,type:"splice"}])}const Ot=J((e=>{const t=Ye(Re(e));return class extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Je}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(At.length){let e=At[At.length-1];e._enqueueClient(this),this.__dataHost=e}}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){let t=this[Je.READ_ONLY];for(let i in e)t&&t[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=e[i])}_addPropertyEffect(e,t,i){this._createPropertyAccessor(e,t==Je.READ_ONLY);let s=Ze(this,t,!0)[e];s||(s=this[t][e]=[]),s.push(i)}_removePropertyEffect(e,t,i){let s=Ze(this,t,!0)[e],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(e,t){let i=this[t];return Boolean(i&&i[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,Je.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,Je.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,Je.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,Je.COMPUTE)}_setPendingPropertyOrPath(e,t,i,s){if(s||ue(Array.isArray(e)?e[0]:e)!==e){if(!s){let i=ye(this,e);if(!(e=ve(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,i))return function(e,t,i){let s=e.__dataLinkedPaths;if(s){let r;for(let n in s){let o=s[n];pe(n,t)?(r=me(n,o,t),e._setPendingPropertyOrPath(r,i,!0,!0)):pe(o,t)&&(r=me(o,n,t),e._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,i);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,i){i===e[t]&&"object"!=typeof i||("className"===t&&(e=he(e)),e[t]=i)}_setPendingProperty(e,t,i){let s=this.__dataHasPaths&&ce(e),r=s?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,r[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),s?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(s||this[Je.NOTIFY]&&this[Je.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=i),!0)}_setProperty(e,t){this._setPendingProperty(e,t,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(e){this.__dataPendingClients=this.__dataPendingClients||[],e!==this&&this.__dataPendingClients.push(e)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let e=this.__dataPendingClients;if(e){this.__dataPendingClients=null;for(let t=0;t{et(this,e.propertyEffects,t,i,s,e.nodeList);for(let r=e.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,t,i,s)};e.runEffects?e.runEffects(r,t,s):r(t,s)}linkPaths(e,t){e=fe(e),t=fe(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=fe(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){let i={path:""};Et(this,ye(this,e,i),i.path,t)}get(e,t){return ye(t||this,e)}set(e,t,i){i?ve(i,e,t):this[Je.READ_ONLY]&&this[Je.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){let i={path:""},s=ye(this,e,i),r=s.length,n=s.push(...t);return t.length&&Tt(this,s,i.path,r,t.length,[]),n}pop(e){let t={path:""},i=ye(this,e,t),s=Boolean(i.length),r=i.pop();return s&&Tt(this,i,t.path,i.length,0,[r]),r}splice(e,t,i,...s){let r,n={path:""},o=ye(this,e,n);return t<0?t=o.length-Math.floor(-t):t&&(t=Math.floor(t)),r=2===arguments.length?o.splice(t):o.splice(t,i,...s),(s.length||r.length)&&Tt(this,o,n.path,t,s.length,r),r}shift(e){let t={path:""},i=ye(this,e,t),s=Boolean(i.length),r=i.shift();return s&&Tt(this,i,t.path,0,0,[r]),r}unshift(e,...t){let i={path:""},s=ye(this,e,i),r=s.unshift(...t);return t.length&&Tt(this,s,i.path,0,t.length,[]),r}notifyPath(e,t){let i;if(1==arguments.length){let s={path:""};t=ye(this,e,s),i=s.path}else i=Array.isArray(e)?fe(e):e;this._setPendingPropertyOrPath(i,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(e,t){var i;this._addPropertyEffect(e,Je.READ_ONLY),t&&(this["_set"+(i=e,i[0].toUpperCase()+i.substring(1))]=function(t){this._setProperty(e,t)})}_createPropertyObserver(e,t,i){let s={property:e,method:t,dynamicFn:Boolean(i)};this._addPropertyEffect(e,Je.OBSERVE,{fn:st,info:s,trigger:{name:e}}),i&&this._addPropertyEffect(t,Je.OBSERVE,{fn:st,info:s,trigger:{name:t}})}_createMethodObserver(e,t){let i=Pt(e);if(!i)throw new Error("Malformed observer expression '"+e+"'");gt(this,i,Je.OBSERVE,yt,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,Je.NOTIFY,{fn:ot,info:{eventName:Pe(e)+"-changed",property:e}})}_createReflectedProperty(e){let t=this.constructor.attributeNameForProperty(e);"-"===t[0]?console.warn("Property "+e+" cannot be reflected to attribute "+t+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(e,Je.REFLECT,{fn:at,info:{attrName:t}})}_createComputedProperty(e,t,i){let s=Pt(t);if(!s)throw new Error("Malformed computed expression '"+t+"'");const r=gt(this,s,Je.COMPUTE,ct,e,i);Ze(this,Xe)[e]=r}_marshalArgs(e,t,i){const s=this.__data,r=[];for(let n=0,o=e.length;n1)return Ke;r[n]=d}return r}static addPropertyEffect(e,t,i){this.prototype._addPropertyEffect(e,t,i)}static createPropertyObserver(e,t,i){this.prototype._createPropertyObserver(e,t,i)}static createMethodObserver(e,t){this.prototype._createMethodObserver(e,t)}static createNotifyingProperty(e){this.prototype._createNotifyingProperty(e)}static createReadOnlyProperty(e,t){this.prototype._createReadOnlyProperty(e,t)}static createReflectedProperty(e){this.prototype._createReflectedProperty(e)}static createComputedProperty(e,t,i){this.prototype._createComputedProperty(e,t,i)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let i=this.constructor._parseTemplate(e),s=this.__preBoundTemplateInfo==i;if(!s)for(let e in i.propertyEffects)this._createPropertyAccessor(e);if(t)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const t=e._parentTemplateInfo||this.__templateInfo,s=t.lastChild;i.parent=t,t.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:t.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(e,t,i){(e.hostProps=e.hostProps||{})[t]=!0;let s=e.propertyEffects=e.propertyEffects||{};(s[t]=s[t]||[]).push(i)}_stampTemplate(e,t){t=t||this._bindTemplate(e,!0),At.push(this);let i=super._stampTemplate(e,t);if(At.pop(),t.nodeList=i.nodeList,!t.wasPreBound){let e=t.childNodes=[];for(let t=i.firstChild;t;t=t.nextSibling)e.push(t)}return i.templateInfo=t,function(e,t){let{nodeList:i,nodeInfoList:s}=t;if(s.length)for(let t=0;tr&&s.push({literal:e.slice(r,i.index)});let n=i[1][0],o=Boolean(i[2]),a=i[3].trim(),l=!1,d="",h=-1;"{"==n&&(h=a.indexOf("::"))>0&&(d=a.substring(h+2),a=a.substring(0,h),l=!0);let c=Pt(a),u=[];if(c){let{args:e,methodName:i}=c;for(let t=0;t{const t=ze(e);function i(e){const t=Object.getPrototypeOf(e);return t.prototype instanceof r?t:null}function s(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))){let t=null;if(e.hasOwnProperty(JSCompiler_renameProperty("properties",e))){const i=e.properties;i&&(t=function(e){const t={};for(let i in e){const s=e[i];t[i]="function"==typeof s?{type:s}:s}return t}(i))}e.__ownProperties=t}return e.__ownProperties}class r extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){e=this.prototype,Vt.push(e);const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((e=>this.prototype._addPropertyToAttributeMap(e))):[]}var e;return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const e=i(this);e&&e.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const e=s(this);e&&this.createProperties(e)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const e=i(this);this.__properties=Object.assign({},e&&e._properties,s(this))}return this.__properties}static typeForProperty(e){const t=this._properties[e];return t&&t.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),kt=window.ShadyCSS&&window.ShadyCSS.cssBuild,Nt=J((e=>{const t=zt(Ot(e));function i(e,t,i,s){if(!kt){const r=t.content.querySelectorAll("style"),n=le(t),o=function(e){let t=re(e);return t?de(t):[]}(i),a=t.content.firstElementChild;for(let i=0;i{t+=e.textContent,e.parentNode.removeChild(e)})),e._styleSheet=new CSSStyleSheet,e._styleSheet.replaceSync(t)}}}return class extends t{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){t._finalizeClass.call(this);const e=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;e&&this.createObservers(e,this._properties),this._prepareTemplate()}static _prepareTemplate(){let e=this.template;e&&("string"==typeof e?(console.error("template getter must return HTMLTemplateElement"),e=null):Y.legacyOptimizations||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(let n in e)t=this.prototype,i=n,s=e[n],r=e,s.computed&&(s.readOnly=!0),s.computed&&(t._hasReadOnlyEffect(i)?console.warn(`Cannot redefine computed property '${i}'.`):t._createComputedProperty(i,s.computed,r)),s.readOnly&&!t._hasReadOnlyEffect(i)?t._createReadOnlyProperty(i,!s.computed):!1===s.readOnly&&t._hasReadOnlyEffect(i)&&console.warn(`Cannot make readOnly property '${i}' non-readOnly.`),s.reflectToAttribute&&!t._hasReflectEffect(i)?t._createReflectedProperty(i):!1===s.reflectToAttribute&&t._hasReflectEffect(i)&&console.warn(`Cannot make reflected property '${i}' non-reflected.`),s.notify&&!t._hasNotifyEffect(i)?t._createNotifyingProperty(i):!1===s.notify&&t._hasNotifyEffect(i)&&console.warn(`Cannot make notify property '${i}' non-notify.`),s.observer&&t._createPropertyObserver(i,s.observer,r[s.observer]),t._addPropertyToAttributeMap(i);var t,i,s,r}static createObservers(e,t){const i=this.prototype;for(let s=0;se});class Rt{constructor(e,t){Dt(e,t);const i=t.reduce(((t,i,s)=>t+Mt(i)+e[s+1]),e[0]);this.value=i.toString()}toString(){return this.value}}function Mt(e){if(e instanceof Rt)return e.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${e}`)}const Ft=function(e,...t){Dt(e,t);const i=document.createElement("template");let s=t.reduce(((t,i,s)=>t+function(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof Rt)return Mt(e);throw new Error(`non-template value passed to Polymer's html function: ${e}`)}(i)+e[s+1]),e[0]);return Lt&&(s=Lt.createHTML(s)),i.innerHTML=s,i},Dt=(e,t)=>{if(!Array.isArray(e)||!Array.isArray(e.raw)||t.length!==e.length-1)throw new TypeError("Invalid call to the html template tag")},Bt=Nt(HTMLElement),Ht=[];function $t(e,t,i=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=i&&e.removeAttribute("dir")}function Ut(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const e=Ut();Ht.forEach((t=>{$t(t,e)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const jt=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>""===e?null:e}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),$t(this,Ut(),null))}attributeChangedCallback(e,t,i){if(super.attributeChangedCallback(e,t,i),"dir"!==e)return;const s=Ut(),r=i===s&&-1===Ht.indexOf(this),n=!i&&t&&-1===Ht.indexOf(this),o=i!==s&&t===s;r||n?(this.__subscribe(),$t(this,s,i)):o&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Ht.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,i){("dir"!==i||""!==t||e.hasAttribute("dir"))&&super._valueToNodeAttribute(e,t,i)}_attributeToProperty(e,t,i){"dir"!==e||t?super._attributeToProperty(e,t,i):this.dir=""}__subscribe(){Ht.includes(this)||Ht.push(this)}__unsubscribe(){Ht.includes(this)&&Ht.splice(Ht.indexOf(this),1)}},qt=e=>class extends e{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(e,t,i){"hidden"===e&&null!==i?this.index=void 0:super.attributeChangedCallback(e,t,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e)}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e)}__rendererOrItemChanged(e,t,i){void 0!==i&&void 0!==t&&(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()))}__updateLabel(e,t){t||(this.textContent=e)}};class Wt extends(qt(U(jt(Bt)))){static get template(){return Ft`
`}static get is(){return"vaadin-combo-box-item"}}r(Wt);let Yt=!1,Gt=[],Kt=[];function Jt(){Yt=!0,requestAnimationFrame((function(){Yt=!1,Xt(Gt),setTimeout((function(){!function(e){for(let t=0,i=e.length;t{throw e}))}}function Zt(e,t,i){Yt||Jt(),Kt.push([e,t,i])}const ei=e=>e.test(navigator.userAgent),ti=e=>e.test(navigator.platform);ei(/Android/u),ei(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);ei(/Firefox/u);const ii=ti(/^iPad/u)||ti(/^Mac/u)&&navigator.maxTouchPoints>1,si=ti(/^iPhone/u)||ii,ri=ei(/^((?!chrome|android).)*safari/iu),ni=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})();window.ShadowRoot&&"adoptedStyleSheets"in Document.prototype&&CSSStyleSheet.prototype;let oi=new WeakMap,ai=new WeakMap,li={},di=0;const hi=e=>e&&e.nodeType===Node.ELEMENT_NODE,ci=(...e)=>{console.error(`Error: ${e.join(" ")}. Skip setting aria-hidden.`)},ui=(e,t,i,s)=>{const r=((e,t)=>hi(e)?t.map((t=>{if(!hi(t))return ci(t,"is not a valid element"),null;let i=t;for(;i&&i!==e;){if(e.contains(i))return t;i=i.getRootNode().host}return ci(t,"is not contained inside",e),null})).filter((e=>Boolean(e))):(ci(e,"is not a valid element"),[]))(t,Array.isArray(e)?e:[e]);li[i]||(li[i]=new WeakMap);const n=li[i],o=[],a=new Set,l=new Set(r),d=e=>{if(!e||a.has(e))return;a.add(e);const t=e.assignedSlot;t&&d(t),d(e.parentNode||e.host)};r.forEach(d);const h=e=>{if(!e||l.has(e))return;const t=e.shadowRoot;(t?[...e.children,...t.children]:[...e.children]).forEach((e=>{if(!["template","script","style"].includes(e.localName))if(a.has(e))h(e);else{const t=e.getAttribute(s),r=null!==t&&"false"!==t,a=(oi.get(e)||0)+1,l=(n.get(e)||0)+1;oi.set(e,a),n.set(e,l),o.push(e),1===a&&r&&ai.set(e,!0),1===l&&e.setAttribute(i,"true"),r||e.setAttribute(s,"true")}}))};return h(t),a.clear(),di+=1,()=>{o.forEach((e=>{const t=oi.get(e)-1,r=n.get(e)-1;oi.set(e,t),n.set(e,r),t||(ai.has(e)?ai.delete(e):e.removeAttribute(s)),r||e.removeAttribute(i)})),di-=1,di||(oi=new WeakMap,oi=new WeakMap,ai=new WeakMap,li={})}},_i=(e,t=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(e)?e:[e]);return t&&s.push(...Array.from(t.querySelectorAll("[aria-live]"))),ui(s,t,i,"aria-hidden")};HTMLElement.prototype;class pi{constructor(e,t){this.host=e,this.callback="function"==typeof t?t:()=>e}showModal(){const e=this.callback();this.__showOthers=_i(e)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}let mi=!1;function fi(){let e=document.activeElement||document.body;for(;e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function gi(){return mi}function yi(e){const t=e.style;if("hidden"===t.visibility||"none"===t.display)return!0;const i=window.getComputedStyle(e);return"hidden"===i.visibility||"none"===i.display}function vi(e,t){const i=Math.max(e.tabIndex,0),s=Math.max(t.tabIndex,0);return 0===i||0===s?s>i:i>s}function bi(e){const t=e.length;if(t<2)return e;const i=Math.ceil(t/2);return function(e,t){const i=[];for(;e.length>0&&t.length>0;)vi(e[0],t[0])?i.push(t.shift()):i.push(e.shift());return i.concat(e,t)}(bi(e.slice(0,i)),bi(e.slice(i)))}function Ci(e){return!e.matches('[tabindex="-1"]')&&(e.matches("input, select, textarea, button, object")?e.matches(":not([disabled])"):e.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function wi(e){return e.getRootNode().activeElement===e}function xi(e,t){if(e.nodeType!==Node.ELEMENT_NODE||yi(e))return!1;const i=e,s=function(e){if(!Ci(e))return-1;const t=e.getAttribute("tabindex")||0;return Number(t)}(i);let r=s>0;s>=0&&t.push(i);let n=[];return n="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...n].forEach((e=>{r=xi(e,t)||r})),r}window.addEventListener("keydown",(()=>{mi=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{mi=!1}),{capture:!0});class Pi{saveFocus(e){this.focusNode=e||fi()}restoreFocus(e){const t=this.focusNode;if(!t)return;const i=!!e&&e.preventScroll;fi()===document.body?setTimeout((()=>t.focus({preventScroll:i}))):t.focus({preventScroll:i}),this.focusNode=null}}const Ii=[];class Si{constructor(e){this.host=e,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(e){const t=[];return xi(e,t)?bi(t):t}(this.__trapNode)}get __focusedElementIndex(){const e=this.__focusableElements;return e.indexOf(e.filter(wi).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(e){if(this.__trapNode=e,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ii.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Ii.pop()}__onKeyDown(e){if(this.__trapNode&&this===Array.from(Ii).pop()&&"Tab"===e.key){e.preventDefault();const t=e.shiftKey;this.__focusNextElement(t)}}__focusNextElement(e=!1){const t=this.__focusableElements,i=e?-1:1,s=this.__focusedElementIndex,r=t[(t.length+s+i)%t.length];r.focus(),"input"===r.localName&&r.select()}}const Ei=J((e=>"function"==typeof e.prototype.addController?e:class extends e{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((e=>{e.hostConnected&&e.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((e=>{e.hostDisconnected&&e.hostDisconnected()}))}addController(e){this.__controllers.add(e),void 0!==this.$&&this.isConnected&&e.hostConnected&&e.hostConnected()}removeController(e){this.__controllers.delete(e)}})),Ti=e=>class extends(Ei(e)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new pi(this),this.__focusTrapController=new Si(this),this.__focusRestorationController=new Pi}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!gi();this.__focusRestorationController.restoreFocus({preventScroll:e})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const e=fi();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return!0;let t=e;const i=e.ownerDocument;for(;t&&t!==i&&t!==this;)t=t.parentNode||t.host;return t===this}},Oi=()=>Array.from(document.body.children).filter((e=>e instanceof HTMLElement&&e._hasOverlayStackMixin&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0)),Ai=()=>Oi().filter((e=>e.$.overlay)),Vi=e=>class extends e{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return this===Ai().pop()}bringToFront(){let e="";const t=Oi().filter((e=>e!==this)).pop();if(t){e=t.__zIndex+1}this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ai().forEach((e=>{e!==this&&(e.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=Ai();let t;for(;(t=e.pop())&&(t===this||(t.$.overlay.style.removeProperty("pointer-events"),t.modeless)););}},zi=e=>class extends(Ti(Vi(e))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),si&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(e){const t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,i=document.documentElement.clientHeight;t&&i>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",i-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(e,t,i,s){const r=this._oldOwner!==t||this._oldModel!==i;this._oldModel=i,this._oldOwner=t;const n=this._oldRenderer!==e,o=void 0!==this._oldRenderer;this._oldRenderer=e;const a=this._oldOpened!==s;this._oldOpened=s,n&&o&&(this.innerHTML="",delete this._$litPart$),s&&e&&(n||a||r)&&this.requestContentUpdate()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(e,t){e?(this._saveFocus(),this._animatedOpening(),Zt(this,(()=>{this._trapFocus();const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):t&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this),t=e.getPropertyValue("animation-name");return!("none"===e.getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(e,t){const i=`__${e}Handler`,s=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(e))return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last&&(!this.modeless||e.composedPath().includes(this.$.overlay))&&"Escape"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}},ki=o.iv`:host{z-index:200;position:fixed;inset:0;bottom:var(--vaadin-overlay-viewport-bottom);display:flex;flex-direction:column;align-items:center;justify-content:center;margin:auto;pointer-events:none;-webkit-tap-highlight-color:transparent;--vaadin-overlay-viewport-bottom:0}:host(:not([opened]):not([closing])),:host(:not([opened]):not([closing])) [part=overlay],:host([hidden]){display:none!important}[part=overlay]{-webkit-overflow-scrolling:touch;overflow:auto;pointer-events:auto;max-width:100%;box-sizing:border-box;-webkit-tap-highlight-color:initial}[part=backdrop]{z-index:-1;content:'';background:rgba(0,0,0,.5);position:fixed;inset:0;pointer-events:auto}`;const Ni={start:"top",end:"bottom"},Li={start:"left",end:"right"},Ri=new ResizeObserver((e=>{setTimeout((()=>{e.forEach((e=>{e.target.__overlay&&e.target.__overlay._updatePosition()}))}))})),Mi=e=>class extends e{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((e=>{e.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=function(e,t){let i=null;const s=document.documentElement;function r(){i&&i.disconnect(),i=null}return function n(o=!1,a=1){r();const{left:l,top:d,width:h,height:c}=e.getBoundingClientRect();if(o||t(),!h||!c)return;const u={rootMargin:`${-Math.floor(d)}px ${-Math.floor(s.clientWidth-(l+h))}px ${-Math.floor(s.clientHeight-(d+c))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let _=!0;i=new IntersectionObserver((function(e){let t=e[0].intersectionRatio;if(t!==a){if(!_)return n();0===t&&(t=1e-7),n(!1,t)}_=!1}),u),i.observe(e)}(!0),r}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((e=>{e.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(e,t){if(this.__removeUpdatePositionEventListeners(),t&&(t.__overlay=null,Ri.unobserve(t),e&&(this.__addUpdatePositionEventListeners(),t.__overlay=this,Ri.observe(t))),e){const e=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((t=>{this.__margins[t]=parseInt(e[t],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(0===e.width&&0===e.height&&this.opened)return void(this.opened=!1);const t=this.__shouldAlignStartVertically(e);this.style.justifyContent=t?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(e,i),r=!i&&s||i&&!s;this.style.alignItems=r?"flex-start":"flex-end";const n=this.getBoundingClientRect(),o=this.__calculatePositionInOneDimension(e,n,this.noVerticalOverlap,Ni,this,t),a=this.__calculatePositionInOneDimension(e,n,this.noHorizontalOverlap,Li,this,s);Object.assign(this.style,o,a),this.toggleAttribute("bottom-aligned",!t),this.toggleAttribute("top-aligned",t),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(e,t){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth),r=!t&&"start"===this.horizontalAlign||t&&"end"===this.horizontalAlign;return this.__shouldAlignStart(e,i,s,this.__margins,r,this.noHorizontalOverlap,Li)}__shouldAlignStartVertically(e){const t=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),s="top"===this.verticalAlign;return this.__shouldAlignStart(e,t,i,this.__margins,s,this.noVerticalOverlap,Ni)}__shouldAlignStart(e,t,i,s,r,n,o){const a=i-e[n?o.end:o.start]-s[o.end],l=e[n?o.start:o.end]-s[o.start],d=r?a:l;return r===(d>(r?l:a)||d>t)}__adjustBottomProperty(e,t,i){let s;if(e===t.end){if(t.end===Ni.end){const e=Math.min(window.innerHeight,document.documentElement.clientHeight);if(i>e&&this.__oldViewportHeight){s=i-(this.__oldViewportHeight-e)}this.__oldViewportHeight=e}if(t.end===Li.end){const e=Math.min(window.innerWidth,document.documentElement.clientWidth);if(i>e&&this.__oldViewportWidth){s=i-(this.__oldViewportWidth-e)}this.__oldViewportWidth=e}}return s}__calculatePositionInOneDimension(e,t,i,s,r,n){const o=n?s.start:s.end,a=n?s.end:s.start,l=parseFloat(r.style[o]||getComputedStyle(r)[o]),d=this.__adjustBottomProperty(o,s,l),h=t[n?s.start:s.end]-e[i===n?s.end:s.start],c=d?`${d}px`:`${l+h*(n?-1:1)}px`;return{[o]:c,[a]:""}}},Fi=e=>class extends(Mi(e)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const e=this._comboBox,t=e&&e.getAttribute("dir");t&&this.setAttribute("dir",t)}_shouldCloseOnOutsideClick(e){const t=e.composedPath();return!t.includes(this.positionTarget)&&!t.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ci(e.composedPath()[0])&&e.preventDefault()}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const t=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);""===t?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,t)}_setOverlayWidth(e,t){e&&t&&(this._updateOverlayWidth(),this._updatePosition())}};F("vaadin-combo-box-overlay",[ki,o.iv` #overlay { width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto)); } [part='content'] { display: flex; flex-direction: column; height: 100%; } `],{moduleId:"vaadin-combo-box-overlay-styles"});class Di extends(Fi(zi(jt(U(Bt))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Ft`
`}}function Bi(e,t){return e.split(".").reduce(((e,t)=>e?e[t]:void 0),t)}r(Di);let Hi=0;let $i=0,Ui=0;const ji=[];let qi=!1;const Wi={after:e=>({run:t=>window.setTimeout(t,e),cancel(e){window.clearTimeout(e)}}),run:(e,t)=>window.setTimeout(e,t),cancel(e){window.clearTimeout(e)}},Yi={run:e=>window.requestAnimationFrame(e),cancel(e){window.cancelAnimationFrame(e)}},Gi={run:e=>window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16),cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},Ki={run(e){qi||(qi=!0,queueMicrotask((()=>function(){qi=!1;const e=ji.length;for(let t=0;t{throw e}))}}ji.splice(0,e),Ui+=e}()))),ji.push(e);const t=$i;return $i+=1,t},cancel(e){const t=e-Ui;if(t>=0){if(!ji[t])throw new Error(`invalid async handle: ${e}`);ji[t]=null}}},Ji=new Set;class Xi{static debounce(e,t,i){return e instanceof Xi?e._cancelAsync():e=new Xi,e.setConfig(t,i),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run((()=>{this._timer=null,Ji.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ji.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function Qi(){const e=Boolean(Ji.size);return Ji.forEach((e=>{try{e.flush()}catch(e){setTimeout((()=>{throw e}))}})),e}const Zi=()=>{let e;do{e=Qi()}while(e)},es=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),ts=es&&es[1]>=8,is={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const e=this._virtualCount;return Math.max(0,e-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this._virtualStartVal=e},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this._physicalStartVal=e},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(e){this._physicalCountVal=e},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let e=this._firstVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;e=this._iterateItems(((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let e=this._lastVisibleIndexVal;if(null==e){let t=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{t=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const e=Math.round(t/this._physicalAverage);this._virtualStart+=e,this._physicalStart+=e,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const e=this._getReusables(i);i?(this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length):(this._virtualStart-=e.indexes.length,this._physicalStart-=e.indexes.length),this._update(e.indexes,i?null:e.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Ki)}},_getReusables(e){let t,i,s;const r=[],n=this._hiddenContentSize*this._ratio,o=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(e?(t=this._physicalStart,i=c-d):(t=this._physicalEnd,i=h-u);s=this._getPhysicalSizeIncrement(t),i-=s,!(r.length>=l||i<=n);)if(e){if(a+r.length+1>=this._virtualCount)break;if(d+s>=c-this._scrollOffset)break;r.push(t),d+=s,t=(t+1)%l}else{if(o-r.length<=0)break;if(d+this._physicalSize-s<=u)break;r.push(t),d-=s,t=0===t?l-1:t-1}return{indexes:r,physicalTop:d-this._scrollOffset}},_update(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(e){const t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(t<0)){if(t>0){const e=window.performance.now();[].push.apply(this._physicalItems,this._createPool(t));for(let e=0;ethis._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(e){"items"===e.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Yi))},_iterateItems(e,t){let i,s,r,n;if(2===arguments.length&&t){for(n=0;n=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_positionItems(){this._adjustScrollPosition();let e=this._physicalTop;this._iterateItems((t=>{this.translate3d(0,`${e}px`,0,this._physicalItems[t]),e+=this._physicalSizes[t]}))},_getPhysicalSizeIncrement(e){return this._physicalSizes[e]},_adjustScrollPosition(){const e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop-=e;const t=this._scrollPosition;!ts&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize(e){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(e||0===this._scrollHeight||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t)},scrollToIndex(e){if("number"!=typeof e||e<0||e>this.items.length-1)return;if(Zi(),0===this._physicalCount)return;e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,i=this._virtualStart,s=0;const r=this._hiddenContentSize;for(;i{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Yi)},_isIndexRendered(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:(e,t,i)=>Math.min(i,Math.max(t,e)),_debounce(e,t,i){var s;this._debouncers||(this._debouncers={}),this._debouncers[e]=Xi.debounce(this._debouncers[e],i,t.bind(this)),s=this._debouncers[e],Ji.add(s)}},ss=1e3;class rs{constructor({createElements:e,updateElement:t,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(e=>this.__onWheel(e))),this.scrollTarget.addEventListener("virtualizer-element-focused",(e=>this.__onElementFocused(e))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((e=>e.__virtualizerPlaceholder))}scrollToIndex(e){if("number"!=typeof e||isNaN(e)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),e=this._clamp(e,0,this.size-1);const t=this.__getVisibleElements().length;let i=Math.floor(e/this.size*this._virtualCount);this._virtualCount-i{s.__virtualIndex>=e&&s.__virtualIndex<=t&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(e){Zi();let t=0,i=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems(((e,s)=>{i+=this._physicalSizes[e],this._physicalSizes[e]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[e])),t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this._physicalSize=this._physicalSize+t-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*s+t)/this._physicalAverageCount))}__getBorderBoxHeight(e){const t=getComputedStyle(e),i=parseFloat(t.height)||0;if("border-box"===t.boxSizing)return i;return i+(parseFloat(t.paddingBottom)||0)+(parseFloat(t.paddingTop)||0)+(parseFloat(t.borderBottomWidth)||0)+(parseFloat(t.borderTopWidth)||0)}__updateElement(e,t,i){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),this.__preventElementUpdates||e.__lastUpdatedIndex===t&&!i||(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach((e=>{const t=e.offsetHeight;if(0===t)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=Xi.debounce(this.__placeholderClearDebouncer,Yi,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift();const e=this.__elementHeightQueue.filter((e=>void 0!==e));this.__placeholderHeight=Math.round(e.reduce(((e,t)=>e+t),0)/e.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(e){const t=this.__getVisibleElements().find((t=>t.__virtualIndex===e));return t?this.scrollTarget.getBoundingClientRect().top-t.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(e){if(e===this.size)return;let t,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,e>0&&(t=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(t)),this.__size=e,this._itemsChanged({path:"items"}),Zi(),e>0){t=Math.min(t,e-1),this.scrollToIndex(t);const s=this.__getIndexScrollOffset(t);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),Zi(),this._debounce("_update",this._update,Ki)}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const e=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(e){const t=this.createElements(e),i=document.createDocumentFragment();return t.forEach((e=>{e.style.position="absolute",i.appendChild(e),this.__resizeObserver.observe(e)})),this.elementsContainer.appendChild(i),t}_assignModels(e){const t=[];this._iterateItems(((e,i)=>{const s=this._physicalItems[e];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),t.push(s))}),e),this.__afterElementsUpdated(t)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(e,t,i,s){s.style.transform=`translateY(${t})`}toggleScrollListener(){}__getFocusedElement(e=this.__getVisibleElements()){return e.find((e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(e,t){return t.indexOf(e)===t.length-1&&this.size>e.__virtualIndex+1}__previousFocusableSiblingMissing(e,t){return 0===t.indexOf(e)&&e.__virtualIndex>0}__onElementFocused(e){if(!this.reorderElements)return;const t=e.detail.element;if(!t)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(t,i)||this.__nextFocusableSiblingMissing(t,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(t,s)?(this._scrollTop+=Math.ceil(t.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(t,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(t.getBoundingClientRect().top),this.flush())}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const e=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const t=e>=0,i=this._getReusables(!t);i.indexes.length&&(this._physicalTop=i.physicalTop,t?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}e&&(this.__fixInvalidItemPositioningDebouncer=Xi.debounce(this.__fixInvalidItemPositioningDebouncer,Wi.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Xi.debounce(this.__scrollReorderDebouncer,Wi.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(e)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const e=this._physicalTop>this._scrollTop,t=this._physicalBottom{this._wheelAnimationFrame=!1}));const i=Math.abs(e.deltaX)+Math.abs(t);this._canScroll(this.scrollTarget,e.deltaX,t)?(e.preventDefault(),this.scrollTarget.scrollTop+=t,this.scrollTarget.scrollLeft+=e.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Xi.debounce(this._debouncerIgnoreNewWheel,Wi.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?e.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(e,t,i){return e!==this.scrollTarget&&e!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(e,t,i)||-1===["auto","scroll"].indexOf(getComputedStyle(e).overflow))||(e!==this&&e.parentElement?this._hasScrolledAncestor(e.parentElement,t,i):void 0))}_canScroll(e,t,i){return i>0&&e.scrollTop0||t>0&&e.scrollLeft0}_increasePoolIfNeeded(e){if(this._physicalCount>2&&e){const t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))}else super._increasePoolIfNeeded(e)}get _optPhysicalSize(){const e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),t=Math.max(...this._physicalSizes);return t>Math.min(...this._physicalSizes)?Math.max(0,t-e):0}_getScrollLineHeight(){const e=document.createElement("div");e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e);const t=window.getComputedStyle(e).fontSize;return document.body.removeChild(e),t?window.parseInt(t):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((e=>!e.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),i=this.__getFocusedElement(t)||t[0];if(!i)return;const s=i.__virtualIndex-e,r=t.indexOf(i)-s;if(r>0)for(let e=0;e{this.scrollTarget.style.transform=e}))}}_adjustVirtualIndexOffset(e){const t=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(e)>1e4){const e=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(e*t)}else{const e=this._vidxOffset,i=ss,s=100;0===this._scrollTop?(this._vidxOffset=0,e!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(e-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=t,e!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffsetclass extends e{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map((e=>parseInt(e,10))).reduce(((e,t)=>e+t))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Hi++}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(e=>e.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const t=this._visibleItemsCount();let i=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),i=e-t+1):e>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((e=>!e.hidden&&e.index===this.__virtualizer.lastVisibleIndex));if(!s||e!==s.index)return;const r=s.getBoundingClientRect(),n=this.getBoundingClientRect(),o=r.bottom-n.bottom+this._viewportTotalPaddingBottom;o>0&&(this.scrollTop+=o)}_isItemSelected(e,t,i){return!(e instanceof os)&&(i&&void 0!==e&&void 0!==t?Bi(i,e)===Bi(i,t):e===t)}__initVirtualizer(){this.__virtualizer=new ns({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(e,t){(e||t)&&this.requestContentUpdate()}__focusedIndexChanged(e,t){e!==t&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e)}__rendererChanged(e,t){(e||t)&&this.requestContentUpdate()}__createElements(e){return[...Array(e)].map((()=>{const e=document.createElement(`${this.__hostTagName}-item`);return e.addEventListener("click",this.__boundOnItemClick),e.tabIndex="-1",e.style.width="100%",e}))}_updateElement(e,t){const i=this.items[t],s=this.focusedIndex,r=this._isItemSelected(i,this.selectedItem,this.itemIdPath);e.setProperties({item:i,index:t,label:this.getItemLabel(i),selected:r,renderer:this.renderer,focused:!this.loading&&s===t}),"function"==typeof this.itemClassNameGenerator?e.className=this.itemClassNameGenerator(i):""!==e.className&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${t}`,e.setAttribute("role",void 0!==t&&"option"),e.setAttribute("aria-selected",r.toString()),e.setAttribute("aria-posinset",t+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),i instanceof os&&this.__requestItemByIndex(t)}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(e=>{const t=0===this.scrollTop,i=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(t&&e.deltaY<0||i&&e.deltaY>0)&&e.preventDefault()}))}__requestItemByIndex(e){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}))}))}_visibleItemsCount(){this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex);return this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};class ls extends(as(Bt)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Ft`
`}}r(ls);const ds=J((e=>class extends e{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return!this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e)}_shouldSetInvalid(e){return!0}_requestValidation(){this.manualValidation||this.validate()}}));function hs(e,t,i=0){let s=t;for(const t of e.subCaches){const e=t.parentCacheIndex;if(s<=e)break;if(s<=e+t.flatSize)return hs(t,s-e-1,i+1);s-=t.flatSize}return{cache:e,item:e.items[s],index:s,page:Math.floor(s/e.pageSize),level:i}}function cs({getItemId:e},t,i,s=0,r=0){for(let n=0;n0&&i.length?us(n,i,s+r+1):s+r}class _s{constructor(e,t,i,s,r){this.context=void 0,this.pageSize=void 0,this.items=[],this.pendingRequests={},this.__subCacheByIndex={},this.__size=0,this.__flatSize=0,this.context=e,this.pageSize=t,this.size=i,this.parentCache=s,this.parentCacheIndex=r,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((e=>e.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn(" The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(e){if(this.__size!==e){if(this.__size=e,void 0!==this.context.placeholder){this.items.length=e||0;for(let t=0;t{parseInt(e)*this.pageSize>=this.size&&delete this.pendingRequests[e]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((e,t)=>(t.recalculateFlatSize(),e+t.flatSize)),0):0}setPage(e,t){const i=e*this.pageSize;t.forEach(((e,t)=>{const s=i+t;(void 0===this.size||s{const s=i.parentCacheIndex;return t>s?e+i.flatSize:e}),t)}getItemForIndex(e){console.warn(" The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:t}=hs(this,e);return t}getCacheAndIndex(e){console.warn(" The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:t,index:i}=hs(this,e);return{cache:t,scaledIndex:i}}updateSize(){console.warn(" The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(e){if(console.warn(" The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(e)){const t=this.createSubCache(e);this.context.__controller.__loadCachePage(t,0)}}get grid(){return console.warn(" The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn(" The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}class ps extends EventTarget{constructor(e,{size:t,pageSize:i,isExpanded:s,getItemId:r,isPlaceholder:n,placeholder:o,dataProvider:a,dataProviderParams:l}){super(),this.host=void 0,this.dataProvider=void 0,this.dataProviderParams=void 0,this.pageSize=void 0,this.isExpanded=void 0,this.getItemId=void 0,this.rootCache=void 0,this.placeholder=void 0,this.isPlaceholder=void 0,this.host=e,this.pageSize=i,this.getItemId=r,this.isExpanded=s,this.placeholder=o,this.isPlaceholder=n,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(t)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache()}setDataProvider(e){this.dataProvider=e,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(e){return hs(this.rootCache,e)}getItemContext(e){return cs({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return us(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:t,page:i,item:s}=this.getFlatIndexContext(e);this.__isItemLoaded(s)||this.__loadCachePage(t,i)}ensureFlatIndexHierarchy(e){const{cache:t,item:i,index:s}=this.getFlatIndexContext(e);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!t.getSubCache(s)){const e=t.createSubCache(s);this.__loadCachePage(e,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(e){return new _s(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,t){if(!this.dataProvider||e.pendingRequests[t])return;let i={page:t,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(i={...i,...this.dataProviderParams()});const s=(r,n)=>{e.pendingRequests[t]===s&&(void 0!==n?e.size=n:i.parentItem&&(e.size=r.length),e.setPage(t,r),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[t],this.dispatchEvent(new CustomEvent("page-loaded")))};e.pendingRequests[t]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}const ms=e=>class extends e{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new ps(this,{placeholder:new os,isPlaceholder:e=>e instanceof os,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(e=>{if(!this._shouldFetchData())return;const t=e.detail.index;void 0!==t&&this.__dataProviderController.ensureFlatIndexLoaded(t)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(e){void 0!==this.__previousDataProviderFilter||""!==e?this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=e}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(e){this._shouldFetchData()&&e&&(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),this.opened||this._isInputFocused()||this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(e){const{rootCache:t}=this.__dataProviderController;t.size!==e&&(t.size=e,t.items=[...t.items],this.__synchronizeControllerState())}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:t}=this.__dataProviderController;t.items!==e&&(t.items=e,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(e,t){if(Math.floor(e)!==e||e<1)throw this.pageSize=t,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache()}_dataProviderChanged(e,t){this._ensureItemsOrDataProvider((()=>{this.dataProvider=t})),this.__dataProviderController.setDataProvider(e),this.clearCache()}_ensureItemsOrDataProvider(e){if(void 0!==this.items&&void 0!==this.dataProvider)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,t){if(e&&""!==t&&(void 0===this.selectedItem||null===this.selectedItem)){const e=this.__getItemIndexByValue(this.filteredItems,t);(e<0||!this._getItemLabel(this.filteredItems[e]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}},fs=J((e=>class extends e{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e)}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),gs=J((e=>class extends e{get _keyboardActive(){return gi()}ready(){this.addEventListener("focusin",(e=>{this._shouldSetFocus(e)&&this._setFocused(!0)})),this.addEventListener("focusout",(e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive)}_shouldSetFocus(e){return!0}_shouldRemoveFocus(e){return!0}})),ys=J((e=>class extends e{ready(){super.ready(),this.addEventListener("keydown",(e=>{this._onKeyDown(e)})),this.addEventListener("keyup",(e=>{this._onKeyUp(e)}))}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e)}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}})),vs=e=>class extends e{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,t){if(!t)return;if(void 0===e)return;const{classList:i}=t;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const e=this.__previousClasses.filter((e=>!this.__initialClasses.has(e)));e.length>0&&i.remove(...e)}const s="string"==typeof e?e.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}};const bs=J((e=>class extends e{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e),this._hasInputValue=e&&e.length>0}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange)}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange)}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=null!=e?e:"")}_inputElementChanged(e,t){e?this._addInputListeners(e):t&&this._removeInputListeners(t)}_hasInputValueChanged(e,t){(e||t)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(e){this._setHasInputValue(e),this._onInput(e)}_onInput(e){const t=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=t.value,this.__userInput=!1}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e)}_valueChanged(e,t){this._toggleHasValue(this._hasValue),""===e&&void 0===t||this.__userInput||this._forwardInputValue(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0}}));class Cs{constructor(e){this.host=e,e.addEventListener("opened-changed",(()=>{e.opened||this.__setVirtualKeyboardEnabled(!1)})),e.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),e.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(e){this.host.inputElement&&(this.host.inputElement.inputMode=e?"":"none")}}function ws(e){return null!=e}function xs(e,t){return e.findIndex((e=>!(e instanceof os)&&t(e)))}const Ps=e=>class extends(vs(Ei(ds(gs(ys(bs(fs(e)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const t=this._nativeInput;t&&(t.autocomplete="off",t.autocapitalize="off",t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-expanded",!!this.opened),t.setAttribute("spellcheck","false"),t.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var t;this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: