@digital-realty/ix-grid 1.4.1-alpha.1 → 1.4.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ix-grid.min.js +5 -5
- package/package.json +4 -4
- package/rollup.config.mjs +32 -6
- package/src/IxGrid.d.ts +148 -0
- package/src/IxGrid.js +784 -0
- package/src/IxGrid.js.map +1 -0
- package/src/IxGridNav.d.ts +2 -0
- package/src/IxGridNav.js +8 -0
- package/src/IxGridNav.js.map +1 -0
- package/src/components/IxGridColumnFilter.d.ts +35 -0
- package/src/components/IxGridColumnFilter.js +249 -0
- package/src/components/IxGridColumnFilter.js.map +1 -0
- package/src/components/IxGridDownloadMenu.d.ts +17 -0
- package/src/components/IxGridDownloadMenu.js +98 -0
- package/src/components/IxGridDownloadMenu.js.map +1 -0
- package/src/components/IxGridNav.d.ts +16 -0
- package/src/components/IxGridNav.js +103 -0
- package/src/components/IxGridNav.js.map +1 -0
- package/src/components/IxGridNoRows.d.ts +10 -0
- package/src/components/IxGridNoRows.js +74 -0
- package/src/components/IxGridNoRows.js.map +1 -0
- package/src/components/IxGridRowFilter.d.ts +55 -0
- package/src/components/IxGridRowFilter.js +441 -0
- package/src/components/IxGridRowFilter.js.map +1 -0
- package/src/components/IxPagination.d.ts +14 -0
- package/src/components/IxPagination.js +107 -0
- package/src/components/IxPagination.js.map +1 -0
- package/src/components/grid-column-filter-styles.d.ts +1 -0
- package/src/components/grid-column-filter-styles.js +89 -0
- package/src/components/grid-column-filter-styles.js.map +1 -0
- package/src/components/grid-row-filter-styles.d.ts +1 -0
- package/src/components/grid-row-filter-styles.js +311 -0
- package/src/components/grid-row-filter-styles.js.map +1 -0
- package/src/components/ix-grid-no-rows.d.ts +1 -0
- package/src/components/ix-grid-no-rows.js +2 -0
- package/src/components/ix-grid-no-rows.js.map +1 -0
- package/src/components/pagination-styles.d.ts +1 -0
- package/src/components/pagination-styles.js +84 -0
- package/src/components/pagination-styles.js.map +1 -0
- package/src/grid-view-styles.d.ts +1 -0
- package/src/grid-view-styles.js +283 -0
- package/src/grid-view-styles.js.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -0
- package/src/ix-grid-copy.d.ts +12 -0
- package/src/ix-grid-copy.js +12 -0
- package/src/ix-grid-copy.js.map +1 -0
- package/src/ix-grid-nav.d.ts +1 -0
- package/src/ix-grid-nav.js +2 -0
- package/src/ix-grid-nav.js.map +1 -0
- package/src/ix-grid-no-rows.d.ts +1 -0
- package/src/ix-grid-no-rows.js +2 -0
- package/src/ix-grid-no-rows.js.map +1 -0
- package/src/ix-grid.d.ts +1 -0
- package/src/ix-grid.js +2 -0
- package/src/ix-grid.js.map +1 -0
- package/src/models/IxGridDownloadMenuItemModel.d.ts +7 -0
- package/src/models/IxGridDownloadMenuItemModel.js +1 -0
- package/src/models/IxGridDownloadMenuItemModel.js.map +1 -0
- package/src/test/ix-grid-column-filter.test.js +41 -0
- package/src/test/ix-grid-row-filter.test.js +281 -0
- package/src/test/ix-grid.test.js +391 -0
- package/src/test/ix-pagination.test.js +58 -0
- package/web-test-runner.config.mjs +1 -1
package/dist/ix-grid.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{adoptStyles,CSSResult,LitElement,css,nothing,render,svg,html as html$1}from"lit";import{PartType,directive}from"lit/directive.js";import{AsyncDirective}from"lit/async-directive.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import"@digital-realty/ix-icon/ix-icon.js";import"@digital-realty/ix-progress/ix-progress.js";import{query,property,state,customElement}from"lit/decorators.js";import{classMap}from"lit/directives/class-map.js";import{ifDefined}from"lit/directives/if-defined.js";import{repeat}from"lit/directives/repeat.js";import"@digital-realty/ix-switch/ix-switch.js";import"@digital-realty/ix-menu/ix-menu.js";import"@digital-realty/ix-menu/ix-menu-item.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-select/ix-select.js";function __decorate(e,t,r,i){var o,a=arguments.length,s=a<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var n=e.length-1;0<=n;n--)(o=e[n])&&(s=(a<3?o(s):3<a?o(t,r,s):o(t,r))||s);return 3<a&&s&&Object.defineProperty(t,r,s),s}function dashToCamelCase$1(e){return e.replace(/-[a-z]/gu,e=>e[1].toUpperCase())}window.Vaadin||={},window.Vaadin.featureFlags||={};let experimentalMap={};function defineCustomElement(e,t="24.8.5"){if(Object.defineProperty(e,"version",{get(){return t}}),e.experimental){let t="string"==typeof e.experimental?e.experimental:dashToCamelCase$1(e.is.split("-").slice(1).join("-"))+"Component";if(!window.Vaadin.featureFlags[t]&&!experimentalMap[t])return experimentalMap[t]=new Set,experimentalMap[t].add(e),void Object.defineProperty(window.Vaadin.featureFlags,t,{get(){return 0===experimentalMap[t].size},set(e){e&&0<experimentalMap[t].size&&(experimentalMap[t].forEach(e=>{customElements.define(e.is,e)}),experimentalMap[t].clear())}});if(experimentalMap[t])return void experimentalMap[t].add(e)}var r,i=customElements.get(e.is);i?(r=i.version)&&e.version&&r===e.version?console.warn(`The component ${e.is} has been loaded twice`):console.error(`Tried to define ${e.is} version ${e.version} when version ${i.version} is already in use. Something will probably break.`):customElements.define(e.is,e)}class Lumo extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}function getEffectiveStyles(e){var t=e.constructor,e=e.__cssInjectorStyleSheet;return e?[...t.baseStyles,e,...t.themeStyles]:t.elementStyles}function applyInstanceStyles(e){[...e.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),adoptStyles(e.shadowRoot,getEffectiveStyles(e))}defineCustomElement(Lumo);let ThemePropertyMixin=e=>class extends e{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(e,t,r){super.attributeChangedCallback(e,t,r),"theme"===e&&this._set_theme(r)}},themeRegistry=[],themableInstances=new Set,themableTagNames=new Set;function classHasThemes(e){return e&&Object.prototype.hasOwnProperty.call(e,"__themes")}function hasThemes(e){return classHasThemes(customElements.get(e))}function flattenStyles(e=[]){return[e].flat(1/0).filter(e=>e instanceof CSSResult||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function matchesThemeFor(e,t){return(e||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function getCssText(e){return e.map(e=>e.cssText).join("\n")}let STYLE_ID="vaadin-themable-mixin-style";function addStylesToTemplate(e,t){var r=document.createElement("style");r.id=STYLE_ID,r.textContent=getCssText(e),t.content.appendChild(r)}function updateInstanceStyles(e){var t;e.shadowRoot&&(t=e.constructor,e instanceof LitElement?applyInstanceStyles(e):(e=e.shadowRoot.getElementById(STYLE_ID),t=t.prototype._template,e.textContent=t.content.getElementById(STYLE_ID).textContent))}function updateInstanceStylesOfType(r){themableInstances.forEach(e=>{var t=e.deref();t instanceof r?updateInstanceStyles(t):t||themableInstances.delete(e)})}function updateComponentStyles(t){t.prototype instanceof LitElement?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(STYLE_ID).textContent=getCssText(t.getStylesForThis()),themableTagNames.forEach(e=>{e=customElements.get(e);e!==t&&e.prototype instanceof t&&updateComponentStyles(e)})}function hasMatchingStyle(e,r){e=e.__themes;return!(!e||!r)&&e.some(e=>e.styles.some(t=>r.some(e=>e.cssText===t.cssText)))}function registerStyles(r,i,e={}){i=flattenStyles(i),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(r,i,e):themeRegistry.push({themeFor:r,styles:i,include:e.include,moduleId:e.moduleId}),r&&themableTagNames.forEach(e=>{var t;matchesThemeFor(r,e)&&hasThemes(e)&&(hasMatchingStyle(t=customElements.get(e),i)?console.warn("Registering styles that already exist for "+e):window.Vaadin&&window.Vaadin.suppressPostFinalizeStylesWarning||console.warn(`The custom element definition for "${e}" `+'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".'),updateComponentStyles(t),updateInstanceStylesOfType(t))})}function getAllThemes(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():themeRegistry}function getIncludePriority(e=""){let t=0;return e.startsWith("lumo-")||e.startsWith("material-")?t=1:e.startsWith("vaadin-")&&(t=2),t}function getIncludedStyles(e){let r=[];return e.include&&[].concat(e.include).forEach(t=>{var e=getAllThemes().find(e=>e.moduleId===t);e?r.push(...getIncludedStyles(e),...e.styles):console.warn(`Included moduleId ${t} not found in style registry`)},e.styles),r}function getThemes(t){let r=t+"-default-theme";var e=getAllThemes().filter(e=>e.moduleId!==r&&matchesThemeFor(e.themeFor,t)).map(e=>({...e,styles:[...getIncludedStyles(e),...e.styles],includePriority:getIncludePriority(e.moduleId)})).sort((e,t)=>t.includePriority-e.includePriority);return 0<e.length?e:getAllThemes().filter(e=>e.moduleId===r)}let ThemableMixin=i=>class extends ThemePropertyMixin(i){constructor(){super(),themableInstances.add(new WeakRef(this))}static finalize(){var e;super.finalize(),this.is&&themableTagNames.add(this.is),this.elementStyles||(e=this.prototype._template)&&!classHasThemes(this)&&addStylesToTemplate(this.getStylesForThis(),e)}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){var e=i.__themes||[],t=Object.getPrototypeOf(this.prototype),t=(t?t.constructor.__themes:[])||[];this.__themes=[...e,...t,...getThemes(this.is)];let r=this.__themes.flatMap(e=>e.styles);return r.filter((e,t)=>t===r.lastIndexOf(e))}},addGlobalThemeStyles=(e,...t)=>{var r=document.createElement("style");r.id=e,r.textContent=t.map(e=>e.toString()).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",r)},addLumoGlobalStyles=(e,...t)=>{addGlobalThemeStyles("lumo-"+e,t)},colorBase=css`:host{--lumo-base-color:#fff;--lumo-tint-5pct:hsla(0, 0%, 100%, 0.3);--lumo-tint-10pct:hsla(0, 0%, 100%, 0.37);--lumo-tint-20pct:hsla(0, 0%, 100%, 0.44);--lumo-tint-30pct:hsla(0, 0%, 100%, 0.5);--lumo-tint-40pct:hsla(0, 0%, 100%, 0.57);--lumo-tint-50pct:hsla(0, 0%, 100%, 0.64);--lumo-tint-60pct:hsla(0, 0%, 100%, 0.7);--lumo-tint-70pct:hsla(0, 0%, 100%, 0.77);--lumo-tint-80pct:hsla(0, 0%, 100%, 0.84);--lumo-tint-90pct:hsla(0, 0%, 100%, 0.9);--lumo-tint:#fff;--lumo-shade-5pct:hsla(214, 61%, 25%, 0.05);--lumo-shade-10pct:hsla(214, 57%, 24%, 0.1);--lumo-shade-20pct:hsla(214, 53%, 23%, 0.16);--lumo-shade-30pct:hsla(214, 50%, 22%, 0.26);--lumo-shade-40pct:hsla(214, 47%, 21%, 0.38);--lumo-shade-50pct:hsla(214, 45%, 20%, 0.52);--lumo-shade-60pct:hsla(214, 43%, 19%, 0.6);--lumo-shade-70pct:hsla(214, 42%, 18%, 0.69);--lumo-shade-80pct:hsla(214, 41%, 17%, 0.83);--lumo-shade-90pct:hsla(214, 40%, 16%, 0.94);--lumo-shade:hsl(214, 35%, 15%);--lumo-contrast-5pct:var(--lumo-shade-5pct);--lumo-contrast-10pct:var(--lumo-shade-10pct);--lumo-contrast-20pct:var(--lumo-shade-20pct);--lumo-contrast-30pct:var(--lumo-shade-30pct);--lumo-contrast-40pct:var(--lumo-shade-40pct);--lumo-contrast-50pct:var(--lumo-shade-50pct);--lumo-contrast-60pct:var(--lumo-shade-60pct);--lumo-contrast-70pct:var(--lumo-shade-70pct);--lumo-contrast-80pct:var(--lumo-shade-80pct);--lumo-contrast-90pct:var(--lumo-shade-90pct);--lumo-contrast:var(--lumo-shade);--lumo-header-text-color:var(--lumo-contrast);--lumo-body-text-color:var(--lumo-contrast-90pct);--lumo-secondary-text-color:var(--lumo-contrast-70pct);--lumo-tertiary-text-color:var(--lumo-contrast-50pct);--lumo-disabled-text-color:var(--lumo-contrast-30pct);--lumo-primary-color:hsl(214, 100%, 48%);--lumo-primary-color-50pct:hsla(214, 100%, 49%, 0.76);--lumo-primary-color-10pct:hsla(214, 100%, 60%, 0.13);--lumo-primary-text-color:hsl(214, 100%, 43%);--lumo-primary-contrast-color:#fff;--lumo-error-color:hsl(3, 85%, 48%);--lumo-error-color-50pct:hsla(3, 85%, 49%, 0.5);--lumo-error-color-10pct:hsla(3, 85%, 49%, 0.1);--lumo-error-text-color:hsl(3, 89%, 42%);--lumo-error-contrast-color:#fff;--lumo-success-color:hsl(145, 72%, 30%);--lumo-success-color-50pct:hsla(145, 72%, 31%, 0.5);--lumo-success-color-10pct:hsla(145, 72%, 31%, 0.1);--lumo-success-text-color:hsl(145, 85%, 25%);--lumo-success-contrast-color:#fff;--lumo-warning-color:hsl(48, 100%, 50%);--lumo-warning-color-10pct:hsla(48, 100%, 50%, 0.25);--lumo-warning-text-color:hsl(32, 100%, 30%);--lumo-warning-contrast-color:var(--lumo-shade-90pct)}@media (forced-colors:active){html{--lumo-disabled-text-color:GrayText}}`,color=(addLumoGlobalStyles("color-props",colorBase),css`[theme~=dark]{--lumo-base-color:hsl(214, 35%, 21%);--lumo-tint-5pct:hsla(214, 65%, 85%, 0.06);--lumo-tint-10pct:hsla(214, 60%, 80%, 0.14);--lumo-tint-20pct:hsla(214, 64%, 82%, 0.23);--lumo-tint-30pct:hsla(214, 69%, 84%, 0.32);--lumo-tint-40pct:hsla(214, 73%, 86%, 0.41);--lumo-tint-50pct:hsla(214, 78%, 88%, 0.5);--lumo-tint-60pct:hsla(214, 82%, 90%, 0.58);--lumo-tint-70pct:hsla(214, 87%, 92%, 0.69);--lumo-tint-80pct:hsla(214, 91%, 94%, 0.8);--lumo-tint-90pct:hsla(214, 96%, 96%, 0.9);--lumo-tint:hsl(214, 100%, 98%);--lumo-shade-5pct:hsla(214, 0%, 0%, 0.07);--lumo-shade-10pct:hsla(214, 4%, 2%, 0.15);--lumo-shade-20pct:hsla(214, 8%, 4%, 0.23);--lumo-shade-30pct:hsla(214, 12%, 6%, 0.32);--lumo-shade-40pct:hsla(214, 16%, 8%, 0.41);--lumo-shade-50pct:hsla(214, 20%, 10%, 0.5);--lumo-shade-60pct:hsla(214, 24%, 12%, 0.6);--lumo-shade-70pct:hsla(214, 28%, 13%, 0.7);--lumo-shade-80pct:hsla(214, 32%, 13%, 0.8);--lumo-shade-90pct:hsla(214, 33%, 13%, 0.9);--lumo-shade:hsl(214, 33%, 13%);--lumo-contrast-5pct:var(--lumo-tint-5pct);--lumo-contrast-10pct:var(--lumo-tint-10pct);--lumo-contrast-20pct:var(--lumo-tint-20pct);--lumo-contrast-30pct:var(--lumo-tint-30pct);--lumo-contrast-40pct:var(--lumo-tint-40pct);--lumo-contrast-50pct:var(--lumo-tint-50pct);--lumo-contrast-60pct:var(--lumo-tint-60pct);--lumo-contrast-70pct:var(--lumo-tint-70pct);--lumo-contrast-80pct:var(--lumo-tint-80pct);--lumo-contrast-90pct:var(--lumo-tint-90pct);--lumo-contrast:var(--lumo-tint);--lumo-header-text-color:var(--lumo-contrast);--lumo-body-text-color:var(--lumo-contrast-90pct);--lumo-secondary-text-color:var(--lumo-contrast-70pct);--lumo-tertiary-text-color:var(--lumo-contrast-50pct);--lumo-disabled-text-color:var(--lumo-contrast-30pct);--lumo-primary-color:hsl(214, 90%, 48%);--lumo-primary-color-50pct:hsla(214, 90%, 70%, 0.69);--lumo-primary-color-10pct:hsla(214, 90%, 55%, 0.13);--lumo-primary-text-color:hsl(214, 90%, 77%);--lumo-primary-contrast-color:#fff;--lumo-error-color:hsl(3, 79%, 49%);--lumo-error-color-50pct:hsla(3, 75%, 62%, 0.5);--lumo-error-color-10pct:hsla(3, 75%, 62%, 0.14);--lumo-error-text-color:hsl(3, 100%, 80%);--lumo-success-color:hsl(145, 72%, 30%);--lumo-success-color-50pct:hsla(145, 92%, 51%, 0.5);--lumo-success-color-10pct:hsla(145, 92%, 51%, 0.1);--lumo-success-text-color:hsl(145, 85%, 46%);--lumo-warning-color:hsl(43, 100%, 48%);--lumo-warning-color-10pct:hsla(40, 100%, 50%, 0.2);--lumo-warning-text-color:hsl(45, 100%, 60%);--lumo-warning-contrast-color:var(--lumo-shade-90pct)}html{color:var(--lumo-body-text-color);background-color:var(--lumo-base-color);color-scheme:light}[theme~=dark]{color:var(--lumo-body-text-color);background-color:var(--lumo-base-color);color-scheme:dark}h1,h2,h3,h4,h5,h6{color:var(--lumo-header-text-color)}a:where(:any-link){color:var(--lumo-primary-text-color)}a:not(:any-link){color:var(--lumo-disabled-text-color)}blockquote{color:var(--lumo-secondary-text-color)}code,pre{background-color:var(--lumo-contrast-10pct);border-radius:var(--lumo-border-radius-m)}pre code{background:0 0}`),fontIcons=(registerStyles("",color,{moduleId:"lumo-color"}),css`@font-face{font-family:lumo-icons;src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=) format('woff');font-weight:400;font-style:normal}html{--lumo-icons-align-center:'\\ea01';--lumo-icons-align-left:'\\ea02';--lumo-icons-align-right:'\\ea03';--lumo-icons-angle-down:'\\ea04';--lumo-icons-angle-left:'\\ea05';--lumo-icons-angle-right:'\\ea06';--lumo-icons-angle-up:'\\ea07';--lumo-icons-arrow-down:'\\ea08';--lumo-icons-arrow-left:'\\ea09';--lumo-icons-arrow-right:'\\ea0a';--lumo-icons-arrow-up:'\\ea0b';--lumo-icons-bar-chart:'\\ea0c';--lumo-icons-bell:'\\ea0d';--lumo-icons-calendar:'\\ea0e';--lumo-icons-checkmark:'\\ea0f';--lumo-icons-chevron-down:'\\ea10';--lumo-icons-chevron-left:'\\ea11';--lumo-icons-chevron-right:'\\ea12';--lumo-icons-chevron-up:'\\ea13';--lumo-icons-clock:'\\ea14';--lumo-icons-cog:'\\ea15';--lumo-icons-cross:'\\ea16';--lumo-icons-download:'\\ea17';--lumo-icons-drag-handle:'\\ea18';--lumo-icons-dropdown:'\\ea19';--lumo-icons-edit:'\\ea1a';--lumo-icons-error:'\\ea1b';--lumo-icons-eye:'\\ea1c';--lumo-icons-eye-disabled:'\\ea1d';--lumo-icons-menu:'\\ea1e';--lumo-icons-minus:'\\ea1f';--lumo-icons-ordered-list:'\\ea20';--lumo-icons-phone:'\\ea21';--lumo-icons-photo:'\\ea22';--lumo-icons-play:'\\ea23';--lumo-icons-plus:'\\ea24';--lumo-icons-redo:'\\ea25';--lumo-icons-reload:'\\ea26';--lumo-icons-resize-handle:'\\ea27';--lumo-icons-search:'\\ea28';--lumo-icons-undo:'\\ea29';--lumo-icons-unordered-list:'\\ea2a';--lumo-icons-upload:'\\ea2b';--lumo-icons-user:'\\ea2c'}`),sizing=(addLumoGlobalStyles("font-icons",fontIcons),css`:host{--lumo-size-xs:1.625rem;--lumo-size-s:1.875rem;--lumo-size-m:2.25rem;--lumo-size-l:2.75rem;--lumo-size-xl:3.5rem;--lumo-icon-size-s:1.25em;--lumo-icon-size-m:1.5em;--lumo-icon-size-l:2.25em;--lumo-icon-size:var(--lumo-icon-size-m)}`),spacing=(addLumoGlobalStyles("sizing-props",sizing),css`:host{--lumo-space-xs:0.25rem;--lumo-space-s:0.5rem;--lumo-space-m:1rem;--lumo-space-l:1.5rem;--lumo-space-xl:2.5rem;--lumo-space-wide-xs:calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);--lumo-space-wide-s:calc(var(--lumo-space-s) / 2) var(--lumo-space-s);--lumo-space-wide-m:calc(var(--lumo-space-m) / 2) var(--lumo-space-m);--lumo-space-wide-l:calc(var(--lumo-space-l) / 2) var(--lumo-space-l);--lumo-space-wide-xl:calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);--lumo-space-tall-xs:var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);--lumo-space-tall-s:var(--lumo-space-s) calc(var(--lumo-space-s) / 2);--lumo-space-tall-m:var(--lumo-space-m) calc(var(--lumo-space-m) / 2);--lumo-space-tall-l:var(--lumo-space-l) calc(var(--lumo-space-l) / 2);--lumo-space-tall-xl:var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2)}`),style=(addLumoGlobalStyles("spacing-props",spacing),css`:host{--lumo-border-radius-s:0.25em;--lumo-border-radius-m:var(--lumo-border-radius, 0.25em);--lumo-border-radius-l:0.5em;--lumo-box-shadow-xs:0 1px 4px -1px var(--lumo-shade-50pct);--lumo-box-shadow-s:0 2px 4px -1px var(--lumo-shade-20pct),0 3px 12px -1px var(--lumo-shade-30pct);--lumo-box-shadow-m:0 2px 6px -1px var(--lumo-shade-20pct),0 8px 24px -4px var(--lumo-shade-40pct);--lumo-box-shadow-l:0 3px 18px -2px var(--lumo-shade-20pct),0 12px 48px -6px var(--lumo-shade-40pct);--lumo-box-shadow-xl:0 4px 24px -3px var(--lumo-shade-20pct),0 18px 64px -8px var(--lumo-shade-40pct);--lumo-clickable-cursor:default}`),font=(css`html{--vaadin-button-background:var(--lumo-contrast-5pct);--vaadin-button-border:none;--vaadin-button-border-radius:var(--lumo-border-radius-m);--vaadin-button-font-size:var(--lumo-font-size-m);--vaadin-button-font-weight:500;--vaadin-button-height:var(--lumo-size-m);--vaadin-button-margin:var(--lumo-space-xs) 0;--vaadin-button-min-width:calc(var(--vaadin-button-height) * 2);--vaadin-button-padding:0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);--vaadin-button-text-color:var(--lumo-primary-text-color);--vaadin-button-primary-background:var(--lumo-primary-color);--vaadin-button-primary-border:none;--vaadin-button-primary-font-weight:600;--vaadin-button-primary-text-color:var(--lumo-primary-contrast-color);--vaadin-button-tertiary-background:transparent!important;--vaadin-button-tertiary-text-color:var(--lumo-primary-text-color);--vaadin-button-tertiary-font-weight:500;--vaadin-button-tertiary-padding:0 calc(var(--vaadin-button-height) / 6);--vaadin-checkbox-background:var(--lumo-contrast-20pct);--vaadin-checkbox-background-hover:var(--lumo-contrast-30pct);--vaadin-checkbox-border-radius:var(--lumo-border-radius-s);--vaadin-checkbox-checkmark-char:var(--lumo-icons-checkmark);--vaadin-checkbox-checkmark-char-indeterminate:'';--vaadin-checkbox-checkmark-color:var(--lumo-primary-contrast-color);--vaadin-checkbox-checkmark-size:calc(var(--vaadin-checkbox-size) + 2px);--vaadin-checkbox-label-color:var(--lumo-body-text-color);--vaadin-checkbox-label-font-size:var(--lumo-font-size-m);--vaadin-checkbox-label-padding:var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);--vaadin-checkbox-size:calc(var(--lumo-size-m) / 2);--vaadin-checkbox-disabled-checkmark-color:var(--lumo-contrast-30pct);--vaadin-checkbox-disabled-background:var(--lumo-contrast-10pct);--vaadin-radio-button-background:var(--lumo-contrast-20pct);--vaadin-radio-button-background-hover:var(--lumo-contrast-30pct);--vaadin-radio-button-dot-color:var(--lumo-primary-contrast-color);--vaadin-radio-button-dot-size:3px;--vaadin-radio-button-label-color:var(--lumo-body-text-color);--vaadin-radio-button-label-font-size:var(--lumo-font-size-m);--vaadin-radio-button-label-padding:var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);--vaadin-radio-button-size:calc(var(--lumo-size-m) / 2);--vaadin-radio-button-disabled-background:var(--lumo-contrast-10pct);--vaadin-radio-button-disabled-dot-color:var(--lumo-contrast-30pct);--vaadin-selection-color:var(--lumo-primary-color);--vaadin-selection-color-text:var(--lumo-primary-text-color);--vaadin-input-field-border-radius:var(--lumo-border-radius-m);--vaadin-focus-ring-color:var(--lumo-primary-color-50pct);--vaadin-focus-ring-width:2px;--vaadin-input-field-label-color:var(--lumo-secondary-text-color);--vaadin-input-field-focused-label-color:var(--lumo-primary-text-color);--vaadin-input-field-hovered-label-color:var(--lumo-body-text-color);--vaadin-input-field-label-font-size:var(--lumo-font-size-s);--vaadin-input-field-label-font-weight:500;--vaadin-input-field-helper-color:var(--lumo-secondary-text-color);--vaadin-input-field-helper-font-size:var(--lumo-font-size-xs);--vaadin-input-field-helper-font-weight:400;--vaadin-input-field-helper-spacing:0.4em;--vaadin-input-field-error-color:var(--lumo-error-text-color);--vaadin-input-field-error-font-size:var(--lumo-font-size-xs);--vaadin-input-field-error-font-weight:400;--vaadin-input-field-background:var(--lumo-contrast-10pct);--vaadin-input-field-icon-color:var(--lumo-contrast-60pct);--vaadin-input-field-icon-size:var(--lumo-icon-size-m);--vaadin-input-field-invalid-background:var(--lumo-error-color-10pct);--vaadin-input-field-invalid-hover-highlight:var(--lumo-error-color-50pct);--vaadin-input-field-disabled-background:var(--lumo-contrast-5pct);--vaadin-input-field-disabled-value-color:var(--lumo-disabled-text-color);--vaadin-input-field-height:var(--lumo-size-m);--vaadin-input-field-hover-highlight:var(--lumo-contrast-50pct);--vaadin-input-field-placeholder-color:var(--lumo-secondary-text-color);--vaadin-input-field-readonly-border:1px dashed var(--lumo-contrast-30pct);--vaadin-input-field-value-color:var(--lumo-body-text-color);--vaadin-input-field-value-font-size:var(--lumo-font-size-m);--vaadin-input-field-value-font-weight:500}`,addLumoGlobalStyles("style-props",style),css`:host{--lumo-font-family:-apple-system,BlinkMacSystemFont,'Roboto','Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol';--lumo-font-size-xxs:0.75rem;--lumo-font-size-xs:0.8125rem;--lumo-font-size-s:0.875rem;--lumo-font-size-m:1rem;--lumo-font-size-l:1.125rem;--lumo-font-size-xl:1.375rem;--lumo-font-size-xxl:1.75rem;--lumo-font-size-xxxl:2.5rem;--lumo-line-height-xs:1.25;--lumo-line-height-s:1.375;--lumo-line-height-m:1.625}`),typography=css`:host,body{font-family:var(--lumo-font-family);font-size:var(--lumo-font-size-m);line-height:var(--lumo-line-height-m);-webkit-text-size-adjust:100%;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}[theme~=font-size-s],small{font-size:var(--lumo-font-size-s);line-height:var(--lumo-line-height-s)}[theme~=font-size-xs]{font-size:var(--lumo-font-size-xs);line-height:var(--lumo-line-height-xs)}:where(h1, h2, h3, h4, h5, h6){font-weight:600;line-height:var(--lumo-line-height-xs);margin-block:0}:where(h1){font-size:var(--lumo-font-size-xxxl)}:where(h2){font-size:var(--lumo-font-size-xxl)}:where(h3){font-size:var(--lumo-font-size-xl)}:where(h4){font-size:var(--lumo-font-size-l)}:where(h5){font-size:var(--lumo-font-size-m)}:where(h6){font-size:var(--lumo-font-size-xs);text-transform:uppercase;letter-spacing:.03em}blockquote,p{margin-top:.5em;margin-bottom:.75em}a{text-decoration:none}a:where(:any-link):hover{text-decoration:underline}hr{display:block;align-self:stretch;height:1px;border:0;padding:0;margin:var(--lumo-space-s) calc(var(--lumo-border-radius-m)/ 2);background-color:var(--lumo-contrast-10pct)}blockquote{border-left:2px solid var(--lumo-contrast-30pct)}b,strong{font-weight:600}blockquote[dir=rtl]{border-left:none;border-right:2px solid var(--lumo-contrast-30pct)}`,CSS_URL_RX=(registerStyles("",typography,{moduleId:"lumo-typography"}),addLumoGlobalStyles("typography-props",font),registerStyles("vaadin-grid",css`:host{font-family:var(--lumo-font-family);font-size:var(--lumo-font-size-m);line-height:var(--lumo-line-height-s);color:var(--lumo-body-text-color);background-color:var(--lumo-base-color);box-sizing:border-box;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--_focus-ring-color:var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));--_focus-ring-width:var(--vaadin-focus-ring-width, 2px);--_lumo-grid-border-color:var(--lumo-contrast-20pct);--_lumo-grid-secondary-border-color:var(--lumo-contrast-10pct);--_lumo-grid-border-width:1px;--_lumo-grid-selected-row-color:var(--lumo-primary-color-10pct)}:host(:not([theme~=no-border])){border:var(--_lumo-grid-border-width) solid var(--_lumo-grid-border-color)}:host([disabled]){opacity:.7}[part~=cell]{min-height:var(--lumo-size-m);background-color:var(--vaadin-grid-cell-background,var(--lumo-base-color));cursor:default;--_cell-padding:var(--vaadin-grid-cell-padding, var(--_cell-default-padding));--_cell-default-padding:var(--lumo-space-xs) var(--lumo-space-m)}[part~=cell] ::slotted(vaadin-grid-cell-content){cursor:inherit;padding:var(--_cell-padding)}:host(:not([theme~=no-row-borders])) [part~=cell]:not([part~=details-cell]){border-top:var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color)}:host(:not([theme~=no-row-borders])) [part~=first-row] [part~=cell]:not([part~=details-cell]){border-top:0;min-height:calc(var(--lumo-size-m) - var(--_lumo-grid-border-width))}[part~=row]{position:relative}[part~=focused-cell]:focus,[part~=row]:focus{outline:0}:host([navigating]) [part~=focused-cell]:focus::before,:host([navigating]) [part~=row]:focus::before{content:'';position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color)}:host([navigating]) [part~=row]:focus::before{transform:translateX(calc(-1 * var(--_grid-horizontal-scroll-position)));z-index:3}[part~=empty-state]{padding:var(--lumo-space-m);color:var(--lumo-secondary-text-color)}:host([dragover])::after{content:'';position:absolute;z-index:100;inset:0;pointer-events:none;box-shadow:inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color)}[part~=row][dragover]{z-index:100!important}[part~=row][dragover] [part~=cell]{overflow:visible}[part~=row][dragover] [part~=cell]::after{content:'';position:absolute;inset:0;height:calc(var(--_lumo-grid-border-width) + 2px);pointer-events:none;background:var(--lumo-primary-color-50pct)}[part~=row][dragover] [part~=cell][last-frozen]::after{right:-1px}:host([theme~=no-row-borders]) [dragover] [part~=cell]::after{height:2px}[part~=row][dragover=below] [part~=cell]::after{top:100%;bottom:auto;margin-top:-1px}:host([all-rows-visible]) [part~=last-row][dragover=below] [part~=cell]::after{height:1px}[part~=row][dragover=above] [part~=cell]::after{top:auto;bottom:100%;margin-bottom:-1px}[part~=row][details-opened][dragover=above] [part~=details-cell]::after,[part~=row][details-opened][dragover=below] [part~=cell]:not([part~=details-cell])::after{display:none}[part~=row][dragover][dragover=on-top] [part~=cell]::after{height:100%;opacity:.5}[part~=row][dragstart] [part~=cell]{border:none!important;box-shadow:none!important}[part~=row][dragstart] [part~=cell][last-column]{border-radius:0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0}[part~=row][dragstart] [part~=cell][first-column]{border-radius:var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s)}#scroller [part~=row][dragstart]:not([dragstart=''])::after{display:block;position:absolute;left:var(--_grid-drag-start-x);top:var(--_grid-drag-start-y);z-index:100;content:attr(dragstart);align-items:center;justify-content:center;box-sizing:border-box;padding:calc(var(--lumo-space-xs) * .8);color:var(--lumo-error-contrast-color);background-color:var(--lumo-error-color);border-radius:var(--lumo-border-radius-m);font-family:var(--lumo-font-family);font-size:var(--lumo-font-size-xxs);line-height:1;font-weight:500;text-transform:initial;letter-spacing:initial;min-width:calc(var(--lumo-size-s) * .7);text-align:center}[part~=footer-cell],[part~=header-cell],[part~=reorder-ghost]{font-size:var(--lumo-font-size-s);font-weight:500}[part~=footer-cell]{font-weight:400}[part~=row]:only-child [part~=header-cell]{min-height:var(--lumo-size-xl)}:host(:not([theme~=no-row-borders])) [part~=row]:first-child [part~=header-cell]{border-top:0}[part~=row][hidden]+[part~=row] [part~=header-cell]{border-top:0}[part~=row]:last-child [part~=header-cell]{border-bottom:var(--_lumo-grid-border-width) solid transparent}:host(:not([theme~=no-row-borders])) [part~=row]:last-child [part~=header-cell]{border-bottom-color:var(--_lumo-grid-secondary-border-color)}:host([overflow~=top]) [part~=row]:last-child [part~=header-cell]{border-bottom-color:var(--_lumo-grid-border-color)}[part~=row]:first-child [part~=footer-cell]{border-top:var(--_lumo-grid-border-width) solid transparent}:host(:not([theme~=no-row-borders])) [part~=row]:first-child [part~=footer-cell]{border-top-color:var(--_lumo-grid-secondary-border-color)}:host([overflow~=bottom]) [part~=row]:first-child [part~=footer-cell]{border-top-color:var(--_lumo-grid-border-color)}:host([reordering]) [part~=cell]{background:linear-gradient(var(--lumo-shade-20pct),var(--lumo-shade-20pct)) var(--lumo-base-color)}:host([reordering]) [part~=cell][reorder-status=allowed]{background:var(--lumo-base-color)}:host([reordering]) [part~=cell][reorder-status=dragging]{background:linear-gradient(var(--lumo-contrast-5pct),var(--lumo-contrast-5pct)) var(--lumo-base-color)}[part~=reorder-ghost]{opacity:.85;box-shadow:var(--lumo-box-shadow-s);padding:var(--lumo-space-s) var(--lumo-space-m)!important}[part=resize-handle]{--_resize-handle-width:3px;width:var(--_resize-handle-width);background-color:var(--lumo-primary-color-50pct);opacity:0;transition:opacity .2s}[part=resize-handle]::before{transform:translateX(calc(-50% + var(--_resize-handle-width)/ 2));width:var(--lumo-size-s)}:host(:not([reordering])) :not([column-resizing]) [part~=cell]:hover [part=resize-handle],[part=resize-handle]:active{opacity:1;transition-delay:.15s}:host([theme~=column-borders]) [part~=cell]:not([last-column]):not([part~=details-cell]){border-right:var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color)}[last-frozen]{border-right:var(--_lumo-grid-border-width) solid transparent;overflow:hidden}:host([overflow~=start]) [part~=cell][last-frozen]:not([part~=details-cell]){border-right-color:var(--_lumo-grid-border-color)}[first-frozen-to-end]{border-left:var(--_lumo-grid-border-width) solid transparent}:host([overflow~=end]) [part~=cell][first-frozen-to-end]:not([part~=details-cell]){border-left-color:var(--_lumo-grid-border-color)}:host([theme~=row-stripes]) [part~=even-row] [part~=body-cell],:host([theme~=row-stripes]) [part~=even-row] [part~=details-cell]{background-image:linear-gradient(var(--lumo-contrast-5pct),var(--lumo-contrast-5pct));background-repeat:repeat-x}:host(:not([reordering])) [part~=row][selected]{z-index:1}:host(:not([reordering])) [part~=row][selected] [part~=body-cell]:not([part~=details-cell]){background-image:linear-gradient(var(--_lumo-grid-selected-row-color),var(--_lumo-grid-selected-row-color));background-repeat:repeat}:host(:not([theme~=no-row-borders])) [part~=row][selected] [part~=cell]:not([part~=details-cell]){box-shadow:0 var(--_lumo-grid-border-width) 0 0 var(--_lumo-grid-selected-row-color)}:host([theme~=compact]) [part~=row]:only-child [part~=header-cell]{min-height:var(--lumo-size-m)}:host([theme~=compact]) [part~=cell]{min-height:var(--lumo-size-s);--_cell-default-padding:var(--lumo-space-xs) var(--lumo-space-s)}:host([theme~=compact]) [part~=first-row] [part~=cell]:not([part~=details-cell]){min-height:calc(var(--lumo-size-s) - var(--_lumo-grid-border-width))}:host([theme~=compact]) [part~=empty-state]{padding:var(--lumo-space-s)}:host([theme~=wrap-cell-content]) [part~=cell] ::slotted(vaadin-grid-cell-content){white-space:normal}:host([dir=rtl]) [part~=row][dragstart] [part~=cell][last-column]{border-radius:var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s)}:host([dir=rtl]) [part~=row][dragstart] [part~=cell][first-column]{border-radius:0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0}:host([dir=rtl][theme~=column-borders]) [part~=cell]:not([last-column]):not([part~=details-cell]){border-right:none;border-left:var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color)}:host([dir=rtl]) [last-frozen]{border-right:none;border-left:var(--_lumo-grid-border-width) solid transparent}:host([dir=rtl]) [first-frozen-to-end]{border-left:none;border-right:var(--_lumo-grid-border-width) solid transparent}:host([dir=rtl][overflow~=start]) [part~=cell][last-frozen]:not([part~=details-cell]){border-left-color:var(--_lumo-grid-border-color)}:host([dir=rtl][overflow~=end]) [part~=cell][first-frozen-to-end]:not([part~=details-cell]){border-right-color:var(--_lumo-grid-border-color)}`,{moduleId:"lumo-grid"}),window.JSCompiler_renameProperty=function(e,t){return e},/(url\()([^)]*)(\))/g),ABS_URL=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,workingURL,resolveDoc;function resolveUrl(t,e){if(t&&ABS_URL.test(t))return t;if("//"===t)return t;if(void 0===workingURL){workingURL=!1;try{var r=new URL("b","http://a");r.pathname="c%20d",workingURL="http://a/c%20d"===r.href}catch(e){}}if(e=e||document.baseURI||window.location.href,workingURL)try{return new URL(t,e).href}catch(e){return t}return resolveDoc||((resolveDoc=document.implementation.createHTMLDocument("temp")).base=resolveDoc.createElement("base"),resolveDoc.head.appendChild(resolveDoc.base),resolveDoc.anchor=resolveDoc.createElement("a"),resolveDoc.body.appendChild(resolveDoc.anchor)),resolveDoc.base.href=e,resolveDoc.anchor.href=t,resolveDoc.anchor.href||t}function resolveCss(e,o){return e.replace(CSS_URL_RX,function(e,t,r,i){return t+"'"+resolveUrl(r.replace(/["']/g,""),o)+"'"+i})}function pathFromUrl(e){return e.substring(0,e.lastIndexOf("/")+1)}let useShadow=!window.ShadyDOM||!window.ShadyDOM.inUse,supportsAdoptingStyleSheets$1=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),useShadow&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{var e=new CSSStyleSheet,t=(e.replaceSync(""),document.createElement("div"));return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})()),rootPath=window.Polymer&&window.Polymer.rootPath||pathFromUrl(document.baseURI||window.location.href),sanitizeDOMValue=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,strictTemplatePolicy=(window.Polymer&&window.Polymer.setPassiveTouchGestures,window.Polymer&&window.Polymer.strictTemplatePolicy||!1),allowTemplateFromDomModule=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,legacyOptimizations=window.Polymer&&window.Polymer.legacyOptimizations||!1,legacyWarnings=window.Polymer&&window.Polymer.legacyWarnings||!1,syncInitialRender=window.Polymer&&window.Polymer.syncInitialRender||!1,legacyUndefined=window.Polymer&&window.Polymer.legacyUndefined||!1,orderedComputed=window.Polymer&&window.Polymer.orderedComputed||!1,removeNestedTemplates=window.Polymer&&window.Polymer.removeNestedTemplates||!1,fastDomIf=window.Polymer&&window.Polymer.fastDomIf||!1,useAdoptedStyleSheetsWithBuiltCSS=(window.Polymer&&window.Polymer.suppressTemplateNotifications,window.Polymer&&window.Polymer.legacyNoObservedAttributes,window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1),dedupeId$1=0,dedupingMixin=function(o){let a=o.__mixinApplications,s=(a||(a=new WeakMap,o.__mixinApplications=a),dedupeId$1++);return function(e){var t=e.__mixinSet;if(t&&t[s])return e;var r=a;let i=r.get(e);return i||(i=o(e),r.set(e,i),(r=Object.create(i.__mixinSet||t||null))[s]=!0,i.__mixinSet=r),i}},modules={},lcModules={};function setModule(e,t){modules[e]=lcModules[e.toLowerCase()]=t}function findModule(e){return modules[e]||lcModules[e.toLowerCase()]}function styleOutsideTemplateCheck(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}class DomModule extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){return e?(e=findModule(e))&&t?e.querySelector(t):e:null}attributeChangedCallback(e,t,r,i){t!==r&&this.register()}get assetpath(){var e;return this.__assetpath||(e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=resolveUrl(this.getAttribute("assetpath")||"",e.baseURI),this.__assetpath=pathFromUrl(e)),this.__assetpath}register(e){if(e=e||this.id){if(strictTemplatePolicy&&void 0!==findModule(e))throw setModule(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);setModule(this.id=e,this),styleOutsideTemplateCheck(this)}}}DomModule.prototype.modules=modules,customElements.define("dom-module",DomModule);let MODULE_STYLE_LINK_SELECTOR="link[rel=import][type~=css]",INCLUDE_ATTR="include",SHADY_UNSCOPED_ATTR="shady-unscoped";function importModule(e){return DomModule.import(e)}function styleForImport(e){var e=resolveCss((e.body||e).textContent,e.baseURI),t=document.createElement("style");return t.textContent=e,t}function stylesFromModules(e){var t=e.trim().split(/\s+/),r=[];for(let e=0;e<t.length;e++)r.push(...stylesFromModule(t[e]));return r}function stylesFromModule(e){var t,r,i=importModule(e);return i?(void 0===i._styles&&((t=[]).push(..._stylesFromModuleImports(i)),(r=i.querySelector("template"))&&t.push(...stylesFromTemplate(r,i.assetpath)),i._styles=t),i._styles):(console.warn("Could not find style data in module named",e),[])}function stylesFromTemplate(e,t){if(!e._styles){var r=[],i=e.content.querySelectorAll("style");for(let e=0;e<i.length;e++){var o=i[e],a=o.getAttribute(INCLUDE_ATTR);a&&r.push(...stylesFromModules(a).filter(function(e,t,r){return r.indexOf(e)===t})),t&&(o.textContent=resolveCss(o.textContent,t)),r.push(o)}e._styles=r}return e._styles}function stylesFromModuleImports(e){e=importModule(e);return e?_stylesFromModuleImports(e):[]}function _stylesFromModuleImports(e){var t=[],r=e.querySelectorAll(MODULE_STYLE_LINK_SELECTOR);for(let e=0;e<r.length;e++){var i,o,a=r[e];a.import&&(i=a.import,(a=a.hasAttribute(SHADY_UNSCOPED_ATTR))&&!i._unscopedStyle?((o=styleForImport(i)).setAttribute(SHADY_UNSCOPED_ATTR,""),i._unscopedStyle=o):i._style||(i._style=styleForImport(i)),t.push(a?i._unscopedStyle:i._style))}return t}let wrap$1=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e;function isPath(e){return 0<=e.indexOf(".")}function root(e){var t=e.indexOf(".");return-1===t?e:e.slice(0,t)}function isAncestor(e,t){return 0===e.indexOf(t+".")}function isDescendant(e,t){return 0===t.indexOf(e+".")}function translate(e,t,r){return t+r.slice(e.length)}function normalize(t){if(Array.isArray(t)){var r=[];for(let e=0;e<t.length;e++){var i=t[e].toString().split(".");for(let e=0;e<i.length;e++)r.push(i[e])}return r.join(".")}return t}function split(e){return(Array.isArray(e)?normalize(e):e.toString()).split(".")}function get$2(e,t,r){let i=e;var o=split(t);for(let e=0;e<o.length;e++){if(!i)return;var a=o[e];i=i[a]}return r&&(r.path=o.join(".")),i}function set(e,t,r){let i=e;var o=split(t),e=o[o.length-1];if(1<o.length){for(let e=0;e<o.length-1;e++){var a=o[e];if(!(i=i[a]))return}i[e]=r}else i[t]=r;return o.join(".")}let caseMap={},DASH_TO_CAMEL=/-[a-z]/g,CAMEL_TO_DASH=/([A-Z])/g;function dashToCamelCase(e){return caseMap[e]||(caseMap[e]=e.indexOf("-")<0?e:e.replace(DASH_TO_CAMEL,e=>e[1].toUpperCase()))}function camelToDashCase(e){return caseMap[e]||(caseMap[e]=e.replace(CAMEL_TO_DASH,"-$1").toLowerCase())}let microtaskCurrHandle$1=0,microtaskLastHandle$1=0,microtaskCallbacks$1=[],microtaskNodeContent=0,microtaskScheduled$1=!1,microtaskNode=document.createTextNode("");function microtaskFlush$1(){microtaskScheduled$1=!1;var t=microtaskCallbacks$1.length;for(let e=0;e<t;e++){var r=microtaskCallbacks$1[e];if(r)try{r()}catch(e){setTimeout(()=>{throw e})}}microtaskCallbacks$1.splice(0,t),microtaskLastHandle$1+=t}new window.MutationObserver(microtaskFlush$1).observe(microtaskNode,{characterData:!0});let microTask$1={run(e){return microtaskScheduled$1||(microtaskScheduled$1=!0,microtaskNode.textContent=microtaskNodeContent++),microtaskCallbacks$1.push(e),microtaskCurrHandle$1++},cancel(e){var t=e-microtaskLastHandle$1;if(0<=t){if(!microtaskCallbacks$1[t])throw new Error("invalid async handle: "+e);microtaskCallbacks$1[t]=null}}},microtask=microTask$1,PropertiesChanged=dedupingMixin(e=>{class t extends e{static createProperties(e){var t,r=this.prototype;for(t in e)t in r||r._createPropertyAccessor(t)}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(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!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(var 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,r){var i=this.__data[e],o=this._shouldPropertyChange(e,t,i);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),!this.__dataOld||e in this.__dataOld||(this.__dataOld[e]=i),this.__data[e]=t,this.__dataPending[e]=t),o}_isPropertyPending(e){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(e))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,microtask.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++;var e=this.__data,t=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(e,t,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(e,t,r)),this.__dataCounter--}_shouldPropertiesChange(e,t,r){return Boolean(t)}_propertiesChanged(e,t,r){}_shouldPropertyChange(e,t,r){return r!==t&&(r==r||t==t)}attributeChangedCallback(e,t,r,i){t!==r&&this._attributeToProperty(e,r),super.attributeChangedCallback&&super.attributeChangedCallback(e,t,r,i)}_attributeToProperty(e,t,r){var i;this.__serializing||(this[i=(i=this.__dataAttributes)&&i[e]||e]=this._deserializeValue(t,r||this.constructor.typeForProperty(i)))}_propertyToAttribute(e,t,r){this.__serializing=!0,r=arguments.length<3?this[e]:r,this._valueToNodeAttribute(this,r,t||this.constructor.attributeNameForProperty(e)),this.__serializing=!1}_valueToNodeAttribute(e,t,r){t=this._serializeValue(t);"class"!==r&&"name"!==r&&"slot"!==r||(e=wrap$1(e)),void 0===t?e.removeAttribute(r):e.setAttribute(r,""===t&&window.trustedTypes?window.trustedTypes.emptyScript:t)}_serializeValue(e){return"boolean"!=typeof e?null!=e?e.toString():void 0:e?"":void 0}_deserializeValue(e,t){switch(t){case Boolean:return null!==e;case Number:return Number(e);default:return e}}}return t}),nativeProperties={},proto=HTMLElement.prototype;for(;proto;){let t=Object.getOwnPropertyNames(proto);for(let e=0;e<t.length;e++)nativeProperties[t[e]]=!0;proto=Object.getPrototypeOf(proto)}let isTrustedType=window.trustedTypes?e=>trustedTypes.isHTML(e)||trustedTypes.isScript(e)||trustedTypes.isScriptURL(e):()=>!1;function saveAccessorValue(e,t){var r;nativeProperties[t]||void 0!==(r=e[t])&&(e.__data?e._setPendingProperty(t,r):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=r))}let PropertyAccessors=dedupingMixin(e=>{e=PropertiesChanged(e);class t extends e{static createPropertiesForAttributes(){var t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(dashToCamelCase(t[e]))}static attributeNameForProperty(e){return camelToDashCase(e)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(e){for(var t in e)this._setProperty(t,e[t])}_ensureAttribute(e,t){this.hasAttribute(e)||this._valueToNodeAttribute(this,t,e)}_serializeValue(e){if("object"==typeof e){if(e instanceof Date)return e.toString();if(e){if(isTrustedType(e))return e;try{return JSON.stringify(e)}catch(e){return""}}}return super._serializeValue(e)}_deserializeValue(t,e){let r;switch(e){case Object:try{r=JSON.parse(t)}catch(e){r=t}break;case Array:try{r=JSON.parse(t)}catch(e){r=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+t)}break;case Date:r=(isNaN(t)?String:Number)(t),r=new Date(r);break;default:r=super._deserializeValue(t,e)}return r}_definePropertyAccessor(e,t){saveAccessorValue(this,e),super._definePropertyAccessor(e,t)}_hasAccessor(e){return this.__dataHasAccessor&&this.__dataHasAccessor[e]}_isPropertyPending(e){return Boolean(this.__dataPending&&e in this.__dataPending)}}return t}),templateExtensions={"dom-if":!0,"dom-repeat":!0},placeholderBugDetect=!1,placeholderBug=!1;function hasPlaceholderBug(){var e;return placeholderBugDetect||(placeholderBugDetect=!0,(e=document.createElement("textarea")).placeholder="a",placeholderBug=e.placeholder===e.textContent),placeholderBug}function fixPlaceholder(e){hasPlaceholderBug()&&"textarea"===e.localName&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}let copyAttributeWithTemplateEventPolicy=(()=>{let i=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(e,t,r)=>{t=t.getAttribute(r);i&&r.startsWith("on-")?e.setAttribute(r,i.createScript(t,r)):e.setAttribute(r,t)}})();function wrapTemplateExtension(e){var t=e.getAttribute("is");if(t&&templateExtensions[t]){var r=e;for(r.removeAttribute("is"),e=r.ownerDocument.createElement(t),r.parentNode.replaceChild(e,r),e.appendChild(r);r.attributes.length;){var i=r.attributes[0].name;copyAttributeWithTemplateEventPolicy(e,r,i),r.removeAttribute(i)}}return e}function findTemplateNode(e,r){var i=r.parentInfo&&findTemplateNode(e,r.parentInfo);if(!i)return e;for(let e=i.firstChild,t=0;e;e=e.nextSibling)if(r.parentIndex===t++)return e}function applyIdToMap(e,t,r,i){i.id&&(t[i.id]=r)}function applyEventListener(i,o,a){if(a.events&&a.events.length)for(let e=0,t=a.events,r;e<t.length&&(r=t[e]);e++)i._addMethodEventListenerToNode(o,r.name,r.value,i)}function applyTemplateInfo(e,t,r,i){r.templateInfo&&(t._templateInfo=r.templateInfo,t._parentTemplateInfo=i)}function createNodeEventHandler(t,e,r){t=t._methodHost||t;return function(e){t[r]?t[r](e,e.detail):console.warn("listener method `"+r+"` not defined")}}let TemplateStamp=dedupingMixin(e=>{class t extends e{static _parseTemplate(e,t){var r;return e._templateInfo||((r=e._templateInfo={nodeInfoList:[]}).nestedTemplate=Boolean(t),r.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute&&e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,r,{parent:null})),e._templateInfo}static _parseTemplateContent(e,t,r){return this._parseTemplateNode(e.content,t,r)}static _parseTemplateNode(e,t,r){let i=!1;return"template"!=e.localName||e.hasAttribute("preserve-content")?"slot"===e.localName&&(t.hasInsertionPoint=!0):i=this._parseTemplateNestedTemplate(e,t,r)||i,fixPlaceholder(e),e.firstChild&&this._parseTemplateChildNodes(e,t,r),(i=e.hasAttributes&&e.hasAttributes()?this._parseTemplateNodeAttributes(e,t,r)||i:i)||r.noted}static _parseTemplateChildNodes(i,o,a){if("script"!==i.localName&&"style"!==i.localName)for(let t=i.firstChild,e=0,r;t;t=r){if("template"==t.localName&&(t=wrapTemplateExtension(t)),r=t.nextSibling,t.nodeType===Node.TEXT_NODE){let e=r;for(;e&&e.nodeType===Node.TEXT_NODE;)t.textContent+=e.textContent,r=e.nextSibling,i.removeChild(e),e=r;if(o.stripWhiteSpace&&!t.textContent.trim()){i.removeChild(t);continue}}var s={parentIndex:e,parentInfo:a};this._parseTemplateNode(t,o,s)&&(s.infoIndex=o.nodeInfoList.push(s)-1),t.parentNode&&e++}}static _parseTemplateNestedTemplate(e,t,r){t=this._parseTemplate(e,t);return(t.content=e.content.ownerDocument.createDocumentFragment()).appendChild(e.content),r.templateInfo=t,!0}static _parseTemplateNodeAttributes(r,i,o){let a=!1;var s=Array.from(r.attributes);for(let e=s.length-1,t;t=s[e];e--)a=this._parseTemplateNodeAttribute(r,i,o,t.name,t.value)||a;return a}static _parseTemplateNodeAttribute(e,t,r,i,o){return"on-"===i.slice(0,3)?(e.removeAttribute(i),r.events=r.events||[],r.events.push({name:i.slice(3),value:o}),!0):"id"===i&&(r.id=o,!0)}static _contentForTemplate(e){var t=e._templateInfo;return t&&t.content||e.content}_stampTemplate(e,i){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);var o=(i=i||this.constructor._parseTemplate(e)).nodeInfoList,e=i.content||e.content,a=document.importNode(e,!0),s=(a.__noInsertionPoint=!i.hasInsertionPoint,a.nodeList=new Array(o.length));a.$={};for(let e=0,t=o.length,r;e<t&&(r=o[e]);e++){var n=s[e]=findTemplateNode(a,r);applyIdToMap(this,a.$,n,r),applyTemplateInfo(this,n,r,i),applyEventListener(this,n,r)}return a}_addMethodEventListenerToNode(e,t,r,i){i=createNodeEventHandler(i=i||e,t,r);return this._addEventListenerToNode(e,t,i),i}_addEventListenerToNode(e,t,r){e.addEventListener(t,r)}_removeEventListenerFromNode(e,t,r){e.removeEventListener(t,r)}}return t}),dedupeId=0,NOOP=[],TYPES={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},COMPUTE_INFO="__computeInfo",capitalAttributeRegex=/[A-Z]/;function ensureOwnEffectMap(e,t,r){let i=e[t];if(i){if(!e.hasOwnProperty(t)&&(i=e[t]=Object.create(e[t]),r))for(var o in i){var a=i[o],s=i[o]=Array(a.length);for(let e=0;e<a.length;e++)s[e]=a[e]}}else i=e[t]={};return i}function runEffects(o,e,a,s,n,l){if(e){let i=!1;var d,h=dedupeId++;for(d in a){var c=e[n?root(d):d];if(c)for(let e=0,t=c.length,r;e<t&&(r=c[e]);e++)r.info&&r.info.lastRun===h||n&&!pathMatchesTrigger(d,r.trigger)||(r.info&&(r.info.lastRun=h),r.fn(o,d,a,s,r.info,n,l),i=!0)}return i}return!1}function runEffectsForProperty(i,e,o,a,s,n,l,d){let h=!1;var c=e[l?root(a):a];if(c)for(let e=0,t=c.length,r;e<t&&(r=c[e]);e++)r.info&&r.info.lastRun===o||l&&!pathMatchesTrigger(a,r.trigger)||(r.info&&(r.info.lastRun=o),r.fn(i,a,s,n,r.info,l,d),h=!0);return h}function pathMatchesTrigger(e,t){var r;return!t||(r=t.name)==e||!(!t.structured||!isAncestor(r,e))||!(!t.wildcard||!isDescendant(r,e))}function runObserverEffect(e,t,r,i,o){var a="string"==typeof o.method?e[o.method]:o.method,s=o.property;a?a.call(e,e.__data[s],i[s]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function runNotifyEffects(e,t,r,i,o){var a=e[TYPES.NOTIFY];let s;var n,l=dedupeId++;for(n in t)t[n]&&(a&&runEffectsForProperty(e,a,l,n,r,i,o)||o&¬ifyPath(e,n,r))&&(s=!0);let d;s&&(d=e.__dataHost)&&d._invalidateProperties&&d._invalidateProperties()}function notifyPath(e,t,r){var i=root(t);return i!==t&&(dispatchNotifyEvent(e,camelToDashCase(i)+"-changed",r[t],t),!0)}function dispatchNotifyEvent(e,t,r,i){r={value:r,queueProperty:!0};i&&(r.path=i),wrap$1(e).dispatchEvent(new CustomEvent(t,{detail:r}))}function runNotifyEffect(e,t,r,i,o,a){a=(a?root(t):t)!=t?t:null;let s=a?get$2(e,a):e.__data[t];a&&void 0===s&&(s=r[t]),dispatchNotifyEvent(e,o.eventName,s,a)}function handleNotification(e,t,r,i,o){let a;var s=e.detail,n=s&&s.path;a=n?(i=translate(r,i,n),s&&s.value):e.currentTarget[r],a=o?!a:a,t[TYPES.READ_ONLY]&&t[TYPES.READ_ONLY][i]||!t._setPendingPropertyOrPath(i,a,!0,Boolean(n))||s&&s.queueProperty||t._invalidateProperties()}function runReflectEffect(e,t,r,i,o){let a=e.__data[t];sanitizeDOMValue&&(a=sanitizeDOMValue(a,o.attrName,"attribute",e)),e._propertyToAttribute(t,o.attrName,a)}function runComputedEffects(t,r,i,o){var a=t[TYPES.COMPUTE];if(a)if(orderedComputed){dedupeId++;var e,s,n=getComputedOrder(t),l=[];for(e in r)enqueueEffectsFor(e,a,l,n,o);for(;s=l.shift();)runComputedEffect(t,"",r,i,s)&&enqueueEffectsFor(s.methodInfo,a,l,n,o);Object.assign(i,t.__dataOld),Object.assign(r,t.__dataPending),t.__dataPending=null}else{let e=r;for(;runEffects(t,a,e,i,o);)Object.assign(i,t.__dataOld),Object.assign(r,t.__dataPending),e=t.__dataPending,t.__dataPending=null}}let insertEffect=(e,t,r)=>{let i=0,o=t.length-1,a=-1;for(;i<=o;){var s=i+o>>1,n=r.get(t[s].methodInfo)-r.get(e.methodInfo);if(n<0)i=1+s;else{if(!(0<n)){a=s;break}o=s-1}}a<0&&(a=o+1),t.splice(a,0,e)},enqueueEffectsFor=(t,e,r,i,o)=>{var a=e[o?root(t):t];if(a)for(let e=0;e<a.length;e++){var s=a[e];s.info.lastRun===dedupeId||o&&!pathMatchesTrigger(t,s.trigger)||(s.info.lastRun=dedupeId,insertEffect(s.info,r,i))}};function getComputedOrder(e){let o=e.constructor.__orderedComputedDeps;if(!o){o=new Map;var a=e[TYPES.COMPUTE];let{counts:t,ready:r,total:i}=dependencyCounts(e);for(;s=r.shift();){o.set(s,o.size);var s=a[s];s&&s.forEach(e=>{e=e.info.methodInfo;--i,0==--t[e]&&r.push(e)})}0!==i&&console.warn(`Computed graph for ${e.localName} incomplete; circular?`),e.constructor.__orderedComputedDeps=o}return o}function dependencyCounts(e){var t,r,i=e[COMPUTE_INFO],o={},e=e[TYPES.COMPUTE],a=[];let s=0;for(t in i){var n=i[t];s+=o[t]=n.args.filter(e=>!e.literal).length+(n.dynamicFn?1:0)}for(r in e)i[r]||a.push(r);return{counts:o,ready:a,total:s}}function runComputedEffect(e,t,r,i,o){t=runMethodEffect(e,t,r,i,o);return t!==NOOP&&(r=o.methodInfo,e.__dataHasAccessor&&e.__dataHasAccessor[r]?e._setPendingProperty(r,t,!0):(e[r]=t,!1))}function computeLinkedPaths(t,r,i){var o=t.__dataLinkedPaths;if(o){let e;for(var a in o){var s=o[a];isDescendant(a,r)?(e=translate(a,s,r),t._setPendingPropertyOrPath(e,i,!0,!0)):isDescendant(s,r)&&(e=translate(s,a,r),t._setPendingPropertyOrPath(e,i,!0,!0))}}}function addBinding(t,r,e,i,o,a,s){e.bindings=e.bindings||[];var n={kind:i,target:o,parts:a,literal:s,isCompound:1!==a.length},l=(e.bindings.push(n),shouldAddListener(n)&&({event:i,negate:s}=n.parts[0],n.listenerEvent=i||camelToDashCase(o)+"-changed",n.listenerNegate=s),r.nodeInfoList.length);for(let e=0;e<n.parts.length;e++){var d=n.parts[e];d.compoundIndex=e,addEffectForBindingPart(t,r,n,d,l)}}function addEffectForBindingPart(r,i,e,t,o){if(!t.literal)if("attribute"===e.kind&&"-"===e.target[0])console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else{var a=t.dependencies,s={index:o,binding:e,part:t,evaluator:r};for(let t=0;t<a.length;t++){let e=a[t];"string"==typeof e&&((e=parseArg(e)).wildcard=!0),r._addTemplatePropertyEffect(i,e.rootProperty,{fn:runBindingEffect,info:s,trigger:e})}}}function runBindingEffect(e,t,r,i,o,a,s){var n,s=s[o.index],l=o.binding,d=o.part;a&&d.source&&t.length>d.source.length&&"property"==l.kind&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]?(n=r[t],t=translate(d.source,l.target,t),s._setPendingPropertyOrPath(t,n,!1,!0)&&e._enqueueClient(s)):(n=o.evaluator._evaluateBinding(e,d,t,r,i,a))!==NOOP&&applyBindingValue(e,s,l,d,n)}function applyBindingValue(e,t,r,i,o){o=computeBindingValue(t,o,r,i),sanitizeDOMValue&&(o=sanitizeDOMValue(o,r.target,r.kind,t)),"attribute"==r.kind?e._valueToNodeAttribute(t,o,r.target):(i=r.target,t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[i]?t[TYPES.READ_ONLY]&&t[TYPES.READ_ONLY][i]||t._setPendingProperty(i,o)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,i,o))}function computeBindingValue(e,t,r,i){var o;return r.isCompound&&((o=e.__dataCompoundStorage[r.target])[i.compoundIndex]=t,t=o.join("")),t="attribute"===r.kind||"textContent"!==r.target&&("value"!==r.target||"input"!==e.localName&&"textarea"!==e.localName)?t:null==t?"":t}function shouldAddListener(e){return Boolean(e.target)&&"attribute"!=e.kind&&"text"!=e.kind&&!e.isCompound&&"{"===e.parts[0].mode}function setupBindings(t,e){var{nodeList:r,nodeInfoList:i}=e;if(i.length)for(let e=0;e<i.length;e++){var o=i[e],a=r[e],s=o.bindings;if(s)for(let e=0;e<s.length;e++){var n=s[e];setupCompoundStorage(a,n),addNotifyListener(a,t,n)}a.__dataHost=t}}function setupCompoundStorage(e,t){if(t.isCompound){var r=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let e=0;e<i.length;e++)o[e]=i[e].literal;var a=t.target;r[a]=o,t.literal&&"property"==t.kind&&((e="className"===a?wrap$1(e):e)[a]=t.literal)}}function addNotifyListener(e,r,i){if(i.listenerEvent){let t=i.parts[0];e.addEventListener(i.listenerEvent,function(e){handleNotification(e,r,i.target,t.source,t.negate)})}}function createMethodEffect(r,i,o,a,e,t){t=i.static||t&&("object"!=typeof t||t[i.methodName]);var s={methodName:i.methodName,args:i.args,methodInfo:e,dynamicFn:t};for(let e=0,t;e<i.args.length&&(t=i.args[e]);e++)t.literal||r._addPropertyEffect(t.rootProperty,o,{fn:a,info:s,trigger:t});return t&&r._addPropertyEffect(i.methodName,o,{fn:a,info:s}),s}function runMethodEffect(e,t,r,i,o){var a=e._methodHost||e,s=a[o.methodName];if(s)return(e=e._marshalArgs(o.args,t,r))===NOOP?NOOP:s.apply(a,e);o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}let emptyArray=[],IDENT="(?:[a-zA-Z_$][\\w.:$\\-*]*)",NUMBER="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",SQUOTE_STRING="(?:'(?:[^'\\\\]|\\\\.)*')",DQUOTE_STRING='(?:"(?:[^"\\\\]|\\\\.)*")',STRING="(?:"+SQUOTE_STRING+"|"+DQUOTE_STRING+")",ARGUMENT="(?:("+IDENT+"|"+NUMBER+"|"+STRING+")\\s*)",ARGUMENTS="(?:"+ARGUMENT+"(?:,\\s*"+ARGUMENT+")*)",ARGUMENT_LIST="(?:\\(\\s*(?:"+ARGUMENTS+"?)\\)\\s*)",BINDING="("+IDENT+"\\s*"+ARGUMENT_LIST+"?)",OPEN_BRACKET="(\\[\\[|{{)\\s*",CLOSE_BRACKET="(?:]]|}})",NEGATE="(?:(!)\\s*)?",EXPRESSION=OPEN_BRACKET+NEGATE+BINDING+CLOSE_BRACKET,bindingRegex=new RegExp(EXPRESSION,"g");function literalFromParts(t){let r="";for(let e=0;e<t.length;e++){var i=t[e].literal;r+=i||""}return r}function parseMethod(e){var t,e=e.match(/([^\s]+?)\(([\s\S]*)\)/);return e?(t={methodName:e[1],static:!0,args:emptyArray},e[2].trim()?parseArgs(e[2].replace(/\\,/g,",").split(","),t):t):null}function parseArgs(e,t){return t.args=e.map(function(e){e=parseArg(e);return e.literal||(t.static=!1),e},this),t}function parseArg(e){var t=e.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),r={name:t,value:"",literal:!1};let i=t[0];switch(i="0"<=(i="-"===i?t[1]:i)&&i<="9"?"#":i){case"'":case'"':r.value=t.slice(1,-1),r.literal=!0;break;case"#":r.value=Number(t),r.literal=!0}return r.literal||(r.rootProperty=root(t),r.structured=isPath(t),r.structured&&(r.wildcard=".*"==t.slice(-2),r.wildcard)&&(r.name=t.slice(0,-2))),r}function getArgValue(e,t,r){let i=get$2(e,r);return i=void 0===i?t[r]:i}function notifySplices(e,t,r,i){i={indexSplices:i};legacyUndefined&&!e._overrideLegacyUndefined&&(t.splices=i),e.notifyPath(r+".splices",i),e.notifyPath(r+".length",t.length),legacyUndefined&&!e._overrideLegacyUndefined&&(i.indexSplices=[])}function notifySplice(e,t,r,i,o,a){notifySplices(e,t,r,[{index:i,addedCount:o,removed:a,object:t,type:"splice"}])}function upper(e){return e[0].toUpperCase()+e.substring(1)}let PropertyEffects=dedupingMixin(e=>{let h=TemplateStamp(PropertyAccessors(e));class t extends h{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 TYPES}_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(){var e;hostStack.length&&((e=hostStack[hostStack.length-1])._enqueueClient(this),this.__dataHost=e)}_initializeProtoProperties(e){this.__data=Object.create(e),this.__dataPending=Object.create(e),this.__dataOld={}}_initializeInstanceProperties(e){var t,r=this[TYPES.READ_ONLY];for(t in e)r&&r[t]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[t]=this.__dataPending[t]=e[t])}_addPropertyEffect(e,t,r){this._createPropertyAccessor(e,t==TYPES.READ_ONLY);let i=ensureOwnEffectMap(this,t,!0)[e];(i=i||(this[t][e]=[])).push(r)}_removePropertyEffect(e,t,r){t=ensureOwnEffectMap(this,t,!0)[e],e=t.indexOf(r);0<=e&&t.splice(e,1)}_hasPropertyEffect(e,t){t=this[t];return Boolean(t&&t[e])}_hasReadOnlyEffect(e){return this._hasPropertyEffect(e,TYPES.READ_ONLY)}_hasNotifyEffect(e){return this._hasPropertyEffect(e,TYPES.NOTIFY)}_hasReflectEffect(e){return this._hasPropertyEffect(e,TYPES.REFLECT)}_hasComputedEffect(e){return this._hasPropertyEffect(e,TYPES.COMPUTE)}_setPendingPropertyOrPath(e,t,r,i){if(i||root(Array.isArray(e)?e[0]:e)!==e){if(!i){i=get$2(this,e);if(!(e=set(this,e,t))||!super._shouldPropertyChange(e,t,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(e,t,r))return computeLinkedPaths(this,e,t),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[e])return this._setPendingProperty(e,t,r);this[e]=t}return!1}_setUnmanagedPropertyToNode(e,t,r){r===e[t]&&"object"!=typeof r||((e="className"===t?wrap$1(e):e)[t]=r)}_setPendingProperty(e,t,r){var i=this.__dataHasPaths&&isPath(e),o=i?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(e,t,o[e])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),e in this.__dataOld||(this.__dataOld[e]=this.__data[e]),i?this.__dataTemp[e]=t:this.__data[e]=t,this.__dataPending[e]=t,(i||this[TYPES.NOTIFY]&&this[TYPES.NOTIFY][e])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[e]=r),!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(){var t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){var r=t[e];r.__dataEnabled?r.__dataPending&&r._flushProperties():r._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(e,t){for(var r in e)!t&&this[TYPES.READ_ONLY]&&this[TYPES.READ_ONLY][r]||this._setPendingPropertyOrPath(r,e[r],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(e,t,r){var i,o=this.__dataHasPaths;this.__dataHasPaths=!1,runComputedEffects(this,t,r,o),i=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(t,r,o),this._flushClients(),runEffects(this,this[TYPES.REFLECT],t,r,o),runEffects(this,this[TYPES.OBSERVE],t,r,o),i&&runNotifyEffects(this,i,t,r,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(e,t,r){this[TYPES.PROPAGATE]&&runEffects(this,this[TYPES.PROPAGATE],e,t,r),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,e,t,r)}_runEffectsForTemplate(i,e,o,t){var r=(t,r)=>{runEffects(this,i.propertyEffects,t,o,r,i.nodeList);for(let e=i.firstChild;e;e=e.nextSibling)this._runEffectsForTemplate(e,t,o,r)};i.runEffects?i.runEffects(r,e,t):r(e,t)}linkPaths(e,t){e=normalize(e),t=normalize(t),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[e]=t}unlinkPaths(e){e=normalize(e),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[e]}notifySplices(e,t){var r={path:""};notifySplices(this,get$2(this,e,r),r.path,t)}get(e,t){return get$2(t||this,e)}set(e,t,r){r?set(r,e,t):this[TYPES.READ_ONLY]&&this[TYPES.READ_ONLY][e]||this._setPendingPropertyOrPath(e,t,!0)&&this._invalidateProperties()}push(e,...t){var r={path:""},e=get$2(this,e,r),i=e.length,o=e.push(...t);return t.length&¬ifySplice(this,e,r.path,i,t.length,[]),o}pop(e){var t={path:""},e=get$2(this,e,t),r=Boolean(e.length),i=e.pop();return r&¬ifySplice(this,e,t.path,e.length,0,[i]),i}splice(e,t,r,...i){var o={path:""},e=get$2(this,e,o);t=t<0?e.length-Math.floor(-t):t&&Math.floor(t);let a;return a=2===arguments.length?e.splice(t):e.splice(t,r,...i),(i.length||a.length)&¬ifySplice(this,e,o.path,t,i.length,a),a}shift(e){var t={path:""},e=get$2(this,e,t),r=Boolean(e.length),i=e.shift();return r&¬ifySplice(this,e,t.path,0,0,[i]),i}unshift(e,...t){var r={path:""},e=get$2(this,e,r),i=e.unshift(...t);return t.length&¬ifySplice(this,e,r.path,0,t.length,[]),i}notifyPath(e,t){let r;var i;r=1==arguments.length?(t=get$2(this,e,i={path:""}),i.path):Array.isArray(e)?normalize(e):e,this._setPendingPropertyOrPath(r,t,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,TYPES.READ_ONLY),e&&(this["_set"+upper(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(e,t,r){var i={property:e,method:t,dynamicFn:Boolean(r)};this._addPropertyEffect(e,TYPES.OBSERVE,{fn:runObserverEffect,info:i,trigger:{name:e}}),r&&this._addPropertyEffect(t,TYPES.OBSERVE,{fn:runObserverEffect,info:i,trigger:{name:t}})}_createMethodObserver(e,t){var r=parseMethod(e);if(!r)throw new Error("Malformed observer expression '"+e+"'");createMethodEffect(this,r,TYPES.OBSERVE,runMethodEffect,null,t)}_createNotifyingProperty(e){this._addPropertyEffect(e,TYPES.NOTIFY,{fn:runNotifyEffect,info:{eventName:camelToDashCase(e)+"-changed",property:e}})}_createReflectedProperty(e){var 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,TYPES.REFLECT,{fn:runReflectEffect,info:{attrName:t}})}_createComputedProperty(e,t,r){var i=parseMethod(t);if(!i)throw new Error("Malformed computed expression '"+t+"'");t=createMethodEffect(this,i,TYPES.COMPUTE,runComputedEffect,e,r);ensureOwnEffectMap(this,COMPUTE_INFO)[e]=t}_marshalArgs(s,n,l){var d,h,c=this.__data,u=[];for(let a=0,e=s.length;a<e;a++){let{name:e,structured:t,wildcard:r,value:i,literal:o}=s[a];if(o||(i=r?(h=getArgValue(c,l,(d=isDescendant(e,n))?n:e),{path:d?n:e,value:h,base:d?get$2(c,e):h}):t?getArgValue(c,l,e):c[e]),legacyUndefined&&!this._overrideLegacyUndefined&&void 0===i&&1<s.length)return NOOP;u[a]=i}return u}static addPropertyEffect(e,t,r){this.prototype._addPropertyEffect(e,t,r)}static createPropertyObserver(e,t,r){this.prototype._createPropertyObserver(e,t,r)}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,r){this.prototype._createComputedProperty(e,t,r)}static bindTemplate(e){return this.prototype._bindTemplate(e)}_bindTemplate(e,t){let r=this.constructor._parseTemplate(e);var i=this.__preBoundTemplateInfo==r;if(!i)for(var o in r.propertyEffects)this._createPropertyAccessor(o);return t?((r=Object.create(r)).wasPreBound=i,this.__templateInfo?(i=(t=e._parentTemplateInfo||this.__templateInfo).lastChild,(((r.parent=t).lastChild=r).previousSibling=i)?i.nextSibling=r:t.firstChild=r):this.__templateInfo=r):this.__preBoundTemplateInfo=r,r}static _addTemplatePropertyEffect(e,t,r){(e.hostProps=e.hostProps||{})[t]=!0;e=e.propertyEffects=e.propertyEffects||{};(e[t]=e[t]||[]).push(r)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),hostStack.push(this);t=super._stampTemplate(t,e);if(hostStack.pop(),e.nodeList=t.nodeList,!e.wasPreBound){var r=e.childNodes=[];for(let e=t.firstChild;e;e=e.nextSibling)r.push(e)}return setupBindings(this,t.templateInfo=e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),t}_removeBoundDom(e){var e=e.templateInfo,{previousSibling:t,nextSibling:r,parent:i}=e,o=(t?t.nextSibling=r:i&&(i.firstChild=r),r?r.previousSibling=t:i&&(i.lastChild=t),e.nextSibling=e.previousSibling=null,e.childNodes);for(let e=0;e<o.length;e++){var a=o[e];wrap$1(wrap$1(a).parentNode).removeChild(a)}}static _parseTemplateNode(e,t,r){let i=h._parseTemplateNode.call(this,e,t,r);var o;return e.nodeType===Node.TEXT_NODE&&(o=this._parseBindings(e.textContent,t))&&(e.textContent=literalFromParts(o)||" ",addBinding(this,t,r,"text","textContent",o),i=!0),i}static _parseTemplateNodeAttribute(r,i,o,a,e){var s=this._parseBindings(e,i);if(s){var n=a;let e="property",t=(capitalAttributeRegex.test(a)?e="attribute":"$"==a[a.length-1]&&(a=a.slice(0,-1),e="attribute"),literalFromParts(s));return t&&"attribute"==e&&("class"==a&&r.hasAttribute("class")&&(t+=" "+r.getAttribute(a)),r.setAttribute(a,t)),"attribute"==e&&"disable-upgrade$"==n&&r.setAttribute(a,""),"input"===r.localName&&"value"===n&&r.setAttribute(n,""),r.removeAttribute(n),"property"===e&&(a=dashToCamelCase(a)),addBinding(this,i,o,e,a,s,t),!0}return h._parseTemplateNodeAttribute.call(this,r,i,o,a,e)}static _parseTemplateNestedTemplate(e,t,r){let i=h._parseTemplateNestedTemplate.call(this,e,t,r);var o=e.parentNode,a=r.templateInfo,s="dom-if"===o.localName,n="dom-repeat"===o.localName,n=(removeNestedTemplates&&(s||n)&&(o.removeChild(e),(r=r.parentInfo).templateInfo=a,r.noted=!0,i=!1),a.hostProps);if(fastDomIf&&s)n&&(t.hostProps=Object.assign(t.hostProps||{},n),removeNestedTemplates||(r.parentInfo.noted=!0));else for(var l in n){var d=[{mode:"{",source:l,dependencies:[l],hostProp:!0}];addBinding(this,t,r,"property","_host_"+l,d)}return i}static _parseBindings(o,a){var e,s=[];let n=0;for(;null!==(h=bindingRegex.exec(o));){h.index>n&&s.push({literal:o.slice(n,h.index)});var l=h[1][0],d=Boolean(h[2]);let e=h[3].trim(),t=!1,r="",i=-1;"{"==l&&0<(i=e.indexOf("::"))&&(r=e.substring(i+2),e=e.substring(0,i),t=!0);var h=parseMethod(e),c=[];if(h){var{args:u,methodName:p}=h;for(let e=0;e<u.length;e++){var m=u[e];m.literal||c.push(m)}var _=a.dynamicFns;(_&&_[p]||h.static)&&(c.push(p),h.dynamicFn=!0)}else c.push(e);s.push({source:e,mode:l,negate:d,customEvent:t,signature:h,dependencies:c,event:r}),n=bindingRegex.lastIndex}return n&&n<o.length&&(e=o.substring(n))&&s.push({literal:e}),s.length?s:null}static _evaluateBinding(e,t,r,i,o,a){let s;return s=t.signature?runMethodEffect(e,r,i,o,t.signature):r!=t.source?get$2(e,t.source):a&&isPath(r)?get$2(e,r):e.__data[r],s=t.negate?!s:s}}return t}),hostStack=[];function register$1(e){}function normalizeProperties(e){var t,r={};for(t in e){var i=e[t];r[t]="function"==typeof i?{type:i}:i}return r}let PropertiesMixin=dedupingMixin(e=>{e=PropertiesChanged(e);function t(e){e=Object.getPrototypeOf(e);return e.prototype instanceof i?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;var r;t.hasOwnProperty(JSCompiler_renameProperty("properties",t))&&(r=t.properties)&&(e=normalizeProperties(r)),t.__ownProperties=e}return t.__ownProperties}class i extends e{static get observedAttributes(){var e;return this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(register$1(this.prototype),e=this._properties,this.__observedAttributes=e?Object.keys(e).map(e=>this.prototype._addPropertyToAttributeMap(e)):[]),this.__observedAttributes}static finalize(){var e;this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))||((e=t(this))&&e.finalize(),this.__finalized=!0,this._finalizeClass())}static _finalizeClass(){var e=r(this);e&&this.createProperties(e)}static get _properties(){var e;return this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))||(e=t(this),this.__properties=Object.assign({},e&&e._properties,r(this))),this.__properties}static typeForProperty(e){e=this._properties[e];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i}),version="3.5.2",builtCSS=window.ShadyCSS&&window.ShadyCSS.cssBuild,ElementMixin$1=dedupingMixin(e=>{let i=PropertiesMixin(PropertyEffects(e));class t extends i{static get polymerElementVersion(){return version}static _finalizeClass(){i._finalizeClass.call(this);(e=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",e))||(e.__ownObservers=e.hasOwnProperty(JSCompiler_renameProperty("observers",e))?e.observers:null);var e=e.__ownObservers;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):legacyOptimizations||(e=e.cloneNode(!0))),this.prototype._template=e}static createProperties(e){for(var t in e)r=this.prototype,i=t,t=e[t],o=e,t.computed&&(t.readOnly=!0),t.computed&&(r._hasReadOnlyEffect(i)?console.warn(`Cannot redefine computed property '${i}'.`):r._createComputedProperty(i,t.computed,o)),t.readOnly&&!r._hasReadOnlyEffect(i)?r._createReadOnlyProperty(i,!t.computed):!1===t.readOnly&&r._hasReadOnlyEffect(i)&&console.warn(`Cannot make readOnly property '${i}' non-readOnly.`),t.reflectToAttribute&&!r._hasReflectEffect(i)?r._createReflectedProperty(i):!1===t.reflectToAttribute&&r._hasReflectEffect(i)&&console.warn(`Cannot make reflected property '${i}' non-reflected.`),t.notify&&!r._hasNotifyEffect(i)?r._createNotifyingProperty(i):!1===t.notify&&r._hasNotifyEffect(i)&&console.warn(`Cannot make notify property '${i}' non-notify.`),t.observer&&r._createPropertyObserver(i,t.observer,o[t.observer]),r._addPropertyToAttributeMap(i);var r,i,o}static createObservers(t,r){var i=this.prototype;for(let e=0;e<t.length;e++)i._createMethodObserver(t[e],r)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let e=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof e&&(e=e()),this._template=void 0!==e?e:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&(e=>{let t=null;if(!e||strictTemplatePolicy&&!allowTemplateFromDomModule||(t=DomModule.import(e,"template"),!strictTemplatePolicy)||t)return t;throw new Error("strictTemplatePolicy: expecting dom-module or null template for "+e)})(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(e){this._template=e}static get importPath(){var e;return this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))||((e=this.importMeta)?this._importPath=pathFromUrl(e.url):(e=DomModule.import(this.is),this._importPath=e&&e.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath)),this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=rootPath,this.importPath=this.constructor.importPath;var e=(e=>{if(!e.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",e))){e.__propertyDefaults=null;var t,r=e._properties;for(t in r){var i=r[t];"value"in i&&(e.__propertyDefaults=e.__propertyDefaults||{},e.__propertyDefaults[t]=i)}}return e.__propertyDefaults})(this.constructor);if(e)for(var t in e){var r=e[t];this._canApplyPropertyDefault(t)&&(r="function"==typeof r.value?r.value.call(this):r.value,this._hasAccessor(t)?this._setPendingProperty(t,r,!0):this[t]=r)}}_canApplyPropertyDefault(e){return!this.hasOwnProperty(e)}static _processStyleText(e,t){return resolveCss(e,t)}static _finalizeTemplate(e){var t=this.prototype._template;if(t&&!t.__polymerFinalized){t.__polymerFinalized=!0;var r=this.importPath,r=r?resolveUrl(r):"",i=this,o=t,a=r;if(!builtCSS){var s=o.content.querySelectorAll("style"),n=stylesFromTemplate(o),l=stylesFromModuleImports(e),d=o.content.firstElementChild;for(let e=0;e<l.length;e++){var h=l[e];h.textContent=i._processStyleText(h.textContent,a),o.content.insertBefore(h,d)}let r=0;for(let t=0;t<n.length;t++){let e=n[t];var c=s[r];c!==e?(e=e.cloneNode(!0),c.parentNode.insertBefore(e,c)):r++,e.textContent=i._processStyleText(e.textContent,a)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(o,e),useAdoptedStyleSheetsWithBuiltCSS&&builtCSS&&supportsAdoptingStyleSheets$1){e=o.content.querySelectorAll("style");if(e){let t="";Array.from(e).forEach(e=>{t+=e.textContent,e.parentNode.removeChild(e)}),i._styleSheet=new CSSStyleSheet,i._styleSheet.replaceSync(t)}}this.prototype._bindTemplate(t)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(e){var t=wrap$1(this);if(t.attachShadow)return e?(t.shadowRoot||(t.attachShadow({mode:"open",shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),this.constructor._styleSheet&&(t.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),syncInitialRender&&window.ShadyDOM&&window.ShadyDOM.flushInitial(t.shadowRoot),t.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(e){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,e)}resolveUrl(e,t){return!t&&this.importPath&&(t=resolveUrl(this.importPath)),resolveUrl(e,t)}static _parseTemplateContent(e,t,r){return t.dynamicFns=t.dynamicFns||this._properties,i._parseTemplateContent.call(this,e,t,r)}static _addTemplatePropertyEffect(e,t,r){return!legacyWarnings||t in this._properties||r.info.part.signature&&r.info.part.signature.static||r.info.part.hostProp||e.nestedTemplate||console.warn(`Property '${t}' used in template but not declared in 'properties'; `+"attribute will not be observed."),i._addTemplatePropertyEffect.call(this,e,t,r)}}return t}),policy=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:e=>e});class LiteralString{constructor(i,e){assertValidTemplateStringParameters(i,e);e=e.reduce((e,t,r)=>e+literalValue(t)+i[r+1],i[0]);this.value=e.toString()}toString(){return this.value}}function literalValue(e){if(e instanceof LiteralString)return e.value;throw new Error("non-literal value passed to Polymer's htmlLiteral function: "+e)}function htmlValue(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof LiteralString)return literalValue(e);throw new Error("non-template value passed to Polymer's html function: "+e)}let html=function(i,...e){assertValidTemplateStringParameters(i,e);var t=document.createElement("template");let r=e.reduce((e,t,r)=>e+htmlValue(t)+i[r+1],i[0]);return policy&&(r=policy.createHTML(r)),t.innerHTML=r,t},assertValidTemplateStringParameters=(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")},PolymerElement=ElementMixin$1(HTMLElement),microtaskCurrHandle=0,microtaskLastHandle=0,microtaskCallbacks=[],microtaskScheduled=!1;function microtaskFlush(){microtaskScheduled=!1;var t=microtaskCallbacks.length;for(let e=0;e<t;e++){var r=microtaskCallbacks[e];if(r)try{r()}catch(e){setTimeout(()=>{throw e})}}microtaskCallbacks.splice(0,t),microtaskLastHandle+=t}let timeOut={after(t){return{run(e){return window.setTimeout(e,t)},cancel(e){window.clearTimeout(e)}}},run(e,t){return window.setTimeout(e,t)},cancel(e){window.clearTimeout(e)}},animationFrame={run(e){return window.requestAnimationFrame(e)},cancel(e){window.cancelAnimationFrame(e)}},idlePeriod={run(e){return window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16)},cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}},microTask={run(e){microtaskScheduled||(microtaskScheduled=!0,queueMicrotask(()=>microtaskFlush())),microtaskCallbacks.push(e);e=microtaskCurrHandle;return microtaskCurrHandle+=1,e},cancel(e){var t=e-microtaskLastHandle;if(0<=t){if(!microtaskCallbacks[t])throw new Error("invalid async handle: "+e);microtaskCallbacks[t]=null}}},debouncerQueue=new Set;class Debouncer{static debounce(e,t,r){return e instanceof Debouncer?e._cancelAsync():e=new Debouncer,e.setConfig(t,r),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,debouncerQueue.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),debouncerQueue.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 enqueueDebouncer(e){debouncerQueue.add(e)}function flushDebouncers(){var e=Boolean(debouncerQueue.size);return debouncerQueue.forEach(e=>{try{e.flush()}catch(e){setTimeout(()=>{throw e})}}),e}let flush=()=>{for(;flushDebouncers(););},directionSubscribers=[];function alignDirs(e,t,r=e.getAttribute("dir")){t?e.setAttribute("dir",t):null!=r&&e.removeAttribute("dir")}function getDocumentDir(){return document.documentElement.getAttribute("dir")}function directionUpdater(){let t=getDocumentDir();directionSubscribers.forEach(e=>{alignDirs(e,t)})}let directionObserver=new MutationObserver(directionUpdater),DirMixin=(directionObserver.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),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(),alignDirs(this,getDocumentDir(),null))}attributeChangedCallback(e,t,r){var i,o;super.attributeChangedCallback(e,t,r),"dir"===e&&(i=r===(e=getDocumentDir())&&-1===directionSubscribers.indexOf(this),o=!r&&t&&-1===directionSubscribers.indexOf(this),t=r!==e&&t===e,i||o?(this.__subscribe(),alignDirs(this,e,r)):t&&this.__unsubscribe())}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=directionSubscribers.includes(this),this.__unsubscribe()}_valueToNodeAttribute(e,t,r){"dir"===r&&""===t&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,t,r)}_attributeToProperty(e,t,r){"dir"!==e||t?super._attributeToProperty(e,t,r):this.dir=""}__subscribe(){directionSubscribers.includes(this)||directionSubscribers.push(this)}__unsubscribe(){directionSubscribers.includes(this)&&directionSubscribers.splice(directionSubscribers.indexOf(this),1)}});function get$1(e,t){return e.split(".").reduce((e,t)=>e?e[t]:void 0,t)}function processTemplates(e){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}function getClosestElement(e,t){return t?t.closest(e)||getClosestElement(e,t.getRootNode().host):null}function deserializeAttributeValue(e){return e?new Set(e.split(" ")):new Set}function serializeAttributeValue(e){return e?[...e].join(" "):""}function addValueToAttribute(e,t,r){var i=deserializeAttributeValue(e.getAttribute(t));i.add(r),e.setAttribute(t,serializeAttributeValue(i))}function removeValueFromAttribute(e,t,r){var i=deserializeAttributeValue(e.getAttribute(t));i.delete(r),0===i.size?e.removeAttribute(t):e.setAttribute(t,serializeAttributeValue(i))}function isEmptyTextNode(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}function getBodyRowCells(e){return e.__cells||Array.from(e.querySelectorAll('[part~="cell"]:not([part~="details-cell"])'))}function iterateChildren(e,t){[...e.children].forEach(t)}function iterateRowCells(e,t){getBodyRowCells(e).forEach(t),e.__detailsCell&&t(e.__detailsCell)}function updateColumnOrders(e,t,r){let i=1;e.forEach(e=>{i%10==0&&(i+=1),e._order=r+i*t,i+=1})}function updateState(e,t,r){switch(typeof r){case"boolean":e.toggleAttribute(t,r);break;case"string":e.setAttribute(t,r);break;default:e.removeAttribute(t)}}function updatePart(e,t,r){(t||""===t?addValueToAttribute:removeValueFromAttribute)(e,"part",r)}function updateCellsPart(e,t,r){e.forEach(e=>{updatePart(e,r,t)})}function updateBooleanRowStates(r,e){let i=getBodyRowCells(r);Object.entries(e).forEach(([e,t])=>{updateState(r,e,t);e+="-row";updatePart(r,t,e),updateCellsPart(i,e+"-cell",t)})}function updateStringRowStates(i,e){let o=getBodyRowCells(i);Object.entries(e).forEach(([e,t])=>{var r=i.getAttribute(e);updateState(i,e,t),r&&(updatePart(i,!1,r=e+`-${r}-row`),updateCellsPart(o,r+"-cell",!1)),t&&(updatePart(i,t,r=e+`-${t}-row`),updateCellsPart(o,r+"-cell",t))})}function updateCellState(e,t,r,i,o){updateState(e,t,r),o&&updatePart(e,!1,o),updatePart(e,r,i||t+"-cell")}class ColumnObserver{constructor(e,t){this.__host=e,this.__callback=t,this.__currentSlots=[],this.__onMutation=this.__onMutation.bind(this),this.__observer=new MutationObserver(this.__onMutation),this.__observer.observe(e,{childList:!0}),this.__initialCallDebouncer=Debouncer.debounce(this.__initialCallDebouncer,microTask,()=>this.__onMutation())}disconnect(){this.__observer.disconnect(),this.__initialCallDebouncer.cancel(),this.__toggleSlotChangeListeners(!1)}flush(){this.__onMutation()}__toggleSlotChangeListeners(t){this.__currentSlots.forEach(e=>{t?e.addEventListener("slotchange",this.__onMutation):e.removeEventListener("slotchange",this.__onMutation)})}__onMutation(){var e=!this.__currentColumns;this.__currentColumns||=[];let r=ColumnObserver.getColumns(this.__host);var t=r.filter(e=>!this.__currentColumns.includes(e)),i=this.__currentColumns.filter(e=>!r.includes(e)),o=this.__currentColumns.some((e,t)=>e!==r[t]),e=(this.__currentColumns=r,this.__toggleSlotChangeListeners(!1),this.__currentSlots=[...this.__host.children].filter(e=>e instanceof HTMLSlotElement),this.__toggleSlotChangeListeners(!0),e||t.length||i.length||o);e&&this.__callback(t,i)}static __isColumnElement(e){return e.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/u.test(e.localName)}static getColumns(e){let t=[],r=e._isColumnElement||ColumnObserver.__isColumnElement;return[...e.children].forEach(e=>{r(e)?t.push(e):e instanceof HTMLSlotElement&&[...e.assignedElements({flatten:!0})].filter(e=>r(e)).forEach(e=>t.push(e))}),t}}let ColumnBaseMixin=e=>class extends e{static get properties(){return{resizable:{type:Boolean,sync:!0,value(){var e;if("vaadin-grid-column-group"!==this.localName)return(e=this.parentNode)&&"vaadin-grid-column-group"===e.localName&&e.resizable||!1}},frozen:{type:Boolean,value:!1,sync:!0},frozenToEnd:{type:Boolean,value:!1,sync:!0},rowHeader:{type:Boolean,value:!1,sync:!0},hidden:{type:Boolean,value:!1,sync:!0},header:{type:String,sync:!0},textAlign:{type:String,sync:!0},headerPartName:{type:String,sync:!0},footerPartName:{type:String,sync:!0},_lastFrozen:{type:Boolean,value:!1,sync:!0},_bodyContentHidden:{type:Boolean,value:!1,sync:!0},_firstFrozenToEnd:{type:Boolean,value:!1,sync:!0},_order:{type:Number,sync:!0},_reorderStatus:{type:Boolean,sync:!0},_emptyCells:Array,_headerCell:{type:Object,sync:!0},_footerCell:{type:Object,sync:!0},_grid:Object,__initialized:{type:Boolean,value:!0},headerRenderer:{type:Function,sync:!0},_headerRenderer:{type:Function,computed:"_computeHeaderRenderer(headerRenderer, header, __initialized)"},footerRenderer:{type:Function,sync:!0},_footerRenderer:{type:Function,computed:"_computeFooterRenderer(footerRenderer, __initialized)"},__gridColumnElement:{type:Boolean,value:!0}}}static get observers(){return["_widthChanged(width, _headerCell, _footerCell, _cells)","_frozenChanged(frozen, _headerCell, _footerCell, _cells)","_frozenToEndChanged(frozenToEnd, _headerCell, _footerCell, _cells)","_flexGrowChanged(flexGrow, _headerCell, _footerCell, _cells)","_textAlignChanged(textAlign, _cells, _headerCell, _footerCell)","_orderChanged(_order, _headerCell, _footerCell, _cells)","_lastFrozenChanged(_lastFrozen)","_firstFrozenToEndChanged(_firstFrozenToEnd)","_onRendererOrBindingChanged(_renderer, _cells, _bodyContentHidden, path)","_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header)","_onFooterRendererOrBindingChanged(_footerRenderer, _footerCell)","_resizableChanged(resizable, _headerCell)","_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells)","_hiddenChanged(hidden, _headerCell, _footerCell, _cells)","_rowHeaderChanged(rowHeader, _cells)","__headerFooterPartNameChanged(_headerCell, _footerCell, headerPartName, footerPartName)"]}get _grid(){return this._gridValue||(this._gridValue=this._findHostGrid()),this._gridValue}get _allCells(){return[].concat(this._cells||[]).concat(this._emptyCells||[]).concat(this._headerCell).concat(this._footerCell).filter(e=>e)}connectedCallback(){super.connectedCallback(),requestAnimationFrame(()=>{this._grid&&this._allCells.forEach(e=>{e._content.parentNode||this._grid.appendChild(e._content)})})}disconnectedCallback(){super.disconnectedCallback(),requestAnimationFrame(()=>{this._grid||this._allCells.forEach(e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)})}),this._gridValue=void 0}ready(){super.ready(),processTemplates(this)}_findHostGrid(){let e=this;for(;e&&!/^vaadin.*grid(-pro)?$/u.test(e.localName);)e=(e.assignedSlot||e).parentNode;return e||void 0}_renderHeaderAndFooter(){this._renderHeaderCellContent(this._headerRenderer,this._headerCell),this._renderFooterCellContent(this._footerRenderer,this._footerCell)}_flexGrowChanged(t){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("flexGrow"),this._allCells.forEach(e=>{e.style.flexGrow=t})}_orderChanged(t){this._allCells.forEach(e=>{e.style.order=t})}_widthChanged(t){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("width"),this._allCells.forEach(e=>{e.style.width=t})}_frozenChanged(t){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozen",t),this._allCells.forEach(e=>{updateCellState(e,"frozen",t)}),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_frozenToEndChanged(t){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozenToEnd",t),this._allCells.forEach(e=>{this._grid&&e.parentElement===this._grid.$.sizer||updateCellState(e,"frozen-to-end",t)}),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_lastFrozenChanged(t){this._allCells.forEach(e=>{updateCellState(e,"last-frozen",t)}),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._lastFrozen=t)}_firstFrozenToEndChanged(t){this._allCells.forEach(e=>{this._grid&&e.parentElement===this._grid.$.sizer||updateCellState(e,"first-frozen-to-end",t)}),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._firstFrozenToEnd=t)}_rowHeaderChanged(t,e){e&&e.forEach(e=>{e.setAttribute("role",t?"rowheader":"gridcell")})}_generateHeader(e){return e.substr(e.lastIndexOf(".")+1).replace(/([A-Z])/gu,"-$1").toLowerCase().replace(/-/gu," ").replace(/^./u,e=>e.toUpperCase())}_reorderStatusChanged(t){var e=this.__previousReorderStatus;let r=e?`reorder-${e}-cell`:"",i=`reorder-${t}-cell`;this._allCells.forEach(e=>{updateCellState(e,"reorder-status",t,i,r)}),this.__previousReorderStatus=t}_resizableChanged(r,e){void 0!==r&&void 0!==e&&e&&[e].concat(this._emptyCells).forEach(e=>{var t;e&&((t=e.querySelector('[part~="resize-handle"]'))&&e.removeChild(t),r)&&((t=document.createElement("div")).setAttribute("part","resize-handle"),e.appendChild(t))})}_textAlignChanged(r){if(void 0!==r&&void 0!==this._grid)if(-1===["start","end","center"].indexOf(r))console.warn('textAlign can only be set as "start", "end" or "center"');else{let t;"ltr"===getComputedStyle(this._grid).direction?"start"===r?t="left":"end"===r&&(t="right"):"start"===r?t="right":"end"===r&&(t="left"),this._allCells.forEach(e=>{e._content.style.textAlign=r,getComputedStyle(e._content).textAlign!==r&&(e._content.style.textAlign=t)})}}_hiddenChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("hidden",e),!!e!=!!this._previousHidden&&this._grid&&(!0===e&&this._allCells.forEach(e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)}),this._grid._debouncerHiddenChanged=Debouncer.debounce(this._grid._debouncerHiddenChanged,animationFrame,()=>{this._grid&&this._grid._renderColumnTree&&this._grid._renderColumnTree(this._grid._columnTree)}),this._grid._debounceUpdateFrozenColumn&&this._grid._debounceUpdateFrozenColumn(),this._grid._resetKeyboardNavigation)&&this._grid._resetKeyboardNavigation(),this._previousHidden=e}_runRenderer(e,t,r){var i=r&&r.item&&!t.parentElement.hidden;!i&&e!==this._headerRenderer&&e!==this._footerRenderer||(t=[t._content,this],i&&t.push(r),e.apply(this,t))}__renderCellsContent(r,e){!this.hidden&&this._grid&&e.forEach(e=>{var t;e.parentElement&&(t=this._grid.__getRowModel(e.parentElement),r)&&(e._renderer!==r&&this._clearCellContent(e),this._runRenderer(e._renderer=r,e,t))})}_clearCellContent(e){e._content.innerHTML="",delete e._content._$litPart$}_renderHeaderCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid)&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement)}_onHeaderRendererOrBindingChanged(e,t){this._renderHeaderCellContent(e,t)}__headerFooterPartNameChanged(e,t,r,i){[{cell:e,partName:r},{cell:t,partName:i}].forEach(({cell:e,partName:t})=>{var r;e&&(r=e.__customParts||[],e.part.remove(...r),e.__customParts=t?t.trim().split(" "):[],e.part.add(...e.__customParts))})}_renderBodyCellsContent(e,t){t&&e&&this.__renderCellsContent(e,t)}_onRendererOrBindingChanged(e,t){this._renderBodyCellsContent(e,t)}_renderFooterCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid)&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement)}_onFooterRendererOrBindingChanged(e,t){this._renderFooterCellContent(e,t)}__setTextContent(e,t){e.textContent!==t&&(e.textContent=t)}__textHeaderRenderer(){this.__setTextContent(this._headerCell._content,this.header)}_defaultHeaderRenderer(){this.path&&this.__setTextContent(this._headerCell._content,this._generateHeader(this.path))}_defaultRenderer(e,t,{item:r}){this.path&&this.__setTextContent(e,get$1(this.path,r))}_defaultFooterRenderer(){}_computeHeaderRenderer(e,t){return e||(null!=t?this.__textHeaderRenderer:this._defaultHeaderRenderer)}_computeRenderer(e){return e||this._defaultRenderer}_computeFooterRenderer(e){return e||this._defaultFooterRenderer}},GridColumnMixin=e=>class extends ColumnBaseMixin(DirMixin(e)){static get properties(){return{responsive:{type:Array,sync:!0},minWidth:{type:String,value:"10px",sync:!0},width:{type:String,value:"100px",sync:!0},flexGrow:{type:Number,value:1,sync:!0},renderer:{type:Function,sync:!0},_renderer:{type:Function,computed:"_computeRenderer(renderer, __initialized)"},path:{type:String,sync:!0},autoWidth:{type:Boolean,value:!1},_focusButtonMode:{type:Boolean,value:!1},_cells:{type:Array,sync:!0}}}};class GridColumn extends GridColumnMixin(PolymerElement){static get is(){return"vaadin-grid-column"}}defineCustomElement(GridColumn);let appliedClassMixins=new WeakMap;function wasMixinPreviouslyApplied(e,t){let r=t;for(;r;){if(appliedClassMixins.get(r)===e)return!0;r=Object.getPrototypeOf(r)}return!1}function dedupeMixin(t){return e=>(wasMixinPreviouslyApplied(t,e)||(e=t(e),appliedClassMixins.set(e,t)),e)}let ControllerMixin=dedupeMixin(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)}}),DEV_MODE_CODE_REGEXP=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,FlowClients=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function isMinified(){return uncommentAndRun(function(){return!0})}function isDevelopmentMode(){try{return isForcedDevelopmentMode()?!0:!!isLocalhost()&&(FlowClients?!isFlowProductionMode():!isMinified())}catch(e){return!1}}function isForcedDevelopmentMode(){return localStorage.getItem("vaadin.developmentmode.force")}function isLocalhost(){return 0<=["localhost","127.0.0.1"].indexOf(window.location.hostname)}function isFlowProductionMode(){if(FlowClients&&0<Object.keys(FlowClients).map(e=>FlowClients[e]).filter(e=>e.productionMode).length)return!0;return!1}function uncommentAndRun(e,t){if("function"==typeof e){var r=DEV_MODE_CODE_REGEXP.exec(e.toString());if(r)try{e=new Function(r[1])}catch(e){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",e)}return e(t)}}window.Vaadin=window.Vaadin||{};let runIfDevelopmentMode=function(e,t){if(window.Vaadin.developmentMode)return uncommentAndRun(e,t)};function maybeGatherAndSendStats(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=isDevelopmentMode());let usageStatistics=function(){if("function"==typeof runIfDevelopmentMode)return runIfDevelopmentMode(maybeGatherAndSendStats)};window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){usageStatistics()};let statsJob,registered=new Set,ElementMixin=e=>class extends DirMixin(e){static finalize(){super.finalize();var e=this.is;e&&!registered.has(e)&&(window.Vaadin.registrations.push(this),registered.add(e),window.Vaadin.developmentModeCallback)&&enqueueDebouncer(statsJob=Debouncer.debounce(statsJob,idlePeriod,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}},DisabledMixin=dedupeMixin(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()}}),TabindexMixin=e=>class extends DisabledMixin(e){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,t){super._disabledChanged(e,t),this.__shouldAllowFocusWhenDisabled()||(e?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):t&&(void 0!==this._lastTabIndex?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0))}_tabindexChanged(e){this.__shouldAllowFocusWhenDisabled()||this.disabled&&-1!==e&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"))}focus(){this.disabled&&!this.__shouldAllowFocusWhenDisabled()||super.focus()}__shouldAllowFocusWhenDisabled(){return!1}},testUserAgent=e=>e.test(navigator.userAgent),testPlatform=e=>e.test(navigator.platform),testVendor=e=>e.test(navigator.vendor),isAndroid=testUserAgent(/Android/u),isChrome=testUserAgent(/Chrome/u)&&testVendor(/Google Inc/u),isFirefox=testUserAgent(/Firefox/u),isIPad=testPlatform(/^iPad/u)||testPlatform(/^Mac/u)&&1<navigator.maxTouchPoints,isIPhone=testPlatform(/^iPhone/u),isIOS=isIPhone||isIPad,isSafari=testUserAgent(/^((?!chrome|android).)*safari/iu),isTouch=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),supportsAdoptingStyleSheets=window.ShadowRoot&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype;class SlotObserver{constructor(e,t){this.slot=e,this.callback=t,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush()}))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){let i=this.slot.assignedNodes({flatten:!0}),e=[],o=[],a=[];i.length&&(e=i.filter(e=>!this._storedNodes.includes(e))),this._storedNodes.length&&this._storedNodes.forEach((e,t)=>{var r=i.indexOf(e);-1===r?o.push(e):r!==t&&a.push(e)}),(e.length||o.length||a.length)&&this.callback({addedNodes:e,currentNodes:i,movedNodes:a,removedNodes:o}),this._storedNodes=i}}let uniqueId=0;function generateUniqueId(){return uniqueId++}class SlotController extends EventTarget{static generateId(e,t="default"){return`${t}-${e.localName}-`+generateUniqueId()}constructor(e,t,r,i={}){super();var{initializer:i,multiple:o,observe:a,useUniqueId:s,uniqueIdPrefix:n}=i;this.host=e,this.slotName=t,this.tagName=r,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof o&&o,this.slotInitializer=i,o&&(this.nodes=[]),s&&(this.defaultId=this.constructor.generateId(e,n||t))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let e=this.getSlotChild();e?(this.node=e,this.initAddedNode(e)):(e=this.attachDefaultNode(),this.initNode(e))}initMultiple(){var e,t=this.getSlotChildren();0===t.length?(e=this.attachDefaultNode())&&(this.nodes=[e],this.initNode(e)):(this.nodes=t).forEach(e=>{this.initAddedNode(e)})}attachDefaultNode(){var{host:e,slotName:t,tagName:r}=this;let i=this.defaultNode;return!i&&r&&(i=document.createElement(r))instanceof Element&&(""!==t&&i.setAttribute("slot",t),this.defaultNode=i),i&&(this.node=i,e.appendChild(i)),i}getSlotChildren(){let t=this.slotName;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t)}getSlotChild(){return this.getSlotChildren()[0]}initNode(e){var t=this.slotInitializer;t&&t(e,this.host)}initCustomNode(e){}teardownNode(e){}initAddedNode(e){e!==this.defaultNode&&(this.initCustomNode(e),this.initNode(e))}observeSlot(){var e=this.slotName,e=this.host.shadowRoot.querySelector(""===e?"slot:not([name])":`slot[name=${e}]`);this.__slotObserver=new SlotObserver(e,({addedNodes:e,removedNodes:t})=>{let r=this.multiple?this.nodes:[this.node];e=e.filter(e=>!isEmptyTextNode(e)&&!r.includes(e));t.length&&(this.nodes=r.filter(e=>!t.includes(e)),t.forEach(e=>{this.teardownNode(e)})),e&&0<e.length&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...r,...e].filter(e=>e!==this.defaultNode),e.forEach(e=>{this.initAddedNode(e)})):(this.node&&this.node.remove(),this.node=e[0],this.initAddedNode(this.node)))})}}class TooltipController extends SlotController{constructor(e){super(e,"tooltip"),this.setTarget(e)}initCustomNode(e){e.target=this.target,void 0!==this.ariaTarget&&(e.ariaTarget=this.ariaTarget),void 0!==this.context&&(e.context=this.context),void 0!==this.manual&&(e.manual=this.manual),void 0!==this.opened&&(e.opened=this.opened),void 0!==this.position&&(e._position=this.position),void 0!==this.shouldShow&&(e.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(e){this.ariaTarget=e;var t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;var t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;var t=this.node;t&&(t.manual=e)}setOpened(e){this.opened=e;var t=this.node;t&&(t.opened=e)}setPosition(e){this.position=e;var t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;var t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;var t=this.node;t&&(t.target=e)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}let IOS=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),IOS_TOUCH_SCROLLING=IOS&&8<=IOS[1],DEFAULT_PHYSICAL_COUNT=3,ironList={_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(){var 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 r=this._physicalTop+this._scrollOffset;e=this._iterateItems((e,t)=>{if((r+=this._getPhysicalSizeIncrement(e))>this._scrollPosition)return t})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let i=this._lastVisibleIndexVal;if(null==i){let r=this._physicalTop+this._scrollOffset;this._iterateItems((e,t)=>{r<this._scrollBottom&&(i=t),r+=this._getPhysicalSizeIncrement(e)}),this._lastVisibleIndexVal=i}return i},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,r=0<=t;this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&0<this._physicalSize?(t-=this._scrollOffset,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()):0<this._physicalCount&&(t=this._getReusables(r),r?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,r?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),microTask))},_getReusables(e){let t,r,i;var o=[],a=this._hiddenContentSize*this._ratio,s=this._virtualStart,n=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;var h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(r=e?(t=this._physicalStart,c-d):(t=this._physicalEnd,h-u);;){if(i=this._getPhysicalSizeIncrement(t),r-=i,l<=o.length||r<=a)break;if(e){if(n+o.length+1>=this._virtualCount)break;if(d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l}else{if(s-o.length<=0)break;if(d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=0===t?l-1:t-1}}return{indexes:o,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;){var r=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(r)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(e){var t=this._clamp(this._physicalCount+e,DEFAULT_PHYSICAL_COUNT,this._virtualCount-this._virtualStart)-this._physicalCount;let r=Math.round(.5*this._physicalCount);if(!(t<0)){if(0<t){e=window.performance.now();[].push.apply(this._physicalItems,this._createPool(t));for(let e=0;e<t;e++)this._physicalSizes.push(0);this._physicalCount+=t,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=t),this._update(),this._templateCost=(window.performance.now()-e)/t,r=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===r||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,r)),idlePeriod):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,r),microTask))}},_render(){var e;this.isAttached&&this._isVisible&&(0!==this._physicalCount?(e=this._getReusables(!0),this._physicalTop=e.physicalTop,this._virtualStart+=e.indexes.length,this._physicalStart+=e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)):0<this._virtualCount&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(DEFAULT_PHYSICAL_COUNT)))},_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,animationFrame))},_iterateItems(e,t){let r,i,o,a;if(2===arguments.length&&t){for(a=0;a<t.length;a++)if(r=t[a],i=this._computeVidx(r),null!=(o=e.call(this,r,i)))return o}else{for(r=this._physicalStart,i=this._virtualStart;r<this._physicalCount;r++,i++)if(null!=(o=e.call(this,r,i)))return o;for(r=0;r<this._physicalStart;r++,i++)if(null!=(o=e.call(this,r,i)))return o}},_computeVidx(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems(e=>{this.translate3d(0,t+"px",0,this._physicalItems[e]),t+=this._physicalSizes[e]})},_getPhysicalSizeIncrement(e){return this._physicalSizes[e]},_adjustScrollPosition(){var e,t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);0!==t&&(this._physicalTop-=t,e=this._scrollPosition,!IOS_TOUCH_SCROLLING)&&0<e&&this._resetScrollPosition(e-t)},_resetScrollPosition(e){this.scrollTarget&&0<=e&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize(e){var 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(i){if(!("number"!=typeof i||i<0||i>this.items.length-1)&&(flush(),0!==this._physicalCount)){i=this._clamp(i,0,this._virtualCount-1),(!this._isIndexRendered(i)||i>=this._maxVirtualStart)&&(this._virtualStart=i-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,t=this._virtualStart,r=0;for(var o=this._hiddenContentSize;t<i&&r<=o;)r+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,t+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+r),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},animationFrame)},_isIndexRendered(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp(e,t,r){return Math.min(r,Math.max(t,e))},_debounce(e,t,r){this._debouncers||(this._debouncers={}),this._debouncers[e]=Debouncer.debounce(this._debouncers[e],r,t.bind(this)),enqueueDebouncer(this._debouncers[e])}},MAX_VIRTUAL_COUNT=1e5,OFFSET_ADJUST_MIN_THRESHOLD=1e3;class IronListAdapter{constructor({createElements:e,updateElement:t,scrollTarget:r,scrollContainer:i,elementsContainer:o,reorderElements:a}){this.isAttached=!0,this._vidxOffset=0,this.createElements=e,this.updateElement=t,this.scrollTarget=r,this.scrollContainer=i,this.elementsContainer=o||i,this.reorderElements=a,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()),new ResizeObserver(([{contentRect:e}])=>{e=0===e.width&&0===e.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e}).observe(this.scrollTarget),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(t){if("number"==typeof t&&!isNaN(t)&&0!==this.size&&this.scrollTarget.offsetHeight){delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);var r=this.__getVisibleElements().length;let e=Math.floor(t/this.size*this._virtualCount);this._virtualCount-e<r?(e=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):e<r?t<OFFSET_ADJUST_MIN_THRESHOLD?(e=t,this._vidxOffset=0):(e=OFFSET_ADJUST_MIN_THRESHOLD,this._vidxOffset=t-e):this._vidxOffset=t-e,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(e),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),flush(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame)&&this.__debouncerWheelAnimationFrame.flush()}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition)}update(t=0,r=this.size-1){let i=[];this.__getVisibleElements().forEach(e=>{e.__virtualIndex>=t&&e.__virtualIndex<=r&&(this.__updateElement(e,e.__virtualIndex,!0),i.push(e))}),this.__afterElementsUpdated(i)}_updateMetrics(e){flush();let r=0,i=0;var t=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((e,t)=>{i+=this._physicalSizes[e],this._physicalSizes[e]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[e])),r+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0},e),this._physicalSize=this._physicalSize+r-i,this._physicalAverageCount!==t&&(this._physicalAverage=Math.round((o*t+r)/this._physicalAverageCount))}__getBorderBoxHeight(e){var e=getComputedStyle(e),t=parseFloat(e.height)||0;return"border-box"===e.boxSizing?t:t+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(e,t,r){e.__virtualizerPlaceholder&&(e.style.paddingTop="",e.style.opacity="",e.__virtualizerPlaceholder=!1),this.__preventElementUpdates||e.__lastUpdatedIndex===t&&!r||(this.updateElement(e,t),e.__lastUpdatedIndex=t)}__afterElementsUpdated(e){e.forEach(e=>{var t=e.offsetHeight;0===t?(e.style.paddingTop=this.__placeholderHeight+"px",e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=Debouncer.debounce(this.__placeholderClearDebouncer,animationFrame,()=>this._resizeHandler())):(this.__elementHeightQueue.push(t),this.__elementHeightQueue.shift(),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(t){var e=this.__getVisibleElements().find(e=>e.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(r){if(r!==this.size){this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,t;0<r&&(e=this.adjustedFirstVisibleIndex,t=this.__getIndexScrollOffset(e)),this.__size=r,this._itemsChanged({path:"items"}),flush(),0<r&&(e=Math.min(e,r-1),this.scrollToIndex(e),r=this.__getIndexScrollOffset(e),void 0!==t)&&void 0!==r&&(this._scrollTop+=t-r),this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),flush(),this._debounce("_update",this._update,microTask)}}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(e){this.scrollTarget.scrollTop=e}get items(){return{length:Math.min(this.size,MAX_VIRTUAL_COUNT)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){var 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){e=this.createElements(e);let t=document.createDocumentFragment();return e.forEach(e=>{e.style.position="absolute",t.appendChild(e),this.__resizeObserver.observe(e)}),this.elementsContainer.appendChild(t),e}_assignModels(e){let r=[];this._iterateItems((e,t)=>{e=this._physicalItems[e];e.hidden=t>=this.size,e.hidden?delete e.__lastUpdatedIndex:(e.__virtualIndex=t+(this._vidxOffset||0),this.__updateElement(e,e.__virtualIndex),r.push(e))},e),this.__afterElementsUpdated(r)}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0}),this.__clientFull||super._isClientFull()}translate3d(e,t,r,i){i.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)&&0<e.__virtualIndex}__onElementFocused(e){var t;this.reorderElements&&(e=e.detail.element)&&(t=this.__getVisibleElements(),(this.__previousFocusableSiblingMissing(e,t)||this.__nextFocusableSiblingMissing(e,t))&&this.flush(),t=this.__getVisibleElements(),this.__nextFocusableSiblingMissing(e,t)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,t)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush()))}_scrollHandler(){var e,t,r;0!==this.scrollTarget.offsetHeight&&(this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0)),e=this.scrollTarget.scrollTop-this._scrollPosition,super._scrollHandler(),0!==this._physicalCount&&(r=this._getReusables(!(t=0<=e))).indexes.length&&(this._physicalTop=r.physicalTop,t?(this._virtualStart-=r.indexes.length,this._physicalStart-=r.indexes.length):(this._virtualStart+=r.indexes.length,this._physicalStart+=r.indexes.length),this._resizeHandler()),e&&(this.__fixInvalidItemPositioningDebouncer=Debouncer.debounce(this.__fixInvalidItemPositioningDebouncer,timeOut.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=Debouncer.debounce(this.__scrollReorderDebouncer,timeOut.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,0===this._scrollTop)&&0!==this.firstVisibleIndex&&0<Math.abs(e)&&this.scrollToIndex(0)}_resizeHandler(){super._resizeHandler();var e=this.adjustedLastVisibleIndex===this.size-1,t=this._physicalTop-this._scrollPosition;e&&0<t&&(e=Math.ceil(t/this._physicalAverage),this._virtualStart=Math.max(0,this._virtualStart-e),this._physicalStart=Math.max(0,this._physicalStart-e),super.scrollToIndex(this._virtualCount-1),this.scrollTarget.scrollTop=this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)}__fixInvalidItemPositioning(){var e,t,r,i;this.scrollTarget.isConnected&&(r=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,t=this.adjustedLastVisibleIndex===this.size-1,r&&!i||e&&!t)&&(r=e,i=this._ratio,this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=i)}__onWheel(t){if(!t.ctrlKey&&!this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY)){let e=t.deltaY;var r;t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame?(this._deltaYAcc+=e,t.preventDefault()):(e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=Debouncer.debounce(this.__debouncerWheelAnimationFrame,animationFrame,()=>{this._wheelAnimationFrame=!1}),r=Math.abs(t.deltaX)+Math.abs(e),this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=Debouncer.debounce(this._debouncerIgnoreNewWheel,timeOut.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1})):this._hasResidualMomentum&&r<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():r>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=r)}}_hasScrolledAncestor(e,t,r){return e!==this.scrollTarget&&e!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(e,t,r)||-1===["auto","scroll"].indexOf(getComputedStyle(e).overflow))||(e!==this&&e.parentElement?this._hasScrolledAncestor(e.parentElement,t,r):void 0))}_canScroll(e,t,r){return 0<r&&e.scrollTop<e.scrollHeight-e.offsetHeight||r<0&&0<e.scrollTop||0<t&&e.scrollLeft<e.scrollWidth-e.offsetWidth||t<0&&0<e.scrollLeft}_increasePoolIfNeeded(e){var t;2<this._physicalCount&&e?(t=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount,super._increasePoolIfNeeded(Math.max(e,Math.min(100,t)))):super._increasePoolIfNeeded(e)}get _optPhysicalSize(){var e=super._optPhysicalSize;return e<=0||this.__hasPlaceholders()?e:e+this.__getItemHeightBuffer()}__getItemHeightBuffer(){var e,t;return 0!==this._physicalCount&&(e=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),(t=Math.max(...this._physicalSizes))>Math.min(...this._physicalSizes))?Math.max(0,t-e):0}_getScrollLineHeight(){var e=document.createElement("div"),t=(e.style.fontSize="initial",e.style.display="none",document.body.appendChild(e),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)this.__pendingReorder=!0;else{this.__pendingReorder=!1;var e=this._virtualStart+(this._vidxOffset||0),t=this.__getVisibleElements(),r=this.__getFocusedElement(t)||t[0];if(r){var e=r.__virtualIndex-e,i=t.indexOf(r)-e;if(0<i)for(let e=0;e<i;e++)this.elementsContainer.appendChild(t[e]);else if(i<0)for(let e=t.length+i;e<t.length;e++)this.elementsContainer.insertBefore(t[e],t[0]);if(isSafari){let e=this.scrollTarget.style.transform;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=e})}}}}_adjustVirtualIndexOffset(e){var t,r=this._maxVirtualIndexOffset;this._virtualCount>=this.size?this._vidxOffset=0:this.__skipNextVirtualIndexAdjust?this.__skipNextVirtualIndexAdjust=!1:1e4<Math.abs(e)?(e=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight),this._vidxOffset=Math.round(e*r)):(e=this._vidxOffset,t=OFFSET_ADJUST_MIN_THRESHOLD,0===this._scrollTop?(this._vidxOffset=0,e!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<t&&0<this._vidxOffset&&(this._vidxOffset-=Math.min(this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex+(e-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&0<this._maxScrollTop?(this._vidxOffset=r,e!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-t&&this._vidxOffset<r&&(this._vidxOffset+=Math.min(r-this._vidxOffset,100),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-e))))}}Object.setPrototypeOf(IronListAdapter.prototype,ironList);class Virtualizer{constructor(e){this.__adapter=new IronListAdapter(e)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(e){this.__adapter.size=e}scrollToIndex(e){this.__adapter.scrollToIndex(e)}update(e=0,t=this.size-1){this.__adapter.update(e,t)}flush(){this.__adapter.flush()}hostConnected(){this.__adapter.hostConnected()}}let A11yMixin=e=>class extends e{static get properties(){return{accessibleName:{type:String}}}static get observers(){return["_a11yUpdateGridSize(size, _columnTree)"]}_a11yGetHeaderRowCount(e){return e.filter(e=>e.some(e=>e.headerRenderer||e.path&&null!==e.header||e.header)).length}_a11yGetFooterRowCount(e){return e.filter(e=>e.some(e=>e.headerRenderer)).length}_a11yUpdateGridSize(e,t){var r;void 0!==e&&void 0!==t&&(r=t[t.length-1],this.$.table.setAttribute("aria-rowcount",e+this._a11yGetHeaderRowCount(t)+this._a11yGetFooterRowCount(t)),this.$.table.setAttribute("aria-colcount",r&&r.length||0),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows())}_a11yUpdateHeaderRows(){iterateChildren(this.$.header,(e,t)=>{e.setAttribute("aria-rowindex",t+1)})}_testIdUpdateHeaderRows(){iterateChildren(this.$.header,(e,t)=>{e.setAttribute("data-testid","rowindex-"+(t+1))})}_a11yUpdateFooterRows(){iterateChildren(this.$.footer,(e,t)=>{e.setAttribute("aria-rowindex",this._a11yGetHeaderRowCount(this._columnTree)+this.size+t+1)})}_testIdUpdateFooterRows(){iterateChildren(this.$.footer,(e,t)=>{e.setAttribute("data-testid","rowindex-"+(this._a11yGetHeaderRowCount(this._columnTree)+this.size+t+1))})}_a11yUpdateRowRowindex(e,t){e.setAttribute("aria-rowindex",t+this._a11yGetHeaderRowCount(this._columnTree)+1)}_testIdUpdateRowRowindex(e,t){e.setAttribute("data-testid","rowindex-"+(t+this._a11yGetHeaderRowCount(this._columnTree)+1))}_a11yUpdateRowSelected(e,t){e.setAttribute("aria-selected",Boolean(t)),iterateRowCells(e,e=>{e.setAttribute("aria-selected",Boolean(t))})}_a11yUpdateRowExpanded(e){this.__isRowExpandable(e)?e.setAttribute("aria-expanded","false"):this.__isRowCollapsible(e)?e.setAttribute("aria-expanded","true"):e.removeAttribute("aria-expanded")}_a11yUpdateRowLevel(e,t){0<t||this.__isRowCollapsible(e)||this.__isRowExpandable(e)?e.setAttribute("aria-level",t+1):e.removeAttribute("aria-level")}_a11ySetRowDetailsCell(e,t){iterateRowCells(e,e=>{e!==t&&e.setAttribute("aria-controls",t.id)})}_a11yUpdateCellColspan(e,t){e.setAttribute("aria-colspan",Number(t))}_a11yUpdateSorters(){Array.from(this.querySelectorAll("vaadin-grid-sorter")).forEach(e=>{let t=e.parentNode;for(;t&&"vaadin-grid-cell-content"!==t.localName;)t=t.parentNode;t&&t.assignedSlot&&t.assignedSlot.parentNode.setAttribute("aria-sort",{asc:"ascending",desc:"descending"}[String(e.direction)]||"none")})}},keyboardActive=!1;function isKeyboardActive(){return keyboardActive}function isElementHiddenDirectly(e){var t=e.style;return"hidden"===t.visibility||"none"===t.display||"hidden"===(t=window.getComputedStyle(e)).visibility||"none"===t.display}function isElementHidden(e){return e.checkVisibility?!e.checkVisibility({visibilityProperty:!0}):null===e.offsetParent&&0===e.clientWidth&&0===e.clientHeight||isElementHiddenDirectly(e)}function isElementFocusable(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]"))}window.addEventListener("keydown",()=>{keyboardActive=!0},{capture:!0}),window.addEventListener("mousedown",()=>{keyboardActive=!1},{capture:!0});let isFocusable=e=>e.offsetParent&&!e.part.contains("body-cell")&&isElementFocusable(e)&&"hidden"!==getComputedStyle(e).visibility,ActiveItemMixin=e=>class extends e{static get properties(){return{activeItem:{type:Object,notify:!0,value:null,sync:!0}}}ready(){super.ready(),this.$.scroller.addEventListener("click",this._onClick.bind(this)),this.addEventListener("cell-activate",this._activateItem.bind(this)),this.addEventListener("row-activate",this._activateItem.bind(this))}_activateItem(e){e=e.detail.model,e=e?e.item:null;e&&(this.activeItem=this._itemsEqual(this.activeItem,e)?null:e)}_shouldPreventCellActivationOnClick(e){var t=this._getGridEventLocation(e).cell;return e.defaultPrevented||!t||t.getAttribute("part").includes("details-cell")||t===this.$.emptystatecell||t._content.contains(this.getRootNode().activeElement)||this._isFocusable(e.target)||e.target instanceof HTMLLabelElement}_onClick(e){this._shouldPreventCellActivationOnClick(e)||(e=this._getGridEventLocation(e).cell,e&&this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(e.parentElement)}})))}_isFocusable(e){return isFocusable(e)}};function get(e,t){return e.split(".").reduce((e,t)=>e[t],t)}function checkPaths(e,t,r){if(0===r.length)return!1;let i=!0;return e.forEach(({path:e})=>{e&&-1!==e.indexOf(".")&&void 0===get(e.replace(/\.[^.]*$/u,""),r[0])&&(console.warn(`Path "${e}" used for ${t} does not exist in all of the items, ${t} is disabled.`),i=!1)}),i}function normalizeEmptyValue(e){return 0<=[void 0,null].indexOf(e)?"":isNaN(e)?e.toString():e}function compare(e,t){return(e=normalizeEmptyValue(e))<(t=normalizeEmptyValue(t))?-1:t<e?1:0}function multiSort(e,i){return e.sort((t,r)=>i.map(e=>"asc"===e.direction?compare(get(e.path,t),get(e.path,r)):"desc"===e.direction?compare(get(e.path,r),get(e.path,t)):0).reduce((e,t)=>0!==e?e:t,0))}function filter(e,t){return e.filter(r=>t.every(e=>{var t=normalizeEmptyValue(get(e.path,r)),e=normalizeEmptyValue(e.value).toString().toLowerCase();return t.toString().toLowerCase().includes(e)}))}let createArrayDataProvider=o=>(e,t)=>{let r=o?[...o]:[];e.filters&&checkPaths(e.filters,"filtering",r)&&(r=filter(r,e.filters)),Array.isArray(e.sortOrders)&&e.sortOrders.length&&checkPaths(e.sortOrders,"sorting",r)&&(r=multiSort(r,e.sortOrders));var i=Math.min(r.length,e.pageSize),e=e.page*i;t(r.slice(e,e+i),r.length)},ArrayDataProviderMixin=e=>class extends e{static get properties(){return{items:{type:Array,sync:!0}}}static get observers(){return["__dataProviderOrItemsChanged(dataProvider, items, isAttached, items.*)"]}__setArrayDataProvider(e){var t=createArrayDataProvider(this.items);t.__items=e,this._arrayDataProvider=t,this.size=e.length,this.dataProvider=t}_onDataProviderPageReceived(){super._onDataProviderPageReceived(),this._arrayDataProvider&&(this.size=this._flatSize)}__dataProviderOrItemsChanged(e,t,r){r&&(this._arrayDataProvider?e!==this._arrayDataProvider?(this._arrayDataProvider=void 0,this.items=void 0):t?this._arrayDataProvider.__items===t?this.clearCache():this.__setArrayDataProvider(t):(this._arrayDataProvider=void 0,this.dataProvider=void 0,this.size=0,this.clearCache()):t&&this.__setArrayDataProvider(t))}},ColumnAutoWidthMixin=e=>class extends e{static get properties(){return{__pendingRecalculateColumnWidths:{type:Boolean,value:!0}}}static get observers(){return["__dataProviderChangedAutoWidth(dataProvider)","__columnTreeChangedAutoWidth(_columnTree)","__flatSizeChangedAutoWidth(_flatSize)"]}constructor(){super(),this.addEventListener("animationend",this.__onAnimationEndAutoWidth)}__onAnimationEndAutoWidth(e){0===e.animationName.indexOf("vaadin-grid-appear")&&this.__tryToRecalculateColumnWidthsIfPending()}__dataProviderChangedAutoWidth(e){this.__hasHadRenderedRowsForColumnWidthCalculation||this.recalculateColumnWidths()}__columnTreeChangedAutoWidth(e){queueMicrotask(()=>this.recalculateColumnWidths())}__flatSizeChangedAutoWidth(){requestAnimationFrame(()=>this.__tryToRecalculateColumnWidthsIfPending())}_onDataProviderPageLoaded(){super._onDataProviderPageLoaded(),this.__tryToRecalculateColumnWidthsIfPending()}_updateFrozenColumn(){super._updateFrozenColumn(),this.__tryToRecalculateColumnWidthsIfPending()}__getIntrinsicWidth(e){return this.__intrinsicWidthCache.has(e)||this.__calculateAndCacheIntrinsicWidths([e]),this.__intrinsicWidthCache.get(e)}__getDistributedWidth(e,t){var r,i;return null==e||e===this?0:(r=Math.max(this.__getIntrinsicWidth(e),this.__getDistributedWidth((e.assignedSlot||e).parentElement,e)),t?(i=r,e=e._visibleChildColumns.map(e=>this.__getIntrinsicWidth(e)).reduce((e,t)=>e+t,0),i=Math.max(0,i-e),e=this.__getIntrinsicWidth(t)/e*i,this.__getIntrinsicWidth(t)+e):r)}_recalculateColumnWidths(){this.__virtualizer.flush(),[...this.$.header.children,...this.$.footer.children].forEach(e=>{e.__debounceUpdateHeaderFooterRowVisibility&&e.__debounceUpdateHeaderFooterRowVisibility.flush()}),this.__hasHadRenderedRowsForColumnWidthCalculation||=0<this._getRenderedRows().length,this.__intrinsicWidthCache=new Map;let t=this._firstVisibleIndex,r=this._lastVisibleIndex;this.__viewportRowsCache=this._getRenderedRows().filter(e=>e.index>=t&&e.index<=r);var e=this.__getAutoWidthColumns();this.__calculateAndCacheIntrinsicWidths(e),e.forEach(e=>{e.width=this.__getDistributedWidth(e)+"px"})}__setVisibleCellContentAutoWidth(e,t){e._allCells.filter(e=>!this.$.items.contains(e)||this.__viewportRowsCache.includes(e.parentElement)).forEach(e=>{e.__measuringAutoWidth=t,e.__measuringAutoWidth?(e.__originalWidth=e.style.width,e.style.width="auto",e.style.position="absolute"):(e.style.width=e.__originalWidth,delete e.__originalWidth,e.style.position="")}),t?this.$.scroller.setAttribute("measuring-auto-width",""):this.$.scroller.removeAttribute("measuring-auto-width")}__getAutoWidthCellsMaxWidth(e){return e._allCells.reduce((e,t)=>t.__measuringAutoWidth?Math.max(e,t.offsetWidth+1):e,0)}__calculateAndCacheIntrinsicWidths(e){e.forEach(e=>this.__setVisibleCellContentAutoWidth(e,!0)),e.forEach(e=>{var t=this.__getAutoWidthCellsMaxWidth(e);this.__intrinsicWidthCache.set(e,t)}),e.forEach(e=>this.__setVisibleCellContentAutoWidth(e,!1))}recalculateColumnWidths(){this.__isReadyForColumnWidthCalculation()?this._recalculateColumnWidths():this.__pendingRecalculateColumnWidths=!0}__tryToRecalculateColumnWidthsIfPending(){this.__pendingRecalculateColumnWidths&&(this.__pendingRecalculateColumnWidths=!1,this.recalculateColumnWidths())}__getAutoWidthColumns(){return this._getColumns().filter(e=>!e.hidden&&e.autoWidth)}__isReadyForColumnWidthCalculation(){var e,t,r;return!(!this._columnTree||((e=this.__getAutoWidthColumns().filter(e=>!customElements.get(e.localName))).length?(Promise.all(e.map(e=>customElements.whenDefined(e.localName))).then(()=>{this.__tryToRecalculateColumnWidthsIfPending()}),1):(e=[...this.$.items.children].some(e=>void 0===e.index),t=this._debouncerHiddenChanged&&this._debouncerHiddenChanged.isActive(),r=this.__debounceUpdateFrozenColumn&&this.__debounceUpdateFrozenColumn.isActive(),this._dataProviderController.isLoading()||e||isElementHidden(this)||t||r)))}},wrap=e=>e,HAS_NATIVE_TA="string"==typeof document.head.style.touchAction,GESTURE_KEY="__polymerGestures",HANDLED_OBJ="__polymerGesturesHandled",TOUCH_ACTION="__polymerGesturesTouchAction",TAP_DISTANCE=25,TRACK_DISTANCE=5,TRACK_LENGTH=2,MOUSE_EVENTS=["mousedown","mousemove","mouseup","click"],MOUSE_WHICH_TO_BUTTONS=[0,1,4,2],MOUSE_HAS_BUTTONS=(()=>{try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}})();function isMouseEvent(e){return-1<MOUSE_EVENTS.indexOf(e)}let supportsPassive=!1;function PASSIVE_TOUCH(e){isMouseEvent(e)}(()=>{try{var e=Object.defineProperty({},"passive",{get(){supportsPassive=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}})();let IS_TOUCH_ONLY=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),canBeDisabled={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function hasLeftMouseButton(t){var e=t.type;if(!isMouseEvent(e))return!1;if("mousemove"!==e)return 0===(void 0===t.button?0:t.button);{let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!MOUSE_HAS_BUTTONS&&(e=MOUSE_WHICH_TO_BUTTONS[t.which]||0),Boolean(1&e)}}function isSyntheticClick(e){var t,r;return"click"===e.type&&(0===e.detail||!((t=_findOriginalTarget(e)).nodeType&&t.nodeType===Node.ELEMENT_NODE&&(t=t.getBoundingClientRect(),r=e.pageX,e=e.pageY,r>=t.left)&&r<=t.right&&e>=t.top&&e<=t.bottom))}let POINTERSTATE={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function firstTouchAction(e){let r="auto";var i=getComposedPath(e);for(let e=0,t;e<i.length;e++)if((t=i[e])[TOUCH_ACTION]){r=t[TOUCH_ACTION];break}return r}function trackDocument(e,t,r){e.movefn=t,e.upfn=r,document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}function untrackDocument(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}let getComposedPath=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],gestures={},recognizers=[];function deepTargetFind(e,t){let r=document.elementFromPoint(e,t),i=r;for(;i&&i.shadowRoot&&!window.ShadyDOM;){if(i===(i=i.shadowRoot.elementFromPoint(e,t)))break;i&&(r=i)}return r}function _findOriginalTarget(e){var t=getComposedPath(e);return 0<t.length?t[0]:e.target}function _handleNative(r){var i=r.type,e=r.currentTarget[GESTURE_KEY];if(e){var o=e[i];if(o){if(!r[HANDLED_OBJ]&&(r[HANDLED_OBJ]={},i.startsWith("touch"))){e=r.changedTouches[0];if("touchstart"===i&&1===r.touches.length&&(POINTERSTATE.touch.id=e.identifier),POINTERSTATE.touch.id!==e.identifier)return;HAS_NATIVE_TA||"touchstart"!==i&&"touchmove"!==i||_handleTouchAction(r)}var a=r[HANDLED_OBJ];if(!a.skip){for(let e=0,t;e<recognizers.length;e++)o[(t=recognizers[e]).name]&&!a[t.name]&&t.flow&&-1<t.flow.start.indexOf(r.type)&&t.reset&&t.reset();for(let e=0,t;e<recognizers.length;e++)o[(t=recognizers[e]).name]&&!a[t.name]&&(a[t.name]=!0,t[i](r))}}}}function _handleTouchAction(t){var r=t.changedTouches[0],i=t.type;if("touchstart"===i)POINTERSTATE.touch.x=r.clientX,POINTERSTATE.touch.y=r.clientY,POINTERSTATE.touch.scrollDecided=!1;else if("touchmove"===i&&!POINTERSTATE.touch.scrollDecided){POINTERSTATE.touch.scrollDecided=!0;i=firstTouchAction(t);let e=!1;var o=Math.abs(POINTERSTATE.touch.x-r.clientX),r=Math.abs(POINTERSTATE.touch.y-r.clientY);t.cancelable&&("none"===i?e=!0:"pan-x"===i?e=o<r:"pan-y"===i&&(e=r<o)),e?t.preventDefault():prevent("track")}}function addListener(e,t,r){return!!gestures[t]&&(_add(e,t,r),!0)}function _add(i,e,t){var r=gestures[e],o=r.deps,a=r.name;let s=i[GESTURE_KEY];s||(i[GESTURE_KEY]=s={});for(let e=0,t,r;e<o.length;e++)t=o[e],IS_TOUCH_ONLY&&isMouseEvent(t)&&"click"!==t||((r=s[t])||(s[t]=r={_count:0}),0===r._count&&i.addEventListener(t,_handleNative,PASSIVE_TOUCH(t)),r[a]=(r[a]||0)+1,r._count=(r._count||0)+1);i.addEventListener(e,t),r.touchAction&&setTouchAction(i,r.touchAction)}function register(t){recognizers.push(t),t.emits.forEach(e=>{gestures[e]=t})}function _findRecognizerByEvent(r){for(let e=0,t;e<recognizers.length;e++){t=recognizers[e];for(let e=0;e<t.emits.length;e++)if(t.emits[e]===r)return t}return null}function setTouchAction(e,t){HAS_NATIVE_TA&&e instanceof HTMLElement&µTask.run(()=>{e.style.touchAction=t}),e[TOUCH_ACTION]=t}function _fire(e,t,r){t=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});t.detail=r,wrap(e).dispatchEvent(t),t.defaultPrevented&&(e=r.preventer||r.sourceEvent)&&e.preventDefault&&e.preventDefault()}function prevent(e){e=_findRecognizerByEvent(e);e.info&&(e.info.prevent=!0)}function downupFire(e,t,r,i){t&&_fire(t,e,{x:r.clientX,y:r.clientY,sourceEvent:r,preventer:i,prevent(e){return prevent(e)}})}function trackHasMovedEnough(e,t,r){return!e.prevent&&(!!e.started||(t=Math.abs(e.x-t),e=Math.abs(e.y-r),t>=TRACK_DISTANCE)||e>=TRACK_DISTANCE)}function trackFire(r,i,o){if(i){var a=r.moves[r.moves.length-2],s=r.moves[r.moves.length-1],n=s.x-r.x;let e,t=0;a&&(e=s.x-a.x,t=s.y-a.y),_fire(i,"track",{state:r.state,x:o.clientX,y:o.clientY,dx:n,dy:s.y-r.y,ddx:e,ddy:t,sourceEvent:o,hover(){return deepTargetFind(o.clientX,o.clientY)}})}}function trackForward(e,t,r){var i=Math.abs(t.clientX-e.x),o=Math.abs(t.clientY-e.y),a=_findOriginalTarget(r||t);!a||canBeDisabled[a.localName]&&a.hasAttribute("disabled")||!(isNaN(i)||isNaN(o)||i<=TAP_DISTANCE&&o<=TAP_DISTANCE||isSyntheticClick(t))||e.prevent||_fire(a,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:r})}register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){untrackDocument(this.info)},mousedown(e){if(hasLeftMouseButton(e)){let t=_findOriginalTarget(e),r=this;trackDocument(this.info,e=>{hasLeftMouseButton(e)||(downupFire("up",t,e),untrackDocument(r.info))},e=>{hasLeftMouseButton(e)&&downupFire("up",t,e),untrackDocument(r.info)}),downupFire("down",t,e)}},touchstart(e){downupFire("down",_findOriginalTarget(e),e.changedTouches[0],e)},touchend(e){downupFire("up",_findOriginalTarget(e),e.changedTouches[0],e)}}),register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(e){this.moves.length>TRACK_LENGTH&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,untrackDocument(this.info)},mousedown(e){if(hasLeftMouseButton(e)){let i=_findOriginalTarget(e),o=this,t=e=>{var t=e.clientX,r=e.clientY;trackHasMovedEnough(o.info,t,r)&&(o.info.state=o.info.started?"mouseup"===e.type?"end":"track":"start","start"===o.info.state&&prevent("tap"),o.info.addMove({x:t,y:r}),hasLeftMouseButton(e)||(o.info.state="end",untrackDocument(o.info)),i&&trackFire(o.info,i,e),o.info.started=!0)};trackDocument(this.info,t,e=>{o.info.started&&t(e),untrackDocument(o.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart(e){e=e.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(e){var t=_findOriginalTarget(e),e=e.changedTouches[0],r=e.clientX,i=e.clientY;trackHasMovedEnough(this.info,r,i)&&("start"===this.info.state&&prevent("tap"),this.info.addMove({x:r,y:i}),trackFire(this.info,t,e),this.info.state="track",this.info.started=!0)},touchend(e){var t=_findOriginalTarget(e),e=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),trackFire(this.info,t,e))}}),register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(e){hasLeftMouseButton(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click(e){hasLeftMouseButton(e)&&trackForward(this.info,e)},touchstart(e){e=e.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(e){trackForward(this.info,e.changedTouches[0],e)}});let ColumnReorderingMixin=e=>class extends e{static get properties(){return{columnReorderingAllowed:{type:Boolean,value:!1},_orderBaseScope:{type:Number,value:1e7}}}static get observers(){return["_updateOrders(_columnTree)"]}ready(){super.ready(),addListener(this,"track",this._onTrackEvent),this._reorderGhost=this.shadowRoot.querySelector('[part="reorder-ghost"]'),this.addEventListener("touchstart",this._onTouchStart.bind(this)),this.addEventListener("touchmove",this._onTouchMove.bind(this)),this.addEventListener("touchend",this._onTouchEnd.bind(this)),this.addEventListener("contextmenu",this._onContextMenu.bind(this))}_onContextMenu(e){this.hasAttribute("reordering")&&(e.preventDefault(),isTouch||this._onTrackEnd())}_onTouchStart(e){this._startTouchReorderTimeout=setTimeout(()=>{this._onTrackStart({detail:{x:e.touches[0].clientX,y:e.touches[0].clientY}})},100)}_onTouchMove(e){this._draggedColumn&&e.preventDefault(),clearTimeout(this._startTouchReorderTimeout)}_onTouchEnd(){clearTimeout(this._startTouchReorderTimeout),this._onTrackEnd()}_onTrackEvent(e){var t;"start"===e.detail.state?(t=(t=e.composedPath())[t.indexOf(this.$.header)-2])&&t._content&&(t._content.contains(this.getRootNode().activeElement)||this.$.scroller.hasAttribute("column-resizing")||this._touchDevice||this._onTrackStart(e)):"track"===e.detail.state?this._onTrack(e):"end"===e.detail.state&&this._onTrackEnd(e)}_onTrackStart(e){if(this.columnReorderingAllowed){var t=e.composedPath&&e.composedPath();if(!t||!t.some(e=>e.hasAttribute&&e.hasAttribute("draggable"))){t=this._cellFromPoint(e.detail.x,e.detail.y);if(t&&t.getAttribute("part").includes("header-cell")){for(this.toggleAttribute("reordering",!0),this._draggedColumn=t._column;1===this._draggedColumn.parentElement.childElementCount;)this._draggedColumn=this._draggedColumn.parentElement;this._setSiblingsReorderStatus(this._draggedColumn,"allowed"),this._draggedColumn._reorderStatus="dragging",this._updateGhost(t),this._reorderGhost.style.visibility="visible",this._updateGhostPosition(e.detail.x,this._touchDevice?e.detail.y-50:e.detail.y),this._autoScroller()}}}}_onTrack(e){if(this._draggedColumn){var r=this._cellFromPoint(e.detail.x,e.detail.y);if(r){let t=this._getTargetColumn(r,this._draggedColumn);if(this._isSwapAllowed(this._draggedColumn,t)&&this._isSwappableByPosition(t,e.detail.x)){var r=this._columnTree.findIndex(e=>e.includes(t)),i=this._getColumnsInOrder(r),r=i.indexOf(this._draggedColumn),o=i.indexOf(t),a=r<o?1:-1;for(let e=r;e!==o;e+=a)this._swapColumnOrders(this._draggedColumn,i[e+a])}this._updateGhostPosition(e.detail.x,this._touchDevice?e.detail.y-50:e.detail.y),this._lastDragClientX=e.detail.x}}}_onTrackEnd(){this._draggedColumn&&(this.toggleAttribute("reordering",!1),this._draggedColumn._reorderStatus="",this._setSiblingsReorderStatus(this._draggedColumn,""),this._draggedColumn=null,this._lastDragClientX=null,this._reorderGhost.style.visibility="hidden",this.dispatchEvent(new CustomEvent("column-reorder",{detail:{columns:this._getColumnsInOrder()}})))}_getColumnsInOrder(e=this._columnTree.length-1){return this._columnTree[e].filter(e=>!e.hidden).sort((e,t)=>e._order-t._order)}_cellFromPoint(e=0,t=0){this._draggedColumn||this.$.scroller.toggleAttribute("no-content-pointer-events",!0);e=this.shadowRoot.elementFromPoint(e,t);return this.$.scroller.toggleAttribute("no-content-pointer-events",!1),this._getCellFromElement(e)}_getCellFromElement(e){if(e){if(e._column)return e;var t=e.parentElement;if(t&&t._focusButton===e)return t}return null}_updateGhostPosition(e,t){var r=this._reorderGhost.getBoundingClientRect(),e=e-r.width/2,t=t-r.height/2,i=parseInt(this._reorderGhost._left||0),o=parseInt(this._reorderGhost._top||0);this._reorderGhost._left=i-(r.left-e),this._reorderGhost._top=o-(r.top-t),this._reorderGhost.style.transform=`translate(${this._reorderGhost._left}px, ${this._reorderGhost._top}px)`}_updateGhost(e){let t=this._reorderGhost,r=(t.textContent=e._content.innerText,window.getComputedStyle(e));return["boxSizing","display","width","height","background","alignItems","padding","border","flex-direction","overflow"].forEach(e=>{t.style[e]=r[e]}),t}_updateOrders(e){void 0!==e&&(e[0].forEach(e=>{e._order=0}),updateColumnOrders(e[0],this._orderBaseScope,0))}_setSiblingsReorderStatus(t,r){iterateChildren(t.parentNode,e=>{/column/u.test(e.localName)&&this._isSwapAllowed(e,t)&&(e._reorderStatus=r)})}_autoScroller(){var e,t;this._lastDragClientX&&(e=this._lastDragClientX-this.getBoundingClientRect().right+50,t=this.getBoundingClientRect().left-this._lastDragClientX+50,0<e?this.$.table.scrollLeft+=e/10:0<t&&(this.$.table.scrollLeft-=t/10)),this._draggedColumn&&setTimeout(()=>this._autoScroller(),10)}_isSwapAllowed(e,t){var r,i;if(e&&t)return r=e.parentElement===t.parentElement,i=e.frozen&&t.frozen||e.frozenToEnd&&t.frozenToEnd||!e.frozen&&!e.frozenToEnd&&!t.frozen&&!t.frozenToEnd,e!==t&&r&&i}_isSwappableByPosition(t,e){var r=Array.from(this.$.header.querySelectorAll('tr:not([hidden]) [part~="cell"]')).find(e=>t.contains(e._column)),i=this.$.header.querySelector("tr:not([hidden]) [reorder-status=dragging]").getBoundingClientRect(),r=r.getBoundingClientRect();return r.left>i.left?e>r.right-i.width:e<r.left+i.width}_swapColumnOrders(e,t){[e._order,t._order]=[t._order,e._order],this._debounceUpdateFrozenColumn(),this._updateFirstAndLastColumn()}_getTargetColumn(t,r){if(t&&r){let e=t._column;for(;e.parentElement!==r.parentElement&&e!==this;)e=e.parentElement;return e.parentElement===r.parentElement?e:t._column}}},ColumnResizingMixin=e=>class extends e{async ready(){super.ready();let t=this.$.scroller;addListener(t,"track",this._onHeaderTrack.bind(this)),window.addEventListener("resize",this._onBreakPointResize.bind(this)),t.addEventListener("touchmove",e=>t.hasAttribute("column-resizing")&&e.preventDefault()),t.addEventListener("contextmenu",e=>"resize-handle"===e.target.getAttribute("part")&&e.preventDefault()),t.addEventListener("mousedown",e=>"resize-handle"===e.target.getAttribute("part")&&e.preventDefault()),setTimeout(()=>{this._onBreakPointResize()},0)}_onBreakPointResize(e){this.$.scroller.toggleAttribute("column-resizing",!0);let r=window.innerWidth;var t=this.getElementsByTagName("vaadin-grid-column");Array.from(t).filter(e=>e.responsive).forEach(e=>{var t=e.responsive.findLast(([e])=>parseInt(e)<=r);e.width=t?t[1]:e.minWidth,e.flexGrow=0}),this.$.scroller.toggleAttribute("column-resizing",!1),this._resizeHandler()}_onHeaderTrack(e){var r=e.target;if("resize-handle"===r.getAttribute("part")){let t=r.parentElement._column;for(this.$.scroller.toggleAttribute("column-resizing",!0);"vaadin-grid-column-group"===t.localName;)t=t._childColumns.slice(0).sort((e,t)=>e._order-t._order).filter(e=>!e.hidden).pop();var r=this.__isRTL,o=e.detail.x,a=Array.from(this.$.header.querySelectorAll('[part~="row"]:last-child [part~="cell"]'));let i=a.find(e=>e._column===t);if(i.offsetWidth){var s=getComputedStyle(i._content),s=(parseInt(t.minWidth)||10)+parseInt(s.paddingLeft)+parseInt(s.paddingRight)+parseInt(s.borderLeftWidth)+parseInt(s.borderRightWidth)+parseInt(s.marginLeft)+parseInt(s.marginRight);let e;var n=i.offsetWidth,l=i.getBoundingClientRect();e=i.hasAttribute("frozen-to-end")?n+(r?o-l.right:l.left-o):n+(r?l.left-o:o-l.right),t.width=Math.max(s,e)+"px",t.flexGrow=0}a.sort((e,t)=>e._column._order-t._column._order).forEach((e,t,r)=>{t<r.indexOf(i)&&(e._column.width=e.offsetWidth+"px",e._column.flexGrow=0)});n=this._frozenToEndCells[0];n&&this.$.table.scrollWidth>this.$.table.offsetWidth&&(l=n.getBoundingClientRect(),s=o-(r?l.right:l.left),r&&s<=0||!r&&0<=s)&&(this.$.table.scrollLeft+=s),"end"===e.detail.state&&(this.$.scroller.toggleAttribute("column-resizing",!1),this.dispatchEvent(new CustomEvent("column-resize",{detail:{resizedColumn:t}}))),this._resizeHandler()}}};function getFlatIndexContext(e,t,r=0){let i=t;for(var o of e.subCaches){var a=o.parentCacheIndex;if(i<=a)break;if(i<=a+o.flatSize)return getFlatIndexContext(o,i-a-1,r+1);i-=o.flatSize}return{cache:e,item:e.items[i],index:i,page:Math.floor(i/e.pageSize),level:r}}function getItemContext({getItemId:t},r,i,o=0,a=0){for(let e=0;e<r.items.length;e++){var s=r.items[e];if(s&&t(s)===t(i))return{cache:r,level:o,item:s,index:e,page:Math.floor(e/r.pageSize),subCache:r.getSubCache(e),flatIndex:a+r.getFlatIndex(e)}}for(var e of r.subCaches){var n=a+r.getFlatIndex(e.parentCacheIndex),e=getItemContext({getItemId:t},e,i,o+1,n+1);if(e)return e}}function getFlatIndexByPath(e,[t,...r],i=0){t===1/0&&(t=e.size-1);var o=e.getFlatIndex(t),e=e.getSubCache(t);return e&&0<e.flatSize&&r.length?getFlatIndexByPath(e,r,i+o+1):i+o}class Cache{context;pageSize;items=[];pendingRequests={};__subCacheByIndex={};__size=0;__flatSize=0;constructor(e,t,r,i,o){this.context=e,this.pageSize=t,this.size=r,this.parentCache=i,this.parentCacheIndex=o,this.__flatSize=r||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return 0<Object.keys(this.pendingRequests).length||this.subCaches.some(e=>e.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e=this.__size;if(e!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let e=0;e<t;e++)this.items[e]||=this.context.placeholder}Object.keys(this.pendingRequests).forEach(e=>{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){let r=e*this.pageSize;t.forEach((e,t)=>{t=r+t;(void 0===this.size||t<this.size)&&(this.items[t]=e)})}getSubCache(e){return this.__subCacheByIndex[e]}removeSubCache(e){delete this.__subCacheByIndex[e]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(e){var t=new Cache(this.context,this.pageSize,0,this,e);return this.__subCacheByIndex[e]=t}getFlatIndex(e){let i=Math.max(0,Math.min(this.size-1,e));return this.subCaches.reduce((e,t)=>{var r=t.parentCacheIndex;return i>r?e+t.flatSize:e},i)}getItemForIndex(e){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");e=getFlatIndexContext(this,e).item;return e}getCacheAndIndex(e){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");var{cache:e,index:t}=getFlatIndexContext(this,e);return{cache:e,scaledIndex:t}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(e){console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.getSubCache(e)||(e=this.createSubCache(e),this.context.__controller.__loadCachePage(e,0))}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}class DataProviderController extends EventTarget{host;dataProvider;dataProviderParams;pageSize;isExpanded;getItemId;rootCache;placeholder;isPlaceholder;constructor(e,{size:t,pageSize:r,isExpanded:i,getItemId:o,isPlaceholder:a,placeholder:s,dataProvider:n,dataProviderParams:l}){super(),this.host=e,this.pageSize=r,this.getItemId=o,this.isExpanded=i,this.placeholder=s,this.isPlaceholder=a,this.dataProvider=n,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 getFlatIndexContext(this.rootCache,e)}getItemContext(e){return getItemContext({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return getFlatIndexByPath(this.rootCache,e)}ensureFlatIndexLoaded(e){var{cache:e,page:t,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(e,t)}ensureFlatIndexHierarchy(e){var{cache:e,item:t,index:r}=this.getFlatIndexContext(e);this.__isItemLoaded(t)&&this.isExpanded(t)&&!e.getSubCache(r)&&(t=e.createSubCache(r),this.__loadCachePage(t,0))}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(e){return new Cache(this.__cacheContext,this.pageSize,e)}__loadCachePage(o,a){if(this.dataProvider&&!o.pendingRequests[a]){let r={page:a,pageSize:this.pageSize,parentItem:o.parentItem},i=(this.dataProviderParams&&(r={...r,...this.dataProviderParams()}),(e,t)=>{o.pendingRequests[a]===i&&(void 0!==t?o.size=t:r.parentItem&&(o.size=e.length),o.setPage(a,e),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete o.pendingRequests[a],this.dispatchEvent(new CustomEvent("page-loaded")))});o.pendingRequests[a]=i,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(r,i)}}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}let DataProviderMixin=e=>class extends e{static get properties(){return{size:{type:Number,notify:!0,sync:!0},_flatSize:{type:Number,sync:!0},pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},dataProvider:{type:Object,notify:!0,observer:"_dataProviderChanged",sync:!0},loading:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0},_hasData:{type:Boolean,value:!1,sync:!0},itemHasChildrenPath:{type:String,value:"children",observer:"__itemHasChildrenPathChanged",sync:!0},itemIdPath:{type:String,value:null,sync:!0},expandedItems:{type:Object,notify:!0,value:()=>[],sync:!0},__expandedKeys:{type:Object,computed:"__computeExpandedKeys(itemIdPath, expandedItems)"}}}static get observers(){return["_sizeChanged(size)","_expandedItemsChanged(expandedItems)"]}constructor(){super(),this._dataProviderController=new DataProviderController(this,{size:this.size||0,pageSize:this.pageSize,getItemId:this.getItemId.bind(this),isExpanded:this._isExpanded.bind(this),dataProvider:this.dataProvider?this.dataProvider.bind(this):null,dataProviderParams:()=>({sortOrders:this._mapSorters(),filters:this._mapFilters()})}),this._dataProviderController.addEventListener("page-requested",this._onDataProviderPageRequested.bind(this)),this._dataProviderController.addEventListener("page-received",this._onDataProviderPageReceived.bind(this)),this._dataProviderController.addEventListener("page-loaded",this._onDataProviderPageLoaded.bind(this))}get _cache(){return console.warn("<vaadin-grid> The `_cache` property is deprecated and will be removed in Vaadin 25."),this._dataProviderController.rootCache}get _effectiveSize(){return console.warn("<vaadin-grid> The `_effectiveSize` property is deprecated and will be removed in Vaadin 25."),this._flatSize}_sizeChanged(e){this._dataProviderController.rootCache.size=e,this._dataProviderController.recalculateFlatSize(),this._flatSize=this._dataProviderController.flatSize}__itemHasChildrenPathChanged(e,t){!t&&"children"===e||this.requestContentUpdate()}_getItem(e,t){t.index=e;var r=this._dataProviderController.getFlatIndexContext(e).item;r?(this.__updateLoading(t,!1),this._updateItem(t,r),this._isExpanded(r)&&this._dataProviderController.ensureFlatIndexHierarchy(e)):(this.__updateLoading(t,!0),this._dataProviderController.ensureFlatIndexLoaded(e))}__updateLoading(e,t){var r=getBodyRowCells(e);updateState(e,"loading",t),updateCellsPart(r,"loading-row-cell",t),t&&(this._generateCellClassNames(e),this._generateCellPartNames(e))}getItemId(e){return this.itemIdPath?get$1(this.itemIdPath,e):e}_isExpanded(e){return this.__expandedKeys&&this.__expandedKeys.has(this.getItemId(e))}_expandedItemsChanged(){this._dataProviderController.recalculateFlatSize(),this._flatSize=this._dataProviderController.flatSize,this.__updateVisibleRows()}__computeExpandedKeys(e,t){t=t||[];let r=new Set;return t.forEach(e=>{r.add(this.getItemId(e))}),r}expandItem(e){this._isExpanded(e)||(this.expandedItems=[...this.expandedItems,e])}collapseItem(t){this._isExpanded(t)&&(this.expandedItems=this.expandedItems.filter(e=>!this._itemsEqual(e,t)))}_getIndexLevel(e=0){e=this._dataProviderController.getFlatIndexContext(e).level;return e}_loadPage(e,t){console.warn("<vaadin-grid> The `_loadPage` method is deprecated and will be removed in Vaadin 25."),this._dataProviderController.__loadCachePage(t,e)}_onDataProviderPageRequested(){this._setLoading(!0)}_onDataProviderPageReceived(){this._flatSize!==this._dataProviderController.flatSize&&(this._shouldUpdateAllRenderedRowsAfterPageLoad=!0,this._flatSize=this._dataProviderController.flatSize),this._getRenderedRows().forEach(e=>{this._dataProviderController.ensureFlatIndexHierarchy(e.index)}),this._hasData=!0}_onDataProviderPageLoaded(){this._debouncerApplyCachedData=Debouncer.debounce(this._debouncerApplyCachedData,timeOut.after(0),()=>{this._setLoading(!1);let r=this._shouldUpdateAllRenderedRowsAfterPageLoad;this._shouldUpdateAllRenderedRowsAfterPageLoad=!1,this._getRenderedRows().forEach(e=>{var t=this._dataProviderController.getFlatIndexContext(e.index).item;(t||r)&&this._getItem(e.index,e)}),this.__scrollToPendingIndexes(),this.__dispatchPendingBodyCellFocus()}),this._dataProviderController.isLoading()||this._debouncerApplyCachedData.flush()}__debounceClearCache(){this.__clearCacheDebouncer=Debouncer.debounce(this.__clearCacheDebouncer,microTask,()=>this.clearCache())}clearCache(){this._dataProviderController.clearCache(),this._dataProviderController.rootCache.size=this.size||0,this._dataProviderController.recalculateFlatSize(),this._hasData=!1,this.__updateVisibleRows(),this.__virtualizer&&this.__virtualizer.size||this._dataProviderController.loadFirstPage()}_pageSizeChanged(e,t){this._dataProviderController.setPageSize(e),void 0!==t&&e!==t&&this.clearCache()}_checkSize(){void 0===this.size&&0===this._flatSize&&console.warn("The <vaadin-grid> needs the total number of items in order to display rows, which you can specify either by setting the `size` property, or by providing it to the second argument of the `dataProvider` function `callback` call.")}_dataProviderChanged(e,t){this._dataProviderController.setDataProvider(e?e.bind(this):null),void 0!==t&&this.clearCache(),this._ensureFirstPageLoaded(),this._debouncerCheckSize=Debouncer.debounce(this._debouncerCheckSize,timeOut.after(2e3),this._checkSize.bind(this))}_ensureFirstPageLoaded(){this._hasData||this._dataProviderController.loadFirstPage()}_itemsEqual(e,t){return this.getItemId(e)===this.getItemId(t)}_getItemIndexInArray(r,e){let i=-1;return e.forEach((e,t)=>{this._itemsEqual(e,r)&&(i=t)}),i}scrollToIndex(...e){let t;for(;t!==(t=this._dataProviderController.getFlatIndexByPath(e));)this._scrollToFlatIndex(t);!this._dataProviderController.isLoading()&&this.clientHeight&&this._columnTree||(this.__pendingScrollToIndexes=e)}__scrollToPendingIndexes(){var e;this.__pendingScrollToIndexes&&this.$.items.children.length&&(e=this.__pendingScrollToIndexes,delete this.__pendingScrollToIndexes,this.scrollToIndex(...e))}},DropMode={BETWEEN:"between",ON_TOP_OR_BETWEEN:"on-top-or-between",ON_GRID:"on-grid"},DropLocation={ON_TOP:"on-top",ABOVE:"above",BELOW:"below",EMPTY:"empty"},DragAndDropMixin=e=>class extends e{static get properties(){return{dropMode:{type:String,sync:!0},rowsDraggable:{type:Boolean,sync:!0},dragFilter:{type:Function,sync:!0},dropFilter:{type:Function,sync:!0},__dndAutoScrollThreshold:{value:50},__draggedItems:{value:()=>[]}}}static get observers(){return["_dragDropAccessChanged(rowsDraggable, dropMode, dragFilter, dropFilter, loading)"]}constructor(){super(),this.__onDocumentDragStart=this.__onDocumentDragStart.bind(this)}ready(){super.ready(),this.$.table.addEventListener("dragstart",this._onDragStart.bind(this)),this.$.table.addEventListener("dragend",this._onDragEnd.bind(this)),this.$.table.addEventListener("dragover",this._onDragOver.bind(this)),this.$.table.addEventListener("dragleave",this._onDragLeave.bind(this)),this.$.table.addEventListener("drop",this._onDrop.bind(this)),this.$.table.addEventListener("dragenter",e=>{this.dropMode&&(e.preventDefault(),e.stopPropagation())})}connectedCallback(){super.connectedCallback(),document.addEventListener("dragstart",this.__onDocumentDragStart,{capture:!0})}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("dragstart",this.__onDocumentDragStart,{capture:!0})}_onDragStart(r){if(this.rowsDraggable){let t=r.target;if((t="vaadin-grid-cell-content"===t.localName?t.assignedSlot.parentNode.parentNode:t).parentNode===this.$.items){if(r.stopPropagation(),this.toggleAttribute("dragging-rows",!0),this._safari){let e=t.style.transform;t.style.top=/translateY\((.*)\)/u.exec(e)[1],t.style.transform="none",requestAnimationFrame(()=>{t.style.top="",t.style.transform=e})}var i=t.getBoundingClientRect();r.dataTransfer.setDragImage(t,r.clientX-i.left,r.clientY-i.top);let e=[t];this._isSelected(t._item)&&(e=this.__getViewportRows().filter(e=>this._isSelected(e._item)).filter(e=>!this.dragFilter||this.dragFilter(this.__getRowModel(e)))),this.__draggedItems=e.map(e=>e._item),r.dataTransfer.setData("text",this.__formatDefaultTransferData(e)),updateBooleanRowStates(t,{dragstart:1<e.length?""+e.length:""}),this.style.setProperty("--_grid-drag-start-x",r.clientX-i.left+20+"px"),this.style.setProperty("--_grid-drag-start-y",r.clientY-i.top+10+"px"),requestAnimationFrame(()=>{updateBooleanRowStates(t,{dragstart:!1}),this.style.setProperty("--_grid-drag-start-x",""),this.style.setProperty("--_grid-drag-start-y",""),this.requestContentUpdate()});i=new CustomEvent("grid-dragstart",{detail:{draggedItems:[...this.__draggedItems],setDragData:(e,t)=>r.dataTransfer.setData(e,t),setDraggedItemsCount:e=>t.setAttribute("dragstart",e)}});i.originalEvent=r,this.dispatchEvent(i)}}}_onDragEnd(e){this.toggleAttribute("dragging-rows",!1),e.stopPropagation();var t=new CustomEvent("grid-dragend");t.originalEvent=e,this.dispatchEvent(t),this.__draggedItems=[],this.requestContentUpdate()}_onDragLeave(e){this.dropMode&&(e.stopPropagation(),this._clearDragStyles())}_onDragOver(t){if(this.dropMode)if(this._dropLocation=void 0,this._dragOverItem=void 0,this.__dndAutoScroll(t.clientY))this._clearDragStyles();else{let e=t.composedPath().find(e=>"tr"===e.localName);if(this._flatSize&&this.dropMode!==DropMode.ON_GRID)if(e&&e.parentNode===this.$.items){var r,i=e.getBoundingClientRect();this._dropLocation=DropLocation.ON_TOP,this.dropMode===DropMode.BETWEEN?(r=t.clientY-i.top<i.bottom-t.clientY,this._dropLocation=r?DropLocation.ABOVE:DropLocation.BELOW):this.dropMode===DropMode.ON_TOP_OR_BETWEEN&&(t.clientY-i.top<i.height/3?this._dropLocation=DropLocation.ABOVE:t.clientY-i.top>i.height/3*2&&(this._dropLocation=DropLocation.BELOW))}else{if(e)return;if(this.dropMode!==DropMode.BETWEEN&&this.dropMode!==DropMode.ON_TOP_OR_BETWEEN)return;e=Array.from(this.$.items.children).filter(e=>!e.hidden).pop(),this._dropLocation=DropLocation.BELOW}else this._dropLocation=DropLocation.EMPTY;e&&e.hasAttribute("drop-disabled")?this._dropLocation=void 0:(t.stopPropagation(),t.preventDefault(),this._dropLocation===DropLocation.EMPTY?this.toggleAttribute("dragover",!0):e?(this._dragOverItem=e._item,e.getAttribute("dragover")!==this._dropLocation&&updateStringRowStates(e,{dragover:this._dropLocation})):this._clearDragStyles())}}__onDocumentDragStart(t){if(t.target.contains(this)){let e=[t.target,this.$.items,this.$.scroller],r=e.map(e=>e.style.cssText);2e4<this.$.table.scrollHeight&&(this.$.scroller.style.display="none"),isChrome&&(t.target.style.willChange="transform"),isSafari&&(this.$.items.style.flexShrink=1),requestAnimationFrame(()=>{e.forEach((e,t)=>{e.style.cssText=r[t]})})}}__dndAutoScroll(e){if(this.__dndAutoScrolling)return!0;var t=this.$.header.getBoundingClientRect().bottom,r=this.$.footer.getBoundingClientRect().top,t=t-e+this.__dndAutoScrollThreshold,e=e-r+this.__dndAutoScrollThreshold;let i=0;if(0<e?i=2*e:0<t&&(i=2*-t),i){r=this.$.table.scrollTop,e=(this.$.table.scrollTop+=i,r!==this.$.table.scrollTop);if(e)return this.__dndAutoScrolling=!0,setTimeout(()=>{this.__dndAutoScrolling=!1},20),!0}}__getViewportRows(){let t=this.$.header.getBoundingClientRect().bottom,r=this.$.footer.getBoundingClientRect().top;return Array.from(this.$.items.children).filter(e=>{e=e.getBoundingClientRect();return e.bottom>t&&e.top<r})}_clearDragStyles(){this.removeAttribute("dragover"),iterateChildren(this.$.items,e=>{updateStringRowStates(e,{dragover:null})})}__updateDragSourceParts(e,t){updateBooleanRowStates(e,{"drag-source":this.__draggedItems.includes(t.item)})}_onDrop(t){var e;this.dropMode&&(t.stopPropagation(),t.preventDefault(),e=t.dataTransfer.types&&Array.from(t.dataTransfer.types).map(e=>({type:e,data:t.dataTransfer.getData(e)})),this._clearDragStyles(),(e=new CustomEvent("grid-drop",{bubbles:t.bubbles,cancelable:t.cancelable,detail:{dropTargetItem:this._dragOverItem,dropLocation:this._dropLocation,dragData:e}})).originalEvent=t,this.dispatchEvent(e))}__formatDefaultTransferData(e){return e.map(e=>Array.from(e.children).filter(e=>!e.hidden&&-1===e.getAttribute("part").indexOf("details-cell")).sort((e,t)=>e._column._order>t._column._order?1:-1).map(e=>e._content.textContent.trim()).filter(e=>e).join("\t")).join("\n")}_dragDropAccessChanged(){this.filterDragAndDrop()}filterDragAndDrop(){iterateChildren(this.$.items,e=>{e.hidden||this._filterDragAndDrop(e,this.__getRowModel(e))})}_filterDragAndDrop(e,t){var r=this.loading||e.hasAttribute("loading");let i=!this.rowsDraggable||r||this.dragFilter&&!this.dragFilter(t);r=!this.dropMode||r||this.dropFilter&&!this.dropFilter(t);iterateRowCells(e,e=>{i?e._content.removeAttribute("draggable"):e._content.setAttribute("draggable",!0)}),updateBooleanRowStates(e,{"drag-disabled":!!i,"drop-disabled":!!r})}};function arrayEquals(r,i){if(!r||!i||r.length!==i.length)return!1;for(let e=0,t=r.length;e<t;e++)if(r[e]instanceof Array&&i[e]instanceof Array){if(!arrayEquals(r[e],i[e]))return!1}else if(r[e]!==i[e])return!1;return!0}let DynamicColumnsMixin=e=>class extends e{static get properties(){return{_columnTree:{type:Object,sync:!0}}}ready(){super.ready(),this._addNodeObserver()}_hasColumnGroups(e){return e.some(e=>"vaadin-grid-column-group"===e.localName)}_getChildColumns(e){return ColumnObserver.getColumns(e)}_flattenColumnGroups(e){return e.map(e=>"vaadin-grid-column-group"===e.localName?this._getChildColumns(e):[e]).reduce((e,t)=>e.concat(t),[])}_getColumnTree(){var e=ColumnObserver.getColumns(this),t=[e];let r=e;for(;this._hasColumnGroups(r);)r=this._flattenColumnGroups(r),t.push(r);return t}_debounceUpdateColumnTree(){this.__updateColumnTreeDebouncer=Debouncer.debounce(this.__updateColumnTreeDebouncer,microTask,()=>this._updateColumnTree())}_updateColumnTree(){var e=this._getColumnTree();arrayEquals(e,this._columnTree)||(this._columnTree=e)}_addNodeObserver(){this._observer=new ColumnObserver(this,(e,t)=>{let r=t.flatMap(e=>e._allCells);t=t=>r.filter(e=>e&&e._content.contains(t)).length;this.__removeSorters(this._sorters.filter(t)),this.__removeFilters(this._filters.filter(t)),this._debounceUpdateColumnTree(),this._debouncerCheckImports=Debouncer.debounce(this._debouncerCheckImports,timeOut.after(2e3),this._checkImports.bind(this)),this._ensureFirstPageLoaded()})}_checkImports(){["vaadin-grid-column-group","vaadin-grid-filter","vaadin-grid-filter-column","vaadin-grid-tree-toggle","vaadin-grid-selection-column","vaadin-grid-sort-column","vaadin-grid-sorter"].forEach(e=>{this.querySelector(e)&&!customElements.get(e)&&console.warn(`Make sure you have imported the required module for <${e}> element.`)})}_updateFirstAndLastColumn(){Array.from(this.shadowRoot.querySelectorAll("tr")).forEach(e=>this._updateFirstAndLastColumnForRow(e))}_updateFirstAndLastColumnForRow(e){Array.from(e.querySelectorAll('[part~="cell"]:not([part~="details-cell"])')).sort((e,t)=>e._column._order-t._column._order).forEach((e,t,r)=>{updateCellState(e,"first-column",0===t),updateCellState(e,"last-column",t===r.length-1)})}_isColumnElement(e){return e.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/u.test(e.localName)}},EventContextMixin=e=>class extends e{getEventContext(e){var t={};let r=this._getGridEventLocation(e).cell;return r&&(t.section=["body","header","footer","details"].find(e=>-1<r.getAttribute("part").indexOf(e)),r._column&&(t.column=r._column),"body"!==t.section&&"details"!==t.section||Object.assign(t,this.__getRowModel(r.parentElement))),t}},FilterMixin=e=>class extends e{static get properties(){return{_filters:{type:Array,value:()=>[]}}}constructor(){super(),this._filterChanged=this._filterChanged.bind(this),this.addEventListener("filter-changed",this._filterChanged)}_filterChanged(e){e.stopPropagation(),this.__addFilter(e.target),this.__applyFilters()}__removeFilters(t){0!==t.length&&(this._filters=this._filters.filter(e=>t.indexOf(e)<0),this.__applyFilters())}__addFilter(e){-1===this._filters.indexOf(e)&&this._filters.push(e)}__applyFilters(){this.dataProvider&&this.isAttached&&this.clearCache()}_mapFilters(){return this._filters.map(e=>({path:e.path,value:e.value}))}};function isRow(e){return e instanceof HTMLTableRowElement}function isCell(e){return e instanceof HTMLTableCellElement}function isDetailsCell(e){return e.matches('[part~="details-cell"]')}let KeyboardNavigationMixin=e=>class extends e{static get properties(){return{_headerFocusable:{type:Object,observer:"_focusableChanged",sync:!0},_itemsFocusable:{type:Object,observer:"_focusableChanged",sync:!0},_footerFocusable:{type:Object,observer:"_focusableChanged",sync:!0},_navigatingIsHidden:Boolean,_focusedItemIndex:{type:Number,value:0},_focusedColumnOrder:Number,_focusedCell:{type:Object,observer:"_focusedCellChanged",sync:!0},interacting:{type:Boolean,value:!1,reflectToAttribute:!0,readOnly:!0,observer:"_interactingChanged"}}}get __rowFocusMode(){return[this._headerFocusable,this._itemsFocusable,this._footerFocusable].some(isRow)}set __rowFocusMode(i){["_itemsFocusable","_footerFocusable","_headerFocusable"].forEach(e=>{var t,r=this[e];i?(t=r&&r.parentElement,isCell(r)?this[e]=t:isCell(t)&&(this[e]=t.parentElement)):!i&&isRow(r)&&(t=r.firstElementChild,this[e]=t._focusButton||t)})}get _visibleItemsCount(){return this._lastVisibleIndex-this._firstVisibleIndex-1}ready(){super.ready(),this._ios||this._android||(this.addEventListener("keydown",this._onKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.$.table.addEventListener("focusin",this._onContentFocusIn.bind(this)),this.addEventListener("mousedown",()=>{this.toggleAttribute("navigating",!1),this._isMousedown=!0,this._focusedColumnOrder=void 0}),this.addEventListener("mouseup",()=>{this._isMousedown=!1}))}_focusableChanged(e,t){t&&t.setAttribute("tabindex","-1"),e&&this._updateGridSectionFocusTarget(e)}_focusedCellChanged(e,t){t&&removeValueFromAttribute(t,"part","focused-cell"),e&&addValueToAttribute(e,"part","focused-cell")}_interactingChanged(){this._updateGridSectionFocusTarget(this._headerFocusable),this._updateGridSectionFocusTarget(this._itemsFocusable),this._updateGridSectionFocusTarget(this._footerFocusable)}__updateItemsFocusable(){var e;this._itemsFocusable&&(e=this.shadowRoot.activeElement===this._itemsFocusable,this._getRenderedRows().forEach(r=>{if(r.index===this._focusedItemIndex)if(this.__rowFocusMode)this._itemsFocusable=r;else{let e=this._itemsFocusable.parentElement,t=this._itemsFocusable;var i;e&&(i=[...(e=isCell(e)?(t=e).parentElement:e).children].indexOf(t),this._itemsFocusable=this.__getFocusable(r,r.children[i]))}}),e)&&this._itemsFocusable.focus()}_onKeyDown(e){var t=e.key;let r;switch(t){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"PageUp":case"PageDown":case"Home":case"End":r="Navigation";break;case"Enter":case"Escape":case"F2":r="Interaction";break;case"Tab":r="Tab";break;case" ":r="Space"}this._detectInteracting(e),(r=this.interacting&&"Interaction"!==r?void 0:r)&&this[`_on${r}KeyDown`](e,t)}__ensureFlatIndexInViewport(t){[...this.$.items.children].find(e=>e.index===t)?this.__scrollIntoViewport(t):this._scrollToFlatIndex(t)}__isRowExpandable(e){if(this.itemHasChildrenPath)return!(!(e=e._item)||!get$1(this.itemHasChildrenPath,e)||this._isExpanded(e))}__isRowCollapsible(e){return this._isExpanded(e._item)}_onNavigationKeyDown(e,t){e.preventDefault();var r,i=this.__isRTL,o=e.composedPath().find(isRow),a=e.composedPath().find(isCell);let s=0,n=0;switch(t){case"ArrowRight":s=i?-1:1;break;case"ArrowLeft":s=i?1:-1;break;case"Home":this.__rowFocusMode||e.ctrlKey?n=-1/0:s=-1/0;break;case"End":this.__rowFocusMode||e.ctrlKey?n=1/0:s=1/0;break;case"ArrowDown":n=1;break;case"ArrowUp":n=-1;break;case"PageDown":this.$.items.contains(o)&&(r=this.__getIndexInGroup(o,this._focusedItemIndex),this._scrollToFlatIndex(r)),n=this._visibleItemsCount;break;case"PageUp":n=-this._visibleItemsCount}if((!this.__rowFocusMode||o)&&(this.__rowFocusMode||a)){var l=i?"ArrowRight":"ArrowLeft";if(t===(i?"ArrowLeft":"ArrowRight")){if(this.__rowFocusMode)return this.__isRowExpandable(o)?void this.expandItem(o._item):(this.__rowFocusMode=!1,void this._onCellNavigation(o.firstElementChild,0,0))}else if(t===l)if(this.__rowFocusMode){if(this.__isRowCollapsible(o))return void this.collapseItem(o._item)}else if(a===[...o.children].sort((e,t)=>e._order-t._order)[0]||isDetailsCell(a))return this.__rowFocusMode=!0,void this._onRowNavigation(o,0);this.__rowFocusMode?this._onRowNavigation(o,n):this._onCellNavigation(a,s,n)}}_onRowNavigation(e,t){t=this.__navigateRows(t,e).dstRow;t&&t.focus()}__getIndexInGroup(e,t){var r=e.parentNode;return r===this.$.items?void 0!==t?t:e.index:[...r.children].indexOf(e)}__navigateRows(e,t,r){var i,o=this.__getIndexInGroup(t,this._focusedItemIndex),a=t.parentNode,s=(a===this.$.items?this._flatSize:a.children.length)-1;let n=Math.max(0,Math.min(o+e,s));if(a!==this.$.items){if(n>o)for(;n<s&&a.children[n].hidden;)n+=1;else if(n<o)for(;0<n&&a.children[n].hidden;)--n;return this.toggleAttribute("navigating",!0),{dstRow:a.children[n]}}let l=!1;return r&&(r=isDetailsCell(r),a===this.$.items)&&(t=t._item,i=this._dataProviderController.getFlatIndexContext(n).item,(l=r?0===e:1===e&&this._isDetailsOpened(t)||-1===e&&n!==o&&this._isDetailsOpened(i))!==r)&&(1===e&&l||-1===e&&!l)&&(n=o),this.__ensureFlatIndexInViewport(n),this._focusedItemIndex=n,this.toggleAttribute("navigating",!0),{dstRow:[...a.children].find(e=>!e.hidden&&e.index===n),dstIsRowDetails:l}}_onCellNavigation(t,r,i){var o=t.parentNode,{dstRow:a,dstIsRowDetails:s}=this.__navigateRows(i,o,t);if(a){let e=[...o.children].indexOf(t);this.$.items.contains(t)&&(e=[...this.$.sizer.children].findIndex(e=>e._column===t._column));var n=isDetailsCell(t),l=o.parentNode,o=this.__getIndexInGroup(o,this._focusedItemIndex);if(void 0===this._focusedColumnOrder&&(this._focusedColumnOrder=n?0:this._getColumns(l,o).filter(e=>!e.hidden)[e]._order),s)[...a.children].find(isDetailsCell).focus();else{var o=this.__getIndexInGroup(a,this._focusedItemIndex),s=this._getColumns(l,o).filter(e=>!e.hidden),l=s.map(e=>e._order).sort((e,t)=>e-t),o=l.length-1,d=l.indexOf(l.slice(0).sort((e,t)=>Math.abs(e-this._focusedColumnOrder)-Math.abs(t-this._focusedColumnOrder))[0]),i=0===i&&n?d:Math.max(0,Math.min(d+r,o)),n=(i!==d&&(this._focusedColumnOrder=void 0),s.reduce((e,t,r)=>(e[t._order]=r,e),{})),r=n[l[i]];let e;if(this.$.items.contains(t)){let t=this.$.sizer.children[r];this._lazyColumns&&(this.__isColumnInViewport(t._column)||t.scrollIntoView(),this.__updateColumnsBodyContentHidden(),this.__updateHorizontalScrollPosition()),e=[...a.children].find(e=>e._column===t._column)}else e=a.children[r];this._scrollHorizontallyToCell(e),e.focus()}}}_onInteractionKeyDown(e,t){var r=e.composedPath()[0],i="input"===r.localName&&!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/iu.test(r.type);let o;switch(t){case"Enter":o=!this.interacting||!i;break;case"Escape":o=!1;break;case"F2":o=!this.interacting}var a,r=this._getGridEventLocation(e).cell;this.interacting!==o&&null!==r&&(o?(a=r._content.querySelector("[focus-target]")||[...r._content.querySelectorAll("*")].find(e=>this._isFocusable(e)))&&(e.preventDefault(),a.focus(),this._setInteracting(!0),this.toggleAttribute("navigating",!1)):(e.preventDefault(),this._focusedColumnOrder=void 0,r.focus(),this._setInteracting(!1),this.toggleAttribute("navigating",!0))),"Escape"===t&&this._hideTooltip(!0)}_predictFocusStepTarget(e,t){var r,i=[this.$.table,this._headerFocusable,this.__emptyState?this.$.emptystatecell:this._itemsFocusable,this._footerFocusable,this.$.focusexit];let o=i.indexOf(e);for(o+=t;0<=o&&o<=i.length-1;){let e=i[o];if((e=e&&!this.__rowFocusMode?i[o].parentNode:e)&&!e.hidden)break;o+=t}let a=i[o];return a&&!this.__isHorizontallyInViewport(a)&&(e=this._getColumnsInOrder().find(e=>this.__isColumnInViewport(e)))&&(a===this._headerFocusable?a=e._headerCell:a===this._itemsFocusable?(r=a._column._cells.indexOf(a),a=e._cells[r]):a===this._footerFocusable&&(a=e._footerCell)),a}_onTabKeyDown(e){let t=this._predictFocusStepTarget(e.composedPath()[0],e.shiftKey?-1:1);t&&(e.stopPropagation(),t===this._itemsFocusable&&(this.__ensureFlatIndexInViewport(this._focusedItemIndex),this.__updateItemsFocusable(),t=this._itemsFocusable),t.focus(),t!==this.$.table&&t!==this.$.focusexit&&e.preventDefault(),this.toggleAttribute("navigating",!0))}_onSpaceKeyDown(e){e.preventDefault();var e=e.composedPath()[0],t=isRow(e);!t&&e._content&&e._content.firstElementChild||this.dispatchEvent(new CustomEvent(t?"row-activate":"cell-activate",{detail:{model:this.__getRowModel(t?e:e.parentElement)}}))}_onKeyUp(e){var t,r;/^( |SpaceBar)$/u.test(e.key)&&!this.interacting&&(e.preventDefault(),(t=e.composedPath()[0])._content)&&t._content.firstElementChild&&(r=this.hasAttribute("navigating"),t._content.firstElementChild.dispatchEvent(new MouseEvent("click",{shiftKey:e.shiftKey,bubbles:!0,composed:!0,cancelable:!0})),this.toggleAttribute("navigating",r))}_onFocusIn(e){this._isMousedown||this.toggleAttribute("navigating",!0);var t=e.composedPath()[0];t===this.$.table||t===this.$.focusexit?(this._isMousedown||this._predictFocusStepTarget(t,t===this.$.table?1:-1).focus(),this._setInteracting(!1)):this._detectInteracting(e)}_onFocusOut(e){this.toggleAttribute("navigating",!1),this._detectInteracting(e),this._hideTooltip(),this._focusedCell=null}_onContentFocusIn(e){var{section:t,cell:r,row:i}=this._getGridEventLocation(e);(r||this.__rowFocusMode)&&(this._detectInteracting(e),t)&&(r||i)&&((this._activeRowGroup=t)===this.$.header?this._headerFocusable=this.__getFocusable(i,r):t===this.$.items?(this._itemsFocusable=this.__getFocusable(i,r),this._focusedItemIndex=i.index):t===this.$.footer&&(this._footerFocusable=this.__getFocusable(i,r)),r?(t=this.getEventContext(e),this.__pendingBodyCellFocus=this.loading&&"body"===t.section,this.__pendingBodyCellFocus||r===this.$.emptystatecell||r.dispatchEvent(new CustomEvent("cell-focus",{bubbles:!0,composed:!0,detail:{context:t}})),this._focusedCell=r._focusButton||r,isKeyboardActive()&&e.target===r&&this._showTooltip(e)):this._focusedCell=null)}__dispatchPendingBodyCellFocus(){this.__pendingBodyCellFocus&&this.shadowRoot.activeElement===this._itemsFocusable&&this._itemsFocusable.dispatchEvent(new Event("focusin",{bubbles:!0,composed:!0}))}__getFocusable(e,t){return this.__rowFocusMode?e:t._focusButton||t}_detectInteracting(e){e=e.composedPath().some(e=>"slot"===e.localName&&this.shadowRoot.contains(e));this._setInteracting(e),this.__updateHorizontalScrollPosition()}_updateGridSectionFocusTarget(e){var t;e&&(t=this._getGridSectionFromFocusTarget(e),t=this.interacting&&t===this._activeRowGroup,e.tabIndex=t?-1:0)}_preventScrollerRotatingCellFocus(){this._activeRowGroup===this.$.items&&(this.__preventScrollerRotatingCellFocusDebouncer=Debouncer.debounce(this.__preventScrollerRotatingCellFocusDebouncer,animationFrame,()=>{var e=this._activeRowGroup===this.$.items;this._getRenderedRows().some(e=>e.index===this._focusedItemIndex)?(this.__updateItemsFocusable(),e&&!this.__rowFocusMode&&(this._focusedCell=this._itemsFocusable),this._navigatingIsHidden&&(this.toggleAttribute("navigating",!0),this._navigatingIsHidden=!1)):e&&(this._focusedCell=null,this.hasAttribute("navigating"))&&(this._navigatingIsHidden=!0,this.toggleAttribute("navigating",!1))}))}_getColumns(e,t){let r=this._columnTree.length-1;return e===this.$.header?r=t:e===this.$.footer&&(r=this._columnTree.length-1-t),this._columnTree[r]}__isValidFocusable(e){return this.$.table.contains(e)&&e.offsetHeight}_resetKeyboardNavigation(){var e,t;!this.$&&this.performUpdate&&this.performUpdate(),["header","footer"].forEach(e=>{var t,r;this.__isValidFocusable(this[`_${e}Focusable`])||(r=(t=[...this.$[e].children].find(e=>e.offsetHeight))?[...t.children].find(e=>!e.hidden):null,t&&r&&(this[`_${e}Focusable`]=this.__getFocusable(t,r)))}),!this.__isValidFocusable(this._itemsFocusable)&&this.$.items.firstElementChild?(t=(e=this.__getFirstVisibleItem())?[...e.children].find(e=>!e.hidden):null)&&e&&(this._focusedColumnOrder=void 0,this._itemsFocusable=this.__getFocusable(e,t)):this.__updateItemsFocusable()}_scrollHorizontallyToCell(i){if(!(i.hasAttribute("frozen")||i.hasAttribute("frozen-to-end")||isDetailsCell(i))){var e=i.getBoundingClientRect(),o=i.parentNode,i=Array.from(o.children).indexOf(i),a=this.$.table.getBoundingClientRect();let t=a.left,r=a.right;for(let e=i-1;0<=e;e--){var s=o.children[e];if(!s.hasAttribute("hidden")&&!isDetailsCell(s)&&(s.hasAttribute("frozen")||s.hasAttribute("frozen-to-end"))){t=s.getBoundingClientRect().right;break}}for(let e=i+1;e<o.children.length;e++){var n=o.children[e];if(!n.hasAttribute("hidden")&&!isDetailsCell(n)&&(n.hasAttribute("frozen")||n.hasAttribute("frozen-to-end"))){r=n.getBoundingClientRect().left;break}}e.left<t&&(this.$.table.scrollLeft+=Math.round(e.left-t)),e.right>r&&(this.$.table.scrollLeft+=Math.round(e.right-r))}}_getGridEventLocation(e){var e=e.__composedPath||e.composedPath(),t=e.indexOf(this.$.table);return{section:1<=t?e[t-1]:null,row:2<=t?e[t-2]:null,cell:3<=t?e[t-3]:null}}_getGridSectionFromFocusTarget(e){return e===this._headerFocusable?this.$.header:e===this._itemsFocusable?this.$.items:e===this._footerFocusable?this.$.footer:null}},RowDetailsMixin=e=>class extends e{static get properties(){return{detailsOpenedItems:{type:Array,value:()=>[],sync:!0},rowDetailsRenderer:{type:Function,sync:!0},_detailsCells:{type:Array}}}static get observers(){return["_detailsOpenedItemsChanged(detailsOpenedItems, rowDetailsRenderer)","_rowDetailsRendererChanged(rowDetailsRenderer)"]}ready(){super.ready(),this._detailsCellResizeObserver=new ResizeObserver(e=>{e.forEach(({target:e})=>{this._updateDetailsCellHeight(e.parentElement)}),this.__virtualizer.__adapter._resizeHandler()})}_rowDetailsRendererChanged(e){e&&this._columnTree&&iterateChildren(this.$.items,e=>{var t;e.querySelector("[part~=details-cell]")||(this._updateRow(e,this._columnTree[this._columnTree.length-1]),t=this._isDetailsOpened(e._item),this._toggleDetailsCell(e,t))})}_detailsOpenedItemsChanged(e,t){iterateChildren(this.$.items,e=>{(e.hasAttribute("details-opened")||t&&this._isDetailsOpened(e._item))&&this._updateItem(e,e._item)})}_configureDetailsCell(e){e.setAttribute("part","cell details-cell"),e.toggleAttribute("frozen",!0),this._detailsCellResizeObserver.observe(e)}_toggleDetailsCell(e,t){e=e.querySelector('[part~="details-cell"]');e&&(e.hidden=!t,e.hidden||this.rowDetailsRenderer&&(e._renderer=this.rowDetailsRenderer))}_updateDetailsCellHeight(e){let t=e.querySelector('[part~="details-cell"]');t&&(this.__updateDetailsRowPadding(e,t),requestAnimationFrame(()=>this.__updateDetailsRowPadding(e,t)))}__updateDetailsRowPadding(e,t){t.hidden?e.style.removeProperty("padding-bottom"):e.style.setProperty("padding-bottom",t.offsetHeight+"px")}_updateDetailsCellHeights(){iterateChildren(this.$.items,e=>{this._updateDetailsCellHeight(e)})}_isDetailsOpened(e){return this.detailsOpenedItems&&-1!==this._getItemIndexInArray(e,this.detailsOpenedItems)}openItemDetails(e){this._isDetailsOpened(e)||(this.detailsOpenedItems=[...this.detailsOpenedItems,e])}closeItemDetails(t){this._isDetailsOpened(t)&&(this.detailsOpenedItems=this.detailsOpenedItems.filter(e=>!this._itemsEqual(e,t)))}},region=document.createElement("div");function getNormalizedScrollLeft(e,t){var r=e.scrollLeft;return"rtl"!==t?r:e.scrollWidth-e.clientWidth+r}region.style.position="fixed",region.style.clip="rect(0px, 0px, 0px, 0px)",region.setAttribute("aria-live","polite"),document.body.appendChild(region);let observer=new ResizeObserver(e=>{setTimeout(()=>{e.forEach(t=>{t.target.isConnected&&(t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect)}):t.target._onResize(t.contentRect))})})}),ResizeMixin=dedupeMixin(e=>class extends e{get _observeParent(){return!1}connectedCallback(){var e;super.connectedCallback(),observer.observe(this),this._observeParent&&((e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode).resizables||(e.resizables=new Set,observer.observe(e)),e.resizables.add(this),this.__parent=e)}disconnectedCallback(){super.disconnectedCallback(),observer.unobserve(this);var e,t=this.__parent;this._observeParent&&t&&((e=t.resizables)&&(e.delete(this),0===e.size)&&observer.unobserve(t),this.__parent=null)}_onResize(e){}}),timeouts={SCROLLING:500,UPDATE_CONTENT_VISIBILITY:100},ScrollMixin=e=>class extends ResizeMixin(e){static get properties(){return{columnRendering:{type:String,value:"eager",sync:!0},_frozenCells:{type:Array,value:()=>[]},_frozenToEndCells:{type:Array,value:()=>[]}}}static get observers(){return["__columnRenderingChanged(_columnTree, columnRendering)"]}get _scrollLeft(){return this.$.table.scrollLeft}get _scrollTop(){return this.$.table.scrollTop}set _scrollTop(e){this.$.table.scrollTop=e}get _lazyColumns(){return"lazy"===this.columnRendering}ready(){super.ready(),this.scrollTarget=this.$.table,this.$.items.addEventListener("focusin",e=>{var t=e.composedPath(),t=t[t.indexOf(this.$.items)-1];t&&(this._isMousedown||this.__scrollIntoViewport(t.index),this.$.table.contains(e.relatedTarget)||this.$.table.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:t}})))}),this.$.table.addEventListener("scroll",()=>this._afterScroll())}_onResize(){var e;this._updateOverflow(),this.__updateHorizontalScrollPosition(),this._firefox&&((e=!isElementHidden(this))&&!1===this.__previousVisible&&(this._scrollTop=this.__memorizedScrollTop||0),this.__previousVisible=e)}_scrollToFlatIndex(e){e=Math.min(this._flatSize-1,Math.max(0,e)),this.__virtualizer.scrollToIndex(e),this.__scrollIntoViewport(e)}__scrollIntoViewport(t){var e,r,i=[...this.$.items.children].find(e=>e.index===t);i&&(i=i.getBoundingClientRect(),e=this.$.footer.getBoundingClientRect().top,r=this.$.header.getBoundingClientRect().bottom,i.bottom>e?this.$.table.scrollTop+=i.bottom-e:i.top<r&&(this.$.table.scrollTop-=r-i.top))}_scheduleScrolling(){this._scrollingFrame||(this._scrollingFrame=requestAnimationFrame(()=>this.$.scroller.toggleAttribute("scrolling",!0))),this._debounceScrolling=Debouncer.debounce(this._debounceScrolling,timeOut.after(timeouts.SCROLLING),()=>{cancelAnimationFrame(this._scrollingFrame),delete this._scrollingFrame,this.$.scroller.toggleAttribute("scrolling",!1)})}_afterScroll(){this.__updateHorizontalScrollPosition(),this.hasAttribute("reordering")||this._scheduleScrolling(),this.hasAttribute("navigating")||this._hideTooltip(!0),this._updateOverflow(),this._debounceColumnContentVisibility=Debouncer.debounce(this._debounceColumnContentVisibility,timeOut.after(timeouts.UPDATE_CONTENT_VISIBILITY),()=>{this._lazyColumns&&this.__cachedScrollLeft!==this._scrollLeft&&(this.__cachedScrollLeft=this._scrollLeft,this.__updateColumnsBodyContentHidden())}),this._firefox&&!isElementHidden(this)&&!1!==this.__previousVisible&&(this.__memorizedScrollTop=this._scrollTop)}__updateColumnsBodyContentHidden(){if(this._columnTree&&this._areSizerCellsAssigned()){let o=this._getColumnsInOrder(),e=!1;var t,r;o.forEach(r=>{let i=this._lazyColumns&&!this.__isColumnInViewport(r);r._bodyContentHidden!==i&&(e=!0,r._cells.forEach(e=>{var t;e!==r._sizerCell&&(i?e.remove():e.__parentRow&&(t=[...e.__parentRow.children].find(e=>o.indexOf(e._column)>o.indexOf(r)),e.__parentRow.insertBefore(e,t)))})),r._bodyContentHidden=i}),e&&this._frozenCellsChanged(),this._lazyColumns&&(t=[...o].reverse().find(e=>e.frozen),t=this.__getColumnEnd(t),r=o.find(e=>!e.frozen&&!e._bodyContentHidden),this.__lazyColumnsStart=this.__getColumnStart(r)-t,this.$.items.style.setProperty("--_grid-lazy-columns-start",this.__lazyColumnsStart+"px"),this._resetKeyboardNavigation())}}__getColumnEnd(e){return e?e._sizerCell.offsetLeft+(this.__isRTL?0:e._sizerCell.offsetWidth):this.__isRTL?this.$.table.clientWidth:0}__getColumnStart(e){return e?e._sizerCell.offsetLeft+(this.__isRTL?e._sizerCell.offsetWidth:0):this.__isRTL?this.$.table.clientWidth:0}__isColumnInViewport(e){return!(!e.frozen&&!e.frozenToEnd)||this.__isHorizontallyInViewport(e._sizerCell)}__isHorizontallyInViewport(e){return e.offsetLeft+e.offsetWidth>=this._scrollLeft&&e.offsetLeft<=this._scrollLeft+this.clientWidth}__columnRenderingChanged(e,t){"eager"===t?this.$.scroller.removeAttribute("column-rendering"):this.$.scroller.setAttribute("column-rendering",t),this.__updateColumnsBodyContentHidden()}_updateOverflow(){this._debounceOverflow=Debouncer.debounce(this._debounceOverflow,animationFrame,()=>{this.__doUpdateOverflow()})}__doUpdateOverflow(){let e="";var t=this.$.table,r=(t.scrollTop<t.scrollHeight-t.clientHeight&&(e+=" bottom"),0<t.scrollTop&&(e+=" top"),getNormalizedScrollLeft(t,this.getAttribute("dir"))),r=(0<r&&(e+=" start"),r<t.scrollWidth-t.clientWidth&&(e+=" end"),this.__isRTL&&(e=e.replace(/start|end/giu,e=>"start"===e?"end":"start")),t.scrollLeft<t.scrollWidth-t.clientWidth&&(e+=" right"),0<t.scrollLeft&&(e+=" left"),e.trim());0<r.length&&this.getAttribute("overflow")!==r?this.setAttribute("overflow",r):0===r.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}_frozenCellsChanged(){this._debouncerCacheElements=Debouncer.debounce(this._debouncerCacheElements,microTask,()=>{Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach(e=>{e.style.transform=""}),this._frozenCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen]")),this._frozenToEndCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen-to-end]")),this.__updateHorizontalScrollPosition()}),this._debounceUpdateFrozenColumn()}_debounceUpdateFrozenColumn(){this.__debounceUpdateFrozenColumn=Debouncer.debounce(this.__debounceUpdateFrozenColumn,microTask,()=>this._updateFrozenColumn())}_updateFrozenColumn(){if(this._columnTree){var i=this._columnTree[this._columnTree.length-1].slice(0);i.sort((e,t)=>e._order-t._order);let t,r;for(let e=0;e<i.length;e++){var o=i[e];o._lastFrozen=!1,o._firstFrozenToEnd=!1,void 0===r&&o.frozenToEnd&&!o.hidden&&(r=e),o.frozen&&!o.hidden&&(t=e)}void 0!==t&&(i[t]._lastFrozen=!0),void 0!==r&&(i[r]._firstFrozenToEnd=!0),this.__updateColumnsBodyContentHidden()}}__updateHorizontalScrollPosition(){if(this._columnTree){var e=this.$.table.scrollWidth,o=this.$.table.clientWidth,a=Math.max(0,this.$.table.scrollLeft),s=getNormalizedScrollLeft(this.$.table,this.getAttribute("dir")),n=`translate(${-a}px, 0)`,n=(this.$.header.style.transform=n,this.$.footer.style.transform=n,this.$.items.style.transform=n,this.__isRTL?s+o-e:a);let t=`translate(${n}px, 0)`;this._frozenCells.forEach(e=>{e.style.transform=t});s=this.__isRTL?s:a+o-e;let r=`translate(${s}px, 0)`,i=r;this._lazyColumns&&this._areSizerCellsAssigned()&&(o=[...a=this._getColumnsInOrder()].reverse().find(e=>!e.frozenToEnd&&!e._bodyContentHidden),e=this.__getColumnEnd(o),o=a.find(e=>e.frozenToEnd),a=s+(this.__getColumnStart(o)-e)+this.__lazyColumnsStart,i=`translate(${a}px, 0)`),this._frozenToEndCells.forEach(e=>{this.$.items.contains(e)?e.style.transform=i:e.style.transform=r}),this.hasAttribute("navigating")&&this.__rowFocusMode&&this.$.table.style.setProperty("--_grid-horizontal-scroll-position",-n+"px")}}_areSizerCellsAssigned(){return this._getColumnsInOrder().every(e=>e._sizerCell)}},SelectionMixin=e=>class extends e{static get properties(){return{selectedItems:{type:Object,notify:!0,value:()=>[],sync:!0},isItemSelectable:{type:Function,notify:!0},__selectedKeys:{type:Object,computed:"__computeSelectedKeys(itemIdPath, selectedItems)"}}}static get observers(){return["__selectedItemsChanged(itemIdPath, selectedItems, isItemSelectable)"]}_isSelected(e){return this.__selectedKeys.has(this.getItemId(e))}__isItemSelectable(e){return!this.isItemSelectable||!e||this.isItemSelectable(e)}selectItem(e){this._isSelected(e)||(this.selectedItems=[...this.selectedItems,e])}deselectItem(t){this._isSelected(t)&&(this.selectedItems=this.selectedItems.filter(e=>!this._itemsEqual(e,t)))}__selectedItemsChanged(){this.requestContentUpdate()}__computeSelectedKeys(e,t){t=t||[];let r=new Set;return t.forEach(e=>{r.add(this.getItemId(e))}),r}},defaultMultiSortPriority="prepend",SortMixin=e=>class extends e{static get properties(){return{multiSort:{type:Boolean,value:!1},multiSortPriority:{type:String,value:()=>defaultMultiSortPriority},multiSortOnShiftClick:{type:Boolean,value:!1},_sorters:{type:Array,value:()=>[]},_previousSorters:{type:Array,value:()=>[]}}}static setDefaultMultiSortPriority(e){defaultMultiSortPriority=["append","prepend"].includes(e)?e:"prepend"}ready(){super.ready(),this.addEventListener("sorter-changed",this._onSorterChanged)}_onSorterChanged(e){var t=e.target;e.stopPropagation(),(t._grid=this).__updateSorter(t,e.detail.shiftClick,e.detail.fromSorterClick),this.__applySorters()}__removeSorters(t){0!==t.length&&(this._sorters=this._sorters.filter(e=>!t.includes(e)),this.__applySorters())}__updateSortOrders(){this._sorters.forEach(e=>{e._order=null});var e=this._getActiveSorters();1<e.length&&e.forEach((e,t)=>{e._order=t})}__updateSorter(t,e,r){var i;(t.direction||this._sorters.includes(t))&&(t._order=null,i=this._sorters.filter(e=>e!==t),this.multiSort&&(!this.multiSortOnShiftClick||!r)||this.multiSortOnShiftClick&&e?"append"===this.multiSortPriority?this._sorters=[...i,t]:this._sorters=[t,...i]:(t.direction||this.multiSortOnShiftClick)&&(this._sorters=t.direction?[t]:[],i.forEach(e=>{e._order=null,e.direction=null})))}__applySorters(){this.__updateSortOrders(),this.dataProvider&&this.isAttached&&JSON.stringify(this._previousSorters)!==JSON.stringify(this._mapSorters())&&this.__debounceClearCache(),this._a11yUpdateSorters(),this._previousSorters=this._mapSorters()}_getActiveSorters(){return this._sorters.filter(e=>e.direction&&e.isConnected)}_mapSorters(){return this._getActiveSorters().map(e=>({path:e.path,direction:e.direction}))}},StylingMixin=e=>class extends e{static get properties(){return{cellClassNameGenerator:{type:Function,sync:!0},cellPartNameGenerator:{type:Function,sync:!0}}}static get observers(){return["__cellClassNameGeneratorChanged(cellClassNameGenerator)","__cellPartNameGeneratorChanged(cellPartNameGenerator)"]}__cellClassNameGeneratorChanged(){this.generateCellClassNames()}__cellPartNameGeneratorChanged(){this.generateCellPartNames()}generateCellClassNames(){iterateChildren(this.$.items,e=>{e.hidden||this._generateCellClassNames(e,this.__getRowModel(e))})}generateCellPartNames(){iterateChildren(this.$.items,e=>{e.hidden||this._generateCellPartNames(e,this.__getRowModel(e))})}_generateCellClassNames(r,i){iterateRowCells(r,t=>{var e;t.__generatedClasses&&t.__generatedClasses.forEach(e=>t.classList.remove(e)),this.cellClassNameGenerator&&!r.hasAttribute("loading")&&(e=this.cellClassNameGenerator(t._column,i),t.__generatedClasses=e&&e.split(" ").filter(e=>0<e.length),t.__generatedClasses)&&t.__generatedClasses.forEach(e=>t.classList.add(e))})}_generateCellPartNames(r,i){iterateRowCells(r,t=>{var e;t.__generatedParts&&t.__generatedParts.forEach(e=>{updatePart(t,null,e)}),this.cellPartNameGenerator&&!r.hasAttribute("loading")&&(e=this.cellPartNameGenerator(t._column,i),t.__generatedParts=e&&e.split(" ").filter(e=>0<e.length),t.__generatedParts)&&t.__generatedParts.forEach(e=>{updatePart(t,!0,e)})})}},GridMixin=e=>class extends ColumnAutoWidthMixin(ArrayDataProviderMixin(DataProviderMixin(DynamicColumnsMixin(ActiveItemMixin(ScrollMixin(SelectionMixin(SortMixin(RowDetailsMixin(KeyboardNavigationMixin(A11yMixin(FilterMixin(ColumnReorderingMixin(ColumnResizingMixin(EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(e)))))))))))))))))){static get observers(){return["_columnTreeChanged(_columnTree)","_flatSizeChanged(_flatSize, __virtualizer, _hasData, _columnTree)"]}static get properties(){return{_safari:{type:Boolean,value:isSafari},_ios:{type:Boolean,value:isIOS},_firefox:{type:Boolean,value:isFirefox},_android:{type:Boolean,value:isAndroid},_touchDevice:{type:Boolean,value:isTouch},allRowsVisible:{type:Boolean,value:!1,reflectToAttribute:!0},isAttached:{value:!1},__gridElement:{type:Boolean,value:!0},__hasEmptyStateContent:{type:Boolean,value:!1},__emptyState:{type:Boolean,computed:"__computeEmptyState(_flatSize, __hasEmptyStateContent)"}}}constructor(){super(),this.addEventListener("animationend",this._onAnimationEnd)}get _firstVisibleIndex(){var e=this.__getFirstVisibleItem();return e?e.index:void 0}get _lastVisibleIndex(){var e=this.__getLastVisibleItem();return e?e.index:void 0}connectedCallback(){super.connectedCallback(),this.isAttached=!0}disconnectedCallback(){super.disconnectedCallback(),this.isAttached=!1,this._hideTooltip(!0)}__getFirstVisibleItem(){return this._getRenderedRows().find(e=>this._isInViewport(e))}__getLastVisibleItem(){return this._getRenderedRows().reverse().find(e=>this._isInViewport(e))}_isInViewport(e){var t=this.$.table.getBoundingClientRect(),e=e.getBoundingClientRect(),r=this.$.header.getBoundingClientRect().height,i=this.$.footer.getBoundingClientRect().height;return e.bottom>t.top+r&&e.top<t.bottom-i}_getRenderedRows(){return Array.from(this.$.items.children).filter(e=>!e.hidden).sort((e,t)=>e.index-t.index)}_getRowContainingNode(e){e=getClosestElement("vaadin-grid-cell-content",e);if(e)return e.assignedSlot.parentElement.parentElement}_isItemAssignedToRow(e,t){t=this.__getRowModel(t);return this.getItemId(e)===this.getItemId(t.item)}ready(){super.ready(),this.__virtualizer=new Virtualizer({createElements:this._createScrollerRows.bind(this),updateElement:this._updateScrollerItem.bind(this),scrollContainer:this.$.items,scrollTarget:this.$.table,reorderElements:!0}),new ResizeObserver(()=>setTimeout(()=>{this.__updateColumnsBodyContentHidden()})).observe(this.$.table);var e=new ResizeObserver(()=>setTimeout(()=>{this.__updateMinHeight()}));e.observe(this.$.header),e.observe(this.$.items),e.observe(this.$.footer),processTemplates(this),this._tooltipController=new TooltipController(this),this.addController(this._tooltipController),this._tooltipController.setManual(!0),this.__emptyStateContentObserver=new SlotObserver(this.$.emptystateslot,({currentNodes:e})=>{this.$.emptystatecell._content=e[0],this.__hasEmptyStateContent=!!this.$.emptystatecell._content})}__getBodyCellCoordinates(e){if(this.$.items.contains(e)&&"td"===e.localName)return{item:e.parentElement._item,column:e._column}}__focusBodyCell({item:t,column:r}){var e=this._getRenderedRows().find(e=>e._item===t),e=e&&[...e.children].find(e=>e._column===r);e&&e.focus()}_focusFirstVisibleRow(){var e=this.__getFirstVisibleItem();this.__rowFocusMode=!0,e.focus()}_flatSizeChanged(e,t,r,i){var o;t&&r&&i&&(r=this.shadowRoot.activeElement,i=this.__getBodyCellCoordinates(r),o=t.size||0,t.size=e,t.update(o-1,o-1),e<o&&t.update(e-1,e-1),i&&r.parentElement.hidden&&this.__focusBodyCell(i),this._resetKeyboardNavigation())}_createScrollerRows(t){var r=[];for(let e=0;e<t;e++){var i=document.createElement("tr");i.setAttribute("part","row body-row"),i.setAttribute("role","row"),i.setAttribute("tabindex","-1"),this._columnTree&&this._updateRow(i,this._columnTree[this._columnTree.length-1],"body",!1,!0),r.push(i)}return this._columnTree&&this._columnTree[this._columnTree.length-1].forEach(e=>{e.isConnected&&e._cells&&(e._cells=[...e._cells])}),this.__afterCreateScrollerRowsDebouncer=Debouncer.debounce(this.__afterCreateScrollerRowsDebouncer,animationFrame,()=>{this._afterScroll()}),r}_createCell(e,t,r){var i="vaadin-grid-cell-content-"+(this._contentIndex=this._contentIndex+1||0);let o=document.createElement("vaadin-grid-cell-content"),a=(o.setAttribute("slot",i),document.createElement(e));r&&a.setAttribute("data-testid","colname-"+r),a.id=i.replace("-content-","-"),a.setAttribute("role","td"===e?"gridcell":"columnheader"),isAndroid||isIOS||(a.addEventListener("mouseenter",e=>{this.$.scroller.hasAttribute("scrolling")||this._showTooltip(e)}),a.addEventListener("mouseleave",()=>{this._hideTooltip()}),a.addEventListener("mousedown",()=>{this._hideTooltip(!0)}));r=document.createElement("slot");return r.setAttribute("name",i),(t&&t._focusButtonMode?((e=document.createElement("div")).setAttribute("role","button"),e.setAttribute("tabindex","-1"),a.appendChild(e),a._focusButton=e,a.focus=function(e){a._focusButton.focus(e)},e):(a.setAttribute("tabindex","-1"),a)).appendChild(r),(a._content=o).addEventListener("mousedown",()=>{if(isChrome){let r=e=>{var t=o.contains(this.getRootNode().activeElement),e=e.composedPath().includes(o);!t&&e&&a.focus({preventScroll:!0}),document.removeEventListener("mouseup",r,!0)};document.addEventListener("mouseup",r,!0)}else setTimeout(()=>{o.contains(this.getRootNode().activeElement)||a.focus({preventScroll:!0})})}),a}_updateRow(a,e,s="body",n=!1,l=!1){let d=document.createDocumentFragment();iterateRowCells(a,e=>{e._vacant=!0}),a.innerHTML="","body"===s&&(a.__cells=[],a.__detailsCell=null),e.filter(e=>!e.hidden).forEach((e,t,r)=>{let i;var o;"body"===s?(e._cells||(e._cells=[]),(i=e._cells.find(e=>e._vacant))||(i=this._createCell("td",e,e.getAttribute("path")),e._onCellKeyDown&&i.addEventListener("keydown",e._onCellKeyDown.bind(e)),e._cells.push(i)),i.setAttribute("part","cell body-cell"),(i.__parentRow=a).__cells.push(i),o=a===this.$.sizer,e._bodyContentHidden&&!o||a.appendChild(i),o&&(e._sizerCell=i),t===r.length-1&&this.rowDetailsRenderer&&(this._detailsCells||(this._detailsCells=[]),o=this._detailsCells.find(e=>e._vacant)||this._createCell("td"),-1===this._detailsCells.indexOf(o)&&this._detailsCells.push(o),o._content.parentElement||d.appendChild(o._content),this._configureDetailsCell(o),a.appendChild(o),a.__detailsCell=o,this._a11ySetRowDetailsCell(a,o),o._vacant=!1),l||(e._cells=[...e._cells])):(t="header"===s?"th":"td",n||"vaadin-grid-column-group"===e.localName?((i=e[`_${s}Cell`])||(i=this._createCell(t),e._onCellKeyDown&&i.addEventListener("keydown",e._onCellKeyDown.bind(e))),i._column=e,a.appendChild(i),e[`_${s}Cell`]=i):(e._emptyCells||(e._emptyCells=[]),(i=e._emptyCells.find(e=>e._vacant)||this._createCell(t))._column=e,a.appendChild(i),-1===e._emptyCells.indexOf(i)&&e._emptyCells.push(i)),i.part.add("cell",s+"-cell")),i._content.parentElement||d.appendChild(i._content),i._vacant=!1,i._column=e}),"body"!==s&&this.__debounceUpdateHeaderFooterRowVisibility(a),this.appendChild(d),this._frozenCellsChanged(),this._updateFirstAndLastColumnForRow(a)}__debounceUpdateHeaderFooterRowVisibility(e){e.__debounceUpdateHeaderFooterRowVisibility=Debouncer.debounce(e.__debounceUpdateHeaderFooterRowVisibility,microTask,()=>this.__updateHeaderFooterRowVisibility(e))}__updateHeaderFooterRowVisibility(r){var e;r&&(e=Array.from(r.children).filter(e=>{var t=e._column;if(!(t._emptyCells&&-1<t._emptyCells.indexOf(e)))if(r.parentElement===this.$.header){if(t.headerRenderer)return!0;if(null===t.header)return!1;if(t.path||void 0!==t.header)return!0}else if(t.footerRenderer)return!0;return!1}),r.hidden!==!e.length&&(r.hidden=!e.length),this._resetKeyboardNavigation())}_updateScrollerItem(e,t){this._preventScrollerRotatingCellFocus(e,t),this._columnTree&&(this._updateRowOrderParts(e,t),this._a11yUpdateRowRowindex(e,t),this._testIdUpdateRowRowindex(e,t),this._getItem(t,e))}_columnTreeChanged(e){this._renderColumnTree(e),this.__updateColumnsBodyContentHidden()}_updateRowOrderParts(e,t=e.index){updateBooleanRowStates(e,{first:0===t,last:t===this._flatSize-1,odd:t%2!=0,even:t%2==0})}_updateRowStateParts(e,{item:t,expanded:r,selected:i,detailsOpened:o}){updateBooleanRowStates(e,{expanded:r,collapsed:this.__isRowExpandable(e),selected:i,nonselectable:!1===this.__isItemSelectable(t),"details-opened":o})}__computeEmptyState(e,t){return 0===e&&t}_renderColumnTree(i){for(iterateChildren(this.$.items,e=>{this._updateRow(e,i[i.length-1],"body",!1,!0);var t=this.__getRowModel(e);this._updateRowOrderParts(e),this._updateRowStateParts(e,t),this._filterDragAndDrop(e,t)});this.$.header.children.length<i.length;){var e=document.createElement("tr"),e=(e.setAttribute("part","row"),e.setAttribute("role","row"),e.setAttribute("tabindex","-1"),this.$.header.appendChild(e),document.createElement("tr"));e.setAttribute("part","row"),e.setAttribute("role","row"),e.setAttribute("tabindex","-1"),this.$.footer.appendChild(e)}for(;this.$.header.children.length>i.length;)this.$.header.removeChild(this.$.header.firstElementChild),this.$.footer.removeChild(this.$.footer.firstElementChild);iterateChildren(this.$.header,(e,t,r)=>{this._updateRow(e,i[t],"header",t===i.length-1);e=getBodyRowCells(e);updateCellsPart(e,"first-header-row-cell",0===t),updateCellsPart(e,"last-header-row-cell",t===r.length-1)}),iterateChildren(this.$.footer,(e,t,r)=>{this._updateRow(e,i[i.length-1-t],"footer",0===t);e=getBodyRowCells(e);updateCellsPart(e,"first-footer-row-cell",0===t),updateCellsPart(e,"last-footer-row-cell",t===r.length-1)}),this._updateRow(this.$.sizer,i[i.length-1]),this._resizeHandler(),this._frozenCellsChanged(),this._updateFirstAndLastColumn(),this._resetKeyboardNavigation(),this._a11yUpdateHeaderRows(),this._testIdUpdateHeaderRows(),this._a11yUpdateFooterRows(),this._testIdUpdateFooterRows(),this.generateCellClassNames(),this.generateCellPartNames(),this.__updateHeaderAndFooter()}_updateItem(e,t){e._item=t;let r=this.__getRowModel(e);this._toggleDetailsCell(e,r.detailsOpened),this._a11yUpdateRowLevel(e,r.level),this._a11yUpdateRowSelected(e,r.selected),this._updateRowStateParts(e,r),this._generateCellClassNames(e,r),this._generateCellPartNames(e,r),this._filterDragAndDrop(e,r),this.__updateDragSourceParts(e,r),iterateChildren(e,e=>{var t;e._column&&!e._column.isConnected||e._renderer&&(t=e._column||this,e._renderer.call(t,e._content,t,r))}),this._updateDetailsCellHeight(e),this._a11yUpdateRowExpanded(e,r.expanded)}_resizeHandler(){this._updateDetailsCellHeights(),this.__updateHorizontalScrollPosition()}_onAnimationEnd(e){0===e.animationName.indexOf("vaadin-grid-appear")&&(e.stopPropagation(),this._resetKeyboardNavigation(),requestAnimationFrame(()=>{this.__scrollToPendingIndexes()}))}__getRowModel(e){return{index:e.index,item:e._item,level:this._getIndexLevel(e.index),expanded:this._isExpanded(e._item),selected:this._isSelected(e._item),detailsOpened:!!this.rowDetailsRenderer&&this._isDetailsOpened(e._item)}}_showTooltip(e){var t,r=this._tooltipController.node;r&&r.isConnected&&(t=e.target,this.__isCellFullyVisible(t))&&(this._tooltipController.setTarget(t),this._tooltipController.setContext(this.getEventContext(e)),r._stateController.open({focus:"focusin"===e.type,hover:"mouseenter"===e.type}))}__isCellFullyVisible(e){if(e.hasAttribute("frozen")||e.hasAttribute("frozen-to-end"))return!0;let{left:t,right:r}=this.getBoundingClientRect();var i=[...e.parentNode.children].find(e=>e.hasAttribute("last-frozen")),i=(i&&(i=i.getBoundingClientRect(),t=this.__isRTL?t:i.right,r=this.__isRTL?i.left:r),[...e.parentNode.children].find(e=>e.hasAttribute("first-frozen-to-end"))),i=(i&&(i=i.getBoundingClientRect(),t=this.__isRTL?i.right:t,r=this.__isRTL?r:i.left),e.getBoundingClientRect());return i.left>=t&&i.right<=r}_hideTooltip(e){var t=this._tooltipController&&this._tooltipController.node;t&&t._stateController.close(e)}requestContentUpdate(){this.__updateHeaderAndFooter(),this.__updateVisibleRows()}__updateHeaderAndFooter(){(this._columnTree||[]).forEach(e=>{e.forEach(e=>{e._renderHeaderAndFooter&&e._renderHeaderAndFooter()})})}__updateVisibleRows(e,t){this.__virtualizer&&this.__virtualizer.update(e,t)}__updateMinHeight(){var e=this.$.header.clientHeight+36+this.$.footer.clientHeight+(this.$.table.offsetHeight-this.$.table.clientHeight);!this.__minHeightStyleSheet&&supportsAdoptingStyleSheets&&(this.__minHeightStyleSheet=new CSSStyleSheet,this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,this.__minHeightStyleSheet]),this.__minHeightStyleSheet?this.__minHeightStyleSheet.replaceSync(`:host { --_grid-min-height: ${e}px; }`):this.style.setProperty("--_grid-min-height",e+"px")}},gridStyles=css`@keyframes vaadin-grid-appear{to{opacity:1}}:host{display:flex;flex-direction:column;animation:1ms vaadin-grid-appear;height:400px;min-height:var(--_grid-min-height,0);flex:1 1 auto;align-self:stretch;position:relative}:host([hidden]){display:none!important}:host([disabled]){pointer-events:none}#scroller{display:flex;flex-direction:column;min-height:100%;transform:translateY(0);width:auto;height:auto;position:absolute;inset:0}:host([all-rows-visible]){height:auto;align-self:flex-start;min-height:auto;flex-grow:0;width:100%}:host([all-rows-visible]) #scroller{width:100%;height:100%;position:relative}:host([all-rows-visible]) #items{min-height:1px}#table{display:flex;flex-direction:column;width:100%;height:100%;overflow:auto;position:relative;outline:0;z-index:0}#footer,#header{display:block;position:-webkit-sticky;position:sticky;left:0;overflow:visible;width:100%;z-index:1}#header{top:0}th{text-align:inherit}[safari] th{text-align:initial}#footer{bottom:0}#items{flex-grow:1;flex-shrink:0;display:block;position:-webkit-sticky;position:sticky;width:100%;left:0;overflow:visible}[part~=row]{display:flex;width:100%;box-sizing:border-box;margin:0}[part~=row][loading] [part~=body-cell] ::slotted(vaadin-grid-cell-content){visibility:hidden}[column-rendering=lazy] [part~=body-cell]:not([frozen]):not([frozen-to-end]){transform:translateX(var(--_grid-lazy-columns-start))}#items [part~=row]{position:absolute}#items [part~=row]:empty{height:100%}[part~=cell]:not([part~=details-cell]){flex-shrink:0;flex-grow:1;box-sizing:border-box;display:flex;width:100%;position:relative;align-items:center;padding:0;white-space:nowrap}[part~=cell]{outline:0}[part~=cell]>[tabindex]{display:flex;align-items:inherit;outline:0;position:absolute;inset:0}[measuring-auto-width] [part~=cell]>[tabindex]{position:static}[part~=details-cell]{position:absolute;bottom:0;width:100%;box-sizing:border-box;padding:0}[part~=cell] ::slotted(vaadin-grid-cell-content){display:block;width:100%;box-sizing:border-box;overflow:hidden;text-overflow:ellipsis}[hidden]{display:none!important}[frozen-to-end],[frozen]{z-index:2;will-change:transform}[no-scrollbars][firefox] #table,[no-scrollbars][safari] #table{overflow:hidden}#scroller:not([empty-state]) #emptystatebody,#scroller[empty-state] #items{display:none}#emptystatebody{display:flex;position:sticky;inset:0;flex:1;overflow:hidden}#emptystaterow{display:flex;flex:1}#emptystatecell{display:block;flex:1;overflow:auto}#scroller[no-content-pointer-events] [part~=cell] ::slotted(vaadin-grid-cell-content),:host([reordering]) [part~=cell] ::slotted(vaadin-grid-cell-content),:host([reordering]) [part~=resize-handle]{pointer-events:none}[part~=reorder-ghost]{visibility:hidden;position:fixed;pointer-events:none;opacity:.5;top:0;left:0}:host([reordering]){-webkit-user-select:none;user-select:none}[part~=resize-handle]{position:absolute;top:0;right:0;height:100%;cursor:col-resize;z-index:1}[part~=resize-handle]::before{position:absolute;content:'';height:100%;width:35px;transform:translateX(-50%)}[last-column] [part~=resize-handle]::before,[last-frozen] [part~=resize-handle]::before{width:18px;transform:none;right:0}[frozen-to-end] [part~=resize-handle]{left:0;right:auto}[frozen-to-end] [part~=resize-handle]::before{left:0;right:auto}[first-frozen-to-end] [part~=resize-handle]::before{width:18px;transform:none}[first-frozen-to-end]{margin-inline-start:auto}:host(:not([overflow~=end])) [first-frozen-to-end] [part~=resize-handle]{display:none}#scroller[column-resizing],#scroller[range-selecting]{-webkit-user-select:none;user-select:none}#sizer{display:flex;position:absolute;visibility:hidden}#sizer [part~=details-cell]{display:none!important}#sizer [part~=cell][hidden]{display:none!important}#sizer [part~=cell]{display:block;flex-shrink:0;line-height:0;height:0!important;min-height:0!important;max-height:0!important;padding:0!important;border:none!important}#sizer [part~=cell]::before{content:'-'}#sizer [part~=cell] ::slotted(vaadin-grid-cell-content){display:none!important}:host([dir=rtl]) #footer,:host([dir=rtl]) #header,:host([dir=rtl]) #items{left:auto}:host([dir=rtl]) [part~=reorder-ghost]{left:auto;right:0}:host([dir=rtl]) [part~=resize-handle]{left:0;right:auto}:host([dir=rtl]) [part~=resize-handle]::before{transform:translateX(50%)}:host([dir=rtl]) [last-column] [part~=resize-handle]::before,:host([dir=rtl]) [last-frozen] [part~=resize-handle]::before{left:0;right:auto}:host([dir=rtl]) [frozen-to-end] [part~=resize-handle]{right:0;left:auto}:host([dir=rtl]) [frozen-to-end] [part~=resize-handle]::before{right:0;left:auto}@media (forced-colors:active){[part~=selected-row] [part~=first-column-cell]::after{content:'';position:absolute;top:0;left:0;bottom:0;border:2px solid}[part~=focused-cell]::before{outline:2px solid!important;outline-offset:-1px}}`;registerStyles("vaadin-grid",gridStyles,{moduleId:"vaadin-grid-styles"});class Grid extends GridMixin(ElementMixin(ThemableMixin(ControllerMixin(PolymerElement)))){static get template(){return html`<div id="scroller" safari$="[[_safari]]" ios$="[[_ios]]" loading$="[[loading]]" column-reordering-allowed$="[[columnReorderingAllowed]]" empty-state$="[[__emptyState]]"><table id="table" role="treegrid" aria-multiselectable="true" tabindex="0" aria-label$="[[accessibleName]]"><caption id="sizer" part="row"></caption><thead id="header" role="rowgroup"></thead><tbody id="items" role="rowgroup"></tbody><tbody id="emptystatebody"><tr id="emptystaterow"><td part="empty-state" id="emptystatecell" tabindex="0"><slot name="empty-state" id="emptystateslot"></slot></td></tr></tbody><tfoot id="footer" role="rowgroup"></tfoot></table><div part="reorder-ghost"></div></div><slot name="tooltip"></slot><div id="focusexit" tabindex="0"></div>`}static get is(){return"vaadin-grid"}}defineCustomElement(Grid);let VALUE_NOT_INITIALIZED=Symbol("valueNotInitialized");class LitRendererDirective extends AsyncDirective{constructor(e){if(super(e),e.type!==PartType.ELEMENT)throw new Error(`\`${this.constructor.name}\` must be bound to an element.`);this.previousValue=VALUE_NOT_INITIALIZED}render(e,t){return nothing}update(e,[t,r]){return this.hasChanged(r)&&(this.host=e.options&&e.options.host,this.element=e.element,this.renderer=t,this.previousValue===VALUE_NOT_INITIALIZED?this.addRenderer():this.runRenderer(),this.previousValue=Array.isArray(r)?[...r]:r),nothing}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){t=this.renderer.call(this.host,...t);render(t,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}}let CONTENT_UPDATE_DEBOUNCER=Symbol("contentUpdateDebouncer");class GridRowDetailsRendererDirective extends LitRendererDirective{addRenderer(){this.element.rowDetailsRenderer=(e,t,r)=>{this.renderRenderer(e,r.item,r,t)}}runRenderer(){this.element[CONTENT_UPDATE_DEBOUNCER]=Debouncer.debounce(this.element[CONTENT_UPDATE_DEBOUNCER],microTask,()=>{this.element.requestContentUpdate()})}removeRenderer(){this.element.rowDetailsRenderer=null}}directive(GridRowDetailsRendererDirective);class AbstractGridColumnRendererDirective extends LitRendererDirective{get rendererProperty(){throw new Error("The `rendererProperty` getter must be implemented.")}addRenderer(){this.element[this.rendererProperty]=(e,t)=>{this.renderRenderer(e,t)}}runRenderer(){let e=this.element._grid;e[CONTENT_UPDATE_DEBOUNCER]=Debouncer.debounce(e[CONTENT_UPDATE_DEBOUNCER],microTask,()=>{e.requestContentUpdate()})}removeRenderer(){this.element[this.rendererProperty]=null}}class GridColumnBodyRendererDirective extends AbstractGridColumnRendererDirective{get rendererProperty(){return"renderer"}addRenderer(){this.element[this.rendererProperty]=(e,t,r)=>{this.renderRenderer(e,r.item,r,t)}}}class GridColumnHeaderRendererDirective extends AbstractGridColumnRendererDirective{get rendererProperty(){return"headerRenderer"}}class GridColumnFooterRendererDirective extends AbstractGridColumnRendererDirective{get rendererProperty(){return"footerRenderer"}}directive(GridColumnBodyRendererDirective);let columnHeaderRenderer=directive(GridColumnHeaderRendererDirective),millisecondsInWeek=(directive(GridColumnFooterRendererDirective),6048e5),millisecondsInDay=864e5,constructFromSymbol=Symbol.for("constructDateFrom");function constructFrom(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&constructFromSymbol in e?e[constructFromSymbol](t):new(e instanceof Date?e.constructor:Date)(t)}function toDate(e,t){return constructFrom(t||e,e)}let defaultOptions={};function getDefaultOptions(){return defaultOptions}function startOfWeek(e,t){var r=getDefaultOptions(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,e=toDate(e,t?.in),t=e.getDay(),t=(t<r?7:0)+t-r;return e.setDate(e.getDate()-t),e.setHours(0,0,0,0),e}function startOfISOWeek(e,t){return startOfWeek(e,{...t,weekStartsOn:1})}function getISOWeekYear(e,t){var e=toDate(e,t?.in),t=e.getFullYear(),r=constructFrom(e,0),r=(r.setFullYear(t+1,0,4),r.setHours(0,0,0,0),startOfISOWeek(r)),i=constructFrom(e,0),i=(i.setFullYear(t,0,4),i.setHours(0,0,0,0),startOfISOWeek(i));return e.getTime()>=r.getTime()?t+1:e.getTime()>=i.getTime()?t:t-1}function getTimezoneOffsetInMilliseconds(e){var t=toDate(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function normalizeDates(e,...t){var r=constructFrom.bind(null,t.find(e=>"object"==typeof e));return t.map(r)}function startOfDay(e,t){e=toDate(e,t?.in);return e.setHours(0,0,0,0),e}function differenceInCalendarDays(e,t,r){var[r,e]=normalizeDates(r?.in,e,t),t=startOfDay(r),r=startOfDay(e),e=+t-getTimezoneOffsetInMilliseconds(t),t=+r-getTimezoneOffsetInMilliseconds(r);return Math.round((e-t)/millisecondsInDay)}function startOfISOWeekYear(e,t){t=getISOWeekYear(e,t),e=constructFrom(e,0);return e.setFullYear(t,0,4),e.setHours(0,0,0,0),startOfISOWeek(e)}function isDate(e){return e instanceof Date||"object"==typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function isValid(e){return!(!isDate(e)&&"number"!=typeof e||isNaN(+toDate(e)))}function startOfYear(e,t){e=toDate(e,t?.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}let formatDistanceLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},formatDistance=(e,t,r)=>{let i;e=formatDistanceLocale[e];return i="string"==typeof e?e:1===t?e.one:e.other.replace("{{count}}",t.toString()),r?.addSuffix?r.comparison&&0<r.comparison?"in "+i:i+" ago":i};function buildFormatLongFn(t){return(e={})=>{e=e.width?String(e.width):t.defaultWidth;return t.formats[e]||t.formats[t.defaultWidth]}}let dateFormats={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},timeFormats={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},dateTimeFormats={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},formatLong={date:buildFormatLongFn({formats:dateFormats,defaultWidth:"full"}),time:buildFormatLongFn({formats:timeFormats,defaultWidth:"full"}),dateTime:buildFormatLongFn({formats:dateTimeFormats,defaultWidth:"full"})},formatRelativeLocale={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},formatRelative=(e,t,r,i)=>formatRelativeLocale[e];function buildLocalizeFn(a){return(e,t)=>{var r,i=t?.context?String(t.context):"standalone";let o;o="formatting"===i&&a.formattingValues?(i=a.defaultFormattingWidth||a.defaultWidth,r=t?.width?String(t.width):i,a.formattingValues[r]||a.formattingValues[i]):(r=a.defaultWidth,i=t?.width?String(t.width):a.defaultWidth,a.values[i]||a.values[r]);t=a.argumentCallback?a.argumentCallback(e):e;return o[t]}}let eraValues={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},quarterValues={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},monthValues={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},dayValues={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},dayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},formattingDayPeriodValues={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ordinalNumber=(e,t)=>{var r=Number(e),e=r%100;if(20<e||e<10)switch(e%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},localize={ordinalNumber:ordinalNumber,era:buildLocalizeFn({values:eraValues,defaultWidth:"wide"}),quarter:buildLocalizeFn({values:quarterValues,defaultWidth:"wide",argumentCallback:e=>e-1}),month:buildLocalizeFn({values:monthValues,defaultWidth:"wide"}),day:buildLocalizeFn({values:dayValues,defaultWidth:"wide"}),dayPeriod:buildLocalizeFn({values:dayPeriodValues,defaultWidth:"wide",formattingValues:formattingDayPeriodValues,defaultFormattingWidth:"wide"})};function buildMatchFn(a){return(e,t={})=>{var r=t.width,i=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(i);if(!i)return null;let o=i[0];i=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],r=Array.isArray(i)?findIndex(i,e=>e.test(o)):findKey(i,e=>e.test(o)),i=a.valueCallback?a.valueCallback(r):r;return{value:t.valueCallback?t.valueCallback(i):i,rest:e.slice(o.length)}}}function findKey(e,t){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function findIndex(t,r){for(let e=0;e<t.length;e++)if(r(t[e]))return e}function buildMatchPatternFn(o){return(e,t={})=>{var r,i=e.match(o.matchPattern);return i&&(i=i[0],r=e.match(o.parsePattern))?(r=o.valueCallback?o.valueCallback(r[0]):r[0],{value:r=t.valueCallback?t.valueCallback(r):r,rest:e.slice(i.length)}):null}}let matchOrdinalNumberPattern=/^(\d+)(th|st|nd|rd)?/i,parseOrdinalNumberPattern=/\d+/i,matchEraPatterns={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},parseEraPatterns={any:[/^b/i,/^(a|c)/i]},matchQuarterPatterns={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},parseQuarterPatterns={any:[/1/i,/2/i,/3/i,/4/i]},matchMonthPatterns={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},parseMonthPatterns={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},matchDayPatterns={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},parseDayPatterns={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},matchDayPeriodPatterns={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},parseDayPeriodPatterns={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},match={ordinalNumber:buildMatchPatternFn({matchPattern:matchOrdinalNumberPattern,parsePattern:parseOrdinalNumberPattern,valueCallback:e=>parseInt(e,10)}),era:buildMatchFn({matchPatterns:matchEraPatterns,defaultMatchWidth:"wide",parsePatterns:parseEraPatterns,defaultParseWidth:"any"}),quarter:buildMatchFn({matchPatterns:matchQuarterPatterns,defaultMatchWidth:"wide",parsePatterns:parseQuarterPatterns,defaultParseWidth:"any",valueCallback:e=>e+1}),month:buildMatchFn({matchPatterns:matchMonthPatterns,defaultMatchWidth:"wide",parsePatterns:parseMonthPatterns,defaultParseWidth:"any"}),day:buildMatchFn({matchPatterns:matchDayPatterns,defaultMatchWidth:"wide",parsePatterns:parseDayPatterns,defaultParseWidth:"any"}),dayPeriod:buildMatchFn({matchPatterns:matchDayPeriodPatterns,defaultMatchWidth:"any",parsePatterns:parseDayPeriodPatterns,defaultParseWidth:"any"})},enUS={code:"en-US",formatDistance:formatDistance,formatLong:formatLong,formatRelative:formatRelative,localize:localize,match:match,options:{weekStartsOn:0,firstWeekContainsDate:1}};function getDayOfYear(e,t){e=toDate(e,t?.in);return differenceInCalendarDays(e,startOfYear(e))+1}function getISOWeek(e,t){e=toDate(e,t?.in),t=+startOfISOWeek(e)-+startOfISOWeekYear(e);return Math.round(t/millisecondsInWeek)+1}function getWeekYear(e,t){var r=toDate(e,t?.in),i=r.getFullYear(),o=getDefaultOptions(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=constructFrom(t?.in||e,0),a=(a.setFullYear(i+1,0,o),a.setHours(0,0,0,0),startOfWeek(a,t)),e=constructFrom(t?.in||e,0),o=(e.setFullYear(i,0,o),e.setHours(0,0,0,0),startOfWeek(e,t));return+a<=+r?i+1:+o<=+r?i:i-1}function startOfWeekYear(e,t){var r=getDefaultOptions(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=getWeekYear(e,t),e=constructFrom(t?.in||e,0),i=(e.setFullYear(i,0,r),e.setHours(0,0,0,0),startOfWeek(e,t));return i}function getWeek(e,t){e=toDate(e,t?.in),e=+startOfWeek(e,t)-+startOfWeekYear(e,t);return Math.round(e/millisecondsInWeek)+1}function addLeadingZeros(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}let lightFormatters={y(e,t){e=e.getFullYear(),e=0<e?e:1-e;return addLeadingZeros("yy"===t?e%100:e,t.length)},M(e,t){e=e.getMonth();return"M"===t?String(e+1):addLeadingZeros(e+1,2)},d(e,t){return addLeadingZeros(e.getDate(),t.length)},a(e,t){var r=1<=e.getHours()/12?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h(e,t){return addLeadingZeros(e.getHours()%12||12,t.length)},H(e,t){return addLeadingZeros(e.getHours(),t.length)},m(e,t){return addLeadingZeros(e.getMinutes(),t.length)},s(e,t){return addLeadingZeros(e.getSeconds(),t.length)},S(e,t){var r=t.length,e=e.getMilliseconds();return addLeadingZeros(Math.trunc(e*Math.pow(10,r-3)),t.length)}},dayPeriodEnum={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},formatters={G:function(e,t,r){var i=0<e.getFullYear()?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(i,{width:"abbreviated"});case"GGGGG":return r.era(i,{width:"narrow"});default:return r.era(i,{width:"wide"})}},y:function(e,t,r){var i;return"yo"===t?(i=e.getFullYear(),r.ordinalNumber(0<i?i:1-i,{unit:"year"})):lightFormatters.y(e,t)},Y:function(e,t,r,i){e=getWeekYear(e,i),i=0<e?e:1-e;return"YY"===t?addLeadingZeros(i%100,2):"Yo"===t?r.ordinalNumber(i,{unit:"year"}):addLeadingZeros(i,t.length)},R:function(e,t){return addLeadingZeros(getISOWeekYear(e),t.length)},u:function(e,t){return addLeadingZeros(e.getFullYear(),t.length)},Q:function(e,t,r){var i=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return addLeadingZeros(i,2);case"Qo":return r.ordinalNumber(i,{unit:"quarter"});case"QQQ":return r.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(i,{width:"narrow",context:"formatting"});default:return r.quarter(i,{width:"wide",context:"formatting"})}},q:function(e,t,r){var i=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return addLeadingZeros(i,2);case"qo":return r.ordinalNumber(i,{unit:"quarter"});case"qqq":return r.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(i,{width:"narrow",context:"standalone"});default:return r.quarter(i,{width:"wide",context:"standalone"})}},M:function(e,t,r){var i=e.getMonth();switch(t){case"M":case"MM":return lightFormatters.M(e,t);case"Mo":return r.ordinalNumber(i+1,{unit:"month"});case"MMM":return r.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(i,{width:"narrow",context:"formatting"});default:return r.month(i,{width:"wide",context:"formatting"})}},L:function(e,t,r){var i=e.getMonth();switch(t){case"L":return String(i+1);case"LL":return addLeadingZeros(i+1,2);case"Lo":return r.ordinalNumber(i+1,{unit:"month"});case"LLL":return r.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(i,{width:"narrow",context:"standalone"});default:return r.month(i,{width:"wide",context:"standalone"})}},w:function(e,t,r,i){e=getWeek(e,i);return"wo"===t?r.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},I:function(e,t,r){e=getISOWeek(e);return"Io"===t?r.ordinalNumber(e,{unit:"week"}):addLeadingZeros(e,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getDate(),{unit:"date"}):lightFormatters.d(e,t)},D:function(e,t,r){e=getDayOfYear(e);return"Do"===t?r.ordinalNumber(e,{unit:"dayOfYear"}):addLeadingZeros(e,t.length)},E:function(e,t,r){var i=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},e:function(e,t,r,i){var o=e.getDay(),a=(o-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return addLeadingZeros(a,2);case"eo":return r.ordinalNumber(a,{unit:"day"});case"eee":return r.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(o,{width:"short",context:"formatting"});default:return r.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,r,i){var o=e.getDay(),a=(o-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return addLeadingZeros(a,t.length);case"co":return r.ordinalNumber(a,{unit:"day"});case"ccc":return r.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(o,{width:"narrow",context:"standalone"});case"cccccc":return r.day(o,{width:"short",context:"standalone"});default:return r.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,r){var i=e.getDay(),o=0===i?7:i;switch(t){case"i":return String(o);case"ii":return addLeadingZeros(o,t.length);case"io":return r.ordinalNumber(o,{unit:"day"});case"iii":return r.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},a:function(e,t,r){var i=1<=e.getHours()/12?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){e=e.getHours();let i;switch(i=12===e?dayPeriodEnum.noon:0===e?dayPeriodEnum.midnight:1<=e/12?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){e=e.getHours();let i;switch(i=17<=e?dayPeriodEnum.evening:12<=e?dayPeriodEnum.afternoon:4<=e?dayPeriodEnum.morning:dayPeriodEnum.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,r){if("ho"!==e)return lightFormatters.h(t,e);{let e=t.getHours()%12;return 0===e&&(e=12),r.ordinalNumber(e,{unit:"hour"})}},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getHours(),{unit:"hour"}):lightFormatters.H(e,t)},K:function(e,t,r){e=e.getHours()%12;return"Ko"===t?r.ordinalNumber(e,{unit:"hour"}):addLeadingZeros(e,t.length)},k:function(e,t,r){let i=e.getHours();return 0===i&&(i=24),"ko"===t?r.ordinalNumber(i,{unit:"hour"}):addLeadingZeros(i,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):lightFormatters.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getSeconds(),{unit:"second"}):lightFormatters.s(e,t)},S:function(e,t){return lightFormatters.S(e,t)},X:function(e,t,r){var i=e.getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return formatTimezoneWithOptionalMinutes(i);case"XXXX":case"XX":return formatTimezone(i);default:return formatTimezone(i,":")}},x:function(e,t,r){var i=e.getTimezoneOffset();switch(t){case"x":return formatTimezoneWithOptionalMinutes(i);case"xxxx":case"xx":return formatTimezone(i);default:return formatTimezone(i,":")}},O:function(e,t,r){var i=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},z:function(e,t,r){var i=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+formatTimezoneShort(i,":");default:return"GMT"+formatTimezone(i,":")}},t:function(e,t,r){return addLeadingZeros(Math.trunc(+e/1e3),t.length)},T:function(e,t,r){return addLeadingZeros(+e,t.length)}};function formatTimezoneShort(e,t=""){var r=0<e?"-":"+",e=Math.abs(e),i=Math.trunc(e/60),e=e%60;return 0==e?r+String(i):r+String(i)+t+addLeadingZeros(e,2)}function formatTimezoneWithOptionalMinutes(e,t){return e%60==0?(0<e?"-":"+")+addLeadingZeros(Math.abs(e)/60,2):formatTimezone(e,t)}function formatTimezone(e,t=""){var r=0<e?"-":"+",e=Math.abs(e);return r+addLeadingZeros(Math.trunc(e/60),2)+t+addLeadingZeros(e%60,2)}let dateLongFormatter=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},timeLongFormatter=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},dateTimeLongFormatter=(e,t)=>{var r=e.match(/(P+)(p+)?/)||[],i=r[1],r=r[2];if(!r)return dateLongFormatter(e,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;default:o=t.dateTime({width:"full"})}return o.replace("{{date}}",dateLongFormatter(i,t)).replace("{{time}}",timeLongFormatter(r,t))},longFormatters={p:timeLongFormatter,P:dateTimeLongFormatter},dayOfYearTokenRE=/^D+$/,weekYearTokenRE=/^Y+$/,throwTokens=["D","DD","YY","YYYY"];function isProtectedDayOfYearToken(e){return dayOfYearTokenRE.test(e)}function isProtectedWeekYearToken(e){return weekYearTokenRE.test(e)}function warnOrThrowProtectedError(e,t,r){t=message(e,t,r);if(console.warn(t),throwTokens.includes(e))throw new RangeError(t)}function message(e,t,r){var i="Y"===e[0]?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${i} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}let formattingTokensRegExp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,longFormattingTokensRegExp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,escapedStringRegExp=/^'([^]*?)'?$/,doubleQuoteRegExp=/''/g,unescapedLatinCharacterRegExp=/[a-zA-Z]/;function format(r,i,e){var t=getDefaultOptions();let o=t.locale??enUS;var a=t.firstWeekContainsDate??t.locale?.options?.firstWeekContainsDate??1,t=t.weekStartsOn??t.locale?.options?.weekStartsOn??0;let s=toDate(r,e?.in);if(!isValid(s))throw new RangeError("Invalid time value");let n=i.match(longFormattingTokensRegExp).map(e=>{var t=e[0];return"p"===t||"P"===t?(0,longFormatters[t])(e,o.formatLong):e}).join("").match(formattingTokensRegExp).map(e=>{if("''"===e)return{isToken:!1,value:"'"};var t=e[0];if("'"===t)return{isToken:!1,value:cleanEscapedString(e)};if(formatters[t])return{isToken:!0,value:e};if(t.match(unescapedLatinCharacterRegExp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}}),l=(o.localize.preprocessor&&(n=o.localize.preprocessor(s,n)),{firstWeekContainsDate:a,weekStartsOn:t,locale:o});return n.map(e=>{var t;return e.isToken?((isProtectedWeekYearToken(t=e.value)||isProtectedDayOfYearToken(t))&&warnOrThrowProtectedError(t,i,String(r)),(0,formatters[t[0]])(s,t,o.localize,l)):e.value}).join("")}function cleanEscapedString(e){var t=e.match(escapedStringRegExp);return t?t[1].replace(doubleQuoteRegExp,"'"):e}let IxGridViewStyles=css`:host{--_ix-grid-cell-padding:var(--ix-grid-cell-padding, 1rem);--lumo-primary-color-50pct:transparent}vaadin-grid::part(first-frozen-to-end-cell){border-left:.063rem solid var(--_lumo-grid-border-color);box-shadow:-.375rem 0 .375rem -.375rem #0000001a}*{font-family:inherit}vaadin-grid::part(cell){cursor:var(--ix-grid-cell-pointer,pointer)}vaadin-grid::part(header-cell){cursor:default;--vaadin-grid-cell-background:#fff}vaadin-grid::part(row):hover{--vaadin-grid-cell-background:#f5f5f5}vaadin-grid-cell-content{font-size:14px;--_cell-padding:var(--ix-grid-cell-padding, 14px 10px)}.hide-column-headers::part(header-cell){display:none}vaadin-grid::part(ix-disabled-cell){cursor:default;color:var(--cp-neutral-blue-60p);--vaadin-grid-cell-background:var(--cp-neutral-blue-12p)}ix-grid-download-menu{width:38px;margin-right:2px}ix-grid-column-filter{width:36px}.grid-container{background-color:var(--clr-surface-container-lowest,#fff);border-radius:8px;box-shadow:rgba(0,0,0,.12) 0 12px 20px -12px,#e1e4e8 0 0 0 1px inset;box-sizing:border-box;padding:2px}.touch-edge{margin:0 -3px}.grid-header{display:flex;-webkit-box-pack:justify;place-content:space-between;-webkit-box-align:center;align-items:center;padding:1rem;flex-wrap:wrap;gap:18px}.grid-menu{display:flex;align-items:center;margin-left:auto}.grid-menu ix-button{--md-text-button-leading-space:4px;--md-text-button-trailing-space:4px}.grid-menu span{color:var(--clr-primary,#1456e0);cursor:pointer}.header{font-weight:700;display:flex;user-select:none;align-items:center;padding-right:calc(var(--_ix-grid-cell-padding) + 2px);position:relative;text-overflow:ellipsis;overflow:hidden;flex-grow:1;z-index:2;padding-left:.25rem}.header:hover .header-sort-icon{display:block}.columns-reordering{opacity:.25}.progress-container{position:relative;top:60px;z-index:1}span .disabled{color:var(--clr-on-surface-variant,rgba(9,34,65,.7))}.disable-cursor{cursor:default!important}.accounts{display:flex;align-items:center}.account-name{margin:0 8px 0 3px}vaadin-grid-cell-content{font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none);--_cell-padding:var(--ix-grid-cell-padding, 14px 10px)}vaadin-grid-cell-content>div{overflow:hidden;text-overflow:ellipsis}.row-controls{border-top:solid 1px var(--clr-border-outline,#0922411f)}.row-limit{display:flex;padding:8px}.remove-all-button{margin-left:auto}.launchpad vaadin-grid{--_lumo-grid-border-width:0;--lumo-size-xl:auto}.launchpad vaadin-grid-cell-content{padding:11px 24px;border-bottom:0}.launchpad vaadin-grid::part(body-row){border-bottom:1px solid var(--clr-border-outline,rgba(9,34,65,.12))}.launchpad .grid-header{padding:.5rem 18px 0}.launchpad .header{font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none)}.launchpad .grid-header h2{font-family:var(--text-page-title-font,sans-serif);font-size:var(--text-page-title-size,2.125rem);letter-spacing:var(--text-page-title-letter-spacing,.01029412em);line-height:var(--text-page-title-line-height,1.17647059em);font-weight:var(--text-page-title-weight,bold);text-decoration:var(--text-page-title-decoration,none);text-transform:var(--text-page-title-transform,none)}vaadin-grid-cell-content{height:var(--ix-grid-cell-height,52px)}@media only screen and (max-width:840px){.grid-header{display:flex;flex-direction:row;padding:1rem;justify-content:space-between}.grid-menu{padding-left:0;margin-left:-4px}}@media only screen and (max-width:600px){.grid-header{display:flex;align-items:flex-start;flex-direction:column;padding:1rem;gap:12px}.grid-container{border-radius:0;box-shadow:none;padding:0;overflow:hidden}}.column-max-width-set{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}`,IxGridColumnFilterStyles=css`.dropdown-content{position:absolute;background-color:var(--clr-surface-container-lowest,#fff);min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:9;-webkit-box-align:center;align-items:center;cursor:pointer;vertical-align:middle;-webkit-tap-highlight-color:transparent;padding:10px;width:247px;left:-100px;border-radius:16px}.dropdown-content>div{margin:0;color:var(--clr-on-surface,#092241);font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none);display:block;cursor:pointer}.dropdown-content span:hover{background-color:#f1f1f1}.dropdown-content label{display:flex;align-items:center}.dropdown-content label.dragOrigin{background:#ff000017;outline:1px #ff9d9d dashed}.dropdown-content label p{width:158px}.dropdown-content label .draggable{font-size:24px;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.dropdown-content label .draggable path{fill:var(--clr-primary,#1456e0)}.active{position:absolute;right:8px;top:8px;height:8px;width:8px;background-color:var(--clr-critical,#db0028);border-radius:50%}ix-switch{padding:0 0 0 6px;display:flex;width:48px}.list{position:relative}@media only screen and (max-width:840px){.dropdown-content{left:0}}`,triggerKeys=[" ","Enter"],handleIcon=svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM7 12C7 10.9 7.9 10 9 10C10.1 10 11 10.9 11 12C11 13.1 10.1 14 9 14C7.9 14 7 13.1 7 12ZM9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20ZM17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM13 18C13 16.9 13.9 16 15 16C16.1 16 17 16.9 17 18C17 19.1 16.1 20 15 20C13.9 20 13 19.1 13 18Z" fill="#1456e0"/></svg>`,IxGridColumnFilter=class extends LitElement{constructor(){super(...arguments),this.columns=[],this.columnsLocalStorageKey=void 0,this.columnReorderingAllowed=!1,this.refreshDataOnColumnVisibilityChange=!0,this.isDropdownVisible=!1,this.disabledColumns=[],this.dragEvent={sourceEl:null,startId:-1,targetId:-1},this.outerInteraction=e=>{e.composedPath().includes(this)||(this.isDropdownVisible=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.outerInteraction),this.initializeLocalStorage()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.outerInteraction)}get preservedColumns(){let e=[];return e=this.columnsLocalStorageKey?JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]"):e}initializeLocalStorage(){0<this.preservedColumns.length&&(this.disabledColumns=this.preservedColumns.filter(t=>t.hidden&&this.columns.some(e=>e.name===t.name)).map(e=>e.name),this.columns.forEach((e,t)=>{this.disabledColumns.includes(e.name)&&(this.columns[t].hidden=!0)})),this.dispatchUpdate()}update(e){super.update(e),e.has("columnsLocalStorageKey")&&this.initializeLocalStorage()}toggleColumn(e){this.columns[e].hidden=!this.columns[e].hidden,this.disabledColumns=this.columns.filter(e=>e.hidden).map(e=>e.name),this.columnsLocalStorageKey&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify([...this.columns])),this.dispatchUpdate()}updateColumn(e,t){e=null==(e=e.target.shadowRoot)?void 0:e.querySelector("input");this.columns[t].hidden!==!(null!=e&&e.checked)&&this.dispatchEvent(new CustomEvent("columnVisibilityChange",{detail:{column:this.columns[t]},bubbles:!0,composed:!0})),this.columns[t].hidden=!(null!=e&&e.checked),this.disabledColumns=this.columns.filter(e=>e.hidden).map(e=>e.name),this.columnsLocalStorageKey&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify([...this.columns])),this.dispatchUpdate()}dispatchUpdate(e=this.columns){this.dispatchEvent(new CustomEvent("columnFilter",{detail:{columns:e},bubbles:!0,composed:!0}))}dragstart(e){this.columnReorderingAllowed&&(e=e.target,(this.dragEvent.sourceEl=e).style.opacity="0.3",e=Number(e.getAttribute("data-id")),this.dragEvent.startId=e)}dragend(){var e,t;this.columnReorderingAllowed&&(this.dragEvent.startId!==this.dragEvent.targetId&&(t=(e=[...this.columns]).splice(this.dragEvent.startId,1)[0],e.splice(this.dragEvent.targetId,0,t),this.dispatchEvent(new CustomEvent("reorderColumns",{detail:{reorderedColumns:e},bubbles:!0,composed:!0}))),null!=(t=this.dragEvent.sourceEl)&&t.style.removeProperty("opacity"),this.dragEvent={sourceEl:null,startId:-1,targetId:-1})}dragenter(e){this.columnReorderingAllowed&&(e=e.target).classList.contains("drag-target")&&(e=Number(e.getAttribute("data-id")),this.dragEvent.targetId=e)}handleDropdownToggle(e){e instanceof KeyboardEvent&&!triggerKeys.includes(e.key)||e.composedPath().includes(this.dropdown)||(this.isDropdownVisible=!this.isDropdownVisible)}render(){return html$1`<div class="grid-menu"><span @click="${this.handleDropdownToggle}" @keyDown="${this.handleDropdownToggle}" class="list list-dropdown"><ix-icon-button appearance="default"><svg slot="default" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 9H7V5H3V9ZM7 14H3V10H7V14ZM7 19H3V15H7V19ZM20 14H8V10H20V14ZM8 19H20V15H8V19ZM8 9V5H20V9H8Z" fill="#1456E0"/></svg></ix-icon-button>${0<this.disabledColumns.length?html$1`<div class="active"></div>`:nothing} ${this.isDropdownVisible?html$1`<div class="dropdown-content" @dragover="${e=>e.preventDefault()}" @dragstart="${this.dragstart}" @dragend="${this.dragend}" @dragenter="${this.dragenter}">${repeat(this.columns.filter(e=>!1!==e.filterable),e=>e.name,(e,t)=>html$1`<div><label class="${"ix-switch-label drag-target "+(this.dragEvent.startId===t?"dragOrigin":"")}" draggable="${this.columnReorderingAllowed}" data-id="${t}"><ix-switch .selected="${!e.hidden}" @change="${e=>this.updateColumn(e,t)}"></ix-switch><p>${e.header}</p>${this.columnReorderingAllowed?html$1`<div class="draggable">${handleIcon}</div>`:nothing}</label></div>`)}</div>`:nothing}</span></div>`}},IxGridDownloadMenu=(IxGridColumnFilter.styles=[IxGridViewStyles,IxGridColumnFilterStyles],__decorate([query(".dropdown-content")],IxGridColumnFilter.prototype,"dropdown",void 0),__decorate([property({type:Array})],IxGridColumnFilter.prototype,"columns",void 0),__decorate([property({type:String})],IxGridColumnFilter.prototype,"columnsLocalStorageKey",void 0),__decorate([property({type:Boolean})],IxGridColumnFilter.prototype,"columnReorderingAllowed",void 0),__decorate([property({type:Boolean})],IxGridColumnFilter.prototype,"refreshDataOnColumnVisibilityChange",void 0),__decorate([property({attribute:!1})],IxGridColumnFilter.prototype,"requestGridUpdate",void 0),__decorate([state()],IxGridColumnFilter.prototype,"isDropdownVisible",void 0),__decorate([state()],IxGridColumnFilter.prototype,"disabledColumns",void 0),__decorate([state()],IxGridColumnFilter.prototype,"dragEvent",void 0),IxGridColumnFilter=__decorate([customElement("ix-grid-column-filter")],IxGridColumnFilter),class extends LitElement{constructor(){super(...arguments),this.items=[],this.isDownloading=!1}toggleMenu(){this.downloadMenu.open=!this.downloadMenu.open}renderMenuItems(){var e;return 0===(null==(e=this.items)?void 0:e.length)?html$1`<ix-menu-item @click="${()=>this.dispatchEvent(new CustomEvent("download",{detail:"all",bubbles:!0,composed:!0}))}"><div slot="headline">Download All Records</div></ix-menu-item><ix-menu-item @click="${()=>this.dispatchEvent(new CustomEvent("download",{detail:"filter",bubbles:!0,composed:!0}))}"><div slot="headline">Download Current Filter</div></ix-menu-item>`:this.items.filter(e=>!e.hidden).map(e=>html$1`<ix-menu-item .disabled="${e.disabled}" @click="${()=>e.onClick(e.name)}"><div slot="headline">${e.label}</div></ix-menu-item>`)}render(){return this.isDownloading?html$1`<ix-progress .indeterminate="${!0}" .linear="${!1}" style="--md-circular-progress-size:1.75REM;text-align:center"></ix-progress>`:html$1`<div style="position:relative"><ix-icon-button id="anchor" @click="${this.toggleMenu}"><svg slot="default" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 9H19L12 16L5 9H9V3H15V9ZM5 20V18H19V20H5Z" fill="#1456E0"/></svg></ix-icon-button><ix-menu id="menu" anchor="anchor" has-overflow>${this.renderMenuItems()}</ix-menu></div>`}}),copy=(IxGridDownloadMenu.styles=[IxGridViewStyles],__decorate([query("#menu")],IxGridDownloadMenu.prototype,"downloadMenu",void 0),__decorate([query("#anchor")],IxGridDownloadMenu.prototype,"downloadMenuAnchor",void 0),__decorate([property({type:Array})],IxGridDownloadMenu.prototype,"items",void 0),__decorate([property({type:Boolean})],IxGridDownloadMenu.prototype,"isDownloading",void 0),IxGridDownloadMenu=__decorate([customElement("ix-grid-download-menu")],IxGridDownloadMenu),{activeFilter:"active filter",filters:"Filters",hideFilters:"Hide Filters",showFilters:"Show Filters",rowsPerPage:"Rows per page",viewMore:"VIEW MORE",viewLess:"VIEW LESS",add:"ADD",removeAll:"REMOVE ALL"}),IxGridRowFilterStyles=css`.slot-wrap{display:flex}.slot-wrap ix-icon{--ix-icon-font-size:24px;color:var(--clr-primary,#1456e0);margin-right:5px}.grid-menu ix-button .filter{margin-top:2px}.filter-form{white-space:nowrap;padding:9px;color:var(--clr-on-surface-variant,#092241b3)}.filter-form-column{display:inline-block;vertical-align:middle}.filter-remove span{margin-right:0;color:var(--clr-on-surface-variant,#092241b3)}.filter-dropdown-content{position:absolute;display:inline;right:0;top:78%;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:12px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:#fff;z-index:10}.filter-form input,.filter-form option,.filter-form select{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);border-radius:0;cursor:pointer;box-sizing:content-box;background:0 0;height:1.4375em;margin:0;animation-name:mui-auto-fill-cancel;animation-duration:10ms;border:none;border-image:initial;box-sizing:border-box;cursor:text;user-select:none;color:currentcolor;-webkit-tap-highlight-color:transparent;display:block;min-width:0;width:100%;height:25px;border-bottom:1px solid #000}.filter-form option{-webkit-tap-highlight-color:#9ca6b2}.filter-form input:hover,.filter-form select:hover{outline:0!important;border-bottom:2px solid #000}.filter-form input:focus,.filter-form select:focus{outline:0!important;border-bottom:2px solid #1456e0}.filter-form select:focus{background-color:rgba(0,0,0,.05)}.form-group{display:flex;flex-direction:column;align-items:baseline;height:54px;justify-content:flex-end;font-family:var(--text-default-font,sans-serif)}.form-group label{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);padding:0;color:#092241;display:block;transform-origin:left top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:133%;transform:translate(0,-1.5px) scale(.75);transition:color .2s cubic-bezier(0,0,.2,1) 0s,transform .2s cubic-bezier(0,0,.2,1) 0s,max-width .2s cubic-bezier(0,0,.2,1) 0s}.filter-form-group label span{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);padding:0;color:#092241;display:block;transform-origin:left top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:133%;transform:translate(0,-1.5px) scale(.75);transition:color .2s cubic-bezier(0,0,.2,1) 0s,transform .2s cubic-bezier(0,0,.2,1) 0s,max-width .2s cubic-bezier(0,0,.2,1) 0s}.filter-form-group label:focus-within span{color:#1456e0}.filter-form-group{display:flex;flex-direction:column;align-items:baseline;height:54px;justify-content:flex-end;font-family:var(--text-default-font,sans-serif)}option{font-weight:400;display:block;min-height:1.2em;padding:0 2px 1px;white-space:nowrap}.filter-footer{padding:9px;display:flex;justify-content:space-between}.no-display{display:none}.filter-local-operator-empty{width:54px;border:none}.grid-menu span.filter-superscript{position:absolute;top:6px;left:14px;z-index:1;display:flex;align-items:center;justify-content:center;font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none);padding:0;height:16px;width:16px;border-radius:50%;background-color:var(--clr-primary,#1456e0);color:var(--clr-on-primary,#fff)}.filterlist{width:40px}.filterColumnField{width:150px}.filterValueField{width:190px}.filterOperatorField{width:120px}.form-group-operator-label{width:100%}.filter-form .filterOperatorInput{min-width:96px}select:hover{cursor:pointer}input:hover{cursor:text}.tooltip-container{position:relative;display:inline-block}.tool-tip{color:var(--clr-on-secondary,#fff);overflow-wrap:break-word;border-radius:3px;background-color:var(--clr-secondary,#071454);padding:5px 8px;font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none);position:absolute;top:42px;right:0;z-index:3;white-space:nowrap;display:none}.filter-button:hover~.tool-tip{display:block}.tool-tip li{margin-left:-21px;overflow-wrap:break-word;border-radius:3px;max-width:250px;min-width:200px;white-space:wrap}.tool-tip p{margin:0;padding:0}.grid-menu ix-button{align-items:center;display:flex}@media only screen and (max-width:840px){.filter-dropdown-content{right:inherit;top:0}}@media only screen and (max-width:600px){.grid-menu ix-button .filter{display:none}.grid-menu ix-button{--md-text-button-leading-space:6px;--md-text-button-trailing-space:0;margin-left:4px}}`,IxGridRowFilter=class extends LitElement{constructor(){super(...arguments),this.columns=[],this.filterValueChangeDebounceTime=300,this.readParamsFromURL=!1,this.maxDate=format(new Date,"yyyy-MM-dd"),this.isDropdownVisible=!1,this.filters=[],this.filterableColumns=[],this.filterColumns=[],this.activeFilters=[],this.mapSelect=!1,this.fromDateErrorText="",this.oldValueLength=0,this.debouncedOnFilterValueChange=()=>{},this.closeOnOuterClick=e=>{e.composedPath().includes(this)||(this.isDropdownVisible=!1)},this.handlePopState=()=>{this.filters=this.parseFilterQueryString(),0===this.filters.length&&(this.isDropdownVisible=!1,this.addFilter()),this.updateActiveFilters()}}updateActiveFilters(){this.activeFilters=this.filters.filter(e=>0<e.value.length)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.closeOnOuterClick),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.closeOnOuterClick),window.removeEventListener("popstate",this.handlePopState)}firstUpdated(){this.filterableColumns=this.columns.filter(e=>e.filterable),this.filterColumns=this.filterableColumns.map(e=>e.name),this.readParamsFromURL&&(this.filters=this.parseFilterQueryString()),this.filters.length||this.addFilter(),this.updateActiveFilters(),this.dispatchUpdate(!1),this.debouncedOnFilterValueChange=(e,t)=>{clearTimeout(this.debounceEvent),this.debounceEvent=setTimeout(()=>this.onfilterValueChange.bind(this)(e,t),this.filterValueChangeDebounceTime)}}get filterNames(){return this.filters.map(e=>e.columnField)}get unselectedFilters(){return this.filterColumns.filter(e=>!this.filterNames.includes(e))}parseFilterQueryString(){let i=new URLSearchParams(window.location.search),o=[];return this.filterableColumns.forEach(r=>{var e;null!=(e=r.filterOperators)&&e.forEach(e=>{var t=r.name+"_"+e;i.has(t)&&o.push({columnField:r.name,operatorValue:e,dataType:r.dataType,value:null!=(e=i.get(t))?e:""})})}),o}dispatchUpdate(e=!0){this.dispatchEvent(new CustomEvent("rowFilter",{detail:{filters:this.filters.filter(e=>e.value.length),resetPage:e},bubbles:!0,composed:!0}))}addFilter(){let e,t,r=this.filterColumns.find(e=>!this.filterNames.includes(e))||"";var i=(null==(e=this.filterableColumns.find(e=>e.name===r))?void 0:e.filterOperators)||["contains"],o=(null==(t=this.filterableColumns.find(e=>e.name===r))?void 0:t.dataType)||"string";this.filters=[...this.filters,{columnField:r,operatorValue:i[0],dataType:o,value:""}],this.updateActiveFilters()}clearFilters(){this.filters=[],this.addFilter(),this.dispatchUpdate()}removeFilter(r){this.filters=this.filters.filter((e,t)=>t!==r),this.dispatchUpdate(),0===this.filters.length&&(this.isDropdownVisible=!1,this.addFilter()),this.updateActiveFilters()}onfilterColumnChange(e,t){let r,i=t.target.value;t=this.filterableColumns.find(e=>e.name===i);this.filters[e].columnField=i,this.filters[e].dataType=null==t?void 0:t.dataType,this.filters[e].operatorValue=(null==(r=null==t?void 0:t.filterOperators)?void 0:r[0])||"contains",this.filters=[...this.filters],this.dispatchUpdate()}onfilterOperatorChange(e,t){t=t.target.value;this.filters[e].operatorValue=t,this.filters=[...this.filters],this.dispatchUpdate()}onDatefilterValueChange(e,t){this.filters[e].value=t,this.dispatchUpdate(),this.updateActiveFilters()}onfilterValueChange(e,t){t=t.value,this.filters[e].value=t,t=this.filters[e].value.length;0<this.filters[e].columnField.length&&(3<=t||t<this.oldValueLength)&&this.dispatchUpdate(),this.updateActiveFilters(),this.oldValueLength=t}formatCamelCaseToEnglish(e){e=e.replace(/([A-Z])/g," $1").toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)}renderToolTip(){return this.isDropdownVisible?copy.hideFilters:this.activeFilters.length?html$1`<p>${this.activeFilters.length} ${copy.activeFilter}</p><ul>${this.activeFilters.map(e=>html$1`<li>${this.formatCamelCaseToEnglish(e.columnField)} ${e.operatorValue} ${e.value}</li>`)}</ul>`:copy.showFilters}renderStringInput(e,t){return html$1`<label class="form-group-operator-label"><span>Value</span> <input data-testid="${"filterValueInput-"+t}" placeholder="Filter value" @input="${e=>this.debouncedOnFilterValueChange(t,e.target)}" .value="${e.value}"></label>`}renderDateInput(e,t){return html$1`<ix-date data-testid="${"filterValueInput-"+t}" .value="${e.value}" max="${this.maxDate}" name="${e.columnField}-valueDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onDatefilterValueChange(t,e)}"></ix-date>`}renderFilterInputControl(e,t){switch(e.dataType){case"string":case void 0:return this.renderStringInput(e,t);case"dateTime":return this.renderDateInput(e,t);default:return nothing}}renderFilterInput(t,r){let e,i,o=[t.columnField,...this.unselectedFilters];var a=this.filterableColumns.filter(e=>o.includes(e.name));return html$1`<div class="filter-form"><div class="filter-remove filter-form-column"><div class="form-group"><ix-icon-button icon="close" data-testid="clearFilterButton" @click="${()=>this.removeFilter(r)}" @keyDown="${e=>{" "!==e.key&&"Enter"!==e.key||this.removeFilter(r)}}"></ix-icon-button></div></div>${this.mapSelect?html$1`<div class="filter-form-column filter-form-column-border filterColumnField"><div class="form-group"><label class="form-group-column-label" title="select: ${t.columnField}, options: ${a.map(e=>`value=${e.name}, selected=${e.name===t.columnField}, ${e.header}
|
|
2
|
-
`)}">Columns</label> <select @change="${e=>this.onfilterColumnChange(
|
|
3
|
-
`)}"><span>Columns</span> <select data-testid="${"filterColumnInput-"+
|
|
1
|
+
import{__decorate}from"tslib";import"@digital-realty/grid";import{columnHeaderRenderer}from"@digital-realty/grid/lit.js";import"@digital-realty/ix-icon-button/ix-icon-button.js";import"@digital-realty/ix-icon/ix-icon.js";import"@digital-realty/ix-progress/ix-progress.js";import{css,svg,LitElement,nothing,html,render}from"lit";import{query,property,state,customElement}from"lit/decorators.js";import{classMap}from"lit/directives/class-map.js";import{ifDefined}from"lit/directives/if-defined.js";import{formatDate}from"date-fns";import{repeat}from"lit/directives/repeat.js";import"@digital-realty/ix-switch/ix-switch.js";import"@digital-realty/ix-menu/ix-menu.js";import"@digital-realty/ix-menu/ix-menu-item.js";import"@digital-realty/ix-button/ix-button.js";import"@digital-realty/ix-date/ix-date.js";import"@digital-realty/ix-select/ix-select.js";let IxGridViewStyles=css`:host{--_ix-grid-cell-padding:var(--ix-grid-cell-padding, 1rem);--lumo-primary-color-50pct:transparent}vaadin-grid::part(first-frozen-to-end-cell){border-left:.063rem solid var(--_lumo-grid-border-color);box-shadow:-.375rem 0 .375rem -.375rem #0000001a}*{font-family:inherit}vaadin-grid::part(cell){cursor:var(--ix-grid-cell-pointer,pointer)}vaadin-grid::part(header-cell){cursor:default;--vaadin-grid-cell-background:#fff}vaadin-grid::part(row):hover{--vaadin-grid-cell-background:#f5f5f5}vaadin-grid-cell-content{font-size:14px;--_cell-padding:var(--ix-grid-cell-padding, 14px 10px)}.hide-column-headers::part(header-cell){display:none}vaadin-grid::part(ix-disabled-cell){cursor:default;color:var(--cp-neutral-blue-60p);--vaadin-grid-cell-background:var(--cp-neutral-blue-12p)}ix-grid-download-menu{width:38px;margin-right:2px}ix-grid-column-filter{width:36px}.grid-container{background-color:var(--clr-surface-container-lowest,#fff);border-radius:8px;box-shadow:rgba(0,0,0,.12) 0 12px 20px -12px,#e1e4e8 0 0 0 1px inset;box-sizing:border-box;padding:2px}.touch-edge{margin:0 -3px}.grid-header{display:flex;-webkit-box-pack:justify;place-content:space-between;-webkit-box-align:center;align-items:center;padding:1rem;flex-wrap:wrap;gap:18px}.grid-menu{display:flex;align-items:center;margin-left:auto}.grid-menu ix-button{--md-text-button-leading-space:4px;--md-text-button-trailing-space:4px}.grid-menu span{color:var(--clr-primary,#1456e0);cursor:pointer}.header{font-weight:700;display:flex;user-select:none;align-items:center;padding-right:calc(var(--_ix-grid-cell-padding) + 2px);position:relative;text-overflow:ellipsis;overflow:hidden;flex-grow:1;z-index:2;padding-left:.25rem}.header:hover .header-sort-icon{display:block}.columns-reordering{opacity:.25}.progress-container{position:relative;top:60px;z-index:1}span .disabled{color:var(--clr-on-surface-variant,rgba(9,34,65,.7))}.disable-cursor{cursor:default!important}.accounts{display:flex;align-items:center}.account-name{margin:0 8px 0 3px}vaadin-grid-cell-content{font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none);--_cell-padding:var(--ix-grid-cell-padding, 14px 10px)}vaadin-grid-cell-content>div{overflow:hidden;text-overflow:ellipsis}.row-controls{border-top:solid 1px var(--clr-border-outline,#0922411f)}.row-limit{display:flex;padding:8px}.remove-all-button{margin-left:auto}.launchpad vaadin-grid{--_lumo-grid-border-width:0;--lumo-size-xl:auto}.launchpad vaadin-grid-cell-content{padding:11px 24px;border-bottom:0}.launchpad vaadin-grid::part(body-row){border-bottom:1px solid var(--clr-border-outline,rgba(9,34,65,.12))}.launchpad .grid-header{padding:.5rem 18px 0}.launchpad .header{font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none)}.launchpad .grid-header h2{font-family:var(--text-page-title-font,sans-serif);font-size:var(--text-page-title-size,2.125rem);letter-spacing:var(--text-page-title-letter-spacing,.01029412em);line-height:var(--text-page-title-line-height,1.17647059em);font-weight:var(--text-page-title-weight,bold);text-decoration:var(--text-page-title-decoration,none);text-transform:var(--text-page-title-transform,none)}vaadin-grid-cell-content{height:var(--ix-grid-cell-height,52px)}@media only screen and (max-width:840px){.grid-header{display:flex;flex-direction:row;padding:1rem;justify-content:space-between}.grid-menu{padding-left:0;margin-left:-4px}}@media only screen and (max-width:600px){.grid-header{display:flex;align-items:flex-start;flex-direction:column;padding:1rem;gap:12px}.grid-container{border-radius:0;box-shadow:none;padding:0;overflow:hidden}}.column-max-width-set{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}`,IxGridColumnFilterStyles=css`.dropdown-content{position:absolute;background-color:var(--clr-surface-container-lowest,#fff);min-width:160px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:9;-webkit-box-align:center;align-items:center;cursor:pointer;vertical-align:middle;-webkit-tap-highlight-color:transparent;padding:10px;width:247px;left:-100px;border-radius:16px}.dropdown-content>div{margin:0;color:var(--clr-on-surface,#092241);font-family:var(--text-small-font,sans-serif);font-size:var(--text-small-size,.875rem);letter-spacing:var(--text-small-letter-spacing,.0275em);line-height:var(--text-small-line-height,1.42857143em);font-weight:var(--text-small-weight,normal);text-decoration:var(--text-small-decoration,none);text-transform:var(--text-small-transform,none);display:block;cursor:pointer}.dropdown-content span:hover{background-color:#f1f1f1}.dropdown-content label{display:flex;align-items:center}.dropdown-content label.dragOrigin{background:#ff000017;outline:1px #ff9d9d dashed}.dropdown-content label p{width:158px}.dropdown-content label .draggable{font-size:24px;cursor:move;cursor:grab;cursor:-moz-grab;cursor:-webkit-grab}.dropdown-content label .draggable path{fill:var(--clr-primary,#1456e0)}.active{position:absolute;right:8px;top:8px;height:8px;width:8px;background-color:var(--clr-critical,#db0028);border-radius:50%}ix-switch{padding:0 0 0 6px;display:flex;width:48px}.list{position:relative}@media only screen and (max-width:840px){.dropdown-content{left:0}}`,triggerKeys=[" ","Enter"],handleIcon=svg`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM7 12C7 10.9 7.9 10 9 10C10.1 10 11 10.9 11 12C11 13.1 10.1 14 9 14C7.9 14 7 13.1 7 12ZM9 20C10.1 20 11 19.1 11 18C11 16.9 10.1 16 9 16C7.9 16 7 16.9 7 18C7 19.1 7.9 20 9 20ZM17 6C17 7.1 16.1 8 15 8C13.9 8 13 7.1 13 6C13 4.9 13.9 4 15 4C16.1 4 17 4.9 17 6ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM13 18C13 16.9 13.9 16 15 16C16.1 16 17 16.9 17 18C17 19.1 16.1 20 15 20C13.9 20 13 19.1 13 18Z" fill="#1456e0"/></svg>`,IxGridColumnFilter=class extends LitElement{constructor(){super(...arguments),this.columns=[],this.columnsLocalStorageKey=void 0,this.columnReorderingAllowed=!1,this.refreshDataOnColumnVisibilityChange=!0,this.isDropdownVisible=!1,this.disabledColumns=[],this.dragEvent={sourceEl:null,startId:-1,targetId:-1},this.outerInteraction=e=>{e.composedPath().includes(this)||(this.isDropdownVisible=!1)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.outerInteraction),this.initializeLocalStorage()}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.outerInteraction)}get preservedColumns(){let e=[];return e=this.columnsLocalStorageKey?JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]"):e}initializeLocalStorage(){0<this.preservedColumns.length&&(this.disabledColumns=this.preservedColumns.filter(t=>t.hidden&&this.columns.some(e=>e.name===t.name)).map(e=>e.name),this.columns.forEach((e,t)=>{this.disabledColumns.includes(e.name)&&(this.columns[t].hidden=!0)})),this.dispatchUpdate()}update(e){super.update(e),e.has("columnsLocalStorageKey")&&this.initializeLocalStorage()}toggleColumn(e){this.columns[e].hidden=!this.columns[e].hidden,this.disabledColumns=this.columns.filter(e=>e.hidden).map(e=>e.name),this.columnsLocalStorageKey&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify([...this.columns])),this.dispatchUpdate()}updateColumn(e,t){e=null==(e=e.target.shadowRoot)?void 0:e.querySelector("input");this.columns[t].hidden!==!(null!=e&&e.checked)&&this.dispatchEvent(new CustomEvent("columnVisibilityChange",{detail:{column:this.columns[t]},bubbles:!0,composed:!0})),this.columns[t].hidden=!(null!=e&&e.checked),this.disabledColumns=this.columns.filter(e=>e.hidden).map(e=>e.name),this.columnsLocalStorageKey&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify([...this.columns])),this.dispatchUpdate()}dispatchUpdate(e=this.columns){this.dispatchEvent(new CustomEvent("columnFilter",{detail:{columns:e},bubbles:!0,composed:!0}))}dragstart(e){this.columnReorderingAllowed&&(e=e.target,(this.dragEvent.sourceEl=e).style.opacity="0.3",e=Number(e.getAttribute("data-id")),this.dragEvent.startId=e)}dragend(){var e,t;this.columnReorderingAllowed&&(this.dragEvent.startId!==this.dragEvent.targetId&&(t=(e=[...this.columns]).splice(this.dragEvent.startId,1)[0],e.splice(this.dragEvent.targetId,0,t),this.dispatchEvent(new CustomEvent("reorderColumns",{detail:{reorderedColumns:e},bubbles:!0,composed:!0}))),null!=(t=this.dragEvent.sourceEl)&&t.style.removeProperty("opacity"),this.dragEvent={sourceEl:null,startId:-1,targetId:-1})}dragenter(e){this.columnReorderingAllowed&&(e=e.target).classList.contains("drag-target")&&(e=Number(e.getAttribute("data-id")),this.dragEvent.targetId=e)}handleDropdownToggle(e){e instanceof KeyboardEvent&&!triggerKeys.includes(e.key)||e.composedPath().includes(this.dropdown)||(this.isDropdownVisible=!this.isDropdownVisible)}render(){return html`<div class="grid-menu"><span @click="${this.handleDropdownToggle}" @keyDown="${this.handleDropdownToggle}" class="list list-dropdown"><ix-icon-button appearance="default"><svg slot="default" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M3 9H7V5H3V9ZM7 14H3V10H7V14ZM7 19H3V15H7V19ZM20 14H8V10H20V14ZM8 19H20V15H8V19ZM8 9V5H20V9H8Z" fill="#1456E0"/></svg></ix-icon-button>${0<this.disabledColumns.length?html`<div class="active"></div>`:nothing} ${this.isDropdownVisible?html`<div class="dropdown-content" @dragover="${e=>e.preventDefault()}" @dragstart="${this.dragstart}" @dragend="${this.dragend}" @dragenter="${this.dragenter}">${repeat(this.columns.filter(e=>!1!==e.filterable),e=>e.name,(e,t)=>html`<div><label class="${"ix-switch-label drag-target "+(this.dragEvent.startId===t?"dragOrigin":"")}" draggable="${this.columnReorderingAllowed}" data-id="${t}"><ix-switch .selected="${!e.hidden}" @change="${e=>this.updateColumn(e,t)}"></ix-switch><p>${e.header}</p>${this.columnReorderingAllowed?html`<div class="draggable">${handleIcon}</div>`:nothing}</label></div>`)}</div>`:nothing}</span></div>`}},IxGridDownloadMenu=(IxGridColumnFilter.styles=[IxGridViewStyles,IxGridColumnFilterStyles],__decorate([query(".dropdown-content")],IxGridColumnFilter.prototype,"dropdown",void 0),__decorate([property({type:Array})],IxGridColumnFilter.prototype,"columns",void 0),__decorate([property({type:String})],IxGridColumnFilter.prototype,"columnsLocalStorageKey",void 0),__decorate([property({type:Boolean})],IxGridColumnFilter.prototype,"columnReorderingAllowed",void 0),__decorate([property({type:Boolean})],IxGridColumnFilter.prototype,"refreshDataOnColumnVisibilityChange",void 0),__decorate([property({attribute:!1})],IxGridColumnFilter.prototype,"requestGridUpdate",void 0),__decorate([state()],IxGridColumnFilter.prototype,"isDropdownVisible",void 0),__decorate([state()],IxGridColumnFilter.prototype,"disabledColumns",void 0),__decorate([state()],IxGridColumnFilter.prototype,"dragEvent",void 0),IxGridColumnFilter=__decorate([customElement("ix-grid-column-filter")],IxGridColumnFilter),class extends LitElement{constructor(){super(...arguments),this.items=[],this.isDownloading=!1}toggleMenu(){this.downloadMenu.open=!this.downloadMenu.open}renderMenuItems(){var e;return 0===(null==(e=this.items)?void 0:e.length)?html`<ix-menu-item @click="${()=>this.dispatchEvent(new CustomEvent("download",{detail:"all",bubbles:!0,composed:!0}))}"><div slot="headline">Download All Records</div></ix-menu-item><ix-menu-item @click="${()=>this.dispatchEvent(new CustomEvent("download",{detail:"filter",bubbles:!0,composed:!0}))}"><div slot="headline">Download Current Filter</div></ix-menu-item>`:this.items.filter(e=>!e.hidden).map(e=>html`<ix-menu-item .disabled="${e.disabled}" @click="${()=>e.onClick(e.name)}"><div slot="headline">${e.label}</div></ix-menu-item>`)}render(){return this.isDownloading?html`<ix-progress .indeterminate="${!0}" .linear="${!1}" style="--md-circular-progress-size:1.75REM;text-align:center"></ix-progress>`:html`<div style="position:relative"><ix-icon-button id="anchor" @click="${this.toggleMenu}"><svg slot="default" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 9H19L12 16L5 9H9V3H15V9ZM5 20V18H19V20H5Z" fill="#1456E0"/></svg></ix-icon-button><ix-menu id="menu" anchor="anchor" has-overflow>${this.renderMenuItems()}</ix-menu></div>`}}),copy=(IxGridDownloadMenu.styles=[IxGridViewStyles],__decorate([query("#menu")],IxGridDownloadMenu.prototype,"downloadMenu",void 0),__decorate([query("#anchor")],IxGridDownloadMenu.prototype,"downloadMenuAnchor",void 0),__decorate([property({type:Array})],IxGridDownloadMenu.prototype,"items",void 0),__decorate([property({type:Boolean})],IxGridDownloadMenu.prototype,"isDownloading",void 0),IxGridDownloadMenu=__decorate([customElement("ix-grid-download-menu")],IxGridDownloadMenu),{activeFilter:"active filter",filters:"Filters",hideFilters:"Hide Filters",showFilters:"Show Filters",rowsPerPage:"Rows per page",viewMore:"VIEW MORE",viewLess:"VIEW LESS",add:"ADD",removeAll:"REMOVE ALL"}),IxGridRowFilterStyles=css`.slot-wrap{display:flex}.slot-wrap ix-icon{--ix-icon-font-size:24px;color:var(--clr-primary,#1456e0);margin-right:5px}.grid-menu ix-button .filter{margin-top:2px}.filter-form{white-space:nowrap;padding:9px;color:var(--clr-on-surface-variant,#092241b3)}.filter-form-column{display:inline-block;vertical-align:middle}.filter-remove span{margin-right:0;color:var(--clr-on-surface-variant,#092241b3)}.filter-dropdown-content{position:absolute;display:inline;right:0;top:78%;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);z-index:3;transition:box-shadow .3s cubic-bezier(.4,0,.2,1) 0s;border-radius:12px;box-shadow:rgba(0,0,0,.2) 0 5px 5px -3px,rgba(0,0,0,.14) 0 8px 10px 1px,rgba(0,0,0,.12) 0 3px 14px 2px;background-color:#fff;z-index:10}.filter-form input,.filter-form option,.filter-form select{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);border-radius:0;cursor:pointer;box-sizing:content-box;background:0 0;height:1.4375em;margin:0;animation-name:mui-auto-fill-cancel;animation-duration:10ms;border:none;border-image:initial;box-sizing:border-box;cursor:text;user-select:none;color:currentcolor;-webkit-tap-highlight-color:transparent;display:block;min-width:0;width:100%;height:25px;border-bottom:1px solid #000}.filter-form option{-webkit-tap-highlight-color:#9ca6b2}.filter-form input:hover,.filter-form select:hover{outline:0!important;border-bottom:2px solid #000}.filter-form input:focus,.filter-form select:focus{outline:0!important;border-bottom:2px solid #1456e0}.filter-form select:focus{background-color:rgba(0,0,0,.05)}.form-group{display:flex;flex-direction:column;align-items:baseline;height:54px;justify-content:flex-end;font-family:var(--text-default-font,sans-serif)}.form-group label{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);padding:0;color:#092241;display:block;transform-origin:left top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:133%;transform:translate(0,-1.5px) scale(.75);transition:color .2s cubic-bezier(0,0,.2,1) 0s,transform .2s cubic-bezier(0,0,.2,1) 0s,max-width .2s cubic-bezier(0,0,.2,1) 0s}.filter-form-group label span{font-family:var(--text-default-font,sans-serif);font-size:var(--text-default-size,16px);letter-spacing:var(--text-default-letter-spacing,.0275em);line-height:var(--text-default-line-height,1.75em);font-weight:var(--text-default-weight,normal);text-transform:var(--text-default-decoration,none);text-decoration:var(--text-default-transform,none);padding:0;color:#092241;display:block;transform-origin:left top;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:133%;transform:translate(0,-1.5px) scale(.75);transition:color .2s cubic-bezier(0,0,.2,1) 0s,transform .2s cubic-bezier(0,0,.2,1) 0s,max-width .2s cubic-bezier(0,0,.2,1) 0s}.filter-form-group label:focus-within span{color:#1456e0}.filter-form-group{display:flex;flex-direction:column;align-items:baseline;height:54px;justify-content:flex-end;font-family:var(--text-default-font,sans-serif)}option{font-weight:400;display:block;min-height:1.2em;padding:0 2px 1px;white-space:nowrap}.filter-footer{padding:9px;display:flex;justify-content:space-between}.no-display{display:none}.filter-local-operator-empty{width:54px;border:none}.grid-menu span.filter-superscript{position:absolute;top:6px;left:14px;z-index:1;display:flex;align-items:center;justify-content:center;font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none);padding:0;height:16px;width:16px;border-radius:50%;background-color:var(--clr-primary,#1456e0);color:var(--clr-on-primary,#fff)}.filterlist{width:40px}.filterColumnField{width:150px}.filterValueField{width:190px}.filterOperatorField{width:120px}.form-group-operator-label{width:100%}.filter-form .filterOperatorInput{min-width:96px}select:hover{cursor:pointer}input:hover{cursor:text}.tooltip-container{position:relative;display:inline-block}.tool-tip{color:var(--clr-on-secondary,#fff);overflow-wrap:break-word;border-radius:3px;background-color:var(--clr-secondary,#071454);padding:5px 8px;font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none);position:absolute;top:42px;right:0;z-index:3;white-space:nowrap;display:none}.filter-button:hover~.tool-tip{display:block}.tool-tip li{margin-left:-21px;overflow-wrap:break-word;border-radius:3px;max-width:250px;min-width:200px;white-space:wrap}.tool-tip p{margin:0;padding:0}.grid-menu ix-button{align-items:center;display:flex}@media only screen and (max-width:840px){.filter-dropdown-content{right:inherit;top:0}}@media only screen and (max-width:600px){.grid-menu ix-button .filter{display:none}.grid-menu ix-button{--md-text-button-leading-space:6px;--md-text-button-trailing-space:0;margin-left:4px}}`,IxGridRowFilter=class extends LitElement{constructor(){super(...arguments),this.columns=[],this.filterValueChangeDebounceTime=300,this.readParamsFromURL=!1,this.maxDate=formatDate(new Date,"yyyy-MM-dd"),this.isDropdownVisible=!1,this.filters=[],this.filterableColumns=[],this.filterColumns=[],this.activeFilters=[],this.mapSelect=!1,this.fromDateErrorText="",this.oldValueLength=0,this.debouncedOnFilterValueChange=()=>{},this.closeOnOuterClick=e=>{e.composedPath().includes(this)||(this.isDropdownVisible=!1)},this.handlePopState=()=>{this.filters=this.parseFilterQueryString(),0===this.filters.length&&(this.isDropdownVisible=!1,this.addFilter()),this.updateActiveFilters()}}updateActiveFilters(){this.activeFilters=this.filters.filter(e=>0<e.value.length)}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.closeOnOuterClick),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.closeOnOuterClick),window.removeEventListener("popstate",this.handlePopState)}firstUpdated(){this.filterableColumns=this.columns.filter(e=>e.filterable),this.filterColumns=this.filterableColumns.map(e=>e.name),this.readParamsFromURL&&(this.filters=this.parseFilterQueryString()),this.filters.length||this.addFilter(),this.updateActiveFilters(),this.dispatchUpdate(!1),this.debouncedOnFilterValueChange=(e,t)=>{clearTimeout(this.debounceEvent),this.debounceEvent=setTimeout(()=>this.onfilterValueChange.bind(this)(e,t),this.filterValueChangeDebounceTime)}}get filterNames(){return this.filters.map(e=>e.columnField)}get unselectedFilters(){return this.filterColumns.filter(e=>!this.filterNames.includes(e))}parseFilterQueryString(){let r=new URLSearchParams(window.location.search),o=[];return this.filterableColumns.forEach(i=>{var e;null!=(e=i.filterOperators)&&e.forEach(e=>{var t=i.name+"_"+e;r.has(t)&&o.push({columnField:i.name,operatorValue:e,dataType:i.dataType,value:null!=(e=r.get(t))?e:""})})}),o}dispatchUpdate(e=!0){this.dispatchEvent(new CustomEvent("rowFilter",{detail:{filters:this.filters.filter(e=>e.value.length),resetPage:e},bubbles:!0,composed:!0}))}addFilter(){let e,t,i=this.filterColumns.find(e=>!this.filterNames.includes(e))||"";var r=(null==(e=this.filterableColumns.find(e=>e.name===i))?void 0:e.filterOperators)||["contains"],o=(null==(t=this.filterableColumns.find(e=>e.name===i))?void 0:t.dataType)||"string";this.filters=[...this.filters,{columnField:i,operatorValue:r[0],dataType:o,value:""}],this.updateActiveFilters()}clearFilters(){this.filters=[],this.addFilter(),this.dispatchUpdate()}removeFilter(i){this.filters=this.filters.filter((e,t)=>t!==i),this.dispatchUpdate(),0===this.filters.length&&(this.isDropdownVisible=!1,this.addFilter()),this.updateActiveFilters()}onfilterColumnChange(e,t){let i,r=t.target.value;t=this.filterableColumns.find(e=>e.name===r);this.filters[e].columnField=r,this.filters[e].dataType=null==t?void 0:t.dataType,this.filters[e].operatorValue=(null==(i=null==t?void 0:t.filterOperators)?void 0:i[0])||"contains",this.filters=[...this.filters],this.dispatchUpdate()}onfilterOperatorChange(e,t){t=t.target.value;this.filters[e].operatorValue=t,this.filters=[...this.filters],this.dispatchUpdate()}onDatefilterValueChange(e,t){this.filters[e].value=t,this.dispatchUpdate(),this.updateActiveFilters()}onfilterValueChange(e,t){t=t.value,this.filters[e].value=t,t=this.filters[e].value.length;0<this.filters[e].columnField.length&&(3<=t||t<this.oldValueLength)&&this.dispatchUpdate(),this.updateActiveFilters(),this.oldValueLength=t}formatCamelCaseToEnglish(e){e=e.replace(/([A-Z])/g," $1").toLowerCase();return e.charAt(0).toUpperCase()+e.slice(1)}renderToolTip(){return this.isDropdownVisible?copy.hideFilters:this.activeFilters.length?html`<p>${this.activeFilters.length} ${copy.activeFilter}</p><ul>${this.activeFilters.map(e=>html`<li>${this.formatCamelCaseToEnglish(e.columnField)} ${e.operatorValue} ${e.value}</li>`)}</ul>`:copy.showFilters}renderStringInput(e,t){return html`<label class="form-group-operator-label"><span>Value</span> <input data-testid="${"filterValueInput-"+t}" placeholder="Filter value" @input="${e=>this.debouncedOnFilterValueChange(t,e.target)}" .value="${e.value}"></label>`}renderDateInput(e,t){return html`<ix-date data-testid="${"filterValueInput-"+t}" .value="${e.value}" max="${this.maxDate}" name="${e.columnField}-valueDate" .errorText="${this.fromDateErrorText}" .onChanged="${e=>this.onDatefilterValueChange(t,e)}"></ix-date>`}renderFilterInputControl(e,t){switch(e.dataType){case"string":case void 0:return this.renderStringInput(e,t);case"dateTime":return this.renderDateInput(e,t);default:return nothing}}renderFilterInput(t,i){let e,r,o=[t.columnField,...this.unselectedFilters];var a=this.filterableColumns.filter(e=>o.includes(e.name));return html`<div class="filter-form"><div class="filter-remove filter-form-column"><div class="form-group"><ix-icon-button icon="close" data-testid="clearFilterButton" @click="${()=>this.removeFilter(i)}" @keyDown="${e=>{" "!==e.key&&"Enter"!==e.key||this.removeFilter(i)}}"></ix-icon-button></div></div>${this.mapSelect?html`<div class="filter-form-column filter-form-column-border filterColumnField"><div class="form-group"><label class="form-group-column-label" title="select: ${t.columnField}, options: ${a.map(e=>`value=${e.name}, selected=${e.name===t.columnField}, ${e.header}
|
|
2
|
+
`)}">Columns</label> <select @change="${e=>this.onfilterColumnChange(i,e)}" .value="${t.columnField}" data-v="${t.columnField}">${a.map(e=>html`<option value="${e.name}" ?selected="${e.name===t.columnField}">${e.header}</option>`)}</select></div></div>`:nothing}<div class="filter-form-column filter-form-column-border filterColumnField"><div class="filter-form-group"><label class="form-group-column-label" title="select: ${t.columnField}, options: ${a.map(e=>`value=${e.name}, selected=${e.name===t.columnField}, ${e.header}
|
|
3
|
+
`)}"><span>Columns</span> <select data-testid="${"filterColumnInput-"+i}" @change="${e=>this.onfilterColumnChange(i,e)}" .value="${t.columnField}" data-v="${t.columnField}">${repeat(a,e=>e.name,e=>html`<option value="${e.name}" ?selected="${e.name===t.columnField}">${e.header}</option>`)}</select></label></div></div><div class="filter-form-column filter-form-column-border filterOperatorField"><div class="filter-form-group"><label class="form-group-operator-label"><span>Operator</span> <select data-testid="${"filterOperatorInput-"+i}" class="filterOperatorInput" @change="${e=>this.onfilterOperatorChange(i,e)}" .value="${t.operatorValue}" data-v="${t.operatorValue}">${repeat(null!=(r=null==(e=a.find(e=>e.name===t.columnField))?void 0:e.filterOperators)?r:["contains"],e=>html`<option value="${e}" ?selected="${e===t.operatorValue}">${e}</option>`)}</select></label></div></div><div class="filter-form-column filter-form-column-border filterValueField"><div class="filter-form-group">${this.renderFilterInputControl(t,i)}</div></div></div>`}renderDropdown(){var e=this.filters.length>=this.filterColumns.length||this.activeFilters.length<this.filters.length;return html`<div class="filter-dropdown-content"><div class="filter-body">${this.filters.map((e,t)=>this.renderFilterInput(e,t))}</div><div class="filter-footer"><ix-button data-testid="addFilterButton" class="add-filter-button" @click="${()=>this.addFilter()}" ?disabled="${e}" appearance="text"><ix-icon slot="icon">add</ix-icon>Add filter</ix-button><ix-button data-testid="clearAllFiltersButton" @click="${()=>this.clearFilters()}" ?disabled="${0===this.activeFilters.length}" appearance="text">Clear all</ix-button></div></div>`}render(){return html`<div class="grid-menu"><div class="filter-container tooltip-container">${0<this.activeFilters.length?html`<span class="filter-superscript">${this.activeFilters.length}</span>`:nothing}<ix-button data-testid="showFiltersButton" appearance="text" class="filter_list filter-button" @click="${()=>{this.isDropdownVisible=!this.isDropdownVisible}}" @keyDown="${()=>{this.isDropdownVisible=!this.isDropdownVisible}}"><div class="slot-wrap"><ix-icon appearance="default" class="filter-icon">filter_list</ix-icon><span class="filter">${copy.filters}</span></div></ix-button><div class="tool-tip">${this.renderToolTip()}</div>${this.isDropdownVisible?this.renderDropdown():nothing}</div></div>`}},PaginationStyles=(IxGridRowFilter.styles=[IxGridViewStyles,IxGridRowFilterStyles],__decorate([property({type:Array})],IxGridRowFilter.prototype,"columns",void 0),__decorate([property({type:Number})],IxGridRowFilter.prototype,"filterValueChangeDebounceTime",void 0),__decorate([property({type:Boolean})],IxGridRowFilter.prototype,"readParamsFromURL",void 0),__decorate([property({type:String})],IxGridRowFilter.prototype,"maxDate",void 0),__decorate([state()],IxGridRowFilter.prototype,"isDropdownVisible",void 0),__decorate([state()],IxGridRowFilter.prototype,"filters",void 0),__decorate([state()],IxGridRowFilter.prototype,"filterableColumns",void 0),__decorate([state()],IxGridRowFilter.prototype,"filterColumns",void 0),__decorate([state()],IxGridRowFilter.prototype,"activeFilters",void 0),__decorate([state()],IxGridRowFilter.prototype,"mapSelect",void 0),__decorate([state()],IxGridRowFilter.prototype,"fromDateErrorText",void 0),__decorate([state()],IxGridRowFilter.prototype,"oldValueLength",void 0),IxGridRowFilter=__decorate([customElement("ix-grid-row-filter")],IxGridRowFilter),css`:host{--md-filled-select-text-field-input-text-size:var(
|
|
4
4
|
--ix-filled-select-text-field-input-text-size,
|
|
5
5
|
12px
|
|
6
6
|
)}.pagination{display:flex;align-items:center;justify-content:end;gap:0;font-family:var(--text-caption-font,sans-serif);font-size:var(--text-caption-size,.75rem);letter-spacing:var(--text-caption-letter-spacing,.03333333em);line-height:var(--text-caption-line-height,1.33333333em);font-weight:var(--text-caption-weight,normal);text-transform:var(--text-caption-transform,none);text-decoration:var(--text-caption-decoration,none);margin:1.25rem .5rem 1.25rem 1rem}.pagination>div{display:flex;align-items:center;gap:.5rem}.pagination p{margin:0}.pagination-nav{display:flex;margin-left:1.5rem;height:1.5rem;gap:.5rem}.pagination-nav>ix-icon-button{margin-top:-.5rem}.rows-per-page{color:var(--clr-on-surface,#092241)}ix-select{--md-menu-container-color:var(--bg-surface-container-lowest, #fff);--md-filled-select-text-field-container-color:var(
|
|
@@ -11,7 +11,7 @@ import{adoptStyles,CSSResult,LitElement,css,nothing,render,svg,html as html$1}fr
|
|
|
11
11
|
#1456e0
|
|
12
12
|
);--md-filled-select-text-field-focus-active-indicator-color:var(
|
|
13
13
|
--md-filled-select-text-field-focus-trailing-icon-color
|
|
14
|
-
)}ix-select-option{--md-menu-item-selected-container-color:rgba(20, 86, 224, 0.1)}@media only screen and (max-width:600px){.pagination{justify-content:space-between}.pagination>div{gap:0}}`),IxPagination=class extends LitElement{constructor(){super(...arguments),this.recordCount=0,this.page=1,this.pageSize=10,this.pageSizes=[5,10,25,100]}changePage(e){this.page+=e,this.updatePagination()}handlePageSizeSelection(e){var e=e.target,e=Number(e.value),t=(this.page-1)*this.pageSize+1,t=Math.ceil(t/e);this.updatePagination(t,e)}updatePagination(e=this.page,t=this.pageSize){this.dispatchEvent(new CustomEvent("updatePagination",{detail:{page:e,pageSize:t},bubbles:!0,composed:!0}))}render(){let e=1<this.page,t=this.recordCount>this.page*this.pageSize;return html
|
|
14
|
+
)}ix-select-option{--md-menu-item-selected-container-color:rgba(20, 86, 224, 0.1)}@media only screen and (max-width:600px){.pagination{justify-content:space-between}.pagination>div{gap:0}}`),IxPagination=class extends LitElement{constructor(){super(...arguments),this.recordCount=0,this.page=1,this.pageSize=10,this.pageSizes=[5,10,25,100]}changePage(e){this.page+=e,this.updatePagination()}handlePageSizeSelection(e){var e=e.target,e=Number(e.value),t=(this.page-1)*this.pageSize+1,t=Math.ceil(t/e);this.updatePagination(t,e)}updatePagination(e=this.page,t=this.pageSize){this.dispatchEvent(new CustomEvent("updatePagination",{detail:{page:e,pageSize:t},bubbles:!0,composed:!0}))}render(){let e=1<this.page,t=this.recordCount>this.page*this.pageSize;return html`<div class="pagination"><div><p class="rows-per-page">${copy.rowsPerPage}:</p><ix-select wide-menu menu-positioning="fixed" class="pagination__select-input" @request-selection="${this.handlePageSizeSelection}" selected-index="${this.pageSizes.indexOf(this.pageSize)}" filled>${this.pageSizes.map(e=>html`<ix-select-option class="select-option" value="${e}" ?selected="${e===this.pageSize}"><div slot="headline">${e}</div></ix-select-option>`)}</ix-select></div><div><p>${0<this.recordCount?(this.page-1)*this.pageSize+1:0} - ${this.page*this.pageSize>this.recordCount?html`${this.recordCount}`:html`${this.page*this.pageSize}`} of ${0<this.recordCount?this.recordCount:0}</p><div class="pagination-nav"><ix-icon-button ?disabled="${!e}" @click="${()=>e&&this.changePage(-1)}" icon="chevron_left" data-testid="ix-pagination-prev"></ix-icon-button><ix-icon-button ?disabled="${!t}" @click="${()=>t&&this.changePage(1)}" icon="chevron_right" data-testid="ix-pagination-next"></ix-icon-button></div></div></div>`}};IxPagination.styles=[IxGridViewStyles,PaginationStyles],__decorate([property({type:Number})],IxPagination.prototype,"recordCount",void 0),__decorate([property({type:Number})],IxPagination.prototype,"page",void 0),__decorate([property({type:Number})],IxPagination.prototype,"pageSize",void 0),__decorate([property({type:Array})],IxPagination.prototype,"pageSizes",void 0),IxPagination=__decorate([customElement("ix-pagination")],IxPagination);class IxGrid extends LitElement{constructor(){super(...arguments),this.defaultPageSize=10,this.defaultPage=1,this.originalSearchParams=void 0,this.columnReorderingAllowed=!1,this.variantClass="",this.columns=[],this.rows=[],this.defaultEmptyText="No data to display",this.sortedColumn="",this.sortDirection="",this.hideHeader=!1,this.hideFilters=!1,this.rowLimit=0,this.page=this.defaultPage,this.pageSize=this.defaultPageSize,this.pageSizes=[5,10,25,100],this.recordCount=0,this.localStorageID=void 0,this.showDownload=!0,this.isDownloading=!1,this.isLoading=!1,this.downloadMenuItems=[],this.addParamsToURL=!0,this.readParamsFromURL=!1,this.refreshDataOnColumnVisibilityChange=!0,this.filterValueChangeDebounceTime=300,this.hideColumnHeaders=!1,this.preservedQueryParamKeys=[],this.filterMaxDate=formatDate(new Date,"yyyy-MM-dd"),this.hashedTableState="",this.hideViewMoreLessButtonIcon=!0,this.showAddButton=!1,this.disableAddButton=!1,this.addButtonLabel=copy.add,this.showRemoveAllButton=!1,this.disableRemoveAllButton=!1,this.removeAllButtonLabel=copy.removeAll,this.filters=[],this.isColumnsReordering=!1,this.isExpanded=!1,this.displayColumns=[],this.defaultFilterKeys=["sort","order","page","size"],this.initialised=!1,this.handlePopState=()=>{this.updateSearchParamsFromUri(!0),this.dispatchChangeEvent()},this.dispatchChangeEvent=()=>{var e=this.filters.reduce((e,{columnField:t,value:i})=>({...e,[t]:i}),{});this.dispatchEvent(new CustomEvent("change",{detail:{columnName:this.sortedColumn,sortOrder:this.sortDirection,page:this.page,pageSize:this.pageSize,filters:e,filtersOperators:this.filters.map(e=>({columnField:e.columnField,operator:e.operatorValue}))},bubbles:!0,composed:!0}))},this.renderColumnHeader=(e,t,i,r)=>{i=classMap({header:!0,frozen:!!e.frozenToEnd,first:0===i,last:i===r-1,border:!(null!=t&&t.frozenToEnd)});return html`<div @click="${()=>e.sortable&&this.handleSort(e.name)}" @keyDown="${()=>e.sortable&&this.handleSort(e.name)}" class="${i}"><span class="header-label">${e.header}</span> ${e.sortable?html`<ix-icon title="Sort" class="header-sort-icon">${"desc"===this.sortDirection&&this.sortedColumn===e.name?"arrow_upward":"arrow_downward"}</ix-icon>`:nothing}</div>`},this.columnRenderer=(e,t,i,r)=>{render(nothing,t);r=e.bodyRenderer(r.item,r,i);let o=r;i=!!e.maxWidth;let a="column-max-width-set";i&&(o=html`<div class="${a}" style="max-width:${e.maxWidth}">${r}</div>`),render(o,t),i&&requestAnimationFrame(()=>{let e,i=t.querySelector("."+a);if(i&&i.scrollWidth>i.clientWidth&&!i.querySelector(".custom-tooltip")&&null!=(e=i.textContent)&&e.trim()){let t=document.createElement("div");t.className="custom-tooltip",t.style.cssText=`
|
|
15
15
|
background-color: #092241;
|
|
16
16
|
font-size: 0.75rem;
|
|
17
17
|
color: white;
|
|
@@ -23,4 +23,4 @@ import{adoptStyles,CSSResult,LitElement,css,nothing,render,svg,html as html$1}fr
|
|
|
23
23
|
position: absolute;
|
|
24
24
|
z-index: 1000;
|
|
25
25
|
display: none;
|
|
26
|
-
`,t.textContent=r.textContent,r.addEventListener("mouseenter",()=>{t.style.display="flex";var e=r.getBoundingClientRect();t.style.left=e.left+"px",t.style.top=e.bottom+window.scrollY+4+"px",document.body.appendChild(t)}),r.addEventListener("mouseleave",()=>{t.remove()})}})},this.renderHeader=()=>html$1`<div class="grid-header"><slot name="header"><div class="empty"></div></slot>${this.hideFilters?nothing:html$1`<div class="grid-menu"><slot name="filters"><div class="empty"></div></slot><ix-grid-column-filter .columns="${this.arrangedColumns}" columnsLocalStorageKey="${ifDefined(this.columnsLocalStorageKey)}" @columnFilter="${e=>this.handleOnColumnFilter(e)}" @reorderColumns="${this.reorderColumnsFromFilter}" .columnReorderingAllowed="${this.columnReorderingAllowed}" .refreshDataOnColumnVisibilityChange="${this.refreshDataOnColumnVisibilityChange}" .requestGridUpdate="${()=>this.requestUpdate()}"></ix-grid-column-filter>${this.showDownload?html$1`<ix-grid-download-menu .items="${this.downloadMenuItems}" .isDownloading="${this.isDownloading}"></ix-grid-download-menu>`:nothing}<ix-grid-row-filter .columns="${this.displayColumns}" .filterValueChangeDebounceTime="${this.filterValueChangeDebounceTime}" .readParamsFromURL="${this.readParamsFromURL}" .maxDate="${this.filterMaxDate}" @rowFilter="${e=>{this.filters=e.detail.filters,e.detail.resetPage&&(this.page=this.defaultPage),this.updatePage()}}"></ix-grid-row-filter></div>`}</div><div class="touch-edge"><slot name="under-header"></slot></div>`,this.renderRowControls=()=>!1===this.showAddButton&&!1===this.showRemoveAllButton&&!1===this.showViewMoreLessButton?nothing:html$1`<div class="row-controls row-limit">${this.renderAddNewButton()} ${this.renderViewMoreLessButton()} ${this.renderRemoveAllButton()}</div>`,this.renderPaginationControls=()=>html$1`<div class="row-controls pagination"><ix-pagination .page="${this.page}" .pageSize="${this.pageSize}" .pageSizes="${this.pageSizes}" .recordCount="${this.recordCount}" @updatePagination="${e=>{this.page=e.detail.page,this.pageSize=e.detail.pageSize,this.updatePage()}}"></ix-pagination></div>`}get isPersistable(){return!!this.localStorageID}get columnNames(){return this.columns.map(e=>e.name)}get columnsLocalStorageKey(){if(""===this.hashedTableState){var e=this.columns.map(({bodyRenderer:e,hidden:t,...r})=>r),r=JSON.stringify(e);let t=0;for(let e=0;e<r.length;e+=1)t=31*t+r.charCodeAt(e)>>>0;this.hashedTableState=t.toString(36)}return`ix-grid-${this.localStorageID}-${this.hashedTableState}-columns`}get arrangedColumns(){let e=[];return(e=0===(e=this.getColumnsToDisplayFromLocalStorage()).length?[...this.columns]:e).filter(e=>e).map(e=>({...e,width:e.width||void 0}))}connectedCallback(){var e;null!=(e=super.connectedCallback)&&e.call(this),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){var e;window.removeEventListener("popstate",this.handlePopState),null!=(e=super.disconnectedCallback)&&e.call(this)}updateSearchParamsFromUri(e=!1){var t,r,i,o,a;this.readParamsFromURL&&(t=new URL(window.location.href),t=new URLSearchParams(t.search),[r,i,o,a]=this.defaultFilterKeys,r=t.get(r),i=t.get(i),o=t.get(o),a=t.get(a),r&&i&&(this.sortedColumn=r,this.sortDirection=i),o&&(this.page=parseInt(o,10)||this.defaultPage),a&&(this.pageSize=parseInt(a,10)||this.defaultPageSize),e)&&this.rebuildFiltersFromUri(t)}rebuildFiltersFromUri(e){var t,r,i=[];for([t,r]of e.entries()){var o=this.defaultFilterKeys.includes(t),[a,s]=t.split("_");!o&&a&&s&&i.push({columnField:a,operatorValue:s,value:r})}this.filters=i}update(e){!this.initialised&&0<this.columns.length&&(this.displayColumns=[...this.columns],this.checkLocalStorageUpdate(),this.initialised=!0),super.update(e)}firstUpdated(){this.updateSearchParamsFromUri(),this.removeOldLocalStorageValues()}checkLocalStorageUpdate(){if(this.isPersistable){let r=JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]");if(0<r.length){let e=!1;r.length!==this.columns.length&&(e=!0);var t=this.columns.every(t=>r.some(e=>e.name===t.name))&&r.every(t=>this.columns.some(e=>e.name===t.name));(e=t?e:!0)&&this.setColumnsToLocalStorage(this.columns)}}}buildQueryFromFilters(){let t=new URLSearchParams;return this.filters.forEach(e=>{t.append(e.columnField+"_"+e.operatorValue,e.value)}),Object.fromEntries(t)}rebuildQueryFromMatchingQuerystringParams(){let r=new URLSearchParams;var e;return 0===this.preservedQueryParamKeys.length?{}:(e=new URL(window.location.href),new URLSearchParams(e.search).forEach((e,t)=>{this.preservedQueryParamKeys.includes(t)&&r.append(t,e)}),Object.fromEntries(r))}getColumnsToDisplayFromLocalStorage(){let e=[];var t;return e=this.isPersistable&&0<(t=JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]")).length?this.mapColumnsWithPersistedSettings(t):e}mapColumnsWithPersistedSettings(o){let r=new Map(o.map(e=>[e.name,e]));var e=this.columns.map(e=>{var t=r.get(e.name);return t?{...e,hidden:t.hidden,frozenToEnd:t.frozenToEnd,width:t.width||void 0}:{...e}});return e.sort((t,r)=>{var e=o.findIndex(e=>e.name===t.name),i=o.findIndex(e=>e.name===r.name);return-1===e&&-1===i?0:-1===e?1:-1===i?-1:e-i}),e}removeOldLocalStorageValues(){var t=this.findMatchingLocalStorageKeys(`ix-grid-${this.localStorageID}-`,"-columns",this.hashedTableState);for(let e=0;e<=t.length;e+=1)localStorage.removeItem(t[e])}findMatchingLocalStorageKeys(t,r,e){var i=[],o=t+e+r;for(let e=0;e<localStorage.length;e+=1){var a=localStorage.key(e);a&&a.startsWith(t)&&a.endsWith(r)&&a!==o&&i.push(a)}return i}async updatePage(e=!0){var t,r;this.dispatchChangeEvent(),this.addParamsToURL&&e&&(e={sort:this.sortedColumn,order:this.sortDirection,page:this.page.toString(),size:this.pageSize.toString(),...this.buildQueryFromFilters(),...this.rebuildQueryFromMatchingQuerystringParams()},t=new URL(window.location.href),e=new URLSearchParams(e),this.originalSearchParams||this.saveOriginalSearchParams(e),r=new URLSearchParams([...null!=(r=this.originalSearchParams)?r:[],...e]),t.search=r.toString(),window.history.pushState(null,"",t.toString()))}saveOriginalSearchParams(e){var t=new URL(window.location.href);let r=new URLSearchParams(t.search);this.filters.forEach(e=>{r.delete(e.columnField+"_"+e.operatorValue)}),e.forEach((e,t)=>{r.delete(t)}),this.originalSearchParams=r}handleSort(e=""){this.sortedColumn!==e?this.sortDirection="asc":this.sortDirection="asc"===this.sortDirection?"desc":"asc",this.sortedColumn=e,this.updatePage()}setColumnsToLocalStorage(e){this.isPersistable&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify(e))}async reorderColumnsFromTable(){var e=[...this.arrangedColumns],t=e.filter(e=>!0!==e.hidden),i=e.filter(e=>!0===e.hidden),e=e.filter(e=>!0===e.frozenToEnd);let o=[...t.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...i.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...e];t=Array.from((null==(t=null==(t=this.grid)?void 0:t.shadowRoot)?void 0:t.querySelectorAll("th"))||[]);if(t.length){let r=t.map((e,t)=>({id:t,flexPosition:Number(e.style.order)})).sort((e,t)=>e.flexPosition-t.flexPosition).map(e=>e.id);t=[];r.every((e,t)=>0===t||e>r[t-1])||(t=r.map(e=>o[e]),this.displayColumns=[...t.filter(e=>!0!==e.hidden&&!0!==(null==e?void 0:e.frozenToEnd)),...i.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...e],this.isColumnsReordering=!0,await this.updateComplete,this.isColumnsReordering=!1,this.setColumnsToLocalStorage(this.displayColumns))}}async reorderColumnsFromFilter(e){this.displayColumns=[...e.detail.reorderedColumns],this.setColumnsToLocalStorage([...this.displayColumns]),this.isColumnsReordering=!0,await this.updateComplete,this.isColumnsReordering=!1}handleOnColumnFilter(e){e.detail.columns.forEach((e,t)=>{this.displayColumns[t]&&(this.displayColumns[t].hidden=null==e?void 0:e.hidden)}),this.displayColumns=[...this.displayColumns],this.updatePage(!1)}cellPartNameGenerator(e,t){let r="";return t.item.disabled&&(r+=" ix-disabled-cell"),r}renderAddNewButton(){return this.showAddButton?html$1`<ix-button name="add-new-button" appearance="text" has-icon ?disabled="${this.disableAddButton}" @click="${()=>this.onAddButtonClick()}"><ix-icon slot="icon">add</ix-icon><span>${this.addButtonLabel}</span></ix-button>`:nothing}get showViewMoreLessButton(){return 0<this.rowLimit&&this.rows.length>this.rowLimit}renderViewMoreLessButton(){return this.showViewMoreLessButton?html$1`<ix-button appearance="text" @click="${()=>{this.isExpanded=!this.isExpanded}}" has-icon>${this.isExpanded?copy.viewLess:copy.viewMore} ${this.hideViewMoreLessButtonIcon?nothing:html$1`<ix-icon slot="icon">${this.isExpanded?"remove":"add"}</ix-icon>`}</ix-button>`:nothing}renderRemoveAllButton(){return this.showRemoveAllButton?html$1`<ix-button class="remove-all-button" name="remove-all-button" appearance="text" ?disabled="${this.disableRemoveAllButton}" @click="${()=>this.onRemoveAllButtonClick()}"><span>${this.removeAllButtonLabel}</span></ix-button>`:nothing}renderColumns(){let t=[...this.arrangedColumns];return 0<t.length?html$1`${t.map((i,e)=>!0===i.hidden?nothing:html$1`<vaadin-grid-column ${columnHeaderRenderer(()=>this.renderColumnHeader(i,t[e+1],e,t.length),this.sortDirection)} .renderer="${(e,t,r)=>this.columnRenderer(i,e,t,r)}" resizable width="${ifDefined(i.width)}" min-width="${ifDefined(i.minWidth)}" .responsive="${i.responsive}" ?hidden="${i.hidden}" ?frozen-to-end="${i.frozenToEnd}" path="${i.name}" ?auto-width="${i.autoWidth}" flex-grow="${ifDefined(i.flexGrow)}"></vaadin-grid-column>`)}`:html$1`<vaadin-grid-column></vaadin-grid-column>`}renderLoading(){return html$1`<div class="progress-container" style="display:${this.isLoading?"":"none"}"><ix-progress .indeterminate="${!0}"></ix-progress></div>`}renderGrid(){var e,t;return this.isColumnsReordering?nothing:(e=this.displayColumns.find(e=>!0!==e.hidden),t=0<this.rowLimit&&!this.isExpanded?this.rows.slice(0,this.rowLimit):this.rows,html$1`<vaadin-grid class="${this.hideColumnHeaders?"hide-column-headers":""}" .items="${e?t:[]}" all-rows-visible ?column-reordering-allowed="${this.columnReorderingAllowed}" theme="no-border" .cellPartNameGenerator="${this.cellPartNameGenerator}" @mouseup="${this.reorderColumnsFromTable}">${this.renderColumns()}<div slot="empty-state"><slot name="no-rows"></slot></div></vaadin-grid>`)}render(){return html$1`<div class="${`grid-container ${this.isColumnsReordering?"columns-reordering":""} `+this.variantClass}">${this.hideHeader?nothing:this.renderHeader()} ${this.renderLoading()} ${this.renderGrid()} ${this.renderRowControls()} ${0<this.rowLimit?nothing:this.renderPaginationControls()}<slot name="footer"></slot></div>`}}IxGrid.styles=[IxGridViewStyles],__decorate([query("vaadin-grid")],IxGrid.prototype,"grid",void 0),__decorate([property({type:Boolean,attribute:"column-reordering-allowed"})],IxGrid.prototype,"columnReorderingAllowed",void 0),__decorate([property({type:String})],IxGrid.prototype,"variantClass",void 0),__decorate([property({type:Array})],IxGrid.prototype,"columns",void 0),__decorate([property({type:Array})],IxGrid.prototype,"rows",void 0),__decorate([property({type:String})],IxGrid.prototype,"defaultEmptyText",void 0),__decorate([property({type:String})],IxGrid.prototype,"sortedColumn",void 0),__decorate([property({type:String})],IxGrid.prototype,"sortDirection",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideHeader",void 0),__decorate([property({type:Boolean,attribute:"hide-filters"})],IxGrid.prototype,"hideFilters",void 0),__decorate([property({type:Number})],IxGrid.prototype,"rowLimit",void 0),__decorate([property({type:Number})],IxGrid.prototype,"page",void 0),__decorate([property({type:Number})],IxGrid.prototype,"pageSize",void 0),__decorate([property({type:Array})],IxGrid.prototype,"pageSizes",void 0),__decorate([property({type:Number})],IxGrid.prototype,"recordCount",void 0),__decorate([property({type:String})],IxGrid.prototype,"localStorageID",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showDownload",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"isDownloading",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"isLoading",void 0),__decorate([property({type:Array})],IxGrid.prototype,"downloadMenuItems",void 0),__decorate([property({type:Boolean,attribute:"add-params-to-url"})],IxGrid.prototype,"addParamsToURL",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"readParamsFromURL",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"refreshDataOnColumnVisibilityChange",void 0),__decorate([property({type:Number})],IxGrid.prototype,"filterValueChangeDebounceTime",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideColumnHeaders",void 0),__decorate([property({type:Array})],IxGrid.prototype,"preservedQueryParamKeys",void 0),__decorate([property({type:String})],IxGrid.prototype,"filterMaxDate",void 0),__decorate([property({type:String})],IxGrid.prototype,"hashedTableState",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideViewMoreLessButtonIcon",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showAddButton",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"disableAddButton",void 0),__decorate([property({type:String})],IxGrid.prototype,"addButtonLabel",void 0),__decorate([property({type:Function})],IxGrid.prototype,"onAddButtonClick",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showRemoveAllButton",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"disableRemoveAllButton",void 0),__decorate([property({type:String})],IxGrid.prototype,"removeAllButtonLabel",void 0),__decorate([property({type:Function})],IxGrid.prototype,"onRemoveAllButtonClick",void 0),__decorate([state()],IxGrid.prototype,"filters",void 0),__decorate([state()],IxGrid.prototype,"isColumnsReordering",void 0),__decorate([state()],IxGrid.prototype,"isExpanded",void 0),__decorate([state()],IxGrid.prototype,"displayColumns",void 0),window.customElements.define("ix-grid",IxGrid);
|
|
26
|
+
`,t.textContent=i.textContent,i.addEventListener("mouseenter",()=>{t.style.display="flex";var e=i.getBoundingClientRect();t.style.left=e.left+"px",t.style.top=e.bottom+window.scrollY+4+"px",document.body.appendChild(t)}),i.addEventListener("mouseleave",()=>{t.remove()})}})},this.renderHeader=()=>html`<div class="grid-header"><slot name="header"><div class="empty"></div></slot>${this.hideFilters?nothing:html`<div class="grid-menu"><slot name="filters"><div class="empty"></div></slot><ix-grid-column-filter .columns="${this.arrangedColumns}" columnsLocalStorageKey="${ifDefined(this.columnsLocalStorageKey)}" @columnFilter="${e=>this.handleOnColumnFilter(e)}" @reorderColumns="${this.reorderColumnsFromFilter}" .columnReorderingAllowed="${this.columnReorderingAllowed}" .refreshDataOnColumnVisibilityChange="${this.refreshDataOnColumnVisibilityChange}" .requestGridUpdate="${()=>this.requestUpdate()}"></ix-grid-column-filter>${this.showDownload?html`<ix-grid-download-menu .items="${this.downloadMenuItems}" .isDownloading="${this.isDownloading}"></ix-grid-download-menu>`:nothing}<ix-grid-row-filter .columns="${this.displayColumns}" .filterValueChangeDebounceTime="${this.filterValueChangeDebounceTime}" .readParamsFromURL="${this.readParamsFromURL}" .maxDate="${this.filterMaxDate}" @rowFilter="${e=>{this.filters=e.detail.filters,e.detail.resetPage&&(this.page=this.defaultPage),this.updatePage()}}"></ix-grid-row-filter></div>`}</div><div class="touch-edge"><slot name="under-header"></slot></div>`,this.renderRowControls=()=>!1===this.showAddButton&&!1===this.showRemoveAllButton&&!1===this.showViewMoreLessButton?nothing:html`<div class="row-controls row-limit">${this.renderAddNewButton()} ${this.renderViewMoreLessButton()} ${this.renderRemoveAllButton()}</div>`,this.renderPaginationControls=()=>html`<div class="row-controls pagination"><ix-pagination .page="${this.page}" .pageSize="${this.pageSize}" .pageSizes="${this.pageSizes}" .recordCount="${this.recordCount}" @updatePagination="${e=>{this.page=e.detail.page,this.pageSize=e.detail.pageSize,this.updatePage()}}"></ix-pagination></div>`}get isPersistable(){return!!this.localStorageID}get columnNames(){return this.columns.map(e=>e.name)}get columnsLocalStorageKey(){if(""===this.hashedTableState){var e=this.columns.map(({bodyRenderer:e,hidden:t,...i})=>i),i=JSON.stringify(e);let t=0;for(let e=0;e<i.length;e+=1)t=31*t+i.charCodeAt(e)>>>0;this.hashedTableState=t.toString(36)}return`ix-grid-${this.localStorageID}-${this.hashedTableState}-columns`}get arrangedColumns(){let e=[];return(e=0===(e=this.getColumnsToDisplayFromLocalStorage()).length?[...this.columns]:e).filter(e=>e).map(e=>({...e,width:e.width||void 0}))}connectedCallback(){var e;null!=(e=super.connectedCallback)&&e.call(this),window.addEventListener("popstate",this.handlePopState)}disconnectedCallback(){var e;window.removeEventListener("popstate",this.handlePopState),null!=(e=super.disconnectedCallback)&&e.call(this)}updateSearchParamsFromUri(e=!1){var t,i,r,o,a;this.readParamsFromURL&&(t=new URL(window.location.href),t=new URLSearchParams(t.search),[i,r,o,a]=this.defaultFilterKeys,i=t.get(i),r=t.get(r),o=t.get(o),a=t.get(a),i&&r&&(this.sortedColumn=i,this.sortDirection=r),o&&(this.page=parseInt(o,10)||this.defaultPage),a&&(this.pageSize=parseInt(a,10)||this.defaultPageSize),e)&&this.rebuildFiltersFromUri(t)}rebuildFiltersFromUri(e){var t,i,r=[];for([t,i]of e.entries()){var o=this.defaultFilterKeys.includes(t),[a,l]=t.split("_");!o&&a&&l&&r.push({columnField:a,operatorValue:l,value:i})}this.filters=r}update(e){!this.initialised&&0<this.columns.length&&(this.displayColumns=[...this.columns],this.checkLocalStorageUpdate(),this.initialised=!0),super.update(e)}firstUpdated(){this.updateSearchParamsFromUri(),this.removeOldLocalStorageValues()}checkLocalStorageUpdate(){if(this.isPersistable){let i=JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]");if(0<i.length){let e=!1;i.length!==this.columns.length&&(e=!0);var t=this.columns.every(t=>i.some(e=>e.name===t.name))&&i.every(t=>this.columns.some(e=>e.name===t.name));(e=t?e:!0)&&this.setColumnsToLocalStorage(this.columns)}}}buildQueryFromFilters(){let t=new URLSearchParams;return this.filters.forEach(e=>{t.append(e.columnField+"_"+e.operatorValue,e.value)}),Object.fromEntries(t)}rebuildQueryFromMatchingQuerystringParams(){let i=new URLSearchParams;var e;return 0===this.preservedQueryParamKeys.length?{}:(e=new URL(window.location.href),new URLSearchParams(e.search).forEach((e,t)=>{this.preservedQueryParamKeys.includes(t)&&i.append(t,e)}),Object.fromEntries(i))}getColumnsToDisplayFromLocalStorage(){let e=[];var t;return e=this.isPersistable&&0<(t=JSON.parse(localStorage.getItem(this.columnsLocalStorageKey)||"[]")).length?this.mapColumnsWithPersistedSettings(t):e}mapColumnsWithPersistedSettings(o){let i=new Map(o.map(e=>[e.name,e]));var e=this.columns.map(e=>{var t=i.get(e.name);return t?{...e,hidden:t.hidden,frozenToEnd:t.frozenToEnd,width:t.width||void 0}:{...e}});return e.sort((t,i)=>{var e=o.findIndex(e=>e.name===t.name),r=o.findIndex(e=>e.name===i.name);return-1===e&&-1===r?0:-1===e?1:-1===r?-1:e-r}),e}removeOldLocalStorageValues(){var t=this.findMatchingLocalStorageKeys(`ix-grid-${this.localStorageID}-`,"-columns",this.hashedTableState);for(let e=0;e<=t.length;e+=1)localStorage.removeItem(t[e])}findMatchingLocalStorageKeys(t,i,e){var r=[],o=t+e+i;for(let e=0;e<localStorage.length;e+=1){var a=localStorage.key(e);a&&a.startsWith(t)&&a.endsWith(i)&&a!==o&&r.push(a)}return r}async updatePage(e=!0){var t,i;this.dispatchChangeEvent(),this.addParamsToURL&&e&&(e={sort:this.sortedColumn,order:this.sortDirection,page:this.page.toString(),size:this.pageSize.toString(),...this.buildQueryFromFilters(),...this.rebuildQueryFromMatchingQuerystringParams()},t=new URL(window.location.href),e=new URLSearchParams(e),this.originalSearchParams||this.saveOriginalSearchParams(e),i=new URLSearchParams([...null!=(i=this.originalSearchParams)?i:[],...e]),t.search=i.toString(),window.history.pushState(null,"",t.toString()))}saveOriginalSearchParams(e){var t=new URL(window.location.href);let i=new URLSearchParams(t.search);this.filters.forEach(e=>{i.delete(e.columnField+"_"+e.operatorValue)}),e.forEach((e,t)=>{i.delete(t)}),this.originalSearchParams=i}handleSort(e=""){this.sortedColumn!==e?this.sortDirection="asc":this.sortDirection="asc"===this.sortDirection?"desc":"asc",this.sortedColumn=e,this.updatePage()}setColumnsToLocalStorage(e){this.isPersistable&&localStorage.setItem(this.columnsLocalStorageKey,JSON.stringify(e))}async reorderColumnsFromTable(){var e=[...this.arrangedColumns],t=e.filter(e=>!0!==e.hidden),r=e.filter(e=>!0===e.hidden),e=e.filter(e=>!0===e.frozenToEnd);let o=[...t.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...r.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...e];t=Array.from((null==(t=null==(t=this.grid)?void 0:t.shadowRoot)?void 0:t.querySelectorAll("th"))||[]);if(t.length){let i=t.map((e,t)=>({id:t,flexPosition:Number(e.style.order)})).sort((e,t)=>e.flexPosition-t.flexPosition).map(e=>e.id);t=[];i.every((e,t)=>0===t||e>i[t-1])||(t=i.map(e=>o[e]),this.displayColumns=[...t.filter(e=>!0!==e.hidden&&!0!==(null==e?void 0:e.frozenToEnd)),...r.filter(e=>!0!==(null==e?void 0:e.frozenToEnd)),...e],this.isColumnsReordering=!0,await this.updateComplete,this.isColumnsReordering=!1,this.setColumnsToLocalStorage(this.displayColumns))}}async reorderColumnsFromFilter(e){this.displayColumns=[...e.detail.reorderedColumns],this.setColumnsToLocalStorage([...this.displayColumns]),this.isColumnsReordering=!0,await this.updateComplete,this.isColumnsReordering=!1}handleOnColumnFilter(e){e.detail.columns.forEach((e,t)=>{this.displayColumns[t]&&(this.displayColumns[t].hidden=null==e?void 0:e.hidden)}),this.displayColumns=[...this.displayColumns],this.updatePage(!1)}cellPartNameGenerator(e,t){let i="";return t.item.disabled&&(i+=" ix-disabled-cell"),i}renderAddNewButton(){return this.showAddButton?html`<ix-button name="add-new-button" appearance="text" has-icon ?disabled="${this.disableAddButton}" @click="${()=>this.onAddButtonClick()}"><ix-icon slot="icon">add</ix-icon><span>${this.addButtonLabel}</span></ix-button>`:nothing}get showViewMoreLessButton(){return 0<this.rowLimit&&this.rows.length>this.rowLimit}renderViewMoreLessButton(){return this.showViewMoreLessButton?html`<ix-button appearance="text" @click="${()=>{this.isExpanded=!this.isExpanded}}" has-icon>${this.isExpanded?copy.viewLess:copy.viewMore} ${this.hideViewMoreLessButtonIcon?nothing:html`<ix-icon slot="icon">${this.isExpanded?"remove":"add"}</ix-icon>`}</ix-button>`:nothing}renderRemoveAllButton(){return this.showRemoveAllButton?html`<ix-button class="remove-all-button" name="remove-all-button" appearance="text" ?disabled="${this.disableRemoveAllButton}" @click="${()=>this.onRemoveAllButtonClick()}"><span>${this.removeAllButtonLabel}</span></ix-button>`:nothing}renderColumns(){let t=[...this.arrangedColumns];return 0<t.length?html`${t.map((r,e)=>!0===r.hidden?nothing:html`<vaadin-grid-column ${columnHeaderRenderer(()=>this.renderColumnHeader(r,t[e+1],e,t.length),this.sortDirection)} .renderer="${(e,t,i)=>this.columnRenderer(r,e,t,i)}" resizable width="${ifDefined(r.width)}" min-width="${ifDefined(r.minWidth)}" .responsive="${r.responsive}" ?hidden="${r.hidden}" ?frozen-to-end="${r.frozenToEnd}" path="${r.name}" ?auto-width="${r.autoWidth}" flex-grow="${ifDefined(r.flexGrow)}"></vaadin-grid-column>`)}`:html`<vaadin-grid-column></vaadin-grid-column>`}renderLoading(){return html`<div class="progress-container" style="display:${this.isLoading?"":"none"}"><ix-progress .indeterminate="${!0}"></ix-progress></div>`}renderGrid(){var e,t;return this.isColumnsReordering?nothing:(e=this.displayColumns.find(e=>!0!==e.hidden),t=0<this.rowLimit&&!this.isExpanded?this.rows.slice(0,this.rowLimit):this.rows,html`<vaadin-grid class="${this.hideColumnHeaders?"hide-column-headers":""}" .items="${e?t:[]}" all-rows-visible ?column-reordering-allowed="${this.columnReorderingAllowed}" theme="no-border" .cellPartNameGenerator="${this.cellPartNameGenerator}" @mouseup="${this.reorderColumnsFromTable}">${this.renderColumns()}<div slot="empty-state"><slot name="no-rows"></slot></div></vaadin-grid>`)}render(){return html`<div class="${`grid-container ${this.isColumnsReordering?"columns-reordering":""} `+this.variantClass}">${this.hideHeader?nothing:this.renderHeader()} ${this.renderLoading()} ${this.renderGrid()} ${this.renderRowControls()} ${0<this.rowLimit?nothing:this.renderPaginationControls()}<slot name="footer"></slot></div>`}}IxGrid.styles=[IxGridViewStyles],__decorate([query("vaadin-grid")],IxGrid.prototype,"grid",void 0),__decorate([property({type:Boolean,attribute:"column-reordering-allowed"})],IxGrid.prototype,"columnReorderingAllowed",void 0),__decorate([property({type:String})],IxGrid.prototype,"variantClass",void 0),__decorate([property({type:Array})],IxGrid.prototype,"columns",void 0),__decorate([property({type:Array})],IxGrid.prototype,"rows",void 0),__decorate([property({type:String})],IxGrid.prototype,"defaultEmptyText",void 0),__decorate([property({type:String})],IxGrid.prototype,"sortedColumn",void 0),__decorate([property({type:String})],IxGrid.prototype,"sortDirection",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideHeader",void 0),__decorate([property({type:Boolean,attribute:"hide-filters"})],IxGrid.prototype,"hideFilters",void 0),__decorate([property({type:Number})],IxGrid.prototype,"rowLimit",void 0),__decorate([property({type:Number})],IxGrid.prototype,"page",void 0),__decorate([property({type:Number})],IxGrid.prototype,"pageSize",void 0),__decorate([property({type:Array})],IxGrid.prototype,"pageSizes",void 0),__decorate([property({type:Number})],IxGrid.prototype,"recordCount",void 0),__decorate([property({type:String})],IxGrid.prototype,"localStorageID",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showDownload",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"isDownloading",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"isLoading",void 0),__decorate([property({type:Array})],IxGrid.prototype,"downloadMenuItems",void 0),__decorate([property({type:Boolean,attribute:"add-params-to-url"})],IxGrid.prototype,"addParamsToURL",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"readParamsFromURL",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"refreshDataOnColumnVisibilityChange",void 0),__decorate([property({type:Number})],IxGrid.prototype,"filterValueChangeDebounceTime",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideColumnHeaders",void 0),__decorate([property({type:Array})],IxGrid.prototype,"preservedQueryParamKeys",void 0),__decorate([property({type:String})],IxGrid.prototype,"filterMaxDate",void 0),__decorate([property({type:String})],IxGrid.prototype,"hashedTableState",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"hideViewMoreLessButtonIcon",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showAddButton",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"disableAddButton",void 0),__decorate([property({type:String})],IxGrid.prototype,"addButtonLabel",void 0),__decorate([property({type:Function})],IxGrid.prototype,"onAddButtonClick",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"showRemoveAllButton",void 0),__decorate([property({type:Boolean})],IxGrid.prototype,"disableRemoveAllButton",void 0),__decorate([property({type:String})],IxGrid.prototype,"removeAllButtonLabel",void 0),__decorate([property({type:Function})],IxGrid.prototype,"onRemoveAllButtonClick",void 0),__decorate([state()],IxGrid.prototype,"filters",void 0),__decorate([state()],IxGrid.prototype,"isColumnsReordering",void 0),__decorate([state()],IxGrid.prototype,"isExpanded",void 0),__decorate([state()],IxGrid.prototype,"displayColumns",void 0),window.customElements.define("ix-grid",IxGrid);
|