UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

2 lines 109 kB
/*! For license information please see chunk.650f5562491c365bb7e8.js.LICENSE.txt */ (self.webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([[1657],{68374:function(e,t,n){"use strict";n(85466),n(85408);var i=document.createElement("template");i.innerHTML='<dom-module id="material-menu-overlay">\n <template>\n <style include="material-overlay">\n </style>\n </template>\n</dom-module>',document.head.appendChild(i.content);var o,r=n(50856);var s,l,a=(0,r.d)(o||(s=['<dom-module id="material-combo-box-overlay" theme-for="vaadin-combo-box-overlay">\n <template>\n <style include="material-menu-overlay">\n :host {\n /* TODO using a legacy mixin (unsupported) */\n --iron-list-items-container: {\n border-width: 8px 0;\n border-style: solid;\n border-color: transparent;\n };\n }\n\n [part="overlay"] {\n position: relative;\n overflow: visible;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n [part="content"] {\n padding: 0;\n }\n\n :host([loading]) [part="loader"] {\n height: 2px;\n position: absolute;\n z-index: 1;\n top: -2px;\n left: 0;\n right: 0;\n background:\n var(--material-background-color) linear-gradient(\n 90deg,\n transparent 0%,\n transparent 20%,\n var(--material-primary-color) 20%,\n var(--material-primary-color) 40%,\n transparent 40%,\n transparent 60%,\n var(--material-primary-color) 60%,\n var(--material-primary-color) 80%,\n transparent 80%,\n transparent 100%\n ) 0 0 / 400% 100% repeat-x;\n opacity: 0;\n animation:\n 3s linear infinite material-combo-box-loader-progress,\n .3s .1s both material-combo-box-loader-fade-in;\n }\n\n [part="loader"]::before {\n content: \'\';\n display: block;\n height: 100%;\n opacity: 0.16;\n background: var(--material-primary-color);\n }\n\n @keyframes material-combo-box-loader-fade-in {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n }\n\n @keyframes material-combo-box-loader-progress {\n 0% {\n background-position: 0 0;\n background-size: 300% 100%;\n }\n\n 33% {\n background-position: -100% 0;\n background-size: 400% 100%;\n }\n\n 67% {\n background-position: -200% 0;\n background-size: 250% 100%;\n }\n\n 100% {\n background-position: -300% 0;\n background-size: 300% 100%;\n }\n }\n </style>\n </template>\n</dom-module>'],l||(l=s.slice(0)),o=Object.freeze(Object.defineProperties(s,{raw:{value:Object.freeze(l)}}))));document.head.appendChild(a.content);var u;n(23799),n(8542);var c=(0,r.d)(u||(u=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<dom-module id="material-item" theme-for="vaadin-item">\n <template>\n <style>\n :host {\n display: flex;\n align-items: center;\n box-sizing: border-box;\n overflow: hidden;\n font-family: var(--material-font-family);\n font-size: var(--material-body-font-size);\n line-height: 24px;\n padding: 4px 0;\n }\n\n /* It\'s the list-box\'s responsibility to add the focus style */\n :host([focused]) {\n outline: none;\n }\n\n /* Selected item has an icon */\n\n :host::before {\n display: var(--_material-item-selected-icon-display, none);\n content: "";\n font-family: material-icons;\n font-size: 24px;\n line-height: 1;\n font-weight: 400;\n width: 24px;\n text-align: center;\n margin-right: 10px;\n color: var(--material-secondary-text-color);\n flex: none;\n }\n\n :host([selected])::before {\n content: var(--material-icons-check);\n }\n\n /* Disabled item */\n\n :host([disabled]) {\n color: var(--material-disabled-text-color);\n cursor: default;\n pointer-events: none;\n }\n </style>\n </template>\n</dom-module>'])));document.head.appendChild(c.content);var h=n(28426),f=n(15520);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _(e,t,n){return(_="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I;function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==w(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C,E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&P(e,t)}(s,e);var t,n,i,o=O(s);function s(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(e=o.call(this)).value,e}return t=s,i=[{key:"template",get:function(){return(0,r.d)(I||(I=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: inline-block;\n }\n\n :host([hidden]) {\n display: none !important;\n }\n </style>\n <div part="content">\n <slot></slot>\n </div>\n'])))}},{key:"is",get:function(){return"vaadin-item"}},{key:"version",get:function(){return"2.1.1"}}],(n=null)&&x(t.prototype,n),i&&x(t,i),s}(function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,e);var t,n,i,o=v(r);function r(){return p(this,r),o.apply(this,arguments)}return t=r,i=[{key:"properties",get:function(){return{_hasVaadinItemMixin:{value:!0},disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}}],(n=[{key:"value",get:function(){return void 0!==this._value?this._value:this.textContent.trim()},set:function(e){this._value=e}},{key:"ready",value:function(){var e=this;_(g(r.prototype),"ready",this).call(this);var t=this.getAttribute("value");null!==t&&(this.value=t),this.addEventListener("focus",(function(t){return e._setFocused(!0)}),!0),this.addEventListener("blur",(function(t){return e._setFocused(!1)}),!0),this.addEventListener("mousedown",(function(t){e._setActive(e._mousedown=!0),document.addEventListener("mouseup",(function t(){e._setActive(e._mousedown=!1),document.removeEventListener("mouseup",t)}))})),this.addEventListener("keydown",(function(t){return e._onKeydown(t)})),this.addEventListener("keyup",(function(t){return e._onKeyup(t)}))}},{key:"disconnectedCallback",value:function(){_(g(r.prototype),"disconnectedCallback",this).call(this),this.hasAttribute("active")&&this._setFocused(!1)}},{key:"_selectedChanged",value:function(e){this.setAttribute("aria-selected",e)}},{key:"_disabledChanged",value:function(e){e?(this.selected=!1,this.setAttribute("aria-disabled","true"),this.blur()):this.removeAttribute("aria-disabled")}},{key:"_setFocused",value:function(e){e?(this.setAttribute("focused",""),this._mousedown||this.setAttribute("focus-ring","")):(this.removeAttribute("focused"),this.removeAttribute("focus-ring"),this._setActive(!1))}},{key:"_setActive",value:function(e){e?this.setAttribute("active",""):this.removeAttribute("active")}},{key:"_onKeydown",value:function(e){/^( |SpaceBar|Enter)$/.test(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this._setActive(!0))}},{key:"_onKeyup",value:function(e){this.hasAttribute("active")&&(this._setActive(!1),this.click())}}])&&y(t.prototype,n),i&&y(t,i),r}((0,f.T)(h.H3)));customElements.define(E.is,E);var R=(0,r.d)(C||(C=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<dom-module id="material-combo-box-item" theme-for="vaadin-combo-box-item">\n <template>\n <style include="material-item">\n :host {\n cursor: pointer;\n -webkit-tap-highlight-color: transparent;\n padding: 4px 10px;\n min-height: 36px;\n font-size: var(--material-small-font-size);\n --_material-item-selected-icon-display: block;\n }\n\n /* ShadyCSS workaround */\n :host::before {\n display: block;\n }\n\n :host(:hover) {\n background-color: var(--material-secondary-background-color);\n }\n\n :host([focused]) {\n background-color: var(--material-divider-color);\n }\n\n @media (pointer: coarse) {\n :host(:hover),\n :host([focused]) {\n background-color: transparent;\n }\n }\n </style>\n </template>\n</dom-module>'])));document.head.appendChild(R.content);var V=n(62305),T=n(21683),j=n(78956),A=n(93252),B=n(52521),F=n(23916),z=n(8621),L=n(20723);function $(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}var H=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,n,i;return t=e,(n=[{key:"toString",value:function(){return""}}])&&$(t.prototype,n),i&&$(t,i),e}();function M(e){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function D(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function N(e,t,n){return(N="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=X(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=X(e);if(t){var o=X(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return W(this,n)}}function W(e,t){return!t||"object"!==M(t)&&"function"!=typeof t?K(e):t}function K(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function X(e){return(X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G(e){return function(e){if(Array.isArray(e))return J(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function ee(e,t,n){return(ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=oe(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return ie(this,n)}}function ie(e,t){return!t||"object"!==U(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n(65233);var re,se=n(72986),le=n(67810),ae=n(72419),ue=n(9672),ce=n(87156),he=n(37692),fe=n(4059);var de,pe=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),ye=pe&&pe[1]>=8,_e="-10000px",me=-100;function ve(e){return(ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ge(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ie(e,t,n){return(Ie="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Oe(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Oe(e);if(t){var o=Oe(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){return!t||"object"!==ve(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Oe(e){return(Oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}(0,ue.k)({_template:(0,r.d)(re||(re=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n }\n\n @media only screen and (-webkit-max-device-pixel-ratio: 1) {\n :host {\n will-change: transform;\n }\n }\n\n #items {\n @apply --iron-list-items-container;\n position: relative;\n }\n\n :host(:not([grid])) #items > ::slotted(*) {\n width: 100%;\n }\n\n #items > ::slotted(*) {\n box-sizing: border-box;\n margin: 0;\n position: absolute;\n top: 0;\n will-change: transform;\n }\n </style>\n\n <array-selector id="selector" items="{{items}}" selected="{{selectedItems}}" selected-item="{{selectedItem}}"></array-selector>\n\n <div id="items">\n <slot></slot>\n </div>\n']))),is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[he.F,se.z,le.o,ae.x],_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,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!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.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return(0,ce.vz)((0,ce.vz)(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e-=e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){(e%=this._physicalCount)<0&&(e=this._physicalCount+e),this.grid&&(e-=e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(null==e){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems((function(e,n){return(t+=this._getPhysicalSizeIncrement(e))>this._scrollPosition?this.grid?n-n%this._itemsPerRow:n:this.grid&&this._virtualCount-1===n?n-n%this._itemsPerRow:void 0}))||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(null==e){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems((function(n,i){t<this._scrollBottom&&(e=i),t+=this._getPhysicalSizeIncrement(n)}))}this._lastVisibleIndexVal=e}return e},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){this._debounce("_render",this._render,T.rs),this.listen(this,"iron-resize","_resizeHandler"),this.listen(this,"keydown","_keydownHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler"),this.unlisten(this,"keydown","_keydownHandler")},_setOverflow:function(e){this.style.webkitOverflowScrolling=e===this?"touch":"",this.style.overflowY=e===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,T.rs)},updateViewportBoundaries:function(){var e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean("rtl"===e.direction),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,n=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;var i=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+i,this._physicalStart=this._physicalStart+i,this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._update()}else if(this._physicalCount>0){var o=this._getReusables(n);n?(this._physicalTop=o.physicalTop,this._virtualStart=this._virtualStart+o.indexes.length,this._physicalStart=this._physicalStart+o.indexes.length):(this._virtualStart=this._virtualStart-o.indexes.length,this._physicalStart=this._physicalStart-o.indexes.length),this._update(o.indexes,n?null:o.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),T.YA)}},_getReusables:function(e){var t,n,i,o=[],r=this._hiddenContentSize*this._ratio,s=this._virtualStart,l=this._virtualEnd,a=this._physicalCount,u=this._physicalTop+this._scrollOffset,c=this._physicalBottom+this._scrollOffset,h=this._scrollTop,f=this._scrollBottom;for(e?(t=this._physicalStart,this._physicalEnd,n=h-u):(t=this._physicalEnd,this._physicalStart,n=c-f);n-=i=this._getPhysicalSizeIncrement(t),!(o.length>=a||n<=r);)if(e){if(l+o.length+1>=this._virtualCount)break;if(u+i>=h-this._scrollOffset)break;o.push(t),u+=i,t=(t+1)%a}else{if(s-o.length<=0)break;if(u+this._physicalSize-i<=f)break;o.push(t),u-=i,t=0===t?a-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&0===e.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var n=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(n)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(e){var t,n;this._ensureTemplatized();var i=new Array(e);for(t=0;t<e;t++)n=this.stamp(null),i[t]=n.root.querySelector("*"),this._itemsParent.appendChild(n.root);return i},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,3,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var n=t%this._itemsPerRow;n&&t-n<=this._physicalCount&&(t+=this._itemsPerRow),t-=n}var i=t-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(i<0)){if(i>0){var r=window.performance.now();[].push.apply(this._physicalItems,this._createPool(i));for(var s=0;s<i;s++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+i,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+i),this._update(),this._templateCost=(window.performance.now()-r)/i,o=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===o||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,o)),T.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,o),T.YA))}},_render:function(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){var e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart=this._virtualStart+e.indexes.length,this._physicalStart=this._physicalStart+e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_ensureTemplatized:function(){if(!this.ctor){this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate||console.warn("iron-list requires a template to be provided in light-dom");var e={__key__:!0};e[this.as]=!0,e[this.indexAs]=!0,e[this.selectedAs]=!0,e.tabIndex=!0,this._instanceProps=e,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(e,t){void 0!==t&&(this.notifyResize(),(0,A.y)(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if("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._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,T.rs);else if("items.splices"===e.path){if(this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0,e.value.indexSplices.some((function(e){return e.addedCount>0||e.removed.length>0}))){var t=this._getActiveElement();this.contains(t)&&t.blur()}var n=e.value.indexSplices.some((function(e){return e.index+e.addedCount>=this._virtualStart&&e.index<=this._virtualEnd}),this);this._isClientFull()&&!n||this._debounce("_render",this._render,T.rs)}else"items.length"!==e.path&&this._forwardItemPath(e.path,e.value)},_forwardItemPath:function(e,t){var n,i,o,r=(e=e.slice(6)).indexOf(".");-1===r&&(r=e.length);var s=this.modelForElement(this._offscreenFocusedItem),l=parseInt(e.substring(0,r),10);(n=this._isIndexRendered(l))?(i=this._getPhysicalIndex(l),o=this.modelForElement(this._physicalItems[i])):s&&(o=s),o&&o[this.indexAs]===l&&(e=e.substring(r+1),e=this.as+(e?"."+e:""),o._setPendingPropertyOrPath(e,t,!1,!0),o._flushProperties&&o._flushProperties(!0),n&&(this._updateMetrics([i]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(e){e.forEach((function(e){if(e.removed.forEach(this._removeItem,this),e.index<this._virtualStart){var t=Math.max(e.addedCount-e.removed.length,e.index-this._virtualStart);this._virtualStart=this._virtualStart+t,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+t)}}),this)},_removeItem:function(e){this.$.selector.deselect(e),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===e&&this._removeFocusedItem()},_iterateItems:function(e,t){var n,i,o,r;if(2===arguments.length&&t){for(r=0;r<t.length;r++)if(n=t[r],i=this._computeVidx(n),null!=(o=e.call(this,n,i)))return o}else{for(n=this._physicalStart,i=this._virtualStart;n<this._physicalCount;n++,i++)if(null!=(o=e.call(this,n,i)))return o;for(n=0;n<this._physicalStart;n++,i++)if(null!=(o=e.call(this,n,i)))return o}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_assignModels:function(e){this._iterateItems((function(e,t){var n=this._physicalItems[e],i=this.items&&this.items[t];if(null!=i){var o=this.modelForElement(n);o.__key__=null,this._forwardProperty(o,this.as,i),this._forwardProperty(o,this.selectedAs,this.$.selector.isSelected(i)),this._forwardProperty(o,this.indexAs,t),this._forwardProperty(o,"tabIndex",this._focusedVirtualIndex===t?0:-1),this._physicalIndexForKey[o.__key__]=e,o._flushProperties&&o._flushProperties(!0),n.removeAttribute("hidden")}else n.setAttribute("hidden","")}),e)},_updateMetrics:function(e){(0,A.y)();var t=0,n=0,i=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((function(e,i){n+=this._physicalSizes[e],this._physicalSizes[e]=this._physicalItems[e].offsetHeight,t+=this._physicalSizes[e],this._physicalAverageCount+=this._physicalSizes[e]?1:0}),e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(n=1===this._itemsPerRow?n:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-n,this._itemsPerRow=1),this._physicalAverageCount!==i&&(this._physicalAverage=Math.round((o*i+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,n=(this._viewportWidth-t)/2;this._iterateItems((function(t,i){var o=i%this._itemsPerRow,r=Math.floor(o*this._itemWidth+n);this._isRTL&&(r*=-1),this.translate3d(r+"px",e+"px",0,this._physicalItems[t]),this._shouldRenderNextRow(i)&&(e+=this._rowHeight)}))}else this._iterateItems((function(t,n){this.translate3d(0,e+"px",0,this._physicalItems[t]),e+=this._physicalSizes[t]}))},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var e=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==e){this._physicalTop=this._physicalTop-e;var t=this._scrollTop;!ye&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((e=(e=(e=e||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||this.grid&&this.$.items.style.height<this._estScrollHeight)||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(e){return this.scrollToIndex(this.items.indexOf(e))},scrollToIndex:function(e){if(!("number"!=typeof e||e<0||e>this.items.length-1)&&((0,A.y)(),0!==this._physicalCount)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-2*this._itemsPerRow:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,n=this._virtualStart,i=0,o=this._hiddenContentSize;n<e&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,n++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",(function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),T.rs)},selectItem:function(e){return this.selectIndex(this.items.indexOf(e))},selectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t&&(t[this.selectedAs]=!0),this.updateSizeForIndex(e)}this.$.selector.selectIndex(e)}},deselectItem:function(e){return this.deselectIndex(this.items.indexOf(e))},deselectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(this._isIndexRendered(e))this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)])[this.selectedAs]=!1,this.updateSizeForIndex(e);this.$.selector.deselectIndex(e)}},toggleSelectionForItem:function(e){return this.toggleSelectionForIndex(this.items.indexOf(e))},toggleSelectionForIndex:function(e){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(e):this.$.selector.isSelected(this.items[e]))?this.deselectIndex(e):this.selectIndex(e)},clearSelection:function(){this._iterateItems((function(e,t){this.modelForElement(this._physicalItems[e])[this.selectedAs]=!1})),this.$.selector.clearSelection()},_selectionEnabledChanged:function(e){(e?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")},_selectionHandler:function(e){var t=this.modelForElement(e.target);if(t){var n,i,o=(0,ce.vz)(e).path[0],r=this._getActiveElement(),s=this._physicalItems[this._getPhysicalIndex(t[this.indexAs])];"input"!==o.localName&&"button"!==o.localName&&"select"!==o.localName&&(n=t.tabIndex,t.tabIndex=me,i=r?r.tabIndex:-1,t.tabIndex=n,r&&s!==r&&s.contains(r)&&i!==me||this.toggleSelectionForItem(t[this.as]))}},_multiSelectionChanged:function(e){this.clearSelection(),this.$.selector.multi=e},updateSizeForItem:function(e){return this.updateSizeForIndex(this.items.indexOf(e))},updateSizeForIndex:function(e){return this._isIndexRendered(e)?(this._updateMetrics([this._getPhysicalIndex(e)]),this._positionItems(),null):null},_manageFocus:function(){var e=this._focusedVirtualIndex;e>=0&&e<this._virtualCount?this._isIndexRendered(e)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedPhysicalIndex=this._physicalStart,this._focusedVirtualIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_convertIndexToCompleteRow:function(e){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(e/this._itemsPerRow)*this._itemsPerRow:e},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},focusItem:function(e){this._focusPhysicalItem(e)},_focusPhysicalItem:function(e){if(!(e<0||e>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(e)||this.scrollToIndex(e);var t,n=this._physicalItems[this._getPhysicalIndex(e)],i=this.modelForElement(n);i.tabIndex=me,n.tabIndex===me&&(t=n),t||(t=(0,ce.vz)(n).querySelector('[tabindex="-100"]')),i.tabIndex=0,this._focusedVirtualIndex=e,t&&t.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedVirtualIndex=-1,this._focusedPhysicalIndex=-1},_createFocusBackfillItem:function(){var e=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var t=this.stamp(null);this._focusBackfillItem=t.root.querySelector("*"),this._itemsParent.appendChild(t.root)}this._offscreenFocusedItem=this._physicalItems[e],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this._focusedPhysicalIndex=e,this.translate3d(0,_e,0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(this._focusedVirtualIndex<0)){this._assignModels();var e=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),t=this._physicalItems[e];if(t){var n=this.modelForElement(t),i=this.modelForElement(this._offscreenFocusedItem);n[this.as]===i[this.as]?(this._focusBackfillItem=t,n.tabIndex=-1,this._physicalItems[e]=this._offscreenFocusedItem,this.translate3d(0,_e,0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(e){var t=this.modelForElement(e.target),n=this.modelForElement(this._focusedItem),i=null!==this._offscreenFocusedItem,o=this._focusedVirtualIndex;t&&(n===t?this._isIndexVisible(o)||this.scrollToIndex(o):(this._restoreFocusedItem(),n&&(n.tabIndex=-1),t.tabIndex=0,o=t[this.indexAs],this._focusedVirtualIndex=o,this._focusedPhysicalIndex=this._getPhysicalIndex(o),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],i&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(e){switch(e.keyCode){case 40:this._focusedVirtualIndex<this._virtualCount-1&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex+(this.grid?this._itemsPerRow:1));break;case 39:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?-1:1));break;case 38:this._focusedVirtualIndex>0&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex-(this.grid?this._itemsPerRow:1));break;case 37:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?1:-1));break;case 13:this._focusPhysicalItem(this._focusedVirtualIndex),this.selectionEnabled&&this._selectionHandler(e)}},_clamp:function(e,t,n){return Math.min(n,Math.max(t,e))},_debounce:function(e,t,n){this._debouncers=this._debouncers||{},this._debouncers[e]=j.d.debounce(this._debouncers[e],n,t.bind(this)),(0,A.E)(this._debouncers[e])},_forwardProperty:function(e,t,n){e._setPendingProperty(t,n)},_forwardHostPropV2:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(n){n&&this.modelForElement(n).forwardHostProp(e,t)}),this)},_notifyInstancePropV2:function(e,t,n){if((0,fe.wB)(this.as,t)){var i=e[this.indexAs];t==this.as&&(this.items[i]=n),this.notifyPath((0,fe.Iu)(this.as,"items."+i,t),n)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(e,t,n){0===t.indexOf(this.as+".")&&this.notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),n)},_forwardParentPath:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(n){n&&this.modelForElement(n).notifyPath(e,t,!0)}),this)},_forwardParentProp:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach((function(n){n&&(this.modelForElement(n)[e]=t)}),this)},_getActiveElement:function(){var e=this._itemsParent.node.domHost;return(0,ce.vz)(e?e.root:document).activeElement}});var Se=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&we(e,t)}(s,e);var t,n,i,o=xe(s);function s(){return be(this,s),o.apply(this,arguments)}return t=s,i=[{key:"template",get:function(){return(0,r.d)(de||(de=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n <style>\n :host {\n display: block;\n }\n\n :host([hidden]) {\n display: none;\n }\n </style>\n <div part="content" id="content"></div>\n'])))}},{key:"is",get:function(){return"vaadin-combo-box-item"}},{key:"properties",get:function(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},_itemTemplateInstance:Object,renderer:Function,_oldRenderer:Function}}},{key:"observers",get:function(){return["_rendererOrItemChanged(renderer, index, item.*)","_updateLabel(label, _itemTemplateInstance)",'_updateTemplateInstanceVariable("index", index, _itemTemplateInstance)','_updateTemplateInstanceVariable("item", item, _itemTemplateInstance)','_updateTemplateInstanceVariable("selected", selected, _itemTemplateInstance)','_updateTemplateInstanceVariable("focused", focused, _itemTemplateInstance)']}}],(n=[{key:"connectedCallback",value:function(){if(Ie(Oe(s.prototype),"connectedCallback",this).call(this),!this._itemTemplateInstance){var e=this.getRootNode().host.getRootNode().host.__dataHost.getRootNode().host;this._comboBox=e.getRootNode().host,this._comboBox._ensureTemplatized(),this._comboBox._TemplateClass&&(this._itemTemplateInstance=new this._comboBox._TemplateClass({}),this.$.content.textContent="",this.$.content.appendChild(this._itemTemplateInstance.root))}}},{key:"_render",value:function(){if(this.renderer){var e={index:this.index,item:this.item};this.renderer(this.$.content,this._comboBox,e)}}},{key:"_rendererOrItemChanged",value:function(e,t,n){void 0!==n&&void 0!==t&&(this._oldRenderer!==e&&(this.$.content.innerHTML=""),e&&(this._oldRenderer=e,this._render()))}},{key:"_updateLabel",value:function(e,t){void 0===t&&this.$.content&&!this.renderer&&(this.$.content.textContent=e)}},{key:"_updateTemplateInstanceVariable",value:function(e,t,n){void 0!==e&&void 0!==t&&void 0!==n&&(n[e]=t)}}])&&ge(t.prototype,n),i&&ge(t,i),s}((0,f.T)(h.H3));customElements.define(Se.is,Se);var ke,Ce=n(16777),Ee=n(1335),Re=n(33367);function Ve(e){return(Ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Ae(e,t,n){return t&&je(e.prototype,t),n&&je(e,n),e}function Be(e,t,n){return(Be="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var i=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Me(e)););return e}(e,t);if(i){var o=Object.getOwnPropertyDescriptor(i,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}function Fe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=Me(e);if(t){var o=Me(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return $e(this,n)}}function $e(e,t){return!t||"object"!==Ve(t)&&"function"!=typeof t?He(e):t}function He(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var De=function(e){Fe(n,e);var t=Le(n);function n(){return Te(this,n),t.apply(this,arguments)}return Ae(n,[{key:"ready",value:function(){Be(Me(n.prototype),"ready",this).call(this);var e=document.createElement("div");e.setAttribute("part","loader");var t=this.shadowRoot.querySelector('[part~="content"]');t.parentNode.insertBefore(e,t)}}],[{key:"is",get:function(){return"vaadin-combo-box-overlay"}}]),n}(Ee.G);customElements.define(De.is,De);var Ne,qe=function(e){Fe(n,e);var t=Le(n);function n(){var e;return Te(this,n),(e=t.call(this))._boundSetPosition=e._setPosition.bind(He(e)),e._boundOutsideClickListener=e._outsideClickListener.bind(He(e)),e}return Ae(n,[{key:"connectedCallback",value:function(){Be(Me(n.prototype),"connectedCallback",this).call(this),this.addEventListener("iron-resize",this._boundSetPosition)}},{key:"ready",value:function(){Be(Me(n.prototype),"ready",this).call(this),this.$.overlay.addEventListener("vaadin-overlay-outside-click",(function(e){e.preventDefault()}))}},{key:"disconnectedCallback",value:function(){Be(Me(n.prototype),"disconnectedCallback",this).call(this),this.removeEventListener("iron-resize",this._boundSetPosition),this.opened=!1}},{key:"notifyResize",value:function(){Be(Me(n.prototype),"notifyResize",this).call(this),this.positionTarget&&this.opened&&(this._setPosition(),requestAnimationFrame(this._setPosition.bind(this)))}},{key:"_openedChanged",value:function(e,t){!!e!=!!t&&(e?(this.$.overlay.style.position=this._isPositionFixed(this.positionTarget)?"fixed":"absolute",this._setPosition(),window.addEventListener("scroll",this._boundSetPosition,!0),document.addEventListener("click",this._boundOutsideClickListener,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0}))):(window.removeEventListener("scroll",this._boundSetPosition,!0),document.removeEventListener("click",this._boundOutsideClickListener,!0),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0}))))}},{key:"_outsideClickListener",value:function(e){var t=e.composedPath();t.indexOf(this.positionTarget)<0&&t.indexOf(this.$.overlay)<0&&(this.opened=!1)}},{key:"_isPositionFixed",value:function(e){var t=this._getOffsetParent(e);return"fixed"===window.getComputedStyle(e).position||t&&this._isPositionFixed(t)}},{key:"_getOffsetParent",value:function(e){if(e.assignedSlot)return e.assignedSlot.parentElement;if(e.parentElement)return e.offsetParent;var t=e.parentNode;return t&&11===t.nodeType&&t.host?t.host:void 0}},{key:"_verticalOffset",value:function(e,t){return this.alignedAbove?-e.height:t.height}},{key:"_shouldAlignAbove",value:function(e){return(window.innerHeight-e.bottom-Math.min(document.body.scrollTop,0))/window.innerHeight<.3}},{key:"_setPosition",value:function(e){if(!this.hidden){if(e&&e.target){var t=e.target===document?document.body:e.target,n=this.$.overlay.parentElement;if(!t.contains(this.$.overlay)&&!t.contains(this.positionTarget)||n!==document.body)return}var i=this.positionTarget.getBoundingClientRect();this.alignedAbove=this._shouldAlignAbove(i);var o=this.$.overlay.getBoundingClientRect();this._translateX=i.left-o.left+(this._translateX||0),this._translateY=i.top-o.top+(this._translateY||0)+this._verticalOffset(o,i);var r=window.devicePixelRatio||1;this._translateX=Math.round(this._translateX*r)/r,this._translateY=Math.round(this._translateY*r)/r,this.$.overlay.style.transform="translate3d(".concat(this._translateX,"px, ").concat(this._translateY,"px, 0)"),this.$.overlay.style.width=this.positionTarget.clientWidth+"px",this.$.overlay.style.justifyContent=this.alignedAbove?"flex-end":"flex-start",this.dispatchEvent(new CustomEvent("position-changed"))}}}],[{key:"template",get:function(){return(0,r.d)(ke||(ke=function(e,t){return t|