Paulus Schoutsen 6627c352e6 Update frontend
2017-10-05 09:17:26 -07:00

168 lines
722 KiB
HTML

<html><head></head><body><div hidden="" by-polymer-bundler=""><script>!function(){"use strict";var o=window.Polymer;window.Polymer=function(o){return window.Polymer._polymerFn(o)},o&&Object.assign(Polymer,o),window.Polymer._polymerFn=function(o){throw new Error("Load polymer.html to use the Polymer() function.")},window.Polymer.version="2.0.1",window.JSCompiler_renameProperty=function(o,r){return o}}();</script><script>!function(){"use strict";function e(e,r){if(e&&t.test(e))return e;if(void 0===n){n=!1;try{var o=new URL("b","http://a");o.pathname="c%20d",n="http://a/c%20d"===o.href}catch(e){}}return r||(r=document.baseURI||window.location.href),n?new URL(e,r).href:(a||((a=document.implementation.createHTMLDocument("temp")).base=a.createElement("base"),a.head.appendChild(a.base),a.anchor=a.createElement("a"),a.body.appendChild(a.anchor)),a.base.href=r,a.anchor.href=e,a.anchor.href||e)}var r=/(url\()([^)]*)(\))/g,t=/(^\/)|(^#)|(^[\w-\d]*:)/,n=void 0,a=void 0;Polymer.ResolveUrl={resolveCss:function(t,n){return t.replace(r,function(r,t,a,o){return t+"'"+e(a.replace(/["']/g,""),n)+"'"+o})},resolveUrl:e,pathFromUrl:function(e){return e.substring(0,e.lastIndexOf("/")+1)}}}();</script><script>!function(){"use strict";var o=Polymer.Settings||{};o.useShadow=!window.ShadyDOM,o.useNativeCSSProperties=Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),o.useNativeCustomElements=!window.customElements.polyfillWrapFlushCallback,Polymer.Settings=o;var e=Polymer.rootPath||Polymer.ResolveUrl.pathFromUrl(document.baseURI||window.location.href);Polymer.rootPath=e,Polymer.setRootPath=function(o){Polymer.rootPath=o}}();</script><script>!function(){"use strict";function i(){}var n=0;i.prototype.__mixinApplications,i.prototype.__mixinSet,Polymer.dedupingMixin=function(i){var t=i.__mixinApplications;t||(t=new WeakMap,i.__mixinApplications=t);var e=n++;return function(n){var r=n.__mixinSet;if(r&&r[e])return n;var _=t,a=_.get(n);a||(a=i(n),_.set(n,a));var o=Object.create(a.__mixinSet||r||null);return o[e]=!0,a.__mixinSet=o,a}}}();</script><script>!function(){"use strict";var e={},a=/-[a-z]/g,r=/([A-Z])/g,n={dashToCamelCase:function(r){return e[r]||(e[r]=r.indexOf("-")<0?r:r.replace(a,function(e){return e[1].toUpperCase()}))},camelToDashCase:function(a){return e[a]||(e[a]=a.replace(r,"-$1").toLowerCase())}};Polymer.CaseMap=n}();</script><script>!function(){"use strict";function e(e){return Polymer.DomModule?Polymer.DomModule.import(e):null}var t={cssFromModules:function(e){for(var t=e.trim().split(" "),r="",o=0;o<t.length;o++)r+=this.cssFromModule(t[o]);return r},cssFromModule:function(t){var r=e(t);if(r&&void 0===r._cssText){var o="",s=r.querySelector("template");s&&(o+=this.cssFromTemplate(s,r.assetpath)),o+=this.cssFromModuleImports(t),r._cssText=o||null}return r||console.warn("Could not find style data in module named",t),r&&r._cssText||""},cssFromTemplate:function(e,t){for(var r="",o=e.content.querySelectorAll("style"),s=0;s<o.length;s++){var l=o[s],n=l.getAttribute("include");n&&(r+=this.cssFromModules(n)),l.parentNode.removeChild(l),r+=t?Polymer.ResolveUrl.resolveCss(l.textContent,t):l.textContent}return r},cssFromModuleImports:function(t){var r="",o=e(t);if(!o)return r;for(var s=o.querySelectorAll("link[rel=import][type~=css]"),l=0;l<s.length;l++){var n=s[l];if(n.import){var u=n.import,m=u.body?u.body:u;r+=Polymer.ResolveUrl.resolveCss(m.textContent,u.baseURI)}}return r}};Polymer.StyleGather=t}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}();!function(){"use strict";function e(e){return r[e]||o[e.toLowerCase()]}function t(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var r={},o={},n=function(n){function s(){return _classCallCheck(this,s),_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return _inherits(s,HTMLElement),_createClass(s,[{key:"attributeChangedCallback",value:function(e,t,r){t!==r&&this.register()}},{key:"register",value:function(e){(e=e||this.id)&&(this.id=e,r[e]=this,o[e.toLowerCase()]=this,t(this))}},{key:"assetpath",get:function(){if(!this.__assetpath){var e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=Polymer.ResolveUrl.resolveUrl(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=Polymer.ResolveUrl.pathFromUrl(t)}return this.__assetpath}}],[{key:"import",value:function(t,r){if(t){var o=e(t);return o&&r?o.querySelector(r):o}return null}},{key:"observedAttributes",get:function(){return["id"]}}]),s}();n.prototype.modules=r,customElements.define("dom-module",n),Polymer.DomModule=n}();</script><script>!function(){"use strict";var t={isPath:function(t){return t.indexOf(".")>=0},root:function(t){var n=t.indexOf(".");return-1===n?t:t.slice(0,n)},isAncestor:function(t,n){return 0===t.indexOf(n+".")},isDescendant:function(t,n){return 0===n.indexOf(t+".")},translate:function(t,n,r){return n+r.slice(t.length)},matches:function(t,n){return t===n||this.isAncestor(t,n)||this.isDescendant(t,n)},normalize:function(t){if(Array.isArray(t)){for(var n=[],r=0;r<t.length;r++)for(var i=t[r].toString().split("."),e=0;e<i.length;e++)n.push(i[e]);return n.join(".")}return t},split:function(t){return Array.isArray(t)?this.normalize(t).split("."):t.toString().split(".")},get:function(t,n,r){for(var i=t,e=this.split(n),s=0;s<e.length;s++){if(!i)return;i=i[e[s]]}return r&&(r.path=e.join(".")),i},set:function(t,n,r){var i=t,e=this.split(n),s=e[e.length-1];if(e.length>1){for(var o=0;o<e.length-1;o++)if(!(i=i[e[o]]))return;i[s]=r}else i[n]=r;return e.join(".")}};t.isDeep=t.isPath,Polymer.Path=t}();</script><script>!function(){"use strict";var n=0,e=0,i=[],t=0,o=document.createTextNode("");new window.MutationObserver(function(){for(var n=i.length,t=0;t<n;t++){var o=i[t];if(o)try{o()}catch(n){setTimeout(function(){throw n})}}i.splice(0,n),e+=n}).observe(o,{characterData:!0}),Polymer.Async={timeOut:{after:function(n){return{run:function(e){return setTimeout(e,n)},cancel:window.clearTimeout.bind(window)}},run:window.setTimeout.bind(window),cancel:window.clearTimeout.bind(window)},animationFrame:{run:window.requestAnimationFrame.bind(window),cancel:window.cancelAnimationFrame.bind(window)},idlePeriod:{run:function(n){return window.requestIdleCallback?window.requestIdleCallback(n):window.setTimeout(n,16)},cancel:function(n){window.cancelIdleCallback?window.cancelIdleCallback(n):window.clearTimeout(n)}},microTask:{run:function(e){return o.textContent=t++,i.push(e),n++},cancel:function(n){var t=n-e;if(t>=0){if(!i[t])throw new Error("invalid async handle: "+n);i[t]=null}}}}}();</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_createClass=function(){function t(t,e){for(var a=0;a<e.length;a++){var i=e[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,a,i){return a&&t(e.prototype,a),i&&t(e,i),e}}();!function(){"use strict";function t(t,e){if(!i[e]){var a=t[e];void 0!==a&&(t.__data?t._setPendingProperty(e,a):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=a))}}for(var e=Polymer.CaseMap,a=Polymer.Async.microTask,i={},r=HTMLElement.prototype;r;){for(var n=Object.getOwnPropertyNames(r),s=0;s<n.length;s++)i[n[s]]=!0;r=Object.getPrototypeOf(r)}Polymer.PropertyAccessors=Polymer.dedupingMixin(function(i){return function(r){function n(){_classCallCheck(this,n);var t=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.__serializing,t.__dataCounter,t.__dataEnabled,t.__dataReady,t.__dataInvalid,t.__data,t.__dataPending,t.__dataOld,t.__dataProto,t.__dataHasAccessor,t.__dataInstanceProps,t._initializeProperties(),t}return _inherits(n,i),_createClass(n,null,[{key:"createPropertiesForAttributes",value:function(){for(var t=this.observedAttributes,a=0;a<t.length;a++)this.prototype._createPropertyAccessor(e.dashToCamelCase(t[a]))}}]),_createClass(n,[{key:"attributeChangedCallback",value:function(t,e,a){e!==a&&this._attributeToProperty(t,a)}},{key:"_initializeProperties",value:function(){this.__serializing=!1,this.__dataCounter=0,this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null);for(var t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}},{key:"_initializeProtoProperties",value:function(t){for(var e in t)this._setProperty(e,t[e])}},{key:"_initializeInstanceProperties",value:function(t){Object.assign(this,t)}},{key:"_ensureAttribute",value:function(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}},{key:"_attributeToProperty",value:function(t,a,i){this.__serializing||(this[e.dashToCamelCase(t)]=this._deserializeValue(a,i))}},{key:"_propertyToAttribute",value:function(t,a,i){this.__serializing=!0,i=arguments.length<3?this[t]:i,this._valueToNodeAttribute(this,i,a||e.camelToDashCase(t)),this.__serializing=!1}},{key:"_valueToNodeAttribute",value:function(t,e,a){var i=this._serializeValue(e);void 0===i?t.removeAttribute(a):t.setAttribute(a,i)}},{key:"_serializeValue",value:function(t){switch(void 0===t?"undefined":_typeof(t)){case"boolean":return t?"":void 0;case"object":if(t instanceof Date)return t.toString();if(t)try{return JSON.stringify(t)}catch(t){return""}default:return null!=t?t.toString():void 0}}},{key:"_deserializeValue",value:function(t,e){var a=void 0;switch(e){case Number:a=Number(t);break;case Boolean:a=null!==t;break;case Object:try{a=JSON.parse(t)}catch(t){}break;case Array:try{a=JSON.parse(t)}catch(e){a=null,console.warn("Polymer::Attributes: couldn't decode Array as JSON: "+t)}break;case Date:a=new Date(t);break;case String:default:a=t}return a}},{key:"_createPropertyAccessor",value:function(e,a){this.hasOwnProperty("__dataHasAccessor")||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[e]||(this.__dataHasAccessor[e]=!0,t(this,e),Object.defineProperty(this,e,{get:function(){return this.__data[e]},set:a?function(){}:function(t){this._setProperty(e,t)}}))}},{key:"_hasAccessor",value:function(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}},{key:"_setProperty",value:function(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}},{key:"_setPendingProperty",value:function(t,e){var a=this.__data[t],i=this._shouldPropertyChange(t,e,a);return i&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),!this.__dataOld||t in this.__dataOld||(this.__dataOld[t]=a),this.__data[t]=e,this.__dataPending[t]=e),i}},{key:"_isPropertyPending",value:function(t){return Boolean(this.__dataPending&&t in this.__dataPending)}},{key:"_invalidateProperties",value:function(){var t=this;!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,a.run(function(){t.__dataInvalid&&(t.__dataInvalid=!1,t._flushProperties())}))}},{key:"_enableProperties",value:function(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}},{key:"_flushProperties",value:function(){if(this.__dataPending&&this.__dataOld){var t=this.__dataPending;this.__dataPending=null,this.__dataCounter++,this._propertiesChanged(this.__data,t,this.__dataOld),this.__dataCounter--}}},{key:"ready",value:function(){this.__dataReady=!0,this._flushProperties()}},{key:"_propertiesChanged",value:function(t,e,a){}},{key:"_shouldPropertyChange",value:function(t,e,a){return a!==e&&(a===a||e===e)}}]),n}()})}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();!function(){"use strict";function e(e){var t=e.getAttribute("is");if(t&&i[t]){var n=e;for(n.removeAttribute("is"),e=n.ownerDocument.createElement(t),n.parentNode.replaceChild(e,n),e.appendChild(n);n.attributes.length;)e.setAttribute(n.attributes[0].name,n.attributes[0].value),n.removeAttribute(n.attributes[0].name)}return e}function t(e,n){var r=n.parentInfo&&t(e,n.parentInfo);if(!r)return e;for(var o=r.firstChild,a=0;o;o=o.nextSibling)if(n.parentIndex===a++)return o}function n(e,t,n,r){r.id&&(t[r.id]=n)}function r(e,t,n){if(n.events&&n.events.length)for(var r,o=0,a=n.events;o<a.length&&(r=a[o]);o++)e._addMethodEventListenerToNode(t,r.name,r.value,e)}function o(e,t,n){n.templateInfo&&(t._templateInfo=n.templateInfo)}function a(e,t,n){e=e._methodHost||e;return function(t){e[n]?e[n](t,t.detail):console.warn("listener method `"+n+"` not defined")}}var i={"dom-if":!0,"dom-repeat":!0};Polymer.TemplateStamp=Polymer.dedupingMixin(function(i){return function(s){function l(){return _classCallCheck(this,l),_possibleConstructorReturn(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}return _inherits(l,i),_createClass(l,[{key:"_stampTemplate",value:function(e){e&&!e.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e);var a=this.constructor._parseTemplate(e),i=a.nodeInfoList,s=a.content||e.content,l=document.importNode(s,!0);l.__noInsertionPoint=!a.hasInsertionPoint;var u=l.nodeList=new Array(i.length);l.$={};for(var p,c=0,f=i.length;c<f&&(p=i[c]);c++){var d=u[c]=t(l,p);n(0,l.$,d,p),o(0,d,p),r(this,d,p)}return l}},{key:"_addMethodEventListenerToNode",value:function(e,t,n,r){var o=a(r=r||e,0,n);return this._addEventListenerToNode(e,t,o),o}},{key:"_addEventListenerToNode",value:function(e,t,n){e.addEventListener(t,n)}},{key:"_removeEventListenerFromNode",value:function(e,t,n){e.removeEventListener(t,n)}}],[{key:"_parseTemplate",value:function(e,t){if(!e._templateInfo){var n=e._templateInfo={};n.nodeInfoList=[],n.stripWhiteSpace=t&&t.stripWhiteSpace||e.hasAttribute("strip-whitespace"),this._parseTemplateContent(e,n,{parent:null})}return e._templateInfo}},{key:"_parseTemplateContent",value:function(e,t,n){return this._parseTemplateNode(e.content,t,n)}},{key:"_parseTemplateNode",value:function(e,t,n){var r=void 0,o=e;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(t.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(o,t,n)||r,o.firstChild&&(r=this._parseTemplateChildNodes(o,t,n)||r),o.hasAttributes&&o.hasAttributes()&&(r=this._parseTemplateNodeAttributes(o,t,n)||r),r}},{key:"_parseTemplateChildNodes",value:function(t,n,r){for(var o,a=t.firstChild,i=0;a;a=o){if("template"==a.localName&&(a=e(a)),o=a.nextSibling,a.nodeType===Node.TEXT_NODE){for(var s=o;s&&s.nodeType===Node.TEXT_NODE;)a.textContent+=s.textContent,o=s.nextSibling,t.removeChild(s),s=o;if(n.stripWhiteSpace&&!a.textContent.trim()){t.removeChild(a);continue}}var l={parentIndex:i,parentInfo:r};this._parseTemplateNode(a,n,l)&&(l.infoIndex=n.nodeInfoList.push(l)-1),a.parentNode&&i++}}},{key:"_parseTemplateNestedTemplate",value:function(e,t,n){var r=this._parseTemplate(e,t);return(r.content=e.content.ownerDocument.createDocumentFragment()).appendChild(e.content),n.templateInfo=r,!0}},{key:"_parseTemplateNodeAttributes",value:function(e,t,n){for(var r,o=!1,a=Array.from(e.attributes),i=a.length-1;r=a[i];i--)o=this._parseTemplateNodeAttribute(e,t,n,r.name,r.value)||o;return o}},{key:"_parseTemplateNodeAttribute",value:function(e,t,n,r,o){return"on-"===r.slice(0,3)?(e.removeAttribute(r),n.events=n.events||[],n.events.push({name:r.slice(3),value:o}),!0):"id"===r&&(n.id=o,!0)}},{key:"_contentForTemplate",value:function(e){var t=e._templateInfo;return t&&t.content||e.content}}]),l}()})}();</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var a=0;a<e.length;a++){var r=e[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,a,r){return a&&t(e.prototype,a),r&&t(e,r),e}}(),_get=function t(e,a,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,a);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,a,r)}if("value"in n)return n.value;var o=n.get;if(void 0!==o)return o.call(r)},_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){"use strict";function t(t,e){var a=t[e];if(a){if(!t.hasOwnProperty(e)){a=t[e]=Object.create(t[e]);for(var r in a)for(var n=a[r],i=a[r]=Array(n.length),o=0;o<n.length;o++)i[o]=n[o]}}else a=t[e]={};return a}function e(t,e,r,n,i,o){if(e){var s=!1,l=D++;for(var _ in r)a(t,e,l,_,r,n,i,o)&&(s=!0);return s}return!1}function a(t,e,a,n,i,o,s,l){var _=!1,h=e[s?Polymer.Path.root(n):n];if(h)for(var u,d=0,f=h.length;d<f&&(u=h[d]);d++)u.info&&u.info.lastRun===a||s&&!r(n,u.trigger)||(u.info&&(u.info.lastRun=a),u.fn(t,n,i,o,u.info,s,l),_=!0);return _}function r(t,e){if(e){var a=e.name;return a==t||e.structured&&Polymer.Path.isAncestor(a,t)||e.wildcard&&Polymer.Path.isDescendant(a,t)}return!0}function n(t,e,a,r,n){var i=t[n.methodName],o=n.property;i?i.call(t,t.__data[o],r[o]):n.dynamicFn||console.warn("observer method `"+n.methodName+"` not defined")}function i(t,e,r,n,i){var s=t[H.NOTIFY],l=void 0,_=D++;for(var h in e)e[h]&&(s&&a(t,s,_,h,r,n,i)?l=!0:i&&o(t,h,r)&&(l=!0));var u=void 0;l&&(u=t.__dataHost)&&u._invalidateProperties&&u._invalidateProperties()}function o(t,e,a){var r=Polymer.Path.root(e);return r!==e&&(s(t,Polymer.CaseMap.camelToDashCase(r)+"-changed",a[e],e),!0)}function s(t,e,a,r){var n={value:a,queueProperty:!0};r&&(n.path=r),t.dispatchEvent(new CustomEvent(e,{detail:n}))}function l(t,e,a,r,n,i){var o=(i?Polymer.Path.root(e):e)!=e?e:null,l=o?Polymer.Path.get(t,o):t.__data[e];o&&void 0===l&&(l=a[e]),s(t,n.eventName,l,o)}function _(t,e,a,r,n){var i=void 0,o=t.detail,s=o&&o.path;s?(r=Polymer.Path.translate(a,r,s),i=o&&o.value):i=t.target[a],i=n?!i:i,e[H.READ_ONLY]&&e[H.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,i,!0,Boolean(s))||o&&o.queueProperty||e._invalidateProperties()}function h(t,e,a,r,n){var i=t.__data[e];Polymer.sanitizeDOMValue&&(i=Polymer.sanitizeDOMValue(i,n.attrName,"attribute",t)),t._propertyToAttribute(e,n.attrName,i)}function u(t,a,r,n){var i=t[H.COMPUTE];if(i)for(var o=a;e(t,i,o,r,n);)Object.assign(r,t.__dataOld),Object.assign(a,t.__dataPending),o=t.__dataPending,t.__dataPending=null}function d(t,e,a,r,n){var i=k(t,e,a,r,n),o=n.methodInfo;t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,i,!0):t[o]=i}function f(t,e,a){var r=t.__dataLinkedPaths;if(r){var n=void 0;for(var i in r){var o=r[i];Polymer.Path.isDescendant(i,e)?(n=Polymer.Path.translate(i,o,e),t._setPendingPropertyOrPath(n,a,!0,!0)):Polymer.Path.isDescendant(o,e)&&(n=Polymer.Path.translate(o,i,e),t._setPendingPropertyOrPath(n,a,!0,!0))}}}function p(t,e,a,r,n,i,o){a.bindings=a.bindings||[];var s={kind:r,target:n,parts:i,literal:o,isCompound:1!==i.length};if(a.bindings.push(s),g(s)){var l=s.parts[0],_=l.event,h=l.negate;s.listenerEvent=_||w.camelToDashCase(n)+"-changed",s.listenerNegate=h}for(var u=e.nodeInfoList.length,d=0;d<s.parts.length;d++){var f=s.parts[d];f.compoundIndex=d,c(t,e,s,f,u)}}function c(t,e,a,r,n){if(!r.literal)if("attribute"===a.kind&&"-"===a.target[0])console.warn("Cannot set attribute "+a.target+' because "-" is not a valid attribute starting character');else for(var i=r.dependencies,o={index:n,binding:a,part:r,evaluator:t},s=0;s<i.length;s++){var l=i[s];"string"==typeof l&&((l=A(l)).wildcard=!0),t._addTemplatePropertyEffect(e,l.rootProperty,{fn:y,info:o,trigger:l})}}function y(t,e,a,r,n,i,o){var s=o[n.index],l=n.binding,_=n.part;if(i&&_.source&&e.length>_.source.length&&"property"==l.kind&&!l.isCompound&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){var h=a[e];e=Polymer.Path.translate(_.source,l.target,e),s._setPendingPropertyOrPath(e,h,!1,!0)&&t._enqueueClient(s)}else P(t,s,l,_,n.evaluator._evaluateBinding(t,_,e,a,r,i))}function P(t,e,a,r,n){if(n=v(e,n,a,r),Polymer.sanitizeDOMValue&&(n=Polymer.sanitizeDOMValue(n,a.target,a.kind,e)),"attribute"==a.kind)t._valueToNodeAttribute(e,n,a.target);else{var i=a.target;e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[H.READ_ONLY]&&e[H.READ_ONLY][i]||e._setPendingProperty(i,n)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,n)}}function v(t,e,a,r){if(a.isCompound){var n=t.__dataCompoundStorage[a.target];n[r.compoundIndex]=e,e=n.join("")}return"attribute"!==a.kind&&("textContent"===a.target||"input"==t.localName&&"value"==a.target)&&(e=void 0==e?"":e),e}function g(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}function m(t,e){var a=e.nodeList,r=e.nodeInfoList;if(r.length)for(var n=0;n<r.length;n++){var i=r[n],o=a[n],s=i.bindings;if(s)for(var l=0;l<s.length;l++){var _=s[l];O(o,_),b(o,t,_)}o.__dataHost=t}}function O(t,e){if(e.isCompound){for(var a=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,n=new Array(r.length),i=0;i<r.length;i++)n[i]=r[i].literal;var o=e.target;a[o]=n,e.literal&&"property"==e.kind&&(t[o]=e.literal)}}function b(t,e,a){if(a.listenerEvent){var r=a.parts[0];t.addEventListener(a.listenerEvent,function(t){_(t,e,a.target,r.source,r.negate)})}}function E(t,e,a,r,n,i){i=e.static||i&&("object"!==(void 0===i?"undefined":_typeof(i))||i[e.methodName]);for(var o,s={methodName:e.methodName,args:e.args,methodInfo:n,dynamicFn:i},l=0;l<e.args.length&&(o=e.args[l]);l++)o.literal||t._addPropertyEffect(o.rootProperty,a,{fn:r,info:s,trigger:o});i&&t._addPropertyEffect(e.methodName,a,{fn:r,info:s})}function k(t,e,a,r,n){var i=t._methodHost||t,o=i[n.methodName];if(o){var s=R(t.__data,n.args,e,a);return o.apply(i,s)}n.dynamicFn||console.warn("method `"+n.methodName+"` not defined")}function C(t){for(var e="",a=0;a<t.length;a++)e+=t[a].literal||"";return e}function T(t){var e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){var a={methodName:e[1],static:!0,args:S};return e[2].trim()?N(e[2].replace(/\\,/g,"&comma;").split(","),a):a}return null}function N(t,e){return e.args=t.map(function(t){var a=A(t);return a.literal||(e.static=!1),a},this),e}function A(t){var e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),a={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){case"'":case'"':a.value=e.slice(1,-1),a.literal=!0;break;case"#":a.value=Number(e),a.literal=!0}return a.literal||(a.rootProperty=Polymer.Path.root(e),a.structured=Polymer.Path.isPath(e),a.structured&&(a.wildcard=".*"==e.slice(-2),a.wildcard&&(a.name=e.slice(0,-2)))),a}function R(t,e,a,r){for(var n=[],i=0,o=e.length;i<o;i++){var s=e[i],l=s.name,_=void 0;if(s.literal?_=s.value:s.structured?void 0===(_=Polymer.Path.get(t,l))&&(_=r[l]):_=t[l],s.wildcard){var h=0===l.indexOf(a+"."),u=0===a.indexOf(l)&&!h;n[i]={path:u?a:l,value:u?r[a]:_,base:_}}else n[i]=_}return n}function I(t,e,a,r){var n=a+".splices";t.notifyPath(n,{indexSplices:r}),t.notifyPath(a+".length",e.length),t.__data[n]={indexSplices:null}}function L(t,e,a,r,n,i){I(t,e,a,[{index:r,addedCount:n,removed:i,object:e,type:"splice"}])}function x(t){return t[0].toUpperCase()+t.substring(1)}var w=Polymer.CaseMap,D=0,H={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},j=void 0,S=[],F=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");Polymer.PropertyEffects=Polymer.dedupingMixin(function(a){var r=Polymer.TemplateStamp(Polymer.PropertyAccessors(a)),o=function(a){function o(){_classCallCheck(this,o);var t=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return t.__dataClientsReady,t.__dataPendingClients,t.__dataToNotify,t.__dataLinkedPaths,t.__dataHasPaths,t.__dataCompoundStorage,t.__dataHost,t.__dataTemp,t.__dataClientsInitialized,t.__data,t.__dataPending,t.__dataOld,t.__computeEffects,t.__reflectEffects,t.__notifyEffects,t.__propagateEffects,t.__observeEffects,t.__readOnly,t.__dataCounter,t.__templateInfo,t}return _inherits(o,r),_createClass(o,[{key:"_initializeProperties",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_initializeProperties",this).call(this),Y.registerHost(this),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}},{key:"_initializeProtoProperties",value:function(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}},{key:"_initializeInstanceProperties",value:function(t){var e=this[H.READ_ONLY];for(var a in t)e&&e[a]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[a]=this.__dataPending[a]=t[a])}},{key:"_addPropertyEffect",value:function(e,a,r){this._createPropertyAccessor(e,a==H.READ_ONLY);var n=t(this,a)[e];n||(n=this[a][e]=[]),n.push(r)}},{key:"_removePropertyEffect",value:function(e,a,r){var n=t(this,a)[e],i=n.indexOf(r);i>=0&&n.splice(i,1)}},{key:"_hasPropertyEffect",value:function(t,e){var a=this[e];return Boolean(a&&a[t])}},{key:"_hasReadOnlyEffect",value:function(t){return this._hasPropertyEffect(t,H.READ_ONLY)}},{key:"_hasNotifyEffect",value:function(t){return this._hasPropertyEffect(t,H.NOTIFY)}},{key:"_hasReflectEffect",value:function(t){return this._hasPropertyEffect(t,H.REFLECT)}},{key:"_hasComputedEffect",value:function(t){return this._hasPropertyEffect(t,H.COMPUTE)}},{key:"_setPendingPropertyOrPath",value:function(t,e,a,r){if(r||Polymer.Path.root(Array.isArray(t)?t[0]:t)!==t){if(!r){var n=Polymer.Path.get(this,t);if(!(t=Polymer.Path.set(this,t,e))||!_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_shouldPropertyChange",this).call(this,t,e,n))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,a))return f(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,a);this[t]=e}return!1}},{key:"_setUnmanagedPropertyToNode",value:function(t,e,a){a===t[e]&&"object"!=(void 0===a?"undefined":_typeof(a))||(t[e]=a)}},{key:"_setPendingProperty",value:function(t,e,a){var r=this.__dataHasPaths&&Polymer.Path.isPath(t),n=r?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,n[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[H.NOTIFY]&&this[H.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=a),!0)}},{key:"_setProperty",value:function(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}},{key:"_invalidateProperties",value:function(){this.__dataReady&&this._flushProperties()}},{key:"_enqueueClient",value:function(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}},{key:"_flushClients",value:function(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}},{key:"__enableOrFlushClients",value:function(){var t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(var e=0;e<t.length;e++){var a=t[e];a.__dataEnabled?a.__dataPending&&a._flushProperties():a._enableProperties()}}}},{key:"_readyClients",value:function(){this.__enableOrFlushClients()}},{key:"setProperties",value:function(t,e){for(var a in t)!e&&this[H.READ_ONLY]&&this[H.READ_ONLY][a]||this._setPendingPropertyOrPath(a,t[a],!0);this._invalidateProperties()}},{key:"ready",value:function(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}},{key:"_propertiesChanged",value:function(t,a,r){var n=this.__dataHasPaths;this.__dataHasPaths=!1,u(this,a,r,n);var o=this.__dataToNotify;this.__dataToNotify=null,this._propagatePropertyChanges(a,r,n),this._flushClients(),e(this,this[H.REFLECT],a,r,n),e(this,this[H.OBSERVE],a,r,n),o&&i(this,o,a,r,n),1==this.__dataCounter&&(this.__dataTemp={})}},{key:"_propagatePropertyChanges",value:function(t,a,r){this[H.PROPAGATE]&&e(this,this[H.PROPAGATE],t,a,r);for(var n=this.__templateInfo;n;)e(this,n.propertyEffects,t,a,r,n.nodeList),n=n.nextTemplateInfo}},{key:"linkPaths",value:function(t,e){t=Polymer.Path.normalize(t),e=Polymer.Path.normalize(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}},{key:"unlinkPaths",value:function(t){t=Polymer.Path.normalize(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}},{key:"notifySplices",value:function(t,e){var a={path:""};I(this,Polymer.Path.get(this,t,a),a.path,e)}},{key:"get",value:function(t,e){return Polymer.Path.get(e||this,t)}},{key:"set",value:function(t,e,a){a?Polymer.Path.set(a,t,e):this[H.READ_ONLY]&&this[H.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}},{key:"push",value:function(t){for(var e={path:""},a=Polymer.Path.get(this,t,e),r=a.length,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var s=a.push.apply(a,i);return i.length&&L(this,a,e.path,r,i.length,[]),s}},{key:"pop",value:function(t){var e={path:""},a=Polymer.Path.get(this,t,e),r=Boolean(a.length),n=a.pop();return r&&L(this,a,e.path,a.length,0,[n]),n}},{key:"splice",value:function(t,e,a){var r={path:""},n=Polymer.Path.get(this,t,r);(e=e<0?n.length-Math.floor(-e):Math.floor(e))||(e=0);for(var i=arguments.length,o=Array(i>3?i-3:0),s=3;s<i;s++)o[s-3]=arguments[s];var l=n.splice.apply(n,[e,a].concat(o));return(o.length||l.length)&&L(this,n,r.path,e,o.length,l),l}},{key:"shift",value:function(t){var e={path:""},a=Polymer.Path.get(this,t,e),r=Boolean(a.length),n=a.shift();return r&&L(this,a,e.path,0,0,[n]),n}},{key:"unshift",value:function(t){for(var e={path:""},a=Polymer.Path.get(this,t,e),r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];var o=a.unshift.apply(a,n);return n.length&&L(this,a,e.path,0,n.length,[]),o}},{key:"notifyPath",value:function(t,e){var a=void 0;if(1==arguments.length){var r={path:""};e=Polymer.Path.get(this,t,r),a=r.path}else a=Array.isArray(t)?Polymer.Path.normalize(t):t;this._setPendingPropertyOrPath(a,e,!0,!0)&&this._invalidateProperties()}},{key:"_createReadOnlyProperty",value:function(t,e){this._addPropertyEffect(t,H.READ_ONLY),e&&(this["_set"+x(t)]=function(e){this._setProperty(t,e)})}},{key:"_createPropertyObserver",value:function(t,e,a){var r={property:t,methodName:e,dynamicFn:Boolean(a)};this._addPropertyEffect(t,H.OBSERVE,{fn:n,info:r,trigger:{name:t}}),a&&this._addPropertyEffect(e,H.OBSERVE,{fn:n,info:r,trigger:{name:e}})}},{key:"_createMethodObserver",value:function(t,e){var a=T(t);if(!a)throw new Error("Malformed observer expression '"+t+"'");E(this,a,H.OBSERVE,k,null,e)}},{key:"_createNotifyingProperty",value:function(t){this._addPropertyEffect(t,H.NOTIFY,{fn:l,info:{eventName:w.camelToDashCase(t)+"-changed",property:t}})}},{key:"_createReflectedProperty",value:function(t){var e=w.camelToDashCase(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property thisead.'):this._addPropertyEffect(t,H.REFLECT,{fn:h,info:{attrName:e}})}},{key:"_createComputedProperty",value:function(t,e,a){var r=T(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");E(this,r,H.COMPUTE,d,t,a)}},{key:"_bindTemplate",value:function(t,e){var a=this.constructor._parseTemplate(t),r=this.__templateInfo==a;if(!r)for(var n in a.propertyEffects)this._createPropertyAccessor(n);if(e&&(a=Object.create(a),a.wasPreBound=r,!r&&this.__templateInfo)){var i=this.__templateInfoLast||this.__templateInfo;return this.__templateInfoLast=i.nextTemplateInfo=a,a.previousTemplateInfo=i,a}return this.__templateInfo=a}},{key:"_stampTemplate",value:function(t){Y.beginHosting(this);var a=_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_stampTemplate",this).call(this,t);Y.endHosting(this);var r=this._bindTemplate(t,!0);if(r.nodeList=a.nodeList,!r.wasPreBound)for(var n=r.childNodes=[],i=a.firstChild;i;i=i.nextSibling)n.push(i);return a.templateInfo=r,m(this,r),this.__dataReady&&e(this,r.propertyEffects,this.__data,null,!1,r.nodeList),a}},{key:"_removeBoundDom",value:function(t){var e=t.templateInfo;e.previousTemplateInfo&&(e.previousTemplateInfo.nextTemplateInfo=e.nextTemplateInfo),e.nextTemplateInfo&&(e.nextTemplateInfo.previousTemplateInfo=e.previousTemplateInfo),this.__templateInfoLast==e&&(this.__templateInfoLast=e.previousTemplateInfo),e.previousTemplateInfo=e.nextTemplateInfo=null;for(var a=e.childNodes,r=0;r<a.length;r++){var n=a[r];n.parentNode.removeChild(n)}}},{key:"PROPERTY_EFFECT_TYPES",get:function(){return H}}],[{key:"addPropertyEffect",value:function(t,e,a){this.prototype._addPropertyEffect(t,e,a)}},{key:"createPropertyObserver",value:function(t,e,a){this.prototype._createPropertyObserver(t,e,a)}},{key:"createMethodObserver",value:function(t,e){this.prototype._createMethodObserver(t,e)}},{key:"createNotifyingProperty",value:function(t){this.prototype._createNotifyingProperty(t)}},{key:"createReadOnlyProperty",value:function(t,e){this.prototype._createReadOnlyProperty(t,e)}},{key:"createReflectedProperty",value:function(t){this.prototype._createReflectedProperty(t)}},{key:"createComputedProperty",value:function(t,e,a){this.prototype._createComputedProperty(t,e,a)}},{key:"bindTemplate",value:function(t){return this.prototype._bindTemplate(t)}},{key:"_addTemplatePropertyEffect",value:function(t,e,a){(t.hostProps=t.hostProps||{})[e]=!0;var r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(a)}},{key:"_parseTemplateNode",value:function(t,e,a){var r=_get(o.__proto__||Object.getPrototypeOf(o),"_parseTemplateNode",this).call(this,t,e,a);if(t.nodeType===Node.TEXT_NODE){var n=this._parseBindings(t.textContent,e);n&&(t.textContent=C(n)||" ",p(this,e,a,"text","textContent",n),r=!0)}return r}},{key:"_parseTemplateNodeAttribute",value:function(t,e,a,r,n){var i=this._parseBindings(n,e);if(i){var s=r,l="property";"$"==r[r.length-1]&&(r=r.slice(0,-1),l="attribute");var _=C(i);return _&&"attribute"==l&&t.setAttribute(r,_),"input"===t.localName&&"value"===s&&t.setAttribute(s,""),t.removeAttribute(s),"property"===l&&(r=Polymer.CaseMap.dashToCamelCase(r)),p(this,e,a,l,r,i,_),!0}return _get(o.__proto__||Object.getPrototypeOf(o),"_parseTemplateNodeAttribute",this).call(this,t,e,a,r,n)}},{key:"_parseTemplateNestedTemplate",value:function(t,e,a){var r=_get(o.__proto__||Object.getPrototypeOf(o),"_parseTemplateNestedTemplate",this).call(this,t,e,a),n=a.templateInfo.hostProps;for(var i in n)p(this,e,a,"property","_host_"+i,[{mode:"{",source:i,dependencies:[i]}]);return r}},{key:"_parseBindings",value:function(t,e){for(var a=[],r=0,n=void 0;null!==(n=F.exec(t));){n.index>r&&a.push({literal:t.slice(r,n.index)});var i=n[1][0],o=Boolean(n[2]),s=n[3].trim(),l=!1,_="",h=-1;"{"==i&&(h=s.indexOf("::"))>0&&(_=s.substring(h+2),s=s.substring(0,h),l=!0);var u=T(s),d=[];if(u){for(var f=u.args,p=u.methodName,c=0;c<f.length;c++){var y=f[c];y.literal||d.push(y)}var P=e.dynamicFns;(P&&P[p]||u.static)&&(d.push(p),u.dynamicFn=!0)}else d.push(s);a.push({source:s,mode:i,negate:o,customEvent:l,signature:u,dependencies:d,event:_}),r=F.lastIndex}if(r&&r<t.length){var v=t.substring(r);v&&a.push({literal:v})}return a.length?a:null}},{key:"_evaluateBinding",value:function(t,e,a,r,n,i){var o=void 0;return o=e.signature?k(t,a,r,0,e.signature):a!=e.source?Polymer.Path.get(t,e.source):i&&Polymer.Path.isPath(a)?Polymer.Path.get(t,a):t.__data[a],e.negate&&(o=!o),o}}]),o}();return j=o,o});var Y={stack:[],registerHost:function(t){this.stack.length&&this.stack[this.stack.length-1]._enqueueClient(t)},beginHosting:function(t){this.stack.push(t)},endHosting:function(t){var e=this.stack.length;e&&this.stack[e-1]==t&&this.stack.pop()}}}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_get=function e(t,r,o){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,r);if(void 0===i){var n=Object.getPrototypeOf(t);return null===n?void 0:e(n,r,o)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(o)};!function(){"use strict";Polymer.ElementMixin=Polymer.dedupingMixin(function(e){function t(e){return e.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",e))||(e.__ownProperties=e.hasOwnProperty(JSCompiler_renameProperty("properties",e))?e.properties:{}),e.__ownProperties}function r(e){return e.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",e))||(e.__ownObservers=e.hasOwnProperty(JSCompiler_renameProperty("observers",e))?e.observers:[]),e.__ownObservers}function o(e,t){for(var r in t){var o=t[r];"function"==typeof o&&(o={type:o}),e[r]=o}return e}function i(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__classProperties",e))){e.__classProperties=o({},t(e));var r=Object.getPrototypeOf(e.prototype).constructor;r.prototype instanceof f&&(e.__classProperties=Object.assign(Object.create(i(r)),e.__classProperties))}return e.__classProperties}function n(e){if(!e.hasOwnProperty(JSCompiler_renameProperty("__classPropertyDefaults",e))){e.__classPropertyDefaults=null;var t=i(e);for(var r in t){var o=t[r];"value"in o&&(e.__classPropertyDefaults=e.__classPropertyDefaults||{},e.__classPropertyDefaults[r]=o)}}return e.__classPropertyDefaults}function s(e){return e.hasOwnProperty(JSCompiler_renameProperty("__finalized",e))}function a(e){var t=e.prototype,r=Object.getPrototypeOf(t).constructor;r.prototype instanceof f&&r.finalize(),l(e)}function l(e){e.__finalized=!0;var o=e.prototype;e.hasOwnProperty(JSCompiler_renameProperty("is",e))&&e.is&&Polymer.telemetry.register(o);var i=t(e);i&&p(o,i);var n=r(e);n&&c(o,n,i);var s=e.template;if(s){if("string"==typeof s){var a=document.createElement("template");a.innerHTML=s,s=a}else s=s.cloneNode(!0);o._template=s}}function p(e,t){for(var r in t)y(e,r,t[r],t)}function c(e,t,r){for(var o=0;o<t.length;o++)e._createMethodObserver(t[o],r)}function y(e,t,r,o){r.computed&&(r.readOnly=!0),r.computed&&!e._hasReadOnlyEffect(t)&&e._createComputedProperty(t,r.computed,o),r.readOnly&&!e._hasReadOnlyEffect(t)&&e._createReadOnlyProperty(t,!r.computed),r.reflectToAttribute&&!e._hasReflectEffect(t)&&e._createReflectedProperty(t),r.notify&&!e._hasNotifyEffect(t)&&e._createNotifyingProperty(t),r.observer&&e._createPropertyObserver(t,r.observer,o[r.observer])}function h(e,t,r,o,i){var n=Polymer.StyleGather.cssFromTemplate(t,r)+Polymer.StyleGather.cssFromModuleImports(o);if(n){var s=document.createElement("style");s.textContent=n,t.content.insertBefore(s,t.content.firstChild)}window.ShadyCSS&&window.ShadyCSS.prepareTemplate(t,o,i),e._bindTemplate(t)}var u=Polymer.PropertyEffects(e),_=Polymer.CaseMap,f=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,u),_createClass(t,[{key:"_initializeProperties",value:function(){Polymer.telemetry.instanceCount++,this.constructor.finalize();var e=this.constructor.importPath;if(this._template&&!this._template.__polymerFinalized){this._template.__polymerFinalized=!0;var r=e?Polymer.ResolveUrl.resolveUrl(e):"";h(this.__proto__,this._template,r,this.localName)}_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_initializeProperties",this).call(this),this.rootPath=Polymer.rootPath,this.importPath=e;var o=n(this.constructor);if(o)for(var i in o){var s=o[i];if(!this.hasOwnProperty(i)){var a="function"==typeof s.value?s.value.call(this):s.value;this._hasAccessor(i)?this._setPendingProperty(i,a,!0):this[i]=a}}}},{key:"connectedCallback",value:function(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),this._enableProperties()}},{key:"disconnectedCallback",value:function(){}},{key:"ready",value:function(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this)}},{key:"_readyClients",value:function(){this._template&&(this.root=this._attachDom(this.root)),_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"_readyClients",this).call(this)}},{key:"_attachDom",value:function(e){if(this.attachShadow)return e?(this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(e),this.shadowRoot):null;throw new Error("ShadowDOM not available. Polymer.Element can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}},{key:"attributeChangedCallback",value:function(e,t,r){if(t!==r){var o=_.dashToCamelCase(e),n=i(this.constructor)[o].type;this._hasReadOnlyEffect(o)||this._attributeToProperty(e,r,n)}}},{key:"updateStyles",value:function(e){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,e)}},{key:"resolveUrl",value:function(e,t){return!t&&this.importPath&&(t=Polymer.ResolveUrl.resolveUrl(this.importPath)),Polymer.ResolveUrl.resolveUrl(e,t)}}],[{key:"finalize",value:function(){s(this)||a(this)}},{key:"_parseTemplateContent",value:function(e,r,o){return r.dynamicFns=r.dynamicFns||i(this),_get(t.__proto__||Object.getPrototypeOf(t),"_parseTemplateContent",this).call(this,e,r,o)}},{key:"observedAttributes",get:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){var e=[],t=i(this);for(var r in t)e.push(Polymer.CaseMap.camelToDashCase(r));this.__observedAttributes=e}return this.__observedAttributes}},{key:"template",get:function(){return this.hasOwnProperty(JSCompiler_renameProperty("_template",this))||(this._template=Polymer.DomModule&&Polymer.DomModule.import(this.is,"template")||Object.getPrototypeOf(this.prototype).constructor.template),this._template}},{key:"importPath",get:function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){var e=Polymer.DomModule&&Polymer.DomModule.import(this.is);this._importPath=e?e.assetpath:Object.getPrototypeOf(this.prototype).constructor.importPath}return this._importPath}}]),t}();return f}),Polymer.telemetry={instanceCount:0,registrations:[],_regLog:function(e){console.log("["+e.is+"]: registered")},register:function(e){this.registrations.push(e),Polymer.log&&this._regLog(e)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}},Polymer.updateStyles=function(e){window.ShadyCSS&&window.ShadyCSS.styleDocument(e)}}();</script><script>!function(){"use strict";var e=Polymer.ElementMixin(HTMLElement);Polymer.Element=e}();</script><style>@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Thin.ttf") format("truetype");font-weight:100;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-ThinItalic.ttf") format("truetype");font-weight:100;font-style:italic;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Light.ttf") format("truetype");font-weight:300;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-LightItalic.ttf") format("truetype");font-weight:300;font-style:italic;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Regular.ttf") format("truetype");font-weight:400;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Italic.ttf") format("truetype");font-weight:400;font-style:italic;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Medium.ttf") format("truetype");font-weight:500;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-MediumItalic.ttf") format("truetype");font-weight:500;font-style:italic;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Bold.ttf") format("truetype");font-weight:700;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-BoldItalic.ttf") format("truetype");font-weight:700;font-style:italic;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-Black.ttf") format("truetype");font-weight:900;font-style:normal;}@font-face{font-family:"Roboto";src:url("/static/fonts/roboto/Roboto-BlackItalic.ttf") format("truetype");font-weight:900;font-style:italic;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Thin.ttf") format("truetype");font-weight:100;font-style:normal;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-ThinItalic.ttf") format("truetype");font-weight:100;font-style:italic;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Light.ttf") format("truetype");font-weight:300;font-style:normal;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-LightItalic.ttf") format("truetype");font-weight:300;font-style:italic;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Regular.ttf") format("truetype");font-weight:400;font-style:normal;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Italic.ttf") format("truetype");font-weight:400;font-style:italic;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Medium.ttf") format("truetype");font-weight:500;font-style:normal;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-MediumItalic.ttf") format("truetype");font-weight:500;font-style:italic;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-Bold.ttf") format("truetype");font-weight:700;font-style:normal;}@font-face{font-family:"Roboto Mono";src:url("/static/fonts/robotomono/RobotoMono-BoldItalic.ttf") format("truetype");font-weight:700;font-style:italic;}</style><script>(function(){"use strict";function t(){this.end=this.start=0,this.rules=this.parent=this.previous=null,this.cssText=this.parsedCssText="",this.atRule=!1,this.type=0,this.parsedSelector=this.selector=this.keyframesName=""}function e(e){var r=n,i=e=e.replace(N,"").replace(j,""),o=new t;o.start=0,o.end=i.length;for(var s=o,a=0,l=i.length;a<l;a++)if("{"===i[a]){s.rules||(s.rules=[]);var u=s,p=u.rules[u.rules.length-1]||null;(s=new t).start=a+1,s.parent=u,s.previous=p,u.rules.push(s)}else"}"===i[a]&&(s.end=a+1,s=s.parent||o);return r(o,e)}function n(t,e){var i=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=i.trim(),t.parent&&(i=e.substring(t.previous?t.previous.end:t.parent.start,t.start-1),i=r(i),i=i.replace(M," "),i=i.substring(i.lastIndexOf(";")+1),i=t.parsedSelector=t.selector=i.trim(),t.atRule=0===i.indexOf("@"),t.atRule?0===i.indexOf("@media")?t.type=R:i.match(P)&&(t.type=O,t.keyframesName=t.selector.split(M).pop()):t.type=0===i.indexOf("--")?A:T),i=t.rules)for(var o,s=0,a=i.length;s<a&&(o=i[s]);s++)n(o,e);return t}function r(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,function(t,e){for(e=6-(t=e).length;e--;)t="0"+t;return"\\"+t})}function i(t,e,n){n=void 0===n?"":n;var r="";if(t.cssText||t.rules){var o,s=t.rules;if((o=s)&&(o=s[0],o=!(o&&o.selector&&0===o.selector.indexOf("--"))),o){o=0;for(var a,l=s.length;o<l&&(a=s[o]);o++)r=i(a,e,r)}else e?e=t.cssText:(e=t.cssText,e=e.replace(I,"").replace(k,""),e=e.replace(q,"").replace(E,"")),(r=e.trim())&&(r=" "+r+"\n")}return r&&(t.selector&&(n+=t.selector+" {\n"),n+=r,t.selector&&(n+="}\n\n")),n}function o(t){(t=V[t])&&(t._applyShimCurrentVersion=t._applyShimCurrentVersion||0,t._applyShimValidatingVersion=t._applyShimValidatingVersion||0,t._applyShimNextVersion=(t._applyShimNextVersion||0)+1)}function s(t){return t._applyShimCurrentVersion===t._applyShimNextVersion}function a(t){t._applyShimValidatingVersion=t._applyShimNextVersion,t.a||(t.a=!0,$.then(function(){t._applyShimCurrentVersion=t._applyShimNextVersion,t.a=!1}))}function l(t){_=(!t||!t.shimcssproperties)&&(D||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function u(t){return t?("string"==typeof t&&(t=e(t)),i(t,W)):""}function p(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=e(t.textContent)),t.__cssRules||null}function c(t,e,n,r){if(t){var i=!1,o=t.type;if(r&&o===R){var s=t.selector.match(H);s&&(window.matchMedia(s[1]).matches||(i=!0))}if(o===T?e(t):n&&o===O?n(t):o===A&&(i=!0),(t=t.rules)&&!i){i=0,o=t.length;for(var a;i<o&&(a=t[i]);i++)c(a,e,n,r)}}}function f(t,e){var n=t.indexOf("var(");if(-1===n)return e(t,"","","");t:{for(var r=0,i=n+3,o=t.length;i<o;i++)if("("===t[i])r++;else if(")"===t[i]&&0==--r)break t;i=-1}return r=t.substring(n+4,i),n=t.substring(0,n),t=f(t.substring(i+1),e),-1===(i=r.indexOf(","))?e(n,r.trim(),"",t):e(n,r.substring(0,i).trim(),r.substring(i+1).trim(),t)}function h(){this.a={}}function d(){this.b=this.c=null,this.a=new h}function y(t,e){return e=e.replace(F,function(e,n,r,i){return g(t,e,n,r,i)}),m(t,e)}function m(t,e){for(var n;n=L.exec(e);){var r=n[0],i=n[1];n=n.index;var o=e.slice(0,n+r.indexOf("@apply"));e=e.slice(n+r.length);var s=S(t,o);r=void 0;var a=t;i=i.replace(K,"");var l=[],u=a.a.get(i);if(u||(a.a.set(i,{}),u=a.a.get(i)),u)for(r in a.c&&(u.i[a.c]=!0),u.h)u=[r,": var(",i,"_-_",r],(a=s&&s[r])&&u.push(",",a),u.push(")"),l.push(u.join(""));e=""+o+(r=l.join("; "))+e,L.lastIndex=n+r.length}return e}function S(t,e){e=e.split(";");for(var n,r,i,o={},s=0;s<e.length;s++)if((n=e[s])&&1<(i=n.split(":")).length){var a=t;r=n=i[0].trim(),i=i.slice(1).join(":");var l=U.exec(i);l&&(l[1]?(a.b||(a.b=document.createElement("meta"),a.b.setAttribute("apply-shim-measure",""),a.b.style.all="initial",document.head.appendChild(a.b)),r=window.getComputedStyle(a.b).getPropertyValue(r)):r="apply-shim-inherit",i=r),r=i,o[n]=r}return o}function v(t,e){if(z)for(var n in e.i)n!==t.c&&z(n)}function g(t,e,n,r,i){if(r&&f(r,function(e,n){n&&t.a.get(n)&&(i="@apply "+n+";")}),!i)return e;var o=m(t,i),s=e.slice(0,e.indexOf("--")),a=o=S(t,o),l=t.a.get(n),u=l&&l.h;u?a=Object.assign(Object.create(u),o):t.a.set(n,a);var p,c=[],h=!1;for(p in a){var d=o[p];void 0===d&&(d="initial"),!u||p in u||(h=!0),c.push(n+"_-_"+p+": "+d)}return h&&v(t,l),l&&(l.h=a),r&&(s=e+";"+s),""+s+c.join("; ")+";"}function w(t){requestAnimationFrame(function(){J?J(t):(G||(G=new Promise(function(t){B=t}),"complete"===document.readyState?B():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&B()})),G.then(function(){t&&t()}))})}function C(){var t=this;this.a=null,w(function(){x(t)}),Q.invalidCallback=o}function x(t){t.a||(t.a=window.ShadyCSS.CustomStyleInterface,t.a&&(t.a.transformCallback=function(t){Q.f(t)},t.a.validateCallback=function(){requestAnimationFrame(function(){t.a.enqueued&&b(t)})}))}function b(t){if(x(t),t.a){var e=t.a.processStyles();if(t.a.enqueued){for(var n=0;n<e.length;n++){var r=t.a.getStyleForCustomStyle(e[n]);r&&Q.f(r)}t.a.enqueued=!1}}}var _,V={},T=1,O=7,R=4,A=1e3,N=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,j=/@import[^;]*;/gim,I=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,k=/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,q=/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,E=/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,P=/^@[^\s]*keyframes/,M=/\s+/g,$=Promise.resolve(),D=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?_=window.ShadyCSS.nativeCss:window.ShadyCSS?(l(window.ShadyCSS),window.ShadyCSS=void 0):l(window.WebComponents&&window.WebComponents.flags);var W=_,F=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,L=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,H=/@media\s(.*)/,K=/;\s*/m,U=/^\s*(initial)|(inherit)\s*$/;h.prototype.set=function(t,e){t=t.trim(),this.a[t]={h:e,i:{}}},h.prototype.get=function(t){return t=t.trim(),this.a[t]||null};var z=null;d.prototype.o=function(t){return t=L.test(t)||F.test(t),L.lastIndex=0,F.lastIndex=0,t},d.prototype.m=function(t,e){var n=null;return(t=t.content.querySelector("style"))&&(n=this.j(t,e)),n},d.prototype.j=function(t,e){e=void 0===e?"":e;var n=p(t);return this.l(n,e),t.textContent=u(n),n},d.prototype.f=function(t){var e=this,n=p(t);return c(n,function(t){":root"===t.selector&&(t.selector="html"),e.g(t)}),t.textContent=u(n),n},d.prototype.l=function(t,e){var n=this;this.c=e,c(t,function(t){n.g(t)}),this.c=null},d.prototype.g=function(t){t.cssText=y(this,t.parsedCssText),":root"===t.selector&&(t.selector=":host > *")},d.prototype.detectMixin=d.prototype.o,d.prototype.transformStyle=d.prototype.j,d.prototype.transformCustomStyle=d.prototype.f,d.prototype.transformRules=d.prototype.l,d.prototype.transformRule=d.prototype.g,d.prototype.transformTemplate=d.prototype.m,d.prototype._separator="_-_",Object.defineProperty(d.prototype,"invalidCallback",{get:function(){return z},set:function(t){z=t}});var B,G=null,J=window.HTMLImports&&window.HTMLImports.whenReady||null,Q=new d;if(C.prototype.prepareTemplate=function(t,e){x(this),V[e]=t,e=Q.m(t,e),t._styleAst=e},C.prototype.styleSubtree=function(t,e){if(x(this),e)for(var n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n]);if(t.shadowRoot)for(this.styleElement(t),t=t.shadowRoot.children||t.shadowRoot.childNodes,e=0;e<t.length;e++)this.styleSubtree(t[e]);else for(t=t.children||t.childNodes,e=0;e<t.length;e++)this.styleSubtree(t[e])},C.prototype.styleElement=function(t){x(this);var e,n=t.localName;e=n?-1<n.indexOf("-")?n:t.getAttribute&&t.getAttribute("is")||"":t.is,(n=V[e])&&!s(n)&&((s(n)||n._applyShimValidatingVersion!==n._applyShimNextVersion)&&(this.prepareTemplate(n,e),a(n)),(t=t.shadowRoot)&&(t=t.querySelector("style"))&&(t.__cssRules=n._styleAst,t.textContent=u(n._styleAst)))},C.prototype.styleDocument=function(t){x(this),this.styleSubtree(document.body,t)},!window.ShadyCSS||!window.ShadyCSS.ScopingShim){var X=new C,Y=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate:function(t,e){b(X),X.prepareTemplate(t,e)},styleSubtree:function(t,e){b(X),X.styleSubtree(t,e)},styleElement:function(t){b(X),X.styleElement(t)},styleDocument:function(t){b(X),X.styleDocument(t)},getComputedStyleValue:function(t,e){return(t=window.getComputedStyle(t).getPropertyValue(e))?t.trim():""},nativeCss:W,nativeShadow:D},Y&&(window.ShadyCSS.CustomStyleInterface=Y)}window.ShadyCSS.ApplyShim=Q}).call(this);</script><script>function _classCallCheck(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(n,t,i){return t&&e(n.prototype,t),i&&e(n,i),n}}();!function(){"use strict";var e=function(){function e(){_classCallCheck(this,e),this._asyncModule=null,this._callback=null,this._timer=null}return _createClass(e,[{key:"setConfig",value:function(e,n){var t=this;this._asyncModule=e,this._callback=n,this._timer=this._asyncModule.run(function(){t._timer=null,t._callback()})}},{key:"cancel",value:function(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}},{key:"flush",value:function(){this.isActive()&&(this.cancel(),this._callback())}},{key:"isActive",value:function(){return null!=this._timer}}],[{key:"debounce",value:function(n,t,i){return n instanceof e?n.cancel():n=new e,n.setConfig(t,i),n}}]),e}();Polymer.Debouncer=e}();</script><script>!function(){"use strict";function e(e){for(var t,n=l?["click"]:f,o=0;o<n.length;o++)t=n[o],e?document.addEventListener(t,p,!0):document.removeEventListener(t,p,!0)}function t(e){var t=e.type;if(-1===f.indexOf(t))return!1;if("mousemove"===t){var n=void 0===e.buttons?1:e.buttons;return e instanceof window.MouseEvent&&!d&&(n=h[e.which]||0),Boolean(1&n)}return 0===(void 0===e.button?0:e.button)}function n(e){if("click"===e.type){if(0===e.detail)return!0;var t=y._findOriginalTarget(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;var n=t.getBoundingClientRect(),o=e.pageX,i=e.pageY;return!(o>=n.left&&o<=n.right&&i>=n.top&&i<=n.bottom)}return!1}function o(e){var t="auto",n=e.composedPath&&e.composedPath();if(n)for(var o,i=0;i<n.length;i++)if((o=n[i])[c]){t=o[c];break}return t}function i(e,t,n){e.movefn=t,e.upfn=n,document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)}function r(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}var s="string"==typeof document.head.style.touchAction,u="__polymerGesturesHandled",c="__polymerGesturesTouchAction",a=2500,f=["mousedown","mousemove","mouseup","click"],h=[0,1,4,2],d=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(e){return!1}}(),v=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){v=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}}();var l=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),m=function(){};m.prototype.reset=function(){},m.prototype.mousedown,m.prototype.mousemove,m.prototype.mouseup,m.prototype.touchstart,m.prototype.touchmove,m.prototype.touchend,m.prototype.click;var p=function(e){var t=e.sourceCapabilities;if((!t||t.firesTouchEvents)&&(e[u]={skip:!0},"click"===e.type)){var n=e.composedPath&&e.composedPath();if(n)for(var o=0;o<n.length;o++)if(n[o]===g.mouse.target)return;e.preventDefault(),e.stopPropagation()}},g={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};document.addEventListener("touchend",function(t){g.mouse.mouseIgnoreJob||e(!0);g.mouse.target=t.composedPath()[0],g.mouse.mouseIgnoreJob=Polymer.Debouncer.debounce(g.mouse.mouseIgnoreJob,Polymer.Async.timeOut.after(a),function(){e(),g.mouse.target=null,g.mouse.mouseIgnoreJob=null})},!!v&&{passive:!0});var y={gestures:{},recognizers:[],deepTargetFind:function(e,t){for(var n=document.elementFromPoint(e,t),o=n;o&&o.shadowRoot&&!window.ShadyDOM;){var i=o;if(o=o.shadowRoot.elementFromPoint(e,t),i===o)break;o&&(n=o)}return n},_findOriginalTarget:function(e){return e.composedPath?e.composedPath()[0]:e.target},_handleNative:function(e){var t=void 0,n=e.type,o=e.currentTarget.__polymerGestures;if(o){var i=o[n];if(i){if(!e[u]&&(e[u]={},"touch"===n.slice(0,5))){var r=(e=e).changedTouches[0];if("touchstart"===n&&1===e.touches.length&&(g.touch.id=r.identifier),g.touch.id!==r.identifier)return;s||"touchstart"!==n&&"touchmove"!==n||y._handleTouchAction(e)}if(!(t=e[u]).skip){for(var c,a=y.recognizers,f=0;f<a.length;f++)i[(c=a[f]).name]&&!t[c.name]&&c.flow&&c.flow.start.indexOf(e.type)>-1&&c.reset&&c.reset();for(var h,d=0;d<a.length;d++)i[(h=a[d]).name]&&!t[h.name]&&(t[h.name]=!0,h[n](e))}}}},_handleTouchAction:function(e){var t=e.changedTouches[0],n=e.type;if("touchstart"===n)g.touch.x=t.clientX,g.touch.y=t.clientY,g.touch.scrollDecided=!1;else if("touchmove"===n){if(g.touch.scrollDecided)return;g.touch.scrollDecided=!0;var i=o(e),r=!1,s=Math.abs(g.touch.x-t.clientX),u=Math.abs(g.touch.y-t.clientY);e.cancelable&&("none"===i?r=!0:"pan-x"===i?r=u>s:"pan-y"===i&&(r=s>u)),r?e.preventDefault():y.prevent("track")}},addListener:function(e,t,n){return!!this.gestures[t]&&(this._add(e,t,n),!0)},removeListener:function(e,t,n){return!!this.gestures[t]&&(this._remove(e,t,n),!0)},_add:function(e,t,n){var o=this.gestures[t],i=o.deps,r=o.name,s=e.__polymerGestures;s||(e.__polymerGestures=s={});for(var u,c,a=0;a<i.length;a++)u=i[a],l&&f.indexOf(u)>-1&&"click"!==u||((c=s[u])||(s[u]=c={_count:0}),0===c._count&&e.addEventListener(u,this._handleNative),c[r]=(c[r]||0)+1,c._count=(c._count||0)+1);e.addEventListener(t,n),o.touchAction&&this.setTouchAction(e,o.touchAction)},_remove:function(e,t,n){var o=this.gestures[t],i=o.deps,r=o.name,s=e.__polymerGestures;if(s)for(var u,c,a=0;a<i.length;a++)(c=s[u=i[a]])&&c[r]&&(c[r]=(c[r]||1)-1,c._count=(c._count||1)-1,0===c._count&&e.removeEventListener(u,this._handleNative));e.removeEventListener(t,n)},register:function(e){this.recognizers.push(e);for(var t=0;t<e.emits.length;t++)this.gestures[e.emits[t]]=e},_findRecognizerByEvent:function(e){for(var t,n=0;n<this.recognizers.length;n++){t=this.recognizers[n];for(var o=0;o<t.emits.length;o++)if(t.emits[o]===e)return t}return null},setTouchAction:function(e,t){s&&(e.style.touchAction=t),e[c]=t},_fire:function(e,t,n){var o=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=n,e.dispatchEvent(o),o.defaultPrevented){var i=n.preventer||n.sourceEvent;i&&i.preventDefault&&i.preventDefault()}},prevent:function(e){var t=this._findRecognizerByEvent(e);t.info&&(t.info.prevent=!0)},resetMouseCanceller:function(){g.mouse.mouseIgnoreJob&&g.mouse.mouseIgnoreJob.flush()}};y.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){r(this.info)},mousedown:function(e){if(t(e)){var n=y._findOriginalTarget(e),o=this;i(this.info,function(e){t(e)||(o._fire("up",n,e),r(o.info))},function(e){t(e)&&o._fire("up",n,e),r(o.info)}),this._fire("down",n,e)}},touchstart:function(e){this._fire("down",y._findOriginalTarget(e),e.changedTouches[0],e)},touchend:function(e){this._fire("up",y._findOriginalTarget(e),e.changedTouches[0],e)},_fire:function(e,t,n,o){y._fire(t,e,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:function(e){return y.prevent(e)}})}}),y.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:function(e){this.moves.length>2&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,r(this.info)},hasMovedEnough:function(e,t){if(this.info.prevent)return!1;if(this.info.started)return!0;var n=Math.abs(this.info.x-e),o=Math.abs(this.info.y-t);return n>=5||o>=5},mousedown:function(e){if(t(e)){var n=y._findOriginalTarget(e),o=this,s=function(e){var i=e.clientX,s=e.clientY;o.hasMovedEnough(i,s)&&(o.info.state=o.info.started?"mouseup"===e.type?"end":"track":"start","start"===o.info.state&&y.prevent("tap"),o.info.addMove({x:i,y:s}),t(e)||(o.info.state="end",r(o.info)),o._fire(n,e),o.info.started=!0)};i(this.info,s,function(e){o.info.started&&s(e),r(o.info)}),this.info.x=e.clientX,this.info.y=e.clientY}},touchstart:function(e){var t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){var t=y._findOriginalTarget(e),n=e.changedTouches[0],o=n.clientX,i=n.clientY;this.hasMovedEnough(o,i)&&("start"===this.info.state&&y.prevent("tap"),this.info.addMove({x:o,y:i}),this._fire(t,n),this.info.state="track",this.info.started=!0)},touchend:function(e){var t=y._findOriginalTarget(e),n=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),this._fire(t,n,e))},_fire:function(e,t){var n=this.info.moves[this.info.moves.length-2],o=this.info.moves[this.info.moves.length-1],i=o.x-this.info.x,r=o.y-this.info.y,s=void 0,u=0;n&&(s=o.x-n.x,u=o.y-n.y),y._fire(e,"track",{state:this.info.state,x:t.clientX,y:t.clientY,dx:i,dy:r,ddx:s,ddy:u,sourceEvent:t,hover:function(){return y.deepTargetFind(t.clientX,t.clientY)}})}}),y.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:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(e){this.info.x=e.clientX,this.info.y=e.clientY},mousedown:function(e){t(e)&&this.save(e)},click:function(e){t(e)&&this.forward(e)},touchstart:function(e){this.save(e.changedTouches[0],e)},touchend:function(e){this.forward(e.changedTouches[0],e)},forward:function(e,t){var o=Math.abs(e.clientX-this.info.x),i=Math.abs(e.clientY-this.info.y),r=y._findOriginalTarget(e);(isNaN(o)||isNaN(i)||o<=25&&i<=25||n(e))&&(this.info.prevent||y._fire(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}}),y.findOriginalTarget=y._findOriginalTarget,y.add=y.addListener,y.remove=y.removeListener,Polymer.Gestures=y}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,r,o){return r&&e(t.prototype,r),o&&e(t,o),t}}(),_get=function e(t,r,o){null===t&&(t=Function.prototype);var n=Object.getOwnPropertyDescriptor(t,r);if(void 0===n){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,o)}if("value"in n)return n.value;var u=n.get;if(void 0!==u)return u.call(o)};!function(){"use strict";var e=Polymer.Gestures;Polymer.GestureEventListeners=Polymer.dedupingMixin(function(t){return function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,t),_createClass(o,[{key:"_addEventListenerToNode",value:function(t,r,n){e.addListener(t,r,n)||_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_addEventListenerToNode",this).call(this,t,r,n)}},{key:"_removeEventListenerFromNode",value:function(t,r,n){e.removeListener(t,r,n)||_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_removeEventListenerFromNode",this).call(this,t,r,n)}}]),o}()})}();</script><script>!function(){"use strict";function e(e){window.HTMLImports?HTMLImports.whenReady(e):e()}Polymer.importHref=function(t,n,r,o){var d=document.head.querySelector('link[href="'+t+'"][import-href]');d||((d=document.createElement("link")).rel="import",d.href=t,d.setAttribute("import-href","")),o&&d.setAttribute("async","");var i=function(){d.removeEventListener("load",a),d.removeEventListener("error",c)},a=function(t){i(),d.__dynamicImportLoaded=!0,n&&e(function(){n(t)})},c=function(t){i(),d.parentNode&&d.parentNode.removeChild(d),r&&e(function(){r(t)})};return d.addEventListener("load",a),d.addEventListener("error",c),null==d.parentNode?document.head.appendChild(d):d.__dynamicImportLoaded&&d.dispatchEvent(new Event("load")),d}}();</script><script>!function(){"use strict";function t(){f=!0,requestAnimationFrame(function(){f=!1,n(u),setTimeout(function(){e(i)})})}function n(t){for(;t.length;)o(t.shift())}function e(t){for(var n=0,e=t.length;n<e;n++)o(t.shift())}function o(t){var n=t[0],e=t[1],o=t[2];try{e.apply(n,o)}catch(t){setTimeout(function(){throw t})}}var f=!1,u=[],i=[];Polymer.RenderStatus={beforeNextRender:function(n,e,o){f||t(),u.push([n,e,o])},afterNextRender:function(n,e,o){f||t(),i.push([n,e,o])},flush:function(){for(;u.length||i.length;)n(u),n(i);f=!1}}}();</script><script>!function(){"use strict";function e(){document.body.removeAttribute("unresolved")}window.WebComponents?window.addEventListener("WebComponentsReady",e):"interactive"===document.readyState||"complete"===document.readyState?e():window.addEventListener("DOMContentLoaded",e)}();</script><script>!function(){"use strict";function r(r,e,n){return{index:r,removed:e,addedCount:n}}function e(r,e,n,t,u,o){for(var i=o-u+1,f=n-e+1,s=new Array(i),h=0;h<i;h++)s[h]=new Array(f),s[h][0]=h;for(var v=0;v<f;v++)s[0][v]=v;for(var c=1;c<i;c++)for(var d=1;d<f;d++)if(a(r[e+d-1],t[u+c-1]))s[c][d]=s[c-1][d-1];else{var l=s[c-1][d]+1,p=s[c][d-1]+1;s[c][d]=l<p?l:p}return s}function n(r){for(var e=r.length-1,n=r[0].length-1,t=r[e][n],u=[];e>0||n>0;)if(0!=e)if(0!=n){var o=r[e-1][n-1],a=r[e-1][n],v=r[e][n-1],c=void 0;(c=a<v?a<o?a:o:v<o?v:o)==o?(o==t?u.push(i):(u.push(f),t=o),e--,n--):c==a?(u.push(h),e--,t=a):(u.push(s),n--,t=v)}else u.push(h),e--;else u.push(s),n--;return u.reverse(),u}function t(t,a,v,c,d,l){var p=0,g=0,m=void 0,y=Math.min(v-a,l-d);if(0==a&&0==d&&(p=u(t,c,y)),v==t.length&&l==c.length&&(g=o(t,c,y-p)),a+=p,d+=p,v-=g,l-=g,v-a==0&&l-d==0)return[];if(a==v){for(m=r(a,[],0);d<l;)m.removed.push(c[d++]);return[m]}if(d==l)return[r(a,[],v-a)];var b=n(e(t,a,v,c,d,l));m=void 0;for(var k=[],w=a,A=d,C=0;C<b.length;C++)switch(b[C]){case i:m&&(k.push(m),m=void 0),w++,A++;break;case f:m||(m=r(w,[],0)),m.addedCount++,w++,m.removed.push(c[A]),A++;break;case s:m||(m=r(w,[],0)),m.addedCount++,w++;break;case h:m||(m=r(w,[],0)),m.removed.push(c[A]),A++}return m&&k.push(m),k}function u(r,e,n){for(var t=0;t<n;t++)if(!a(r[t],e[t]))return t;return n}function o(r,e,n){for(var t=r.length,u=e.length,o=0;o<n&&a(r[--t],e[--u]);)o++;return o}function a(r,e){return r===e}var i=0,f=1,s=2,h=3;Polymer.ArraySplice={calculateSplices:function(r,e){return t(r,0,r.length,e,0,e.length)}}}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var s=0;s<t.length;s++){var n=t[s];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,s,n){return s&&e(t.prototype,s),n&&e(t,n),t}}();!function(){"use strict";function e(e){return"slot"===e.localName}var t=function(){function t(e,s){var n=this;_classCallCheck(this,t),this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=s,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=function(){n._schedule()},this.connect(),this._schedule()}return _createClass(t,null,[{key:"getFlattenedNodes",value:function(t){return e(t)?t.assignedNodes({flatten:!0}):Array.from(t.childNodes).map(function(t){return e(t)?t.assignedNodes({flatten:!0}):[t]}).reduce(function(e,t){return e.concat(t)},[])}}]),_createClass(t,[{key:"connect",value:function(){var t=this;e(this._target)?this._listenSlots([this._target]):(this._listenSlots(this._target.children),window.ShadyDOM?this._shadyChildrenObserver=ShadyDOM.observeChildren(this._target,function(e){t._processMutations(e)}):(this._nativeChildrenObserver=new MutationObserver(function(e){t._processMutations(e)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}},{key:"disconnect",value:function(){e(this._target)?this._unlistenSlots([this._target]):(this._unlistenSlots(this._target.children),window.ShadyDOM&&this._shadyChildrenObserver?(ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}},{key:"_schedule",value:function(){var e=this;this._scheduled||(this._scheduled=!0,Polymer.Async.microTask.run(function(){return e.flush()}))}},{key:"_processMutations",value:function(e){this._processSlotMutations(e),this.flush()}},{key:"_processSlotMutations",value:function(e){if(e)for(var t=0;t<e.length;t++){var s=e[t];s.addedNodes&&this._listenSlots(s.addedNodes),s.removedNodes&&this._unlistenSlots(s.removedNodes)}}},{key:"flush",value:function(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;for(var e,t={target:this._target,addedNodes:[],removedNodes:[]},s=this.constructor.getFlattenedNodes(this._target),n=Polymer.ArraySplice.calculateSplices(s,this._effectiveNodes),r=0;r<n.length&&(e=n[r]);r++)for(var i,o=0;o<e.removed.length&&(i=e.removed[o]);o++)t.removedNodes.push(i);for(var h,l=0;l<n.length&&(h=n[l]);l++)for(var a=h.index;a<h.index+h.addedCount;a++)t.addedNodes.push(s[a]);this._effectiveNodes=s;var d=!1;return(t.addedNodes.length||t.removedNodes.length)&&(d=!0,this.callback.call(this._target,t)),d}},{key:"_listenSlots",value:function(t){for(var s=0;s<t.length;s++){var n=t[s];e(n)&&n.addEventListener("slotchange",this._boundSchedule)}}},{key:"_unlistenSlots",value:function(t){for(var s=0;s<t.length;s++){var n=t[s];e(n)&&n.removeEventListener("slotchange",this._boundSchedule)}}}]),t}();Polymer.FlattenedNodesObserver=t}();</script><script>!function(){"use strict";function n(){for(var n=Boolean(o.length);o.length;)try{o.shift().flush()}catch(n){setTimeout(function(){throw n})}return n}var o=[];Polymer.enqueueDebouncer=function(n){o.push(n)},Polymer.flush=function(){var o=void 0,i=void 0;do{o=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),i=n()}while(o||i)}}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();!function(){"use strict";var e=Element.prototype,t=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,n=function(e,n){return t.call(e,n)},o=function(){function e(t){_classCallCheck(this,e),this.node=t}return _createClass(e,[{key:"observeNodes",value:function(e){return new Polymer.FlattenedNodesObserver(this.node,e)}},{key:"unobserveNodes",value:function(e){e.disconnect()}},{key:"notifyObserver",value:function(){}},{key:"deepContains",value:function(e){if(this.node.contains(e))return!0;for(var t=e,n=e.ownerDocument;t&&t!==n&&t!==this.node;)t=t.parentNode||t.host;return t===this.node}},{key:"getOwnerRoot",value:function(){return this.node.getRootNode()}},{key:"getDistributedNodes",value:function(){return"slot"===this.node.localName?this.node.assignedNodes({flatten:!0}):[]}},{key:"getDestinationInsertionPoints",value:function(){for(var e=[],t=this.node.assignedSlot;t;)e.push(t),t=t.assignedSlot;return e}},{key:"importNode",value:function(e,t){return(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(e,t)}},{key:"getEffectiveChildNodes",value:function(){return Polymer.FlattenedNodesObserver.getFlattenedNodes(this.node)}},{key:"queryDistributedElements",value:function(e){for(var t,o=this.getEffectiveChildNodes(),r=[],i=0,s=o.length;i<s&&(t=o[i]);i++)t.nodeType===Node.ELEMENT_NODE&&n(t,e)&&r.push(t);return r}},{key:"activeElement",get:function(){var e=this.node;return void 0!==e._activeElement?e._activeElement:e.activeElement}}]),e}();!function(e,t){for(var n=0;n<t.length;n++)!function(n){var o=t[n];e[o]=function(){return this.node[o].apply(this.node,arguments)}}(n)}(o.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),function(e,t){for(var n=0;n<t.length;n++)!function(n){var o=t[n];Object.defineProperty(e,o,{get:function(){return this.node[o]},configurable:!0})}(n)}(o.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),function(e,t){for(var n=0;n<t.length;n++)!function(n){var o=t[n];Object.defineProperty(e,o,{get:function(){return this.node[o]},set:function(e){this.node[o]=e},configurable:!0})}(n)}(o.prototype,["textContent","innerHTML"]);var r=function(){function e(t){_classCallCheck(this,e),this.event=t}return _createClass(e,[{key:"rootTarget",get:function(){return this.event.composedPath()[0]}},{key:"localTarget",get:function(){return this.event.target}},{key:"path",get:function(){return this.event.composedPath()}}]),e}();Polymer.DomApi=o,Polymer.dom=function(e){if(!(e=e||document).__domApi){var t=void 0;t=e instanceof Event?new r(e):new o(e),e.__domApi=t}return e.__domApi},Polymer.dom.matchesSelector=n,Polymer.dom.flush=Polymer.flush,Polymer.dom.addDebouncer=Polymer.enqueueDebouncer}();</script><script>function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_get=function e(t,r,n){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,r);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,r,n)}if("value"in o)return o.value;var u=o.get;if(void 0!==u)return u.call(n)};!function(){"use strict";var e=window.ShadyCSS;Polymer.LegacyElementMixin=Polymer.dedupingMixin(function(t){var r=Polymer.GestureEventListeners(Polymer.ElementMixin(t)),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"},o=function(t){function o(){_classCallCheck(this,o);var e=_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return e.root=e,e.created(),e}return _inherits(o,r),_createClass(o,[{key:"created",value:function(){}},{key:"connectedCallback",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"connectedCallback",this).call(this),this.isAttached=!0,this.attached()}},{key:"attached",value:function(){}},{key:"disconnectedCallback",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"disconnectedCallback",this).call(this),this.isAttached=!1,this.detached()}},{key:"detached",value:function(){}},{key:"attributeChangedCallback",value:function(e,t,r){t!==r&&(_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"attributeChangedCallback",this).call(this,e,t,r),this.attributeChanged(e,t,r))}},{key:"attributeChanged",value:function(e,t,r){}},{key:"_initializeProperties",value:function(){var e=Object.getPrototypeOf(this);e.hasOwnProperty("__hasRegisterFinished")||(e.__hasRegisterFinished=!0,this._registered()),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_initializeProperties",this).call(this)}},{key:"_registered",value:function(){}},{key:"ready",value:function(){this._ensureAttributes(),this._applyListeners(),_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"ready",this).call(this)}},{key:"_ensureAttributes",value:function(){}},{key:"_applyListeners",value:function(){}},{key:"serialize",value:function(e){return this._serializeValue(e)}},{key:"deserialize",value:function(e,t){return this._deserializeValue(e,t)}},{key:"reflectPropertyToAttribute",value:function(e,t,r){this._propertyToAttribute(e,t,r)}},{key:"serializeValueToAttribute",value:function(e,t,r){this._valueToNodeAttribute(r||this,e,t)}},{key:"extend",value:function(e,t){if(!e||!t)return e||t;for(var r,n=Object.getOwnPropertyNames(t),o=0;o<n.length&&(r=n[o]);o++){var i=Object.getOwnPropertyDescriptor(t,r);i&&Object.defineProperty(e,r,i)}return e}},{key:"mixin",value:function(e,t){for(var r in t)e[r]=t[r];return e}},{key:"chainObject",value:function(e,t){return e&&t&&e!==t&&(e.__proto__=t),e}},{key:"instanceTemplate",value:function(e){var t=this.constructor._contentForTemplate(e);return document.importNode(t,!0)}},{key:"fire",value:function(e,t,r){r=r||{},t=null===t||void 0===t?{}:t;var n=new Event(e,{bubbles:void 0===r.bubbles||r.bubbles,cancelable:Boolean(r.cancelable),composed:void 0===r.composed||r.composed});return n.detail=t,(r.node||this).dispatchEvent(n),n}},{key:"listen",value:function(e,t,r){e=e||this;var n=this.__boundListeners||(this.__boundListeners=new WeakMap),o=n.get(e);o||(o={},n.set(e,o));var i=t+r;o[i]||(o[i]=this._addMethodEventListenerToNode(e,t,r,this))}},{key:"unlisten",value:function(e,t,r){e=e||this;var n=this.__boundListeners&&this.__boundListeners.get(e),o=t+r,i=n&&n[o];i&&(this._removeEventListenerFromNode(e,t,i),n[o]=null)}},{key:"setScrollDirection",value:function(e,t){Polymer.Gestures.setTouchAction(t||this,n[e]||"auto")}},{key:"$$",value:function(e){return this.root.querySelector(e)}},{key:"distributeContent",value:function(){window.ShadyDOM&&this.shadowRoot&&ShadyDOM.flush()}},{key:"getEffectiveChildNodes",value:function(){return Polymer.dom(this).getEffectiveChildNodes()}},{key:"queryDistributedElements",value:function(e){return Polymer.dom(this).queryDistributedElements(e)}},{key:"getEffectiveChildren",value:function(){return this.getEffectiveChildNodes().filter(function(e){return e.nodeType===Node.ELEMENT_NODE})}},{key:"getEffectiveTextContent",value:function(){for(var e,t=this.getEffectiveChildNodes(),r=[],n=0;e=t[n];n++)e.nodeType!==Node.COMMENT_NODE&&r.push(e.textContent);return r.join("")}},{key:"queryEffectiveChildren",value:function(e){var t=this.queryDistributedElements(e);return t&&t[0]}},{key:"queryAllEffectiveChildren",value:function(e){return this.queryDistributedElements(e)}},{key:"getContentChildNodes",value:function(e){var t=this.root.querySelector(e||"slot");return t?Polymer.dom(t).getDistributedNodes():[]}},{key:"getContentChildren",value:function(e){return this.getContentChildNodes(e).filter(function(e){return e.nodeType===Node.ELEMENT_NODE})}},{key:"isLightDescendant",value:function(e){return this!==e&&this.contains(e)&&this.getRootNode()===e.getRootNode()}},{key:"isLocalDescendant",value:function(e){return this.root===e.getRootNode()}},{key:"scopeSubtree",value:function(e,t){}},{key:"getComputedStyleValue",value:function(t){return e.getComputedStyleValue(this,t)}},{key:"debounce",value:function(e,t,r){return this._debouncers=this._debouncers||{},this._debouncers[e]=Polymer.Debouncer.debounce(this._debouncers[e],r>0?Polymer.Async.timeOut.after(r):Polymer.Async.microTask,t.bind(this))}},{key:"isDebouncerActive",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];return!(!t||!t.isActive())}},{key:"flushDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.flush()}},{key:"cancelDebouncer",value:function(e){this._debouncers=this._debouncers||{};var t=this._debouncers[e];t&&t.cancel()}},{key:"async",value:function(e,t){return t>0?Polymer.Async.timeOut.run(e.bind(this),t):~Polymer.Async.microTask.run(e.bind(this))}},{key:"cancelAsync",value:function(e){e<0?Polymer.Async.microTask.cancel(~e):Polymer.Async.timeOut.cancel(e)}},{key:"create",value:function(e,t){var r=document.createElement(e);if(t)if(r.setProperties)r.setProperties(t);else for(var n in t)r[n]=t[n];return r}},{key:"importHref",value:function(e,t,r,n){var o=t?t.bind(this):null,i=r?r.bind(this):null;return Polymer.importHref(e,o,i,n)}},{key:"elementMatches",value:function(e,t){return Polymer.dom.matchesSelector(t||this,e)}},{key:"toggleAttribute",value:function(e,t,r){r=r||this,1==arguments.length&&(t=!r.hasAttribute(e)),t?r.setAttribute(e,""):r.removeAttribute(e)}},{key:"toggleClass",value:function(e,t,r){r=r||this,1==arguments.length&&(t=!r.classList.contains(e)),t?r.classList.add(e):r.classList.remove(e)}},{key:"transform",value:function(e,t){(t=t||this).style.webkitTransform=e,t.style.transform=e}},{key:"translate3d",value:function(e,t,r,n){n=n||this,this.transform("translate3d("+e+","+t+","+r+")",n)}},{key:"arrayDelete",value:function(e,t){var r=void 0;if(Array.isArray(e)){if((r=e.indexOf(t))>=0)return e.splice(r,1)}else if((r=Polymer.Path.get(this,e).indexOf(t))>=0)return this.splice(e,r,1);return null}},{key:"_logger",value:function(e,t){var r;switch(Array.isArray(t)&&1===t.length&&(t=t[0]),e){case"log":case"warn":case"error":(r=console)[e].apply(r,_toConsumableArray(t))}}},{key:"_log",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this._logger("log",t)}},{key:"_warn",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this._logger("warn",t)}},{key:"_error",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];this._logger("error",t)}},{key:"_logf",value:function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return["[%s::%s]",this.is,e].concat(r)}},{key:"domHost",get:function(){var e=this.getRootNode();return e instanceof DocumentFragment?e.host:e}}]),o}();return o.prototype.is="",o})}();</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}(),_get=function t(e,r,o){null===e&&(e=Function.prototype);var i=Object.getOwnPropertyDescriptor(e,r);if(void 0===i){var n=Object.getPrototypeOf(e);return null===n?void 0:t(n,r,o)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(o)};!function(){"use strict";function t(t,o){if(!t)return o;o=Polymer.LegacyElementMixin(o),Array.isArray(t)||(t=[t]);var i=o.prototype.behaviors;return t=r(t,null,i),o=e(t,o),i&&(t=i.concat(t)),o.prototype.behaviors=t,o}function e(t,r){for(var i=0;i<t.length;i++){var n=t[i];n&&(r=Array.isArray(n)?e(n,r):o(n,r))}return r}function r(t,e,o){e=e||[];for(var i=t.length-1;i>=0;i--){var n=t[i];n?Array.isArray(n)?r(n,e):e.indexOf(n)<0&&(!o||o.indexOf(n)<0)&&e.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return e}function o(t,e){var r=function(r){function o(){return _classCallCheck(this,o),_possibleConstructorReturn(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return _inherits(o,e),_createClass(o,[{key:"created",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"created",this).call(this),t.created&&t.created.call(this)}},{key:"_registered",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_registered",this).call(this),t.beforeRegister&&t.beforeRegister.call(Object.getPrototypeOf(this)),t.registered&&t.registered.call(Object.getPrototypeOf(this))}},{key:"_applyListeners",value:function(){if(_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_applyListeners",this).call(this),t.listeners)for(var e in t.listeners)this._addMethodEventListenerToNode(this,e,t.listeners[e])}},{key:"_ensureAttributes",value:function(){if(t.hostAttributes)for(var e in t.hostAttributes)this._ensureAttribute(e,t.hostAttributes[e]);_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"_ensureAttributes",this).call(this)}},{key:"ready",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"ready",this).call(this),t.ready&&t.ready.call(this)}},{key:"attached",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"attached",this).call(this),t.attached&&t.attached.call(this)}},{key:"detached",value:function(){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"detached",this).call(this),t.detached&&t.detached.call(this)}},{key:"attributeChanged",value:function(e,r,i){_get(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"attributeChanged",this).call(this,e,r,i),t.attributeChanged&&t.attributeChanged.call(this,e,r,i)}}],[{key:"properties",get:function(){return t.properties}},{key:"observers",get:function(){return t.observers}},{key:"template",get:function(){return t._template||Polymer.DomModule&&Polymer.DomModule.import(this.is,"template")||e.template||this.prototype._template||null}}]),o}();r.generatedFrom=t;for(var o in t)if(!(o in i)){var n=Object.getOwnPropertyDescriptor(t,o);n&&Object.defineProperty(r.prototype,o,n)}return r}var i={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0};Polymer.Class=function(e){e||console.warn("Polymer.Class requires `info` argument");var r=o(e,e.behaviors?t(e.behaviors,HTMLElement):Polymer.LegacyElementMixin(HTMLElement));return r.is=e.is,r},Polymer.mixinBehaviors=t}();</script><script>!function(){"use strict";window.Polymer._polymerFn=function(n){var e=void 0;return e="function"==typeof n?n:Polymer.Class(n),customElements.define(e.is,e),e}}();</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,o,n){return o&&t(e.prototype,o),n&&t(e,n),e}}(),_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){"use strict";function t(t,e,o,n,r){var u=void 0;r&&(u="object"===(void 0===o?"undefined":_typeof(o))&&null!==o)&&(n=t.__dataTemp[e]);var a=n!==o&&(n===n||o===o);return u&&a&&(t.__dataTemp[e]=o),a}Polymer.MutableData=Polymer.dedupingMixin(function(e){var o=function(o){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,e),_createClass(n,[{key:"_shouldPropertyChange",value:function(e,o,n){return t(this,e,o,n,!0)}}]),n}();return o.prototype.mutableData=!1,o}),Polymer.OptionalMutableData=Polymer.dedupingMixin(function(e){return function(o){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,e),_createClass(n,[{key:"_shouldPropertyChange",value:function(e,o,n){return t(this,e,o,n,this.mutableData)}}],[{key:"properties",get:function(){return{mutableData:Boolean}}}]),n}()}),Polymer.MutableData._mutablePropertyChange=t}();</script><script>function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),_get=function t(e,o,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,o);if(void 0===n){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,o,r)}if("value"in n)return n.value;var i=n.get;if(void 0!==i)return i.call(r)};!function(){"use strict";function t(){return p}function e(t,e){p=t,Object.setPrototypeOf(t,e.prototype),new e,p=null}function o(t){var e=t.__dataHost;return e&&e._methodHost||e}function r(t,e,o){var r=o.mutableData?d:f,n=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,r),e}();return n.prototype.__templatizeOptions=o,n.prototype._bindTemplate(t),i(n,t,e,o),n}function n(t,o,r){var n=r.forwardHostProp;if(n){var i=o.templatizeTemplateClass;if(!i){var _=r.mutableData?c:l;i=o.templatizeTemplateClass=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,_),e}();var s=o.hostProps;for(var p in s)i.prototype._addPropertyEffect("_host_"+p,i.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:a(p,n)}),i.prototype._createNotifyingProperty("_host_"+p)}e(t,i),t.__dataProto&&Object.assign(t.__data,t.__dataProto),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties()}}function a(t,e){return function(t,o,r){e.call(t.__templatizeOwner,o.substring("_host_".length),r[o])}}function i(t,e,o,r){var n=o.hostProps||{};for(var a in r.instanceProps){delete n[a];var i=r.notifyInstanceProp;i&&t.prototype._addPropertyEffect(a,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:_(a,i)})}if(r.forwardHostProp&&e.__dataHost)for(var p in n)t.prototype._addPropertyEffect(p,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:s()})}function _(t,e){return function(t,o,r){e.call(t.__templatizeOwner,t,o,r[o])}}function s(){return function(t,e,o){t.__dataHost._setPendingPropertyOrPath("_host_"+e,o[e],!0,!0)}}var p=null;t.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:t,writable:!0}});var l=Polymer.PropertyEffects(t),c=Polymer.MutableData(l),u=Polymer.PropertyEffects(function(){function t(){_classCallCheck(this,t)}return t}()),f=function(t){function e(t){_classCallCheck(this,e);var o=_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));o._configureProperties(t),o.root=o._stampTemplate(o.__dataHost);for(var r=o.children=[],n=o.root.firstChild;n;n=n.nextSibling)r.push(n),n.__templatizeInstance=o;o.__templatizeOwner.__hideTemplateChildren__&&o._showHideChildren(!0);var a=o.__templatizeOptions;return(t&&a.instanceProps||!a.instanceProps)&&o._enableProperties(),o}return _inherits(e,u),_createClass(e,[{key:"_configureProperties",value:function(t){var e=this.__templatizeOptions;if(t)for(var o in e.instanceProps)o in t&&this._setPendingProperty(o,t[o]);for(var r in this.__hostProps)this._setPendingProperty(r,this.__dataHost["_host_"+r])}},{key:"forwardHostProp",value:function(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}},{key:"_addEventListenerToNode",value:function(t,e,o){var r=this;if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,function(t){t.model=r,o(t)});else{var n=this.__dataHost.__dataHost;n&&n._addEventListenerToNode(t,e,o)}}},{key:"_showHideChildren",value:function(t){for(var e=this.children,o=0;o<e.length;o++){var r=e[o];Boolean(t)!=Boolean(r.__hideTemplateChildren__)&&(r.nodeType===Node.TEXT_NODE?t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__:r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__)),r.__hideTemplateChildren__=t,r._showHideChildren&&r._showHideChildren(t)}}},{key:"_setUnmanagedPropertyToNode",value:function(t,o,r){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==o?t.__polymerTextContent__=r:_get(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"_setUnmanagedPropertyToNode",this).call(this,t,o,r)}},{key:"parentModel",get:function(){var t=this.__parentModel;if(!t){var e=void 0;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}}]),e}();f.prototype.__dataHost,f.prototype.__templatizeOptions,f.prototype._methodHost,f.prototype.__templatizeOwner,f.prototype.__hostProps;var d=Polymer.MutableData(f),h={templatize:function(t,e,a){if(a=a||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;var i=e.constructor._parseTemplate(t),_=i.templatizeInstanceClass;_||(_=r(t,i,a),i.templatizeInstanceClass=_),n(t,i,a);var s=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,_),e}();return s.prototype._methodHost=o(t),s.prototype.__dataHost=t,s.prototype.__templatizeOwner=e,s.prototype.__hostProps=i.hostProps,s},modelForElement:function(t,e){for(var o=void 0;e;)if(o=e.__templatizeInstance){if(o.__dataHost==t)return o;e=o.__dataHost}else e=e.parentNode;return null}};Polymer.Templatize=h,Polymer.TemplateInstanceBase=f}();</script><script>!function(){"use strict";Polymer.TemplateInstanceBase;var t={templatize:function(t,e){this._templatizerTemplate=t,this.ctor=Polymer.Templatize.templatize(t,this,{mutableData:Boolean(e),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp:function(t){return new this.ctor(t)},modelForElement:function(t){return Polymer.Templatize.modelForElement(this._templatizerTemplate,t)}};Polymer.Templatizer=t}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();!function(){"use strict";var e=Polymer.GestureEventListeners(Polymer.OptionalMutableData(Polymer.PropertyEffects(HTMLElement))),t=function(t){function r(){_classCallCheck(this,r);var e=_possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return e.root=null,e.$=null,e.__children=null,e}return _inherits(r,e),_createClass(r,null,[{key:"observedAttributes",get:function(){return["mutable-data"]}}]),_createClass(r,[{key:"attributeChangedCallback",value:function(){this.mutableData=!0}},{key:"connectedCallback",value:function(){this.render()}},{key:"disconnectedCallback",value:function(){this.__removeChildren()}},{key:"__insertChildren",value:function(){this.parentNode.insertBefore(this.root,this)}},{key:"__removeChildren",value:function(){if(this.__children)for(var e=0;e<this.__children.length;e++)this.root.appendChild(this.__children[e])}},{key:"render",value:function(){var e=this,t=void 0;if(!this.__children){if(!(t=t||this.querySelector("template"))){var r=new MutationObserver(function(){if(!(t=e.querySelector("template")))throw new Error("dom-bind requires a <template> child");r.disconnect(),e.render()});return void r.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(var n=this.root.firstChild;n;n=n.nextSibling)this.__children[this.__children.length]=n;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}}]),r}();customElements.define("dom-bind",t)}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _get=function e(t,n,i){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,i)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(i)},_createClass=function(){function e(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)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}();!function(){"use strict";Polymer.TemplateInstanceBase;var e=Polymer.OptionalMutableData(Polymer.Element),t=function(t){function n(){_classCallCheck(this,n);var e=_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return e.__instances=[],e.__limit=1/0,e.__pool=[],e.__renderDebouncer=null,e.__itemsIdxToInstIdx={},e.__chunkCount=null,e.__lastChunkTime=null,e.__sortFn=null,e.__filterFn=null,e.__observePaths=null,e.__ctor=null,e.__isDetached=!0,e.template=null,e}return _inherits(n,e),_createClass(n,null,[{key:"is",get:function(){return"dom-repeat"}},{key:"template",get:function(){return null}},{key:"properties",get:function(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!0,readOnly:!0},initialCount:{type:Number,observer:"__initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"}}}},{key:"observers",get:function(){return["__itemsChanged(items.*)"]}}]),_createClass(n,[{key:"disconnectedCallback",value:function(){_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"disconnectedCallback",this).call(this),this.__isDetached=!0;for(var e=0;e<this.__instances.length;e++)this.__detachInstance(e)}},{key:"connectedCallback",value:function(){if(_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"connectedCallback",this).call(this),this.__isDetached){this.__isDetached=!1;for(var e=this.parentNode,t=0;t<this.__instances.length;t++)this.__attachInstance(t,e)}}},{key:"__ensureTemplatized",value:function(){var e=this;if(!this.__ctor){var t=this.template=this.querySelector("template");if(!t){var n=new MutationObserver(function(){if(!e.querySelector("template"))throw new Error("dom-repeat requires a <template> child");n.disconnect(),e.__render()});return n.observe(this,{childList:!0}),!1}var i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Polymer.Templatize.templatize(t,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(e,t){for(var n,i=this.__instances,r=0;r<i.length&&(n=i[r]);r++)n.forwardHostProp(e,t)},notifyInstanceProp:function(e,t,n){if(Polymer.Path.matches(this.as,t)){var i=e[this.itemsIndexAs];t==this.as&&(this.items[i]=n);var r=Polymer.Path.translate(this.as,"items."+i,t);this.notifyPath(r,n)}}})}return!0}},{key:"__getMethodHost",value:function(){return this.__dataHost._methodHost||this.__dataHost}},{key:"__sortChanged",value:function(e){var t=this.__getMethodHost();this.__sortFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this.items&&this.__debounceRender(this.__render)}},{key:"__filterChanged",value:function(e){var t=this.__getMethodHost();this.__filterFn=e&&("function"==typeof e?e:function(){return t[e].apply(t,arguments)}),this.items&&this.__debounceRender(this.__render)}},{key:"__computeFrameTime",value:function(e){return Math.ceil(1e3/e)}},{key:"__initializeChunking",value:function(){this.initialCount&&(this.__limit=this.initialCount,this.__chunkCount=this.initialCount,this.__lastChunkTime=performance.now())}},{key:"__tryRenderChunk",value:function(){this.items&&this.__limit<this.items.length&&this.__debounceRender(this.__requestRenderChunk)}},{key:"__requestRenderChunk",value:function(){var e=this;requestAnimationFrame(function(){return e.__renderChunk()})}},{key:"__renderChunk",value:function(){var e=performance.now(),t=this._targetFrameTime/(e-this.__lastChunkTime);this.__chunkCount=Math.round(this.__chunkCount*t)||1,this.__limit+=this.__chunkCount,this.__lastChunkTime=e,this.__debounceRender(this.__render)}},{key:"__observeChanged",value:function(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}},{key:"__itemsChanged",value:function(e){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(e.path,e.value)||(this.__initializeChunking(),this.__debounceRender(this.__render))}},{key:"__handleObservedPaths",value:function(e){if(this.__observePaths){e=e.substring(e.indexOf(".")+1);for(var t=this.__observePaths,n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return this.__debounceRender(this.__render,this.delay),!0}}},{key:"__debounceRender",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.__renderDebouncer=Polymer.Debouncer.debounce(this.__renderDebouncer,t>0?Polymer.Async.timeOut.after(t):Polymer.Async.microTask,e.bind(this)),Polymer.enqueueDebouncer(this.__renderDebouncer)}},{key:"render",value:function(){this.__debounceRender(this.__render),Polymer.flush()}},{key:"__render",value:function(){this.__ensureTemplatized()&&(this.__applyFullRefresh(),this.__pool.length=0,this._setRenderedItemCount(this.__instances.length),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this.__tryRenderChunk())}},{key:"__applyFullRefresh",value:function(){for(var e=this,t=this.items||[],n=new Array(t.length),i=0;i<t.length;i++)n[i]=i;this.__filterFn&&(n=n.filter(function(n,i,r){return e.__filterFn(t[n],i,r)})),this.__sortFn&&n.sort(function(n,i){return e.__sortFn(t[n],t[i])});for(var r=this.__itemsIdxToInstIdx={},s=0,o=Math.min(n.length,this.__limit);s<o;s++){var a=this.__instances[s],_=n[s],h=t[_];r[_]=s,a&&s<this.__limit?(a._setPendingProperty(this.as,h),a._setPendingProperty(this.indexAs,s),a._setPendingProperty(this.itemsIndexAs,_),a._flushProperties()):this.__insertInstance(h,s,_)}for(var u=this.__instances.length-1;u>=s;u--)this.__detachAndRemoveInstance(u)}},{key:"__detachInstance",value:function(e){for(var t=this.__instances[e],n=0;n<t.children.length;n++){var i=t.children[n];t.root.appendChild(i)}return t}},{key:"__attachInstance",value:function(e,t){var n=this.__instances[e];t.insertBefore(n.root,this)}},{key:"__detachAndRemoveInstance",value:function(e){var t=this.__detachInstance(e);t&&this.__pool.push(t),this.__instances.splice(e,1)}},{key:"__stampInstance",value:function(e,t,n){var i={};return i[this.as]=e,i[this.indexAs]=t,i[this.itemsIndexAs]=n,new this.__ctor(i)}},{key:"__insertInstance",value:function(e,t,n){var i=this.__pool.pop();i?(i._setPendingProperty(this.as,e),i._setPendingProperty(this.indexAs,t),i._setPendingProperty(this.itemsIndexAs,n),i._flushProperties()):i=this.__stampInstance(e,t,n);var r=this.__instances[t+1],s=r?r.children[0]:this;return this.parentNode.insertBefore(i.root,s),this.__instances[t]=i,i}},{key:"_showHideChildren",value:function(e){for(var t=0;t<this.__instances.length;t++)this.__instances[t]._showHideChildren(e)}},{key:"__handleItemPath",value:function(e,t){var n=e.slice(6),i=n.indexOf("."),r=i<0?n:n.substring(0,i);if(r==parseInt(r,10)){var s=i<0?"":n.substring(i+1);this.__handleObservedPaths(s);var o=this.__itemsIdxToInstIdx[r],a=this.__instances[o];if(a){var _=this.as+(s?"."+s:"");a._setPendingPropertyOrPath(_,t,!1,!0),a._flushProperties()}return!0}}},{key:"itemForElement",value:function(e){var t=this.modelForElement(e);return t&&t[this.as]}},{key:"indexForElement",value:function(e){var t=this.modelForElement(e);return t&&t[this.indexAs]}},{key:"modelForElement",value:function(e){return Polymer.Templatize.modelForElement(this.template,e)}}]),n}();customElements.define(t.is,t),Polymer.DomRepeat=t}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _get=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var s=i.get;if(void 0!==s)return s.call(r)},_createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();!function(){"use strict";var e=function(e){function t(){_classCallCheck(this,t);var e=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.__renderDebouncer=null,e.__invalidProps=null,e.__instance=null,e._lastIf=!1,e.__ctor=null,e}return _inherits(t,Polymer.Element),_createClass(t,null,[{key:"is",get:function(){return"dom-if"}},{key:"template",get:function(){return null}},{key:"properties",get:function(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"}}}}]),_createClass(t,[{key:"__debounceRender",value:function(){var e=this;this.__renderDebouncer=Polymer.Debouncer.debounce(this.__renderDebouncer,Polymer.Async.microTask,function(){return e.__render()}),Polymer.enqueueDebouncer(this.__renderDebouncer)}},{key:"disconnectedCallback",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"disconnectedCallback",this).call(this),this.parentNode&&(this.parentNode.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||this.parentNode.host)||this.__teardownInstance()}},{key:"connectedCallback",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this.if&&this.__debounceRender()}},{key:"render",value:function(){Polymer.flush()}},{key:"__render",value:function(){if(this.if){if(!this.__ensureInstance())return;this._showHideChildren()}else this.restamp&&this.__teardownInstance();!this.restamp&&this.__instance&&this._showHideChildren(),this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}},{key:"__ensureInstance",value:function(){var e=this,t=this.parentNode;if(t){if(!this.__ctor){var n=this.querySelector("template");if(!n){var r=new MutationObserver(function(){if(!e.querySelector("template"))throw new Error("dom-if requires a <template> child");r.disconnect(),e.__render()});return r.observe(this,{childList:!0}),!1}this.__ctor=Polymer.Templatize.templatize(n,this,{mutableData:!0,forwardHostProp:function(e,t){this.__instance&&(this.if?this.__instance.forwardHostProp(e,t):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Polymer.Path.root(e)]=!0))}})}if(this.__instance){this.__syncHostProperties();var i=this.__instance.children;if(i&&i.length&&this.previousSibling!==i[i.length-1])for(var o,s=0;s<i.length&&(o=i[s]);s++)t.insertBefore(o,this)}else this.__instance=new this.__ctor,t.insertBefore(this.__instance.root,this)}return!0}},{key:"__syncHostProperties",value:function(){var e=this.__invalidProps;if(e){for(var t in e)this.__instance._setPendingProperty(t,this.__dataHost[t]);this.__invalidProps=null,this.__instance._flushProperties()}}},{key:"__teardownInstance",value:function(){if(this.__instance){var e=this.__instance.children;if(e&&e.length)for(var t,n=e[0].parentNode,r=0;r<e.length&&(t=e[r]);r++)n.removeChild(t);this.__instance=null,this.__invalidProps=null}}},{key:"_showHideChildren",value:function(){var e=this.__hideTemplateChildren__||!this.if;this.__instance&&this.__instance._showHideChildren(e)}}]),t}();customElements.define(e.is,e),Polymer.DomIf=e}();</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var s=0;s<t.length;s++){var i=t[s];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,s,i){return s&&e(t.prototype,s),i&&e(t,i),t}}();!function(){"use strict";var e=Polymer.dedupingMixin(function(e){var t=Polymer.ElementMixin(e);return function(e){function s(){_classCallCheck(this,s);var e=_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return e.__lastItems=null,e.__lastMulti=null,e.__selectedMap=null,e}return _inherits(s,t),_createClass(s,null,[{key:"properties",get:function(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}},{key:"observers",get:function(){return["__updateSelection(multi, items.*)"]}}]),_createClass(s,[{key:"__updateSelection",value:function(e,t){var s=t.path;if("items"==s){var i=t.base||[],l=this.__lastItems;if(e!==this.__lastMulti&&this.clearSelection(),l){var n=Polymer.ArraySplice.calculateSplices(i,l);this.__applySplices(n)}this.__lastItems=i,this.__lastMulti=e}else if("items.splices"==t.path)this.__applySplices(t.value.indexSplices);else{var r=s.slice("items.".length),a=parseInt(r,10);r.indexOf(".")<0&&r==a&&this.__deselectChangedIdx(a)}}},{key:"__applySplices",value:function(e){for(var t=this,s=this.__selectedMap,i=0;i<e.length;i++)!function(i){var l=e[i];s.forEach(function(e,t){e<l.index||(e>=l.index+l.removed.length?s.set(t,e+l.addedCount-l.removed.length):s.set(t,-1))});for(var n=0;n<l.addedCount;n++){var r=l.index+n;s.has(t.items[r])&&s.set(t.items[r],r)}}(i);this.__updateLinks();var l=0;s.forEach(function(e,i){e<0?(t.multi?t.splice("selected",l,1):t.selected=t.selectedItem=null,s.delete(i)):l++})}},{key:"__updateLinks",value:function(){var e=this;if(this.__dataLinkedPaths={},this.multi){var t=0;this.__selectedMap.forEach(function(s){s>=0&&e.linkPaths("items."+s,"selected."+t++)})}else this.__selectedMap.forEach(function(t){e.linkPaths("selected","items."+t),e.linkPaths("selectedItem","items."+t)})}},{key:"clearSelection",value:function(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}},{key:"isSelected",value:function(e){return this.__selectedMap.has(e)}},{key:"isIndexSelected",value:function(e){return this.isSelected(this.items[e])}},{key:"__deselectChangedIdx",value:function(e){var t=this,s=this.__selectedIndexForItemIndex(e);if(s>=0){var i=0;this.__selectedMap.forEach(function(e,l){s==i++&&t.deselect(l)})}}},{key:"__selectedIndexForItemIndex",value:function(e){var t=this.__dataLinkedPaths["items."+e];if(t)return parseInt(t.slice("selected.".length),10)}},{key:"deselect",value:function(e){var t=this.__selectedMap.get(e);if(t>=0){this.__selectedMap.delete(e);var s=void 0;this.multi&&(s=this.__selectedIndexForItemIndex(t)),this.__updateLinks(),this.multi?this.splice("selected",s,1):this.selected=this.selectedItem=null}}},{key:"deselectIndex",value:function(e){this.deselect(this.items[e])}},{key:"select",value:function(e){this.selectIndex(this.items.indexOf(e))}},{key:"selectIndex",value:function(e){var t=this.items[e];this.isSelected(t)?this.toggle&&this.deselectIndex(e):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(t,e),this.__updateLinks(),this.multi?this.push("selected",t):this.selected=this.selectedItem=t)}}]),s}()});Polymer.ArraySelectorMixin=e;var t=e(Polymer.Element),s=function(e){function s(){return _classCallCheck(this,s),_possibleConstructorReturn(this,(s.__proto__||Object.getPrototypeOf(s)).apply(this,arguments))}return _inherits(s,t),_createClass(s,null,[{key:"is",get:function(){return"array-selector"}}]),s}();customElements.define(s.is,s),Polymer.ArraySelector=s}();</script><script>(function(){"use strict";function t(t){i=(!t||!t.shimcssproperties)&&(S||!(navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)||!window.CSS||!CSS.supports||!CSS.supports("box-shadow","0 0 0 var(--foo)")))}function e(t,e){for(var n in e)null===n?t.style.removeProperty(n):t.style.setProperty(n,e[n])}function n(){var t=l;requestAnimationFrame(function(){u?u(t):(d||(d=new Promise(function(t){r=t}),"complete"===document.readyState?r():document.addEventListener("readystatechange",function(){"complete"===document.readyState&&r()})),d.then(function(){t&&t()}))})}function o(){this.customStyles=[],this.enqueued=!1}function a(t){!t.enqueued&&l&&(t.enqueued=!0,n())}var i,S=!(window.ShadyDOM&&window.ShadyDOM.inUse);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?i=window.ShadyCSS.nativeCss:window.ShadyCSS?(t(window.ShadyCSS),window.ShadyCSS=void 0):t(window.WebComponents&&window.WebComponents.flags);var r,s=i,d=null,u=window.HTMLImports&&window.HTMLImports.whenReady||null,y=null,l=null;o.prototype.c=function(t){t.__seenByShadyCSS||(t.__seenByShadyCSS=!0,this.customStyles.push(t),a(this))},o.prototype.b=function(t){if(t.__shadyCSSCachedStyle)return t.__shadyCSSCachedStyle;return t.getStyle?t.getStyle():t},o.prototype.a=function(){for(var t=this.customStyles,e=0;e<t.length;e++){var n=t[e];if(!n.__shadyCSSCachedStyle){var o=this.b(n);o&&(o=o.__appliedElement||o,y&&y(o),n.__shadyCSSCachedStyle=o)}}return t},o.prototype.addCustomStyle=o.prototype.c,o.prototype.getStyleForCustomStyle=o.prototype.b,o.prototype.processStyles=o.prototype.a,Object.defineProperties(o.prototype,{transformCallback:{get:function(){return y},set:function(t){y=t}},validateCallback:{get:function(){return l},set:function(t){var e=!1;l||(e=!0),l=t,e&&a(this)}}});var c=new o;window.ShadyCSS||(window.ShadyCSS={prepareTemplate:function(){},styleSubtree:function(t,n){c.a(),e(t,n)},styleElement:function(){c.a()},styleDocument:function(t){c.a(),e(document.body,t)},getComputedStyleValue:function(t,e){return(t=window.getComputedStyle(t).getPropertyValue(e))?t.trim():""},nativeCss:s,nativeShadow:S}),window.ShadyCSS.CustomStyleInterface=c}).call(this);</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();!function(){"use strict";var e=window.ShadyCSS.CustomStyleInterface,t=function(t){function r(){_classCallCheck(this,r);var t=_possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t._style=null,e.addCustomStyle(t),t}return _inherits(r,HTMLElement),_createClass(r,[{key:"getStyle",value:function(){if(this._style)return this._style;var e=this.querySelector("style");if(!e)return null;this._style=e;var t=e.getAttribute("include");return t&&(e.removeAttribute("include"),e.textContent=Polymer.StyleGather.cssFromModules(t)+e.textContent),this._style}}]),r}();window.customElements.define("custom-style",t),Polymer.CustomStyle=t}();</script><script>!function(){"use strict";var t=void 0;t=Polymer.MutableData._mutablePropertyChange,Polymer.MutableDataBehavior={_shouldPropertyChange:function(a,e,r){return t(this,a,e,r,!0)}},Polymer.OptionalMutableDataBehavior={properties:{mutableData:Boolean},_shouldPropertyChange:function(a,e,r){return t(this,a,e,r,this.mutableData)}}}();</script><script>Polymer.Base=Polymer.LegacyElementMixin(HTMLElement).prototype;</script><custom-style><style is="custom-style">html{--paper-font-common-base:{font-family:'Roboto', 'Noto', sans-serif;-webkit-font-smoothing:antialiased;};--paper-font-common-code:{font-family:'Roboto Mono', 'Consolas', 'Menlo', monospace;-webkit-font-smoothing:antialiased;};--paper-font-common-expensive-kerning:{text-rendering:optimizeLegibility;};--paper-font-common-nowrap:{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;};--paper-font-display4:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:112px;font-weight:300;letter-spacing:-.044em;line-height:120px;};--paper-font-display3:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:56px;font-weight:400;letter-spacing:-.026em;line-height:60px;};--paper-font-display2:{@apply --paper-font-common-base;font-size:45px;font-weight:400;letter-spacing:-.018em;line-height:48px;};--paper-font-display1:{@apply --paper-font-common-base;font-size:34px;font-weight:400;letter-spacing:-.01em;line-height:40px;};--paper-font-headline:{@apply --paper-font-common-base;font-size:24px;font-weight:400;letter-spacing:-.012em;line-height:32px;};--paper-font-title:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:20px;font-weight:500;line-height:28px;};--paper-font-subhead:{@apply --paper-font-common-base;font-size:16px;font-weight:400;line-height:24px;};--paper-font-body2:{@apply --paper-font-common-base;font-size:14px;font-weight:500;line-height:24px;};--paper-font-body1:{@apply --paper-font-common-base;font-size:14px;font-weight:400;line-height:20px;};--paper-font-caption:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:12px;font-weight:400;letter-spacing:0.011em;line-height:20px;};--paper-font-menu:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:13px;font-weight:500;line-height:24px;};--paper-font-button:{@apply --paper-font-common-base;@apply --paper-font-common-nowrap;font-size:14px;font-weight:500;letter-spacing:0.018em;line-height:24px;text-transform:uppercase;};--paper-font-code2:{@apply --paper-font-common-code;font-size:14px;font-weight:700;line-height:20px;};--paper-font-code1:{@apply --paper-font-common-code;font-size:14px;font-weight:500;line-height:20px;};}</style></custom-style><dom-module id="iron-flex" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.horizontal,
.layout.vertical{display:-ms-flexbox;display:-webkit-flex;display:flex;}.layout.inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex;}.layout.horizontal{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row;}.layout.vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;}.layout.wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;}.layout.no-wrap{-ms-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;flex-wrap:nowrap;}.layout.center,
.layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center;}.layout.center-justified,
.layout.center-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}.flex{-ms-flex:1 1 0.000000001px;-webkit-flex:1;flex:1;-webkit-flex-basis:0.000000001px;flex-basis:0.000000001px;}.flex-auto{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto;}.flex-none{-ms-flex:none;-webkit-flex:none;flex:none;}</style></template></dom-module><dom-module id="iron-flex-reverse" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.horizontal-reverse,
.layout.vertical-reverse{display:-ms-flexbox;display:-webkit-flex;display:flex;}.layout.horizontal-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;}.layout.vertical-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;}.layout.wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;}</style></template></dom-module><dom-module id="iron-flex-alignment" assetpath="../bower_components/iron-flex-layout/"><template><style>.layout.start{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;}.layout.center,
.layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center;}.layout.end{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end;}.layout.baseline{-ms-flex-align:baseline;-webkit-align-items:baseline;align-items:baseline;}.layout.start-justified{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}.layout.center-justified,
.layout.center-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}.layout.end-justified{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;}.layout.around-justified{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around;}.layout.justified{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;}.self-start{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start;}.self-center{-ms-align-self:center;-webkit-align-self:center;align-self:center;}.self-end{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end;}.self-stretch{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch;}.self-baseline{-ms-align-self:baseline;-webkit-align-self:baseline;align-self:baseline;}.layout.start-aligned{-ms-flex-line-pack:start;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start;}.layout.end-aligned{-ms-flex-line-pack:end;-ms-align-content:flex-end;-webkit-align-content:flex-end;align-content:flex-end;}.layout.center-aligned{-ms-flex-line-pack:center;-ms-align-content:center;-webkit-align-content:center;align-content:center;}.layout.between-aligned{-ms-flex-line-pack:justify;-ms-align-content:space-between;-webkit-align-content:space-between;align-content:space-between;}.layout.around-aligned{-ms-flex-line-pack:distribute;-ms-align-content:space-around;-webkit-align-content:space-around;align-content:space-around;}</style></template></dom-module><dom-module id="iron-flex-factors" assetpath="../bower_components/iron-flex-layout/"><template><style>.flex,
.flex-1{-ms-flex:1 1 0.000000001px;-webkit-flex:1;flex:1;-webkit-flex-basis:0.000000001px;flex-basis:0.000000001px;}.flex-2{-ms-flex:2;-webkit-flex:2;flex:2;}.flex-3{-ms-flex:3;-webkit-flex:3;flex:3;}.flex-4{-ms-flex:4;-webkit-flex:4;flex:4;}.flex-5{-ms-flex:5;-webkit-flex:5;flex:5;}.flex-6{-ms-flex:6;-webkit-flex:6;flex:6;}.flex-7{-ms-flex:7;-webkit-flex:7;flex:7;}.flex-8{-ms-flex:8;-webkit-flex:8;flex:8;}.flex-9{-ms-flex:9;-webkit-flex:9;flex:9;}.flex-10{-ms-flex:10;-webkit-flex:10;flex:10;}.flex-11{-ms-flex:11;-webkit-flex:11;flex:11;}.flex-12{-ms-flex:12;-webkit-flex:12;flex:12;}</style></template></dom-module><dom-module id="iron-positioning" assetpath="../bower_components/iron-flex-layout/"><template><style>.block{display:block;}[hidden]{display:none !important;}.invisible{visibility:hidden !important;}.relative{position:relative;}.fit{position:absolute;top:0;right:0;bottom:0;left:0;}body.fullbleed{margin:0;height:100vh;}.scroll{-webkit-overflow-scrolling:touch;overflow:auto;}.fixed-bottom,
.fixed-left,
.fixed-right,
.fixed-top{position:fixed;}.fixed-top{top:0;left:0;right:0;}.fixed-right{top:0;right:0;bottom:0;}.fixed-bottom{right:0;bottom:0;left:0;}.fixed-left{top:0;bottom:0;left:0;}</style></template></dom-module><script>!function(t,e){var i={},n={},r={};!function(t,e){function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=v}function n(){return t.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function r(e,n,r){var a=new i;return n&&(a.fill="both",a.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach(function(i){if("auto"!=e[i]){if(("number"==typeof a[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&-1==_.indexOf(e[i]))return;if("direction"==i&&-1==g.indexOf(e[i]))return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;a[i]=e[i]}}):a.duration=e,a}function a(t,e,i,n){return t<0||t>1||i<0||i>1?v:function(r){function a(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(r<=0){var o=0;return t>0?o=e/t:!e&&i>0&&(o=n/i),o*r}if(r>=1){var s=0;return i<1?s=(n-1)/(i-1):1==i&&t<1&&(s=(e-1)/(t-1)),1+s*(r-1)}for(var u=0,c=1;u<c;){var f=(u+c)/2,l=a(t,i,f);if(Math.abs(r-l)<1e-5)return a(e,n,f);l<r?u=f:c=f}return a(e,n,f)}}function o(t,e){return function(i){if(i>=1)return 1;var n=1/t;return(i+=e*n)-i%n}}function s(t){x||(x=document.createElement("div").style),x.animationTimingFunction="",x.animationTimingFunction=t;var e=x.animationTimingFunction;if(""==e&&n())throw new TypeError(t+" is not a valid value for easing");return e}function u(t){if("linear"==t)return v;var e=A.exec(t);if(e)return a.apply(this,e.slice(1).map(Number));var i=P.exec(t);return i?o(Number(i[1]),{start:y,middle:b,end:T}[i[2]]):w[t]||v}function c(t){return 0===t.duration||0===t.iterations?0:t.duration*t.iterations}function f(t,e,i){if(null==e)return R;var n=i.delay+t+i.endDelay;return e<Math.min(i.delay,n)?k:e>=Math.min(i.delay+t,n)?N:S}function l(t,e,i,n,r){switch(n){case k:return"backwards"==e||"both"==e?0:null;case S:return i-r;case N:return"forwards"==e||"both"==e?t:null;case R:return null}}function h(t,e,i,n,r){var a=r;return 0===t?e!==k&&(a+=i):a+=n/t,a}function m(t,e,i,n,r,a){var o=t===1/0?e%1:t%1;return 0!==o||i!==N||0===n||0===r&&0!==a||(o=1),o}function d(t,e,i,n){return t===N&&e===1/0?1/0:1===i?Math.floor(n)-1:Math.floor(n)}function p(t,e,i){var n=t;if("normal"!==t&&"reverse"!==t){var r=e;"alternate-reverse"===t&&(r+=1),n="normal",r!==1/0&&r%2!=0&&(n="reverse")}return"normal"===n?i:1-i}var _="backwards|forwards|both|none".split("|"),g="reverse|alternate|alternate-reverse".split("|"),v=function(t){return t};i.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||t<0)&&n())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||t<0)&&n())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=u(s(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||t<0)&&n())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var y=1,b=.5,T=0,w={ease:a(.25,.1,.25,1),"ease-in":a(.42,0,1,1),"ease-out":a(0,0,.58,1),"ease-in-out":a(.42,0,.58,1),"step-start":o(1,y),"step-middle":o(1,b),"step-end":o(1,T)},x=null,E="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",A=new RegExp("cubic-bezier\\("+E+","+E+","+E+","+E+"\\)"),P=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,R=0,k=1,N=2,S=3;t.cloneTimingInput=function(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e},t.makeTiming=r,t.numericTimingToObject=function(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t},t.normalizeTimingInput=function(e,i){return e=t.numericTimingToObject(e),r(e,i)},t.calculateActiveDuration=function(t){return Math.abs(c(t)/t.playbackRate)},t.calculateIterationProgress=function(t,e,i){var n=f(t,e,i),r=l(t,i.fill,e,n,i.delay);if(null===r)return null;var a=h(i.duration,n,i.iterations,r,i.iterationStart),o=m(a,i.iterationStart,n,i.iterations,r,i.duration),s=d(n,i.iterations,o,a),u=p(i.direction,s,o);return i._easingFunction(u)},t.calculatePhase=f,t.normalizeEasing=s,t.parseEasingFunction=u}(i),function(t,e){function i(t,e){return t in c?c[t][e]||e:e}function n(t){return"display"===t||0===t.lastIndexOf("animation",0)||0===t.lastIndexOf("transition",0)}function r(t,e,r){if(!n(t)){var a=o[t];if(a){s.style[t]=e;for(var u in a){var c=a[u],f=s.style[c];r[c]=i(c,f)}}else r[t]=i(t,e)}}function a(t){var e=[];for(var i in t)if(!(i in["easing","offset","composite"])){var n=t[i];Array.isArray(n)||(n=[n]);for(var r,a=n.length,o=0;o<a;o++)(r={}).offset="offset"in t?t.offset:1==a?1:o/(a-1),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),r[i]=n[o],e.push(r)}return e.sort(function(t,e){return t.offset-e.offset}),e}var o={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},s=document.createElementNS("http://www.w3.org/1999/xhtml","div"),u={thin:"1px",medium:"3px",thick:"5px"},c={borderBottomWidth:u,borderLeftWidth:u,borderRightWidth:u,borderTopWidth:u,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:u,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};t.convertToArrayForm=a,t.normalizeKeyframes=function(e){if(null==e)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||(e=a(e));for(var i=e.map(function(e){var i={};for(var n in e){var a=e[n];if("offset"==n){if(null!=a){if(a=Number(a),!isFinite(a))throw new TypeError("Keyframe offsets must be numbers.");if(a<0||a>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==n){if("add"==a||"accumulate"==a)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=a)throw new TypeError("Invalid composite mode "+a+".")}else a="easing"==n?t.normalizeEasing(a):""+a;r(n,a,i)}return void 0==i.offset&&(i.offset=null),void 0==i.easing&&(i.easing="linear"),i}),n=!0,o=-1/0,s=0;s<i.length;s++){var u=i[s].offset;if(null!=u){if(u<o)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");o=u}else n=!1}return i=i.filter(function(t){return t.offset>=0&&t.offset<=1}),n||function(){var t=i.length;null==i[t-1].offset&&(i[t-1].offset=1),t>1&&null==i[0].offset&&(i[0].offset=0);for(var e=0,n=i[0].offset,r=1;r<t;r++){var a=i[r].offset;if(null!=a){for(var o=1;o<r-e;o++)i[e+o].offset=n+(a-n)*o/(r-e);e=r,n=a}}}(),i}}(i),function(t){var e={};t.isDeprecated=function(t,i,n,r){var a=r?"are":"is",o=new Date,s=new Date(i);return s.setMonth(s.getMonth()+3),!(o<s&&(t in e||console.warn("Web Animations: "+t+" "+a+" deprecated and will stop working on "+s.toDateString()+". "+n),e[t]=!0,1))},t.deprecated=function(e,i,n,r){var a=r?"are":"is";if(t.isDeprecated(e,i,n,r))throw new Error(e+" "+a+" no longer supported. "+n)}}(i),function(){if(document.documentElement.animate){var t=document.documentElement.animate([],0),e=!0;if(t&&(e=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(i){void 0===t[i]&&(e=!0)})),!e)return}!function(t,e,i){function n(t){for(var e={},i=0;i<t.length;i++)for(var n in t[i])if("offset"!=n&&"easing"!=n&&"composite"!=n){var r={offset:t[i].offset,easing:t[i].easing,value:t[i][n]};e[n]=e[n]||[],e[n].push(r)}for(var a in e){var o=e[a];if(0!=o[0].offset||1!=o[o.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return e}function r(i){var n=[];for(var r in i)for(var a=i[r],o=0;o<a.length-1;o++){var s=o,u=o+1,c=a[s].offset,f=a[u].offset,l=c,h=f;0==o&&(l=-1/0,0==f&&(u=s)),o==a.length-2&&(h=1/0,1==c&&(s=u)),n.push({applyFrom:l,applyTo:h,startOffset:a[s].offset,endOffset:a[u].offset,easingFunction:t.parseEasingFunction(a[s].easing),property:r,interpolation:e.propertyInterpolation(r,a[s].value,a[u].value)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}e.convertEffectInput=function(i){var a=n(t.normalizeKeyframes(i)),o=r(a);return function(t,i){if(null!=i)o.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(n){var r=i-n.startOffset,a=n.endOffset-n.startOffset,o=0==a?0:n.easingFunction(r/a);e.apply(t,n.property,n.interpolation(o))});else for(var n in a)"offset"!=n&&"easing"!=n&&"composite"!=n&&e.clear(t,n)}}}(i,n),function(t,e,i){function n(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function r(t,e,i){a[i]=a[i]||[],a[i].push([t,e])}var a={};e.addPropertiesHandler=function(t,e,i){for(var a=0;a<i.length;a++)r(t,e,n(i[a]))};var o={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};e.propertyInterpolation=function(i,r,s){var u=i;/-/.test(i)&&!t.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(u=n(i)),"initial"!=r&&"initial"!=s||("initial"==r&&(r=o[u]),"initial"==s&&(s=o[u]));for(var c=r==s?[]:a[u],f=0;c&&f<c.length;f++){var l=c[f][0](r),h=c[f][0](s);if(void 0!==l&&void 0!==h){var m=c[f][1](l,h);if(m){var d=e.Interpolation.apply(null,m);return function(t){return 0==t?r:1==t?s:d(t)}}}}return e.Interpolation(!1,!0,function(t){return t?s:r})}}(i,n),function(t,e,i){function n(e){var i=t.calculateActiveDuration(e),n=function(n){return t.calculateIterationProgress(i,n,e)};return n._totalDuration=e.delay+i+e.endDelay,n}e.KeyframeEffect=function(i,r,a,o){var s,u=n(t.normalizeTimingInput(a)),c=e.convertEffectInput(r),f=function(){c(i,s)};return f._update=function(t){return null!==(s=u(t))},f._clear=function(){c(i,null)},f._hasSameTarget=function(t){return i===t},f._target=i,f._totalDuration=u._totalDuration,f._id=o,f}}(i,n),function(t,e){t.apply=function(e,i,n){e.style[t.propertyName(i)]=n},t.clear=function(e,i){e.style[t.propertyName(i)]=""}}(n),function(t){window.Element.prototype.animate=function(e,i){var n="";return i&&i.id&&(n=i.id),t.timeline._play(t.KeyframeEffect(this,e,i,n))}}(n),function(t,e){function i(t,e,n){if("number"==typeof t&&"number"==typeof e)return t*(1-n)+e*n;if("boolean"==typeof t&&"boolean"==typeof e)return n<.5?t:e;if(t.length==e.length){for(var r=[],a=0;a<t.length;a++)r.push(i(t[a],e[a],n));return r}throw"Mismatched interpolation arguments "+t+":"+e}n.Interpolation=function(t,e,n){return function(r){return n(i(t,e,r))}}}(),function(t,e,i){t.sequenceNumber=0;var n=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};e.Animation=function(e){this.id="",e&&e._id&&(this.id=e._id),this._sequenceNumber=t.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=e,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},e.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,e.timeline._animations.push(this))},_tickCurrentTime:function(t,e){t!=this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),e.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var i=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)),null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,e.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),e.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){if(this._isFinished){if(!this._finishedFlag){var e=new n(this,this._currentTime,t),i=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){i.forEach(function(t){t.call(e.target,e)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();-1===t.indexOf(this)&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);-1!==e&&t.splice(e,1)}}}(i,n),function(t,e,i){function n(t){var e=c;c=[],t<_.currentTime&&(t=_.currentTime),_._animations.sort(r),_._animations=s(t,!0,_._animations)[0],e.forEach(function(e){e[1](t)}),o(),l=void 0}function r(t,e){return t._sequenceNumber-e._sequenceNumber}function a(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function o(){d.forEach(function(t){t()}),d.length=0}function s(t,i,n){p=!0,m=!1,e.timeline.currentTime=t,h=!1;var r=[],a=[],o=[],s=[];return n.forEach(function(e){e._tick(t,i),e._inEffect?(a.push(e._effect),e._markTarget()):(r.push(e._effect),e._unmarkTarget()),e._needsTick&&(h=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?o.push(e):s.push(e)}),d.push.apply(d,r),d.push.apply(d,a),h&&requestAnimationFrame(function(){}),p=!1,[o,s]}var u=window.requestAnimationFrame,c=[],f=0;window.requestAnimationFrame=function(t){var e=f++;return 0==c.length&&u(n),c.push([e,t]),e},window.cancelAnimationFrame=function(t){c.forEach(function(e){e[0]==t&&(e[1]=function(){})})},a.prototype={_play:function(i){i._timing=t.normalizeTimingInput(i.timing);var n=new e.Animation(i);return n._idle=!1,n._timeline=this,this._animations.push(n),e.restart(),e.applyDirtiedAnimation(n),n}};var l=void 0,h=!1,m=!1;e.restart=function(){return h||(h=!0,requestAnimationFrame(function(){}),m=!0),m},e.applyDirtiedAnimation=function(t){if(!p){t._markTarget();var i=t._targetAnimations();i.sort(r),s(e.timeline.currentTime,!1,i.slice())[1].forEach(function(t){var e=_._animations.indexOf(t);-1!==e&&_._animations.splice(e,1)}),o()}};var d=[],p=!1,_=new a;e.timeline=_}(i,n),function(t){function e(t,e){var i=t.exec(e);if(i)return i=t.ignoreCase?i[0].toLowerCase():i[0],[i,e.substr(i.length)]}function i(t,e){var i=t(e=e.replace(/^\s*/,""));if(i)return[i[0],i[1].replace(/^\s*/,"")]}function n(t,e){for(var i=t,n=e;i&&n;)i>n?i%=n:n%=i;return i=t*e/(i+n)}function r(t,e,i,r,a){for(var o=[],s=[],u=[],c=n(r.length,a.length),f=0;f<c;f++){var l=e(r[f%r.length],a[f%a.length]);if(!l)return;o.push(l[0]),s.push(l[1]),u.push(l[2])}return[o,s,function(e){var n=e.map(function(t,e){return u[e](t)}).join(i);return t?t(n):n}]}t.consumeToken=e,t.consumeTrimmed=i,t.consumeRepeated=function(t,n,r){t=i.bind(null,t);for(var a=[];;){var o=t(r);if(!o)return[a,r];if(a.push(o[0]),r=o[1],!(o=e(n,r))||""==o[1])return[a,r];r=o[1]}},t.consumeParenthesised=function(t,e){for(var i=0,n=0;n<e.length&&(!/\s|,/.test(e[n])||0!=i);n++)if("("==e[n])i++;else if(")"==e[n]&&(0==--i&&n++,i<=0))break;var r=t(e.substr(0,n));return void 0==r?void 0:[r,e.substr(n)]},t.ignore=function(t){return function(e){var i=t(e);return i&&(i[0]=void 0),i}},t.optional=function(t,e){return function(i){return t(i)||[e,i]}},t.consumeList=function(e,i){for(var n=[],r=0;r<e.length;r++){var a=t.consumeTrimmed(e[r],i);if(!a||""==a[0])return;void 0!==a[0]&&n.push(a[0]),i=a[1]}if(""==i)return n},t.mergeNestedRepeated=r.bind(null,null),t.mergeWrappedNestedRepeated=r,t.mergeList=function(t,e,i){for(var n=[],r=[],a=[],o=0,s=0;s<i.length;s++)if("function"==typeof i[s]){var u=i[s](t[o],e[o++]);n.push(u[0]),r.push(u[1]),a.push(u[2])}else!function(t){n.push(!1),r.push(!1),a.push(function(){return i[t]})}(s);return[n,r,function(t){for(var e="",i=0;i<t.length;i++)e+=a[i](t[i]);return e}]}}(n),function(t){function e(e){var i={inset:!1,lengths:[],color:null},n=t.consumeRepeated(function(e){var n=t.consumeToken(/^inset/i,e);return n?(i.inset=!0,n):(n=t.consumeLengthOrPercent(e))?(i.lengths.push(n[0]),n):(n=t.consumeColor(e))?(i.color=n[0],n):void 0},/^/,e);if(n&&n[0].length)return[i,n[1]]}var i=function(e,i,n,r){function a(t){return{inset:t,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var o=[],s=[],u=0;u<n.length||u<r.length;u++){var c=n[u]||a(r[u].inset),f=r[u]||a(n[u].inset);o.push(c),s.push(f)}return t.mergeNestedRepeated(e,i,o,s)}.bind(null,function(e,i){for(;e.lengths.length<Math.max(e.lengths.length,i.lengths.length);)e.lengths.push({px:0});for(;i.lengths.length<Math.max(e.lengths.length,i.lengths.length);)i.lengths.push({px:0});if(e.inset==i.inset&&!!e.color==!!i.color){for(var n,r=[],a=[[],0],o=[[],0],s=0;s<e.lengths.length;s++){var u=t.mergeDimensions(e.lengths[s],i.lengths[s],2==s);a[0].push(u[0]),o[0].push(u[1]),r.push(u[2])}if(e.color&&i.color){var c=t.mergeColors(e.color,i.color);a[1]=c[0],o[1]=c[1],n=c[2]}return[a,o,function(t){for(var i=e.inset?"inset ":" ",a=0;a<r.length;a++)i+=r[a](t[0][a])+" ";return n&&(i+=n(t[1])),i}]}},", ");t.addPropertiesHandler(function(i){var n=t.consumeRepeated(e,/^,/,i);if(n&&""==n[1])return n[0]},i,["box-shadow","text-shadow"])}(n),function(t,e){function i(t){return t.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function n(t,e,i){return Math.min(e,Math.max(t,i))}function r(t){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t))return Number(t)}function a(t,e){return function(r,a){return[r,a,function(r){return i(n(t,e,r))}]}}function o(t){var e=t.trim().split(/\s*[\s,]\s*/);if(0!==e.length){for(var i=[],n=0;n<e.length;n++){var a=r(e[n]);if(void 0===a)return;i.push(a)}return i}}t.clamp=n,t.addPropertiesHandler(o,function(t,e){if(t.length==e.length)return[t,e,function(t){return t.map(i).join(" ")}]},["stroke-dasharray"]),t.addPropertiesHandler(r,a(0,1/0),["border-image-width","line-height"]),t.addPropertiesHandler(r,a(0,1),["opacity","shape-image-threshold"]),t.addPropertiesHandler(r,function(t,e){if(0!=t)return a(0,1/0)(t,e)},["flex-grow","flex-shrink"]),t.addPropertiesHandler(r,function(t,e){return[t,e,function(t){return Math.round(n(1,1/0,t))}]},["orphans","widows"]),t.addPropertiesHandler(r,function(t,e){return[t,e,Math.round]},["z-index"]),t.parseNumber=r,t.parseNumberList=o,t.mergeNumbers=function(t,e){return[t,e,i]},t.numberToString=i}(n),function(t,e){n.addPropertiesHandler(String,function(t,e){if("visible"==t||"visible"==e)return[0,1,function(i){return i<=0?t:i>=1?e:"visible"}]},["visibility"])}(),function(t,e){function i(t){t=t.trim(),a.fillStyle="#000",a.fillStyle=t;var e=a.fillStyle;if(a.fillStyle="#fff",a.fillStyle=t,e==a.fillStyle){a.fillRect(0,0,1,1);var i=a.getImageData(0,0,1,1).data;a.clearRect(0,0,1,1);var n=i[3]/255;return[i[0]*n,i[1]*n,i[2]*n,n]}}function n(e,i){return[e,i,function(e){if(e[3])for(var i=0;i<3;i++)e[i]=Math.round(function(t){return Math.max(0,Math.min(255,t))}(e[i]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var r=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");r.width=r.height=1;var a=r.getContext("2d");t.addPropertiesHandler(i,n,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,i),t.mergeColors=n}(n),function(t,e){function i(t){function e(){var e=s.exec(t);o=e?e[0]:void 0}function i(){var t=Number(o);return e(),t}function n(){if("("!==o)return i();e();var t=a();return")"!==o?NaN:(e(),t)}function r(){for(var t=n();"*"===o||"/"===o;){var i=o;e();var r=n();"*"===i?t*=r:t/=r}return t}function a(){for(var t=r();"+"===o||"-"===o;){var i=o;e();var n=r();"+"===i?t+=n:t-=n}return t}var o,s=/([\+\-\w\.]+|[\(\)\*\/])/g;return e(),a()}function n(t,e){if("0"==(e=e.trim().toLowerCase())&&"px".search(t)>=0)return{px:0};if(/^[^(]*$|^calc/.test(e)){var n={};e=(e=e.replace(/calc\(/g,"(")).replace(t,function(t){return n[t]=null,"U"+t});for(var r="U("+t.source+")",a=e.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+r,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),o=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],s=0;s<o.length;)o[s].test(a)?(a=a.replace(o[s],"$1"),s=0):s++;if("D"==a){for(var u in n){var c=i(e.replace(new RegExp("U"+u,"g"),"").replace(new RegExp(r,"g"),"*0"));if(!isFinite(c))return;n[u]=c}return n}}}function r(t,e){return a(t,e,!0)}function a(e,i,n){var r,a=[];for(r in e)a.push(r);for(r in i)a.indexOf(r)<0&&a.push(r);return e=a.map(function(t){return e[t]||0}),i=a.map(function(t){return i[t]||0}),[e,i,function(e){var i=e.map(function(i,r){return 1==e.length&&n&&(i=Math.max(i,0)),t.numberToString(i)+a[r]}).join(" + ");return e.length>1?"calc("+i+")":i}]}var o="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",s=n.bind(null,new RegExp(o,"g")),u=n.bind(null,new RegExp(o+"|%","g")),c=n.bind(null,/deg|rad|grad|turn/g);t.parseLength=s,t.parseLengthOrPercent=u,t.consumeLengthOrPercent=t.consumeParenthesised.bind(null,u),t.parseAngle=c,t.mergeDimensions=a;var f=t.consumeParenthesised.bind(null,s),l=t.consumeRepeated.bind(void 0,f,/^/),h=t.consumeRepeated.bind(void 0,l,/^,/);t.consumeSizePairList=h;var m=t.mergeNestedRepeated.bind(void 0,r," "),d=t.mergeNestedRepeated.bind(void 0,m,",");t.mergeNonNegativeSizePair=m,t.addPropertiesHandler(function(t){var e=h(t);if(e&&""==e[1])return e[0]},d,["background-size"]),t.addPropertiesHandler(u,r,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),t.addPropertiesHandler(u,a,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(n),function(t,e){function i(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function n(e){var n=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,i,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],e);if(n&&4==n[0].length)return n[0]}var r=t.mergeWrappedNestedRepeated.bind(null,function(t){return"rect("+t+")"},function(e,i){return"auto"==e||"auto"==i?[!0,!1,function(n){var r=n?e:i;if("auto"==r)return"auto";var a=t.mergeDimensions(r,r);return a[2](a[0])}]:t.mergeDimensions(e,i)},", ");t.parseBox=n,t.mergeBoxes=r,t.addPropertiesHandler(n,r,["clip"])}(n),function(t,e){function i(t){return function(e){var i=0;return t.map(function(t){return t===c?e[i++]:t})}}function n(t){return t}function r(e){if("none"==(e=e.toLowerCase().trim()))return[];for(var i,n=/\s*(\w+)\(([^)]*)\)/g,r=[],a=0;i=n.exec(e);){if(i.index!=a)return;a=i.index+i[0].length;var o=i[1],s=h[o];if(!s)return;var u=i[2].split(","),c=s[0];if(c.length<u.length)return;for(var m=[],d=0;d<c.length;d++){var p,_=u[d],g=c[d];if(void 0===(p=_?{A:function(e){return"0"==e.trim()?l:t.parseAngle(e)},N:t.parseNumber,T:t.parseLengthOrPercent,L:t.parseLength}[g.toUpperCase()](_):{a:l,n:m[0],t:f}[g]))return;m.push(p)}if(r.push({t:o,d:m}),n.lastIndex==e.length)return r}}function a(t){return t.toFixed(6).replace(".000000","")}function o(e,i){if(e.decompositionPair!==i){e.decompositionPair=i;var n=t.makeMatrixDecomposition(e)}if(i.decompositionPair!==e){i.decompositionPair=e;var r=t.makeMatrixDecomposition(i)}return null==n[0]||null==r[0]?[[!1],[!0],function(t){return t?i[0].d:e[0].d}]:(n[0].push(0),r[0].push(1),[n,r,function(e){var i=t.quat(n[0][3],r[0][3],e[5]);return t.composeMatrix(e[0],e[1],e[2],i,e[4]).map(a).join(",")}])}function s(t){return t.replace(/[xy]/,"")}function u(t){return t.replace(/(x|y|z|3d)?$/,"3d")}var c=null,f={px:0},l={deg:0},h={matrix:["NNNNNN",[c,c,0,0,c,c,0,0,0,0,1,0,c,c,0,1],n],matrix3d:["NNNNNNNNNNNNNNNN",n],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",i([c,c,1]),n],scalex:["N",i([c,1,1]),i([c,1])],scaley:["N",i([1,c,1]),i([1,c])],scalez:["N",i([1,1,c])],scale3d:["NNN",n],skew:["Aa",null,n],skewx:["A",null,i([c,l])],skewy:["A",null,i([l,c])],translate:["Tt",i([c,c,f]),n],translatex:["T",i([c,f,f]),i([c,f])],translatey:["T",i([f,c,f]),i([f,c])],translatez:["L",i([f,f,c])],translate3d:["TTL",n]};t.addPropertiesHandler(r,function(e,i){var n=t.makeMatrixDecomposition&&!0,r=!1;if(!e.length||!i.length)for(e.length||(r=!0,e=i,i=[]),p=0;p<e.length;p++){var a=e[p].t,c=e[p].d,f="scale"==a.substr(0,5)?1:0;i.push({t:a,d:c.map(function(t){if("number"==typeof t)return f;var e={};for(var i in t)e[i]=f;return e})})}var l=[],m=[],d=[];if(e.length!=i.length){if(!n)return;l=[(P=o(e,i))[0]],m=[P[1]],d=[["matrix",[P[2]]]]}else for(var p=0;p<e.length;p++){var _=e[p].t,g=i[p].t,v=e[p].d,y=i[p].d,b=h[_],T=h[g];if(function(t,e){return"perspective"==t&&"perspective"==e||("matrix"==t||"matrix3d"==t)&&("matrix"==e||"matrix3d"==e)}(_,g)){if(!n)return;P=o([e[p]],[i[p]]),l.push(P[0]),m.push(P[1]),d.push(["matrix",[P[2]]])}else{if(_==g)a=_;else if(b[2]&&T[2]&&s(_)==s(g))a=s(_),v=b[2](v),y=T[2](y);else{if(!b[1]||!T[1]||u(_)!=u(g)){if(!n)return;l=[(P=o(e,i))[0]],m=[P[1]],d=[["matrix",[P[2]]]];break}a=u(_),v=b[1](v),y=T[1](y)}for(var w=[],x=[],E=[],A=0;A<v.length;A++){var P=("number"==typeof v[A]?t.mergeNumbers:t.mergeDimensions)(v[A],y[A]);w[A]=P[0],x[A]=P[1],E.push(P[2])}l.push(w),m.push(x),d.push([a,E])}}if(r){var R=l;l=m,m=R}return[l,m,function(t){return t.map(function(t,e){var i=t.map(function(t,i){return d[e][1][i](t)}).join(",");return"matrix"==d[e][0]&&16==i.split(",").length&&(d[e][0]="matrix3d"),d[e][0]+"("+i+")"}).join(" ")}]},["transform"]),t.transformToSvgMatrix=function(e){var i=t.transformListToMatrix(r(e));return"matrix("+a(i[0])+" "+a(i[1])+" "+a(i[4])+" "+a(i[5])+" "+a(i[12])+" "+a(i[13])+")"}}(n),function(t,e){function i(t,e){e.concat([t]).forEach(function(e){e in document.documentElement.style&&(n[t]=e),r[e]=t})}var n={},r={};i("transform",["webkitTransform","msTransform"]),i("transformOrigin",["webkitTransformOrigin"]),i("perspective",["webkitPerspective"]),i("perspectiveOrigin",["webkitPerspectiveOrigin"]),t.propertyName=function(t){return n[t]||t},t.unprefixedPropertyName=function(t){return r[t]||t}}(n)}(),function(){if(void 0===document.createElement("div").animate([]).oncancel){if(window.performance&&performance.now)t=function(){return performance.now()};else var t=function(){return Date.now()};var e=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},i=window.Element.prototype.animate;window.Element.prototype.animate=function(n,r){var a=i.call(this,n,r);a._cancelHandlers=[],a.oncancel=null;var o=a.cancel;a.cancel=function(){o.call(this);var i=new e(this,null,t()),n=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){n.forEach(function(t){t.call(i.target,i)})},0)};var s=a.addEventListener;a.addEventListener=function(t,e){"function"==typeof e&&"cancel"==t?this._cancelHandlers.push(e):s.call(this,t,e)};var u=a.removeEventListener;return a.removeEventListener=function(t,e){if("cancel"==t){var i=this._cancelHandlers.indexOf(e);i>=0&&this._cancelHandlers.splice(i,1)}else u.call(this,t,e)},a}}}(),function(t){var e=document.documentElement,i=null,n=!1;try{var r="0"==getComputedStyle(e).getPropertyValue("opacity")?"1":"0";(i=e.animate({opacity:[r,r]},{duration:1})).currentTime=0,n=getComputedStyle(e).getPropertyValue("opacity")==r}catch(t){}finally{i&&i.cancel()}if(!n){var a=window.Element.prototype.animate;window.Element.prototype.animate=function(e,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||null===e||(e=t.convertToArrayForm(e)),a.call(this,e,i)}}}(i),function(t,e,i){function n(t){var i=e.timeline;i.currentTime=t,i._discardAnimations(),0==i._animations.length?a=!1:requestAnimationFrame(n)}var r=window.requestAnimationFrame;window.requestAnimationFrame=function(t){return r(function(i){e.timeline._updateAnimationsPromises(),t(i),e.timeline._updateAnimationsPromises()})},e.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},e.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){e.animationsWithPromises=e.animationsWithPromises.filter(function(t){return t._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(t){return"finished"!=t.playState&&"idle"!=t.playState})},_play:function(t){var i=new e.Animation(t,this);return this._animations.push(i),e.restartWebAnimationsNextTick(),i._updatePromises(),i._animation.play(),i._updatePromises(),i},play:function(t){return t&&t.remove(),this._play(t)}};var a=!1;e.restartWebAnimationsNextTick=function(){a||(a=!0,requestAnimationFrame(n))};var o=new e.AnimationTimeline;e.timeline=o;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return o}})}catch(t){}try{window.document.timeline=o}catch(t){}}(0,r),function(t,e,i){e.animationsWithPromises=[],e.Animation=function(e,i){if(this.id="",e&&e._id&&(this.id=e._id),this.effect=e,e&&(e._animation=this),!i)throw new Error("Animation with null timeline is not supported");this._timeline=i,this._sequenceNumber=t.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},e.Animation.prototype={_updatePromises:function(){var t=this._oldPlayState,e=this.playState;return this._readyPromise&&e!==t&&("idle"==e?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==t?this._resolveReadyPromise():"pending"==e&&(this._readyPromise=void 0)),this._finishedPromise&&e!==t&&("idle"==e?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==e?this._resolveFinishedPromise():"finished"==t&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var t,i,n,r,a=!!this._animation;a&&(t=this.playbackRate,i=this._paused,n=this.startTime,r=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=e.newUnderlyingAnimationForKeyframeEffect(this.effect),e.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=e.newUnderlyingAnimationForGroup(this.effect),e.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&e.bindAnimationForCustomEffect(this),a&&(1!=t&&(this.playbackRate=t),null!==n?this.startTime=n:null!==r?this.currentTime=r:null!==this._holdTime&&(this.currentTime=this._holdTime),i&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var t=this.effect._timing.delay;this._childAnimations.forEach(function(i){this._arrangeChildren(i,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i.effect))}.bind(this))}},_setExternalAnimation:function(t){if(this.effect&&this._isGroup)for(var e=0;e<this.effect.children.length;e++)this.effect.children[e]._animation=t,this._childAnimations[e]._setExternalAnimation(t)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var t=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(i){var n=e.timeline._play(i);this._childAnimations.push(n),n.playbackRate=this.playbackRate,this._paused&&n.pause(),i._animation=this.effect._animation,this._arrangeChildren(n,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i))}.bind(this))}},_arrangeChildren:function(t,e){null===this.startTime?t.currentTime=this.currentTime-e/this.playbackRate:t.startTime!==this.startTime+e/this.playbackRate&&(t.startTime=this.startTime+e/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==e.animationsWithPromises.indexOf(this)&&e.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(t,e){this._resolveFinishedPromise=function(){t(this)},this._rejectFinishedPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==e.animationsWithPromises.indexOf(this)&&e.animationsWithPromises.push(this),this._readyPromise=new Promise(function(t,e){this._resolveReadyPromise=function(){t(this)},this._rejectReadyPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(t){this._animation.onfinish="function"==typeof t?function(e){e.target=this,t.call(this,e)}.bind(this):t},get oncancel(){return this._animation.oncancel},set oncancel(t){this._animation.oncancel="function"==typeof t?function(e){e.target=this,t.call(this,e)}.bind(this):t},get currentTime(){this._updatePromises();var t=this._animation.currentTime;return this._updatePromises(),t},set currentTime(t){this._updatePromises(),this._animation.currentTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.currentTime=t-i}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(t){this._updatePromises(),this._animation.startTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.startTime=t+i}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(t){this._updatePromises();var e=this.currentTime;this._animation.playbackRate=t,this._forEachChild(function(e){e.playbackRate=t}),null!==e&&(this.currentTime=e),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),e.awaitStartTime(this),this._forEachChild(function(t){var e=t.currentTime;t.play(),t.currentTime=e}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(t){t.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var t=this.currentTime;this._animation.reverse(),this._forEachChild(function(t){t.reverse()}),null!==t&&(this.currentTime=t),this._updatePromises()},addEventListener:function(t,e){var i=e;"function"==typeof e&&(i=function(t){t.target=this,e.call(this,t)}.bind(this),e._wrapper=i),this._animation.addEventListener(t,i)},removeEventListener:function(t,e){this._animation.removeEventListener(t,e&&e._wrapper||e)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(e){var i=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(t){e.call(this,t,i),this.effect instanceof window.SequenceEffect&&(i+=t.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var n=this.effect._timing,r=this.currentTime;null!==r&&(r=t.calculateIterationProgress(t.calculateActiveDuration(n),r,n)),(null==r||isNaN(r))&&this._removeChildAnimations()}}},window.Animation=e.Animation}(i,r),function(t,e,i){function n(e){this._frames=t.normalizeKeyframes(e)}function r(){for(var t=!1;u.length;)u.shift()._updateChildren(),t=!0;return t}var a=function t(e){if(e._animation=void 0,e instanceof window.SequenceEffect||e instanceof window.GroupEffect)for(var i=0;i<e.children.length;i++)t(e.children[i])};e.removeMulti=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n._parent?(-1==e.indexOf(n._parent)&&e.push(n._parent),n._parent.children.splice(n._parent.children.indexOf(n),1),n._parent=null,a(n)):n._animation&&n._animation.effect==n&&(n._animation.cancel(),n._animation.effect=new KeyframeEffect(null,[]),n._animation._callback&&(n._animation._callback._animation=null),n._animation._rebuildUnderlyingAnimation(),a(n))}for(i=0;i<e.length;i++)e[i]._rebuild()},e.KeyframeEffect=function(e,i,r,a){return this.target=e,this._parent=null,r=t.numericTimingToObject(r),this._timingInput=t.cloneTimingInput(r),this._timing=t.normalizeTimingInput(r),this.timing=t.makeTiming(r,!1,this),this.timing._effect=this,"function"==typeof i?(t.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=i):this._normalizedKeyframes=new n(i),this._keyframes=i,this.activeDuration=t.calculateActiveDuration(this._timing),this._id=a,this},e.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(t){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=t,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var e=new KeyframeEffect(this.target,[],t.cloneTimingInput(this._timingInput),this._id);return e._normalizedKeyframes=this._normalizedKeyframes,e._keyframes=this._keyframes,e},remove:function(){e.removeMulti([this])}};var o=Element.prototype.animate;Element.prototype.animate=function(t,i){var n="";return i&&i.id&&(n=i.id),e.timeline._play(new e.KeyframeEffect(this,t,i,n))};var s=document.createElementNS("http://www.w3.org/1999/xhtml","div");e.newUnderlyingAnimationForKeyframeEffect=function(t){if(t){e=t.target||s;"function"==typeof(i=t._keyframes)&&(i=[]),(n=t._timingInput).id=t._id}else var e=s,i=[],n=0;return o.apply(e,[i,n])},e.bindAnimationForKeyframeEffect=function(t){t.effect&&"function"==typeof t.effect._normalizedKeyframes&&e.bindAnimationForCustomEffect(t)};var u=[];e.awaitStartTime=function(t){null===t.startTime&&t._isGroup&&(0==u.length&&requestAnimationFrame(r),u.push(t))};var c=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){e.timeline._updateAnimationsPromises();var t=c.apply(this,arguments);return r()&&(t=c.apply(this,arguments)),e.timeline._updateAnimationsPromises(),t}}),window.KeyframeEffect=e.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(t){return null!==t.effect&&t.effect.target==this}.bind(this))}}(i,r),function(t,e,i){function n(t){t._registered||(t._registered=!0,o.push(t),s||(s=!0,requestAnimationFrame(r)))}function r(t){var e=o;o=[],e.sort(function(t,e){return t._sequenceNumber-e._sequenceNumber}),e=e.filter(function(t){t();var e=t._animation?t._animation.playState:"idle";return"running"!=e&&"pending"!=e&&(t._registered=!1),t._registered}),o.push.apply(o,e),o.length?(s=!0,requestAnimationFrame(r)):s=!1}var a=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);e.bindAnimationForCustomEffect=function(e){var i,r=e.effect.target,o="function"==typeof e.effect.getFrames();i=o?e.effect.getFrames():e.effect._onsample;var s=e.effect.timing,u=null;s=t.normalizeTimingInput(s);var c=function n(){var a=n._animation?n._animation.currentTime:null;null!==a&&(a=t.calculateIterationProgress(t.calculateActiveDuration(s),a,s),isNaN(a)&&(a=null)),a!==u&&(o?i(a,r,e.effect):i(a,e.effect,e.effect._animation)),u=a};c._animation=e,c._registered=!1,c._sequenceNumber=a++,e._callback=c,n(c)};var o=[],s=!1;e.Animation.prototype._register=function(){this._callback&&n(this._callback)}}(i,r),function(t,e,i){function n(t){return t._timing.delay+t.activeDuration+t._timing.endDelay}function r(e,i,n){this._id=n,this._parent=null,this.children=e||[],this._reparent(this.children),i=t.numericTimingToObject(i),this._timingInput=t.cloneTimingInput(i),this._timing=t.normalizeTimingInput(i,!0),this.timing=t.makeTiming(i,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){r.apply(this,arguments)},window.GroupEffect=function(){r.apply(this,arguments)},r.prototype={_isAncestor:function(t){for(var e=this;null!==e;){if(e==t)return!0;e=e._parent}return!1},_rebuild:function(){for(var t=this;t;)"auto"===t.timing.duration&&(t._timing.duration=t.activeDuration),t=t._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(t){e.removeMulti(t);for(var i=0;i<t.length;i++)t[i]._parent=this},_putChild:function(t,e){for(var i=e?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",n=0;n<t.length;n++)if(this._isAncestor(t[n]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:i};for(n=0;n<t.length;n++)e?this.children.push(t[n]):this.children.unshift(t[n]);this._reparent(t),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var e=t.cloneTimingInput(this._timingInput),i=[],n=0;n<this.children.length;n++)i.push(this.children[n].clone());return this instanceof GroupEffect?new GroupEffect(i,e):new SequenceEffect(i,e)},remove:function(){e.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(r.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t+=n(e)}),Math.max(t,0)}}),window.GroupEffect.prototype=Object.create(r.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t=Math.max(t,n(e))}),t}}),e.newUnderlyingAnimationForGroup=function(i){var n,r=null,a=new KeyframeEffect(null,[],i._timing,i._id);return a.onsample=function(e){var i=n._wrapper;if(i&&"pending"!=i.playState&&i.effect)return null==e?void i._removeChildAnimations():0==e&&i.playbackRate<0&&(r||(r=t.normalizeTimingInput(i.effect.timing)),e=t.calculateIterationProgress(t.calculateActiveDuration(r),-1,r),isNaN(e)||null==e)?(i._forEachChild(function(t){t.currentTime=-1}),void i._removeChildAnimations()):void 0},n=e.timeline._play(a)},e.bindAnimationForGroup=function(t){t._animation._wrapper=t,t._isGroup=!0,e.awaitStartTime(t),t._constructChildAnimations(),t._setExternalAnimation(t)},e.groupChildDuration=n}(i,r),e.true=t}({},function(){return this}());</script><script>!function(n){"use strict";function t(n,t){for(var e=[],r=0,u=n.length;r<u;r++)e.push(n[r].substr(0,t));return e}function e(n){return function(t,e,r){var u=r[n].indexOf(e.charAt(0).toUpperCase()+e.substr(1).toLowerCase());~u&&(t.month=u)}}function r(n,t){for(n=String(n),t=t||2;n.length<t;)n="0"+n;return n}var u={},o=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,a=/\d\d?/,i=/\d{3}/,s=/\d{4}/,m=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,d=/\[([^]*?)\]/gm,c=function(){},f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"],l=t(h,3),M=t(f,3);u.i18n={dayNamesShort:M,dayNames:f,monthNamesShort:l,monthNames:h,amPm:["am","pm"],DoFn:function(n){return n+["th","st","nd","rd"][n%10>3?0:(n-n%10!=10)*n%10]}};var g={D:function(n){return n.getDate()},DD:function(n){return r(n.getDate())},Do:function(n,t){return t.DoFn(n.getDate())},d:function(n){return n.getDay()},dd:function(n){return r(n.getDay())},ddd:function(n,t){return t.dayNamesShort[n.getDay()]},dddd:function(n,t){return t.dayNames[n.getDay()]},M:function(n){return n.getMonth()+1},MM:function(n){return r(n.getMonth()+1)},MMM:function(n,t){return t.monthNamesShort[n.getMonth()]},MMMM:function(n,t){return t.monthNames[n.getMonth()]},YY:function(n){return String(n.getFullYear()).substr(2)},YYYY:function(n){return n.getFullYear()},h:function(n){return n.getHours()%12||12},hh:function(n){return r(n.getHours()%12||12)},H:function(n){return n.getHours()},HH:function(n){return r(n.getHours())},m:function(n){return n.getMinutes()},mm:function(n){return r(n.getMinutes())},s:function(n){return n.getSeconds()},ss:function(n){return r(n.getSeconds())},S:function(n){return Math.round(n.getMilliseconds()/100)},SS:function(n){return r(Math.round(n.getMilliseconds()/10),2)},SSS:function(n){return r(n.getMilliseconds(),3)},a:function(n,t){return n.getHours()<12?t.amPm[0]:t.amPm[1]},A:function(n,t){return n.getHours()<12?t.amPm[0].toUpperCase():t.amPm[1].toUpperCase()},ZZ:function(n){var t=n.getTimezoneOffset();return(t>0?"-":"+")+r(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)}},D={D:[a,function(n,t){n.day=t}],Do:[new RegExp(a.source+m.source),function(n,t){n.day=parseInt(t,10)}],M:[a,function(n,t){n.month=t-1}],YY:[a,function(n,t){var e=+(""+(new Date).getFullYear()).substr(0,2);n.year=""+(t>68?e-1:e)+t}],h:[a,function(n,t){n.hour=t}],m:[a,function(n,t){n.minute=t}],s:[a,function(n,t){n.second=t}],YYYY:[s,function(n,t){n.year=t}],S:[/\d/,function(n,t){n.millisecond=100*t}],SS:[/\d{2}/,function(n,t){n.millisecond=10*t}],SSS:[i,function(n,t){n.millisecond=t}],d:[a,c],ddd:[m,c],MMM:[m,e("monthNamesShort")],MMMM:[m,e("monthNames")],a:[m,function(n,t,e){var r=t.toLowerCase();r===e.amPm[0]?n.isPm=!1:r===e.amPm[1]&&(n.isPm=!0)}],ZZ:[/[\+\-]\d\d:?\d\d/,function(n,t){var e,r=(t+"").match(/([\+\-]|\d\d)/gi);r&&(e=60*r[1]+parseInt(r[2],10),n.timezoneOffset="+"===r[0]?e:-e)}]};D.dd=D.d,D.dddd=D.ddd,D.DD=D.D,D.mm=D.m,D.hh=D.H=D.HH=D.h,D.MM=D.M,D.ss=D.s,D.A=D.a,u.masks={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},u.format=function(n,t,e){var r=e||u.i18n;if("number"==typeof n&&(n=new Date(n)),"[object Date]"!==Object.prototype.toString.call(n)||isNaN(n.getTime()))throw new Error("Invalid Date in fecha.format");var a=[];return t=(t=u.masks[t]||t||u.masks.default).replace(d,function(n,t){return a.push(t),"??"}),(t=t.replace(o,function(t){return t in g?g[t](n,r):t.slice(1,t.length-1)})).replace(/\?\?/g,function(){return a.shift()})},u.parse=function(n,t,e){var r=e||u.i18n;if("string"!=typeof t)throw new Error("Invalid format in fecha.parse");if(t=u.masks[t]||t,n.length>1e3)return!1;var a=!0,i={};if(t.replace(o,function(t){if(D[t]){var e=D[t],u=n.search(e[0]);~u?n.replace(e[0],function(t){return e[1](i,t,r),n=n.substr(u+t.length),t}):a=!1}return D[t]?"":t.slice(1,t.length-1)}),!a)return!1;var s=new Date;!0===i.isPm&&null!=i.hour&&12!=+i.hour?i.hour=+i.hour+12:!1===i.isPm&&12==+i.hour&&(i.hour=0);var m;return null!=i.timezoneOffset?(i.minute=+(i.minute||0)-+i.timezoneOffset,m=new Date(Date.UTC(i.year||s.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0))):m=new Date(i.year||s.getFullYear(),i.month||0,i.day||1,i.hour||0,i.minute||0,i.second||0,i.millisecond||0),m},"undefined"!=typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd?define(function(){return u}):n.fecha=u}(this);</script><script>function toLocaleStringSupportsOptions(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}function toLocaleDateStringSupportsOptions(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}return!1}function toLocaleTimeStringSupportsOptions(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}return!1}window.hassUtil=window.hassUtil||{},window.hassUtil.DEFAULT_ICON="mdi:bookmark",window.hassUtil.OFF_STATES=["off","closed","unlocked"],window.hassUtil.DOMAINS_WITH_CARD=["climate","cover","configurator","input_select","input_number","input_text","media_player","scene","script","weblink"],window.hassUtil.DOMAINS_WITH_MORE_INFO=["alarm_control_panel","automation","camera","climate","configurator","cover","fan","group","history_graph","light","lock","media_player","script","sun","updater","vacuum"],window.hassUtil.DOMAINS_WITH_NO_HISTORY=["camera","configurator","history_graph","scene"],window.hassUtil.HIDE_MORE_INFO=["input_select","scene","script","input_number","input_text"],window.hassUtil.LANGUAGE=navigator.languages?navigator.languages[0]:navigator.language||navigator.userLanguage,window.hassUtil.attributeClassNames=function(e,t){return e?t.map(function(t){return t in e.attributes?"has-"+t:""}).join(" "):""},window.hassUtil.featureClassNames=function(e,t){if(!e||!e.attributes.supported_features)return"";var i=e.attributes.supported_features;return Object.keys(t).map(function(e){return 0!=(i&e)?t[e]:""}).join(" ")},window.hassUtil.canToggleState=function(e,t){var i=window.hassUtil.computeDomain(t);return"group"===i?"on"===t.state||"off"===t.state:window.hassUtil.canToggleDomain(e,i)},window.hassUtil.canToggleDomain=function(e,t){var i,a=e.config.services[t];return i="lock"===t?"lock":"cover"===t?"open_cover":"turn_on",a&&i in a},window.hassUtil.dynamicContentUpdater=function(e,t,i){var a,n=Polymer.dom(e);n.lastChild&&n.lastChild.tagName===t?a=n.lastChild:(n.lastChild&&n.removeChild(n.lastChild),a=document.createElement(t.toLowerCase())),a.setProperties?a.setProperties(i):Object.keys(i).forEach(function(e){a[e]=i[e]}),null===a.parentNode&&n.appendChild(a)},window.fecha.masks.haDateTime=window.fecha.masks.shortTime+" "+window.fecha.masks.mediumDate,toLocaleStringSupportsOptions()?window.hassUtil.formatDateTime=function(e){return e.toLocaleString(window.hassUtil.LANGUAGE,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"2-digit"})}:window.hassUtil.formatDateTime=function(e){return window.fecha.format(e,"haDateTime")},toLocaleDateStringSupportsOptions()?window.hassUtil.formatDate=function(e){return e.toLocaleDateString(window.hassUtil.LANGUAGE,{year:"numeric",month:"long",day:"numeric"})}:window.hassUtil.formatDate=function(e){return window.fecha.format(e,"mediumDate")},toLocaleTimeStringSupportsOptions()?window.hassUtil.formatTime=function(e){return e.toLocaleTimeString(window.hassUtil.LANGUAGE,{hour:"numeric",minute:"2-digit"})}:window.hassUtil.formatTime=function(e){return window.fecha.format(e,"shortTime")},window.hassUtil.relativeTime=function(e){var t,i=Math.abs(new Date-e)/1e3,a=new Date>e?"%s ago":"in %s",n=window.hassUtil.relativeTime.tests;for(t=0;t<n.length;t+=2){if(i<n[t])return i=Math.floor(i),a.replace("%s",1===i?"1 "+n[t+1]:i+" "+n[t+1]+"s");i/=n[t]}return i=Math.floor(i),a.replace("%s",1===i?"1 week":i+" weeks")},window.hassUtil.relativeTime.tests=[60,"second",60,"minute",24,"hour",7,"day"],window.hassUtil.stateCardType=function(e,t){if("unavailable"===t.state)return"display";var i=window.hassUtil.computeDomain(t);return-1!==window.hassUtil.DOMAINS_WITH_CARD.indexOf(i)?i:window.hassUtil.canToggleState(e,t)&&"hidden"!==t.attributes.control?"toggle":"display"},window.hassUtil.stateMoreInfoType=function(e){var t=window.hassUtil.computeDomain(e);return-1!==window.hassUtil.DOMAINS_WITH_MORE_INFO.indexOf(t)?t:-1!==window.hassUtil.HIDE_MORE_INFO.indexOf(t)?"hidden":"default"},window.hassUtil.domainIcon=function(e,t){switch(e){case"alarm_control_panel":return t&&"disarmed"===t?"mdi:bell-outline":"mdi:bell";case"automation":return"mdi:playlist-play";case"binary_sensor":return t&&"off"===t?"mdi:radiobox-blank":"mdi:checkbox-marked-circle";case"calendar":return"mdi:calendar";case"camera":return"mdi:video";case"climate":return"mdi:nest-thermostat";case"configurator":return"mdi:settings";case"conversation":return"mdi:text-to-speech";case"cover":return t&&"open"===t?"mdi:window-open":"mdi:window-closed";case"device_tracker":return"mdi:account";case"fan":return"mdi:fan";case"history_graph":return"mdi:chart-line";case"group":return"mdi:google-circles-communities";case"homeassistant":return"mdi:home";case"image_processing":return"mdi:image-filter-frames";case"input_boolean":return"mdi:drawing";case"input_select":return"mdi:format-list-bulleted";case"input_number":return"mdi:ray-vertex";case"input_text":return"mdi:textbox";case"light":return"mdi:lightbulb";case"lock":return t&&"unlocked"===t?"mdi:lock-open":"mdi:lock";case"mailbox":return"mdi:mailbox";case"media_player":return t&&"off"!==t&&"idle"!==t?"mdi:cast-connected":"mdi:cast";case"notify":return"mdi:comment-alert";case"proximity":return"mdi:apple-safari";case"remote":return"mdi:remote";case"scene":return"mdi:google-pages";case"script":return"mdi:file-document";case"sensor":return"mdi:eye";case"simple_alarm":return"mdi:bell";case"sun":return"mdi:white-balance-sunny";case"switch":return"mdi:flash";case"updater":return"mdi:cloud-upload";case"weblink":return"mdi:open-in-new";case"zwave":if(t){if(-1!==t.indexOf("Dead"))return"mdi:emoticon-dead";if(-1!==t.indexOf("Sleeping"))return"mdi:sleep"}return"mdi:nfc";default:return console.warn("Unable to find icon for domain "+e+" ("+t+")"),window.hassUtil.DEFAULT_ICON}},window.hassUtil.binarySensorIcon=function(e){var t=e.state&&"off"===e.state;switch(e.attributes.device_class){case"connectivity":return t?"mdi:server-network-off":"mdi:server-network";case"light":return t?"mdi:brightness-5":"mdi:brightness-7";case"moisture":return t?"mdi:water-off":"mdi:water";case"motion":return t?"mdi:walk":"mdi:run";case"occupancy":return t?"mdi:home":"mdi:home-outline";case"opening":return t?"mdi:crop-square":"mdi:exit-to-app";case"sound":return t?"mdi:music-note-off":"mdi:music-note";case"vibration":return t?"mdi:crop-portrait":"mdi:vibrate";case"gas":case"power":case"safety":case"smoke":return t?"mdi:verified":"mdi:alert";default:return t?"mdi:radiobox-blank":"mdi:checkbox-marked-circle"}},window.hassUtil.coverIcon=function(e){var t=e.state&&"open"===e.state;switch(e.attributes.device_class){case"garage":return t?"mdi:garage-open":"mdi:garage";default:return t?"mdi:window-open":"mdi:window-closed"}},window.hassUtil.stateIcon=function(e){if(!e)return window.hassUtil.DEFAULT_ICON;if(e.attributes.icon)return e.attributes.icon;var t=e.attributes.unit_of_measurement,i=window.hassUtil.computeDomain(e);if(t&&"sensor"===i){if("°C"===t||"°F"===t)return"mdi:thermometer";if("Mice"===t)return"mdi:mouse-variant"}else{if("binary_sensor"===i)return window.hassUtil.binarySensorIcon(e);if("cover"===i)return window.hassUtil.coverIcon(e)}return window.hassUtil.domainIcon(i,e.state)},window.hassUtil.computeDomain=function(e){return e._domain||(e._domain=window.HAWS.extractDomain(e.entity_id)),e._domain},window.hassUtil.computeObjectId=function(e){return e._object_id||(e._object_id=window.HAWS.extractObjectId(e.entity_id)),e._object_id},window.hassUtil.computeStateName=function(e){return void 0===e._entityDisplay&&(e._entityDisplay=e.attributes.friendly_name||window.HAWS.extractObjectId(e.entity_id).replace(/_/g," ")),e._entityDisplay},window.hassUtil.sortByName=function(e,t){var i=window.hassUtil.computeStateName(e),a=window.hassUtil.computeStateName(t);return i<a?-1:i>a?1:0},window.hassUtil.computeStateState=function(e){if(!e._stateDisplay&&(e._stateDisplay=e.state.replace(/_/g," "),e.attributes.unit_of_measurement&&(e._stateDisplay+=" "+e.attributes.unit_of_measurement),"binary_sensor"===window.hassUtil.computeDomain(e)))switch(e.attributes.device_class){case"moisture":e._stateDisplay="off"===e._stateDisplay?"dry":"wet";break;case"gas":case"motion":case"occupancy":case"smoke":case"sound":case"vibration":e._stateDisplay="off"===e._stateDisplay?"clear":"detected";break;case"opening":e._stateDisplay="off"===e._stateDisplay?"closed":"open";break;case"safety":e._stateDisplay="off"===e._stateDisplay?"safe":"unsafe"}return e._stateDisplay},window.hassUtil.isComponentLoaded=function(e,t){return e&&-1!==e.config.core.components.indexOf(t)},window.hassUtil.computeLocationName=function(e){return e&&e.config.core.location_name},window.hassUtil.applyThemesOnElement=function(e,t,i,a){e._themes||(e._themes={});var n=t.default_theme;("default"===i||i&&t.themes[i])&&(n=i);var r=Object.assign({},e._themes);if("default"!==n){var o=t.themes[n];Object.keys(o).forEach(function(t){var i="--"+t;e._themes[i]="",r[i]=o[t]})}if(e.updateStyles(r),a){var s=document.querySelector("meta[name=theme-color]");if(s){s.hasAttribute("default-content")||s.setAttribute("default-content",s.getAttribute("content"));var c=r["--primary-color"]||s.getAttribute("default-content");s.setAttribute("content",c)}}};</script><script>!function(){var t=["dockedSidebar","selectedTheme"];Polymer({is:"ha-pref-storage",properties:{hass:{type:Object},storage:{type:Object,value:window.localStorage||{}}},storeState:function(){if(this.hass)try{for(var e=0;e<t.length;e++){var r=t[e],a=this.hass[r];this.storage[r]=JSON.stringify(void 0===a?null:a)}}catch(t){}},getStoredState:function(){for(var e={},r=0;r<t.length;r++){var a=t[r];a in this.storage&&(e[a]=JSON.parse(this.storage[a]))}return e}})}();</script><script>window.hassCallApi=function(e,t,s,o,a){var r=e+"/api/"+o;if(window.HASS_DEMO){var n;switch(o.split("/",1)[0]){case"bootstrap":n=window.hassDemoData.bootstrap;break;case"logbook":n=window.hassDemoData.logbook;break;case"history":n=window.hassDemoData.stateHistory;break;default:n=!1}return new Promise(function(e,t){n?e(n):t("Request not allowed in demo mode.")})}return new Promise(function(e,o){var n=new XMLHttpRequest;n.open(s,r,!0),t.authToken&&n.setRequestHeader("X-HA-access",t.authToken),n.onload=function(){var t=n.responseText;if("application/json"===n.getResponseHeader("content-type"))try{t=JSON.parse(n.responseText)}catch(e){return void o({error:"Unable to parse JSON response",status_code:n.status,body:t})}n.status>199&&n.status<300?e(t):o({error:"Response error: "+n.status,status_code:n.status,body:t})},n.onerror=function(){o({error:"Request error",status_code:n.status,body:n.responseText})},a?(n.setRequestHeader("Content-Type","application/json;charset=UTF-8"),n.send(JSON.stringify(a))):n.send()})};</script><custom-style><style is="custom-style">html{--primary-text-color:var(--light-theme-text-color);--primary-background-color:var(--light-theme-background-color);--secondary-text-color:var(--light-theme-secondary-color);--disabled-text-color:var(--light-theme-disabled-color);--divider-color:var(--light-theme-divider-color);--error-color:var(--paper-deep-orange-a700);--primary-color:var(--paper-indigo-500);--light-primary-color:var(--paper-indigo-100);--dark-primary-color:var(--paper-indigo-700);--accent-color:var(--paper-pink-a200);--light-accent-color:var(--paper-pink-a100);--dark-accent-color:var(--paper-pink-a400);--light-theme-background-color:#ffffff;--light-theme-base-color:#000000;--light-theme-text-color:var(--paper-grey-900);--light-theme-secondary-color:#737373;--light-theme-disabled-color:#9b9b9b;--light-theme-divider-color:#dbdbdb;--dark-theme-background-color:var(--paper-grey-900);--dark-theme-base-color:#ffffff;--dark-theme-text-color:#ffffff;--dark-theme-secondary-color:#bcbcbc;--dark-theme-disabled-color:#646464;--dark-theme-divider-color:#3c3c3c;--text-primary-color:var(--dark-theme-text-color);--default-primary-color:var(--primary-color);}</style></custom-style><script>!function(){function e(e){this.type=e&&e.type||"default",this.key=e&&e.key,"value"in e&&(this.value=e.value)}e.types={},e.prototype={get value(){var t=this.type,y=this.key;if(t&&y)return e.types[t]&&e.types[t][y]},set value(t){var y=this.type,i=this.key;y&&i&&(y=e.types[y]=e.types[y]||{},null==t?delete y[i]:y[i]=t)},get list(){if(this.type)return Object.keys(e.types[this.type]).map(function(e){return t[this.type][e]},this)},byKey:function(e){return this.key=e,this.value}},Polymer.IronMeta=e;var t=Polymer.IronMeta.types;Polymer({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,y){var i=new Polymer.IronMeta({type:e,key:t});return void 0!==y&&y!==i.value?i.value=y:this.value!==i.value&&(this.value=i.value),i},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new Polymer.IronMeta({type:this.type,key:e}).value}})}();</script><script>Polymer.IronValidatableBehaviorMeta=null,Polymer.IronValidatableBehavior={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){Polymer.IronValidatableBehaviorMeta=new Polymer.IronMeta({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return Polymer.IronValidatableBehaviorMeta&&Polymer.IronValidatableBehaviorMeta.byKey(this.validator)},hasValidator:function(){return null!=this._validator},validate:function(i){return void 0===i&&void 0!==this.value?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(i),!this.invalid},_getValidity:function(i){return!this.hasValidator()||this._validator.validate(i)}};</script><script>Polymer.IronFormElementBehavior={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:Polymer.Element?null:function(){this.fire("iron-form-element-register")},detached:Polymer.Element?null:function(){this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}};</script><script>Polymer.IronCheckedElementBehaviorImpl={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},Polymer.IronCheckedElementBehavior=[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronCheckedElementBehaviorImpl];</script><script>!function(){"use strict";function e(e,t){var n="";if(e){var i=e.toLowerCase();" "===i||v.test(i)?n="space":f.test(i)?n="esc":1==i.length?t&&!u.test(i)||(n=i):n=c.test(i)?i.replace("arrow",""):"multiply"==i?"*":i}return n}function t(e){var t="";return e&&(e in o?t=o[e]:h.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function n(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):d[e]),t}function i(i,r){return i.key?e(i.key,r):i.detail&&i.detail.key?e(i.detail.key,r):t(i.keyIdentifier)||n(i.keyCode)||""}function r(e,t){return i(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function s(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(e,t){var n=t.split(":"),i=n[0],r=n[1];return i in y?(e[y[i]]=!0,e.hasModifiers=!0):(e.key=i,e.event=r||"keydown"),e},{combo:e.split(":").shift()})}function a(e){return e.trim().split(" ").map(function(e){return s(e)})}var o={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},d={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},y={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},u=/[a-z0-9*]/,h=/U\+/,c=/^arrow/,v=/^space(bar)?/,f=/^escape$/;Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=a(t),i=0;i<n.length;++i)if(r(n[i],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(e){return e.keyBindings});return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(e){for(var t in e)this._addKeyBinding(t,e[t])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1})},_addKeyBinding:function(e,t){a(e).forEach(function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)},this)},_unlistenKeyEventListeners:function(){for(var e,t,n,i;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],i=e[2],t.removeEventListener(n,i)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var i=e[n][0],s=e[n][1];if(r(i,t)&&(this._triggerKeyHandler(i,s,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var i=Object.create(e);i.keyboardEvent=n;var r=new CustomEvent(e.event,{detail:i,cancelable:!0});this[t].call(this,r),r.defaultPrevented&&n.preventDefault()}}}();</script><script>Polymer.IronControlState={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}},__handleEventRetargeting:{type:Boolean,value:function(){return!this.shadowRoot&&!Polymer.Element}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){if(Polymer.Element)this._setFocused("focus"===e.type);else if(e.target===this)this._setFocused("focus"===e.type);else if(this.__handleEventRetargeting){var t=Polymer.dom(e).localTarget;this.isLightDescendant(t)||this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})}},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.tabIndex,this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};</script><script>Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,i=Polymer.dom(t).localTarget;this.isLightDescendant(i)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl];</script><dom-module id="paper-ripple" assetpath="../bower_components/paper-ripple/"><template><style>:host{display:block;position:absolute;border-radius:inherit;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none;}:host([animating]){-webkit-transform:translate(0, 0);transform:translate3d(0, 0, 0);}#background,
#waves,
.wave-container,
.wave{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%;}#background,
.wave{opacity:0;}#waves,
.wave{overflow:hidden;}.wave-container,
.wave{border-radius:50%;}:host(.circle) #background,
:host(.circle) #waves{border-radius:50%;}:host(.circle) .wave-container{overflow:hidden;}</style><div id="background"></div><div id="waves"></div></template></dom-module><script>!function(){"use strict";function t(t){this.element=t,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function i(t){this.element=t,this.color=window.getComputedStyle(t).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}var e={distance:function(t,i,e,n){var s=t-e,a=i-n;return Math.sqrt(s*s+a*a)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(t,i){var n=e.distance(t,i,0,0),s=e.distance(t,i,this.width,0),a=e.distance(t,i,0,this.height),o=e.distance(t,i,this.width,this.height);return Math.max(n,s,a,o)}},i.MAX_RADIUS=300,i.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var t;return this.mouseDownStart?(t=e.now()-this.mouseDownStart,this.mouseUpStart&&(t-=this.mouseUpElapsed),t):0},get mouseUpElapsed(){return this.mouseUpStart?e.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var t=this.containerMetrics.width*this.containerMetrics.width,e=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(t+e),i.MAX_RADIUS)+5,s=1.1-n/i.MAX_RADIUS*.2,a=this.mouseInteractionSeconds/s,o=n*(1-Math.pow(80,-a));return Math.abs(o)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var t=.3*this.mouseUpElapsedSeconds,i=this.opacity;return Math.max(0,Math.min(t,i))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,i.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new t(this.element)},draw:function(){var t,i,e;this.wave.style.opacity=this.opacity,t=this.radius/(this.containerMetrics.size/2),i=this.xNow-this.containerMetrics.width/2,e=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+i+"px, "+e+"px)",this.waveContainer.style.transform="translate3d("+i+"px, "+e+"px, 0)",this.wave.style.webkitTransform="scale("+t+","+t+")",this.wave.style.transform="scale3d("+t+","+t+",1)"},downAction:function(t){var i=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=e.now(),this.center?(this.xStart=i,this.yStart=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=t?t.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=t?t.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=i,this.yEnd=n,this.slideDistance=e.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(t){this.isMouseDown&&(this.mouseUpStart=e.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Polymer.dom(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var t=this.keyEventTarget;this.listen(t,"up","uiUpAction"),this.listen(t,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var t=0;t<this.ripples.length;++t)if(!this.ripples[t].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(t){this.noink||this.downAction(t)},downAction:function(t){this.holdDown&&this.ripples.length>0||(this.addRipple().downAction(t),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(t){this.noink||this.upAction(t)},upAction:function(t){this.holdDown||(this.ripples.forEach(function(i){i.upAction(t)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var t=new i(this);return Polymer.dom(this.$.waves).appendChild(t.waveContainer),this.$.background.style.backgroundColor=t.color,this.ripples.push(t),this._setAnimating(!0),t},removeRipple:function(t){var i=this.ripples.indexOf(t);i<0||(this.ripples.splice(i,1),t.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var t,i;for(t=0;t<this.ripples.length;++t)(i=this.ripples[t]).draw(),this.$.background.style.opacity=i.outerOpacity,i.isOpacityFullyDecayed&&!i.isRestingAtMaxRadius&&this.removeRipple(i);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()}},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(t,i){void 0!==i&&(t?this.downAction():this.upAction())}})}();</script><script>Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Polymer.IronButtonStateImpl._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var i=this._rippleContainer||this.root;if(i&&Polymer.dom(i).appendChild(this._ripple),e){var n=Polymer.dom(this._rippleContainer||this),t=Polymer.dom(e).rootTarget;n.deepContains(t)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}};</script><script>Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=Polymer.PaperRippleBehavior._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl];</script><script>Polymer.PaperCheckedElementBehaviorImpl={_checkedChanged:function(){Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Polymer.PaperRippleBehavior._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},Polymer.PaperCheckedElementBehavior=[Polymer.PaperInkyFocusBehavior,Polymer.IronCheckedElementBehavior,Polymer.PaperCheckedElementBehaviorImpl];</script><dom-module id="paper-checkbox" assetpath="../bower_components/paper-checkbox/"><template strip-whitespace=""><style>:host{display:inline-block;white-space:nowrap;cursor:pointer;--calculated-paper-checkbox-size:var(--paper-checkbox-size, 18px);--calculated-paper-checkbox-ink-size:var(--paper-checkbox-ink-size, -1px);@apply --paper-font-common-base;line-height:0;-webkit-tap-highlight-color:transparent;}:host([hidden]){display:none !important;}:host(:focus){outline:none;}.hidden{display:none;}#checkboxContainer{display:inline-block;position:relative;width:var(--calculated-paper-checkbox-size);height:var(--calculated-paper-checkbox-size);min-width:var(--calculated-paper-checkbox-size);margin:var(--paper-checkbox-margin, initial);vertical-align:var(--paper-checkbox-vertical-align, middle);background-color:var(--paper-checkbox-unchecked-background-color, transparent);}#ink{position:absolute;top:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);left:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);width:var(--calculated-paper-checkbox-ink-size);height:var(--calculated-paper-checkbox-ink-size);color:var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));opacity:0.6;pointer-events:none;}:host-context([dir="rtl"]) #ink{right:calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);left:auto;}#ink[checked]{color:var(--paper-checkbox-checked-ink-color, var(--primary-color));}#checkbox{position:relative;box-sizing:border-box;height:100%;border:solid 2px;border-color:var(--paper-checkbox-unchecked-color, var(--primary-text-color));border-radius:2px;pointer-events:none;-webkit-transition:background-color 140ms, border-color 140ms;transition:background-color 140ms, border-color 140ms;}#checkbox.checked #checkmark{-webkit-animation:checkmark-expand 140ms ease-out forwards;animation:checkmark-expand 140ms ease-out forwards;}@-webkit-keyframes checkmark-expand{0%{-webkit-transform:scale(0, 0) rotate(45deg);}100%{-webkit-transform:scale(1, 1) rotate(45deg);}}@keyframes checkmark-expand{0%{transform:scale(0, 0) rotate(45deg);}100%{transform:scale(1, 1) rotate(45deg);}}#checkbox.checked{background-color:var(--paper-checkbox-checked-color, var(--primary-color));border-color:var(--paper-checkbox-checked-color, var(--primary-color));}#checkmark{position:absolute;width:36%;height:70%;border-style:solid;border-top:none;border-left:none;border-right-width:calc(2/15 * var(--calculated-paper-checkbox-size));border-bottom-width:calc(2/15 * var(--calculated-paper-checkbox-size));border-color:var(--paper-checkbox-checkmark-color, white);-webkit-transform-origin:97% 86%;transform-origin:97% 86%;box-sizing:content-box;}:host-context([dir="rtl"]) #checkmark{-webkit-transform-origin:50% 14%;transform-origin:50% 14%;}#checkboxLabel{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-checkbox-label-spacing, 8px);white-space:normal;line-height:normal;color:var(--paper-checkbox-label-color, var(--primary-text-color));@apply --paper-checkbox-label;}:host([checked]) #checkboxLabel{color:var(--paper-checkbox-label-checked-color, var(--paper-checkbox-label-color, var(--primary-text-color)));@apply --paper-checkbox-label-checked;}:host-context([dir="rtl"]) #checkboxLabel{padding-right:var(--paper-checkbox-label-spacing, 8px);padding-left:0;}#checkboxLabel[hidden]{display:none;}:host([disabled]) #checkbox{opacity:0.5;border-color:var(--paper-checkbox-unchecked-color, var(--primary-text-color));}:host([disabled][checked]) #checkbox{background-color:var(--paper-checkbox-unchecked-color, var(--primary-text-color));opacity:0.5;}:host([disabled]) #checkboxLabel{opacity:0.65;}#checkbox.invalid:not(.checked){border-color:var(--paper-checkbox-error-color, var(--error-color));}</style><div id="checkboxContainer"><div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]"><div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div></div></div><div id="checkboxLabel"><slot></slot></div></template><script>Polymer({is:"paper-checkbox",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){if("-1px"===this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim()){var e=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),t=e.match(/[A-Za-z]+$/)[0]||"px",a=parseFloat(e,10),r=8/3*a;"px"===t&&(r=Math.floor(r))%2!=a%2&&r++,this.updateStyles({"--paper-checkbox-ink-size":r+t})}})},_computeCheckboxClass:function(e,t){var a="";return e&&(a+="checked "),t&&(a+="invalid"),a},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)}});</script></dom-module><custom-style><style is="custom-style">html{--layout:{display:-ms-flexbox;display:-webkit-flex;display:flex;};--layout-inline:{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex;};--layout-horizontal:{@apply --layout;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row;};--layout-horizontal-reverse:{@apply --layout;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;};--layout-vertical:{@apply --layout;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column;};--layout-vertical-reverse:{@apply --layout;-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;};--layout-wrap:{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap;};--layout-wrap-reverse:{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;};--layout-flex-auto:{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto;};--layout-flex-none:{-ms-flex:none;-webkit-flex:none;flex:none;};--layout-flex:{-ms-flex:1 1 0.000000001px;-webkit-flex:1;flex:1;-webkit-flex-basis:0.000000001px;flex-basis:0.000000001px;};--layout-flex-2:{-ms-flex:2;-webkit-flex:2;flex:2;};--layout-flex-3:{-ms-flex:3;-webkit-flex:3;flex:3;};--layout-flex-4:{-ms-flex:4;-webkit-flex:4;flex:4;};--layout-flex-5:{-ms-flex:5;-webkit-flex:5;flex:5;};--layout-flex-6:{-ms-flex:6;-webkit-flex:6;flex:6;};--layout-flex-7:{-ms-flex:7;-webkit-flex:7;flex:7;};--layout-flex-8:{-ms-flex:8;-webkit-flex:8;flex:8;};--layout-flex-9:{-ms-flex:9;-webkit-flex:9;flex:9;};--layout-flex-10:{-ms-flex:10;-webkit-flex:10;flex:10;};--layout-flex-11:{-ms-flex:11;-webkit-flex:11;flex:11;};--layout-flex-12:{-ms-flex:12;-webkit-flex:12;flex:12;};--layout-start:{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start;};--layout-center:{-ms-flex-align:center;-webkit-align-items:center;align-items:center;};--layout-end:{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end;};--layout-baseline:{-ms-flex-align:baseline;-webkit-align-items:baseline;align-items:baseline;};--layout-start-justified:{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;};--layout-center-justified:{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;};--layout-end-justified:{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;};--layout-around-justified:{-ms-flex-pack:distribute;-webkit-justify-content:space-around;justify-content:space-around;};--layout-justified:{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;};--layout-center-center:{@apply --layout-center;@apply --layout-center-justified;};--layout-self-start:{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start;};--layout-self-center:{-ms-align-self:center;-webkit-align-self:center;align-self:center;};--layout-self-end:{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end;};--layout-self-stretch:{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch;};--layout-self-baseline:{-ms-align-self:baseline;-webkit-align-self:baseline;align-self:baseline;};--layout-start-aligned:{-ms-flex-line-pack:start;-ms-align-content:flex-start;-webkit-align-content:flex-start;align-content:flex-start;};--layout-end-aligned:{-ms-flex-line-pack:end;-ms-align-content:flex-end;-webkit-align-content:flex-end;align-content:flex-end;};--layout-center-aligned:{-ms-flex-line-pack:center;-ms-align-content:center;-webkit-align-content:center;align-content:center;};--layout-between-aligned:{-ms-flex-line-pack:justify;-ms-align-content:space-between;-webkit-align-content:space-between;align-content:space-between;};--layout-around-aligned:{-ms-flex-line-pack:distribute;-ms-align-content:space-around;-webkit-align-content:space-around;align-content:space-around;};--layout-block:{display:block;};--layout-invisible:{visibility:hidden !important;};--layout-relative:{position:relative;};--layout-fit:{position:absolute;top:0;right:0;bottom:0;left:0;};--layout-scroll:{-webkit-overflow-scrolling:touch;overflow:auto;};--layout-fullbleed:{margin:0;height:100vh;};--layout-fixed-top:{position:fixed;top:0;left:0;right:0;};--layout-fixed-right:{position:fixed;top:0;right:0;bottom:0;};--layout-fixed-bottom:{position:fixed;right:0;bottom:0;left:0;};--layout-fixed-left:{position:fixed;top:0;bottom:0;left:0;};}</style></custom-style><script>Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl];</script><custom-style><style is="custom-style">html{--shadow-transition:{transition:box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);};--shadow-none:{box-shadow:none;};--shadow-elevation-2dp:{box-shadow:0 2px 2px 0 rgba(0, 0, 0, 0.14),
0 1px 5px 0 rgba(0, 0, 0, 0.12),
0 3px 1px -2px rgba(0, 0, 0, 0.2);};--shadow-elevation-3dp:{box-shadow:0 3px 4px 0 rgba(0, 0, 0, 0.14),
0 1px 8px 0 rgba(0, 0, 0, 0.12),
0 3px 3px -2px rgba(0, 0, 0, 0.4);};--shadow-elevation-4dp:{box-shadow:0 4px 5px 0 rgba(0, 0, 0, 0.14),
0 1px 10px 0 rgba(0, 0, 0, 0.12),
0 2px 4px -1px rgba(0, 0, 0, 0.4);};--shadow-elevation-6dp:{box-shadow:0 6px 10px 0 rgba(0, 0, 0, 0.14),
0 1px 18px 0 rgba(0, 0, 0, 0.12),
0 3px 5px -1px rgba(0, 0, 0, 0.4);};--shadow-elevation-8dp:{box-shadow:0 8px 10px 1px rgba(0, 0, 0, 0.14),
0 3px 14px 2px rgba(0, 0, 0, 0.12),
0 5px 5px -3px rgba(0, 0, 0, 0.4);};--shadow-elevation-12dp:{box-shadow:0 12px 16px 1px rgba(0, 0, 0, 0.14),
0 4px 22px 3px rgba(0, 0, 0, 0.12),
0 6px 7px -4px rgba(0, 0, 0, 0.4);};--shadow-elevation-16dp:{box-shadow:0 16px 24px 2px rgba(0, 0, 0, 0.14),
0 6px 30px 5px rgba(0, 0, 0, 0.12),
0 8px 10px -5px rgba(0, 0, 0, 0.4);};--shadow-elevation-24dp:{box-shadow:0 24px 38px 3px rgba(0, 0, 0, 0.14),
0 9px 46px 8px rgba(0, 0, 0, 0.12),
0 11px 15px -7px rgba(0, 0, 0, 0.4);};}</style></custom-style><dom-module id="paper-material-styles" assetpath="../bower_components/paper-styles/element-styles/"><template><style>:host, html{--paper-material:{display:block;position:relative;};--paper-material-elevation-1:{@apply --shadow-elevation-2dp;};--paper-material-elevation-2:{@apply --shadow-elevation-4dp;};--paper-material-elevation-3:{@apply --shadow-elevation-6dp;};--paper-material-elevation-4:{@apply --shadow-elevation-8dp;};--paper-material-elevation-5:{@apply --shadow-elevation-16dp;};}:host(.paper-material), .paper-material{@apply --paper-material;}:host(.paper-material[elevation="1"]), .paper-material[elevation="1"]{@apply --paper-material-elevation-1;}:host(.paper-material[elevation="2"]), .paper-material[elevation="2"]{@apply --paper-material-elevation-2;}:host(.paper-material[elevation="3"]), .paper-material[elevation="3"]{@apply --paper-material-elevation-3;}:host(.paper-material[elevation="4"]), .paper-material[elevation="4"]{@apply --paper-material-elevation-4;}:host(.paper-material[elevation="5"]), .paper-material[elevation="5"]{@apply --paper-material-elevation-5;}</style></template></dom-module><dom-module id="paper-button" assetpath="../bower_components/paper-button/"><template strip-whitespace=""><style include="paper-material-styles">:host{@apply --layout-inline;@apply --layout-center-center;position:relative;box-sizing:border-box;min-width:5.14em;margin:0 0.29em;background:transparent;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;font:inherit;text-transform:uppercase;outline-width:0;border-radius:3px;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;cursor:pointer;z-index:0;padding:0.7em 0.57em;@apply --paper-font-common-base;@apply --paper-button;}:host([elevation="1"]){@apply --paper-material-elevation-1;}:host([elevation="2"]){@apply --paper-material-elevation-2;}:host([elevation="3"]){@apply --paper-material-elevation-3;}:host([elevation="4"]){@apply --paper-material-elevation-4;}:host([elevation="5"]){@apply --paper-material-elevation-5;}:host([hidden]){display:none !important;}:host([raised].keyboard-focus){font-weight:bold;@apply --paper-button-raised-keyboard-focus;}:host(:not([raised]).keyboard-focus){font-weight:bold;@apply --paper-button-flat-keyboard-focus;}:host([disabled]){background:#eaeaea;color:#a8a8a8;cursor:auto;pointer-events:none;@apply --paper-button-disabled;}:host([animated]){@apply --shadow-transition;}paper-ripple{color:var(--paper-button-ink-color);}</style><slot></slot></template><script>Polymer({is:"paper-button",behaviors:[Polymer.PaperButtonBehavior],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this):this._setElevation(0)}});</script></dom-module><dom-module id="iron-a11y-announcer" assetpath="../bower_components/iron-a11y-announcer/"><template><style>:host{display:inline-block;position:fixed;clip:rect(0px,0px,0px,0px);}</style><div aria-live$="[[mode]]">[[_text]]</div></template><script>!function(){"use strict";Polymer.IronA11yAnnouncer=Polymer({is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(n){this._text="",this.async(function(){this._text=n},100)},_onIronAnnounce:function(n){n.detail&&n.detail.text&&this.announce(n.detail.text)}}),Polymer.IronA11yAnnouncer.instance=null,Polymer.IronA11yAnnouncer.requestAvailability=function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Polymer.IronA11yAnnouncer.instance)}}();</script></dom-module><dom-module id="iron-input" assetpath="../bower_components/iron-input/"><template><style>:host{display:inline-block;}</style><slot id="content"></slot></template><script>Polymer({is:"iron-input",behaviors:[Polymer.IronValidatableBehavior],properties:{bindValue:{type:String},value:{computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){Polymer.IronA11yAnnouncer.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=Polymer.dom(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(Polymer.dom(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.type){case"number":e=/[0-9.,e-]/}return e},_bindValueChanged:function(e,t){t&&(void 0===e?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){this.allowedPattern&&!this._patternAlreadyChecked&&(this._checkPatternValidity()||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput)),this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=8==e.keyCode||9==e.keyCode||13==e.keyCode||27==e.keyCode,i=19==e.keyCode||20==e.keyCode||45==e.keyCode||46==e.keyCode||144==e.keyCode||145==e.keyCode||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!(t||0==e.charCode&&i)},_onKeypress:function(e){if(this.allowedPattern||"number"===this.type){var t=this._patternRegExp;if(t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var i=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(i)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+i+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.inputElement.value.length;t++)if(!e.test(this.inputElement.value[t]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var e=this.inputElement.checkValidity();return e&&(this.required&&""===this.bindValue?e=!1:this.hasValidator()&&(e=Polymer.IronValidatableBehavior.validate.call(this,this.bindValue))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})},_computeValue:function(e){return e}});</script></dom-module><script>Polymer.PaperInputHelper={},Polymer.PaperInputHelper.NextLabelID=1,Polymer.PaperInputHelper.NextAddonID=1,Polymer.PaperInputBehaviorImpl={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!Polymer.Element&&this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.inputElement.type)&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e=e?e+" "+t:t},_onAddonAttached:function(e){var t=Polymer.dom(e).rootTarget;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var a="paper-input-add-on-"+Polymer.PaperInputHelper.NextAddonID++;t.id=a,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,a)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){Polymer.IronControlState._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(t){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e=Polymer.dom(this.root).querySelector("label");if(e){var t;e.id?t=e.id:(t="paper-input-label-"+Polymer.PaperInputHelper.NextLabelID++,e.id=t),this._ariaLabelledBy=t}else this._ariaLabelledBy=""},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement;e instanceof HTMLElement&&e!==document.body&&e!==document.documentElement||this._focusableElement.focus()}}},Polymer.PaperInputBehavior=[Polymer.IronControlState,Polymer.IronA11yKeysBehavior,Polymer.PaperInputBehaviorImpl];</script><script>Polymer.PaperInputAddonBehavior={attached:function(){Polymer.dom.flush(),this.fire("addon-attached")},update:function(t){}};</script><dom-module id="paper-input-char-counter" assetpath="../bower_components/paper-input/"><template><style>:host{display:inline-block;float:right;@apply --paper-font-caption;@apply --paper-input-char-counter;}:host([hidden]){display:none !important;}:host-context([dir="rtl"]){float:left;}</style><span>[[_charCounterStr]]</span></template></dom-module><script>Polymer({is:"paper-input-char-counter",behaviors:[Polymer.PaperInputAddonBehavior],properties:{_charCounterStr:{type:String,value:"0"}},update:function(t){if(t.inputElement){t.value=t.value||"";var e=t.value.toString().length.toString();t.inputElement.hasAttribute("maxlength")&&(e+="/"+t.inputElement.getAttribute("maxlength")),this._charCounterStr=e}}});</script><dom-module id="paper-input-container" assetpath="../bower_components/paper-input/"><template><style>:host{display:block;padding:8px 0;--paper-input-container-shared-input-style:{position:relative;outline:none;box-shadow:none;padding:0;width:100%;max-width:100%;background:transparent;border:none;color:var(--paper-input-container-input-color, var(--primary-text-color));-webkit-appearance:none;text-align:inherit;vertical-align:bottom;@apply --paper-font-subhead;};@apply --paper-input-container;}:host([inline]){display:inline-block;}:host([disabled]){pointer-events:none;opacity:0.33;@apply --paper-input-container-disabled;}:host([hidden]){display:none !important;}[hidden]{display:none !important;}.floated-label-placeholder{@apply --paper-font-caption;}.underline{height:2px;position:relative;}.focused-line{@apply --layout-fit;border-bottom:2px solid var(--paper-input-container-focus-color, var(--primary-color));-webkit-transform-origin:center center;transform-origin:center center;-webkit-transform:scale3d(0,1,1);transform:scale3d(0,1,1);@apply --paper-input-container-underline-focus;}.underline.is-highlighted .focused-line{-webkit-transform:none;transform:none;-webkit-transition:-webkit-transform 0.25s;transition:transform 0.25s;@apply --paper-transition-easing;}.underline.is-invalid .focused-line{border-color:var(--paper-input-container-invalid-color, var(--error-color));-webkit-transform:none;transform:none;-webkit-transition:-webkit-transform 0.25s;transition:transform 0.25s;@apply --paper-transition-easing;}.unfocused-line{@apply --layout-fit;border-bottom:1px solid var(--paper-input-container-color, var(--secondary-text-color));@apply --paper-input-container-underline;}:host([disabled]) .unfocused-line{border-bottom:1px dashed;border-color:var(--paper-input-container-color, var(--secondary-text-color));@apply --paper-input-container-underline-disabled;}.input-wrapper{@apply --layout-horizontal;@apply --layout-center;position:relative;}.input-content{@apply --layout-flex-auto;@apply --layout-relative;max-width:100%;}.input-content ::slotted(label),
.input-content ::slotted(.paper-input-label){position:absolute;top:0;right:0;left:0;width:100%;font:inherit;color:var(--paper-input-container-color, var(--secondary-text-color));-webkit-transition:-webkit-transform 0.25s, width 0.25s;transition:transform 0.25s, width 0.25s;-webkit-transform-origin:left top;transform-origin:left top;@apply --paper-font-common-nowrap;@apply --paper-font-subhead;@apply --paper-input-container-label;@apply --paper-transition-easing;}.input-content.label-is-floating ::slotted(label),
.input-content.label-is-floating ::slotted(.paper-input-label){-webkit-transform:translateY(-75%) scale(0.75);transform:translateY(-75%) scale(0.75);width:133%;@apply --paper-input-container-label-floating;}:host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(label),
:host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(.paper-input-label){width:100%;-webkit-transform-origin:right top;transform-origin:right top;}.input-content.label-is-highlighted ::slotted(label),
.input-content.label-is-highlighted ::slotted(.paper-input-label){color:var(--paper-input-container-focus-color, var(--primary-color));@apply --paper-input-container-label-focus;}.input-content.is-invalid ::slotted(label),
.input-content.is-invalid ::slotted(.paper-input-label){color:var(--paper-input-container-invalid-color, var(--error-color));}.input-content.label-is-hidden ::slotted(label),
.input-content.label-is-hidden ::slotted(.paper-input-label){visibility:hidden;}.input-content ::slotted(iron-input){@apply --paper-input-container-shared-input-style;}.input-content ::slotted(input),
.input-content ::slotted(textarea),
.input-content ::slotted(iron-autogrow-textarea),
.input-content ::slotted(.paper-input-input){@apply --paper-input-container-shared-input-style;@apply --paper-input-container-input;}.input-content ::slotted(input)::-webkit-outer-spin-button,
.input-content ::slotted(input)::-webkit-inner-spin-button{@apply --paper-input-container-input-webkit-spinner;}.input-content.focused ::slotted(input),
.input-content.focused ::slotted(textarea),
.input-content.focused ::slotted(iron-autogrow-textarea),
.input-content.focused ::slotted(.paper-input-input){@apply --paper-input-container-input-focus;}.input-content.is-invalid ::slotted(input),
.input-content.is-invalid ::slotted(textarea),
.input-content.is-invalid ::slotted(iron-autogrow-textarea),
.input-content.is-invalid ::slotted(.paper-input-input){@apply --paper-input-container-input-invalid;}.prefix ::slotted(*){display:inline-block;@apply --paper-font-subhead;@apply --layout-flex-none;@apply --paper-input-prefix;}.suffix ::slotted(*){display:inline-block;@apply --paper-font-subhead;@apply --layout-flex-none;@apply --paper-input-suffix;}.input-content ::slotted(input){min-width:0;}.input-content ::slotted(textarea){resize:none;}.add-on-content{position:relative;}.add-on-content.is-invalid ::slotted(*){color:var(--paper-input-container-invalid-color, var(--error-color));}.add-on-content.is-highlighted ::slotted(*){color:var(--paper-input-container-focus-color, var(--primary-color));}</style><div class="floated-label-placeholder" aria-hidden="true" hidden="[[noLabelFloat]]">&nbsp;</div><div class="input-wrapper"><span class="prefix"><slot name="prefix"></slot></span><div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]" id="labelAndInputContainer"><slot name="label"></slot><slot name="input"></slot></div><span class="suffix"><slot name="suffix"></slot></span></div><div class$="[[_computeUnderlineClass(focused,invalid)]]"><div class="unfocused-line"></div><div class="focused-line"></div></div><div class$="[[_computeAddOnContentClass(focused,invalid)]]"><slot name="add-on"></slot></div></template></dom-module><script>Polymer({is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return Polymer.CaseMap.dashToCamelCase(this.attrForValue)},get _inputElement(){return Polymer.dom(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&""!=this._inputElementValue?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(t){this._addons||(this._addons=[]);var n=t.target;-1===this._addons.indexOf(n)&&(this._addons.push(n),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(t){this._handleValueAndAutoValidate(t.target)},_onValueChanged:function(t){void 0!==t.target.value&&this._handleValueAndAutoValidate(t.target)},_handleValue:function(t){var n=this._inputElementValue;n||0===n||"number"===t.type&&!t.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:t,value:n,invalid:this.invalid})},_handleValueAndAutoValidate:function(t){if(this.autoValidate&&t){var n;n=t.validate?t.validate(this._inputElementValue):t.checkValidity(),this.invalid=!n}this._handleValue(t)},_onIronInputValidate:function(t){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(t){for(var n,e=0;n=this._addons[e];e++)n.update(t)},_computeInputContentClass:function(t,n,e,i,a){var u="input-content";if(t)a&&(u+=" label-is-hidden"),i&&(u+=" is-invalid");else{var l=this.querySelector("label");n||a?(u+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",i?u+=" is-invalid":e&&(u+=" label-is-highlighted")):(l&&(this.$.labelAndInputContainer.style.position="relative"),i&&(u+=" is-invalid"))}return e&&(u+=" focused"),u},_computeUnderlineClass:function(t,n){var e="underline";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e},_computeAddOnContentClass:function(t,n){var e="add-on-content";return n?e+=" is-invalid":t&&(e+=" is-highlighted"),e}});</script><dom-module id="paper-input-error" assetpath="../bower_components/paper-input/"><template><style>:host{display:inline-block;visibility:hidden;color:var(--paper-input-container-invalid-color, var(--error-color));@apply --paper-font-caption;@apply --paper-input-error;position:absolute;left:0;right:0;}:host([invalid]){visibility:visible;}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-input-error",behaviors:[Polymer.PaperInputAddonBehavior],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});</script><dom-module id="paper-input" assetpath="../bower_components/paper-input/"><template><style>:host{display:block;}:host([focused]){outline:none;}:host([hidden]){display:none !important;}input{position:relative;outline:none;box-shadow:none;padding:0;width:100%;max-width:100%;background:transparent;border:none;color:var(--paper-input-container-input-color, var(--primary-text-color));-webkit-appearance:none;text-align:inherit;vertical-align:bottom;min-width:0;@apply --paper-font-subhead;@apply --paper-input-container-input;}input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button{@apply --paper-input-container-input-webkit-spinner;}input::-webkit-clear-button{@apply --paper-input-container-input-webkit-clear;}input::-webkit-input-placeholder{color:var(--paper-input-container-color, var(--secondary-text-color));}input:-moz-placeholder{color:var(--paper-input-container-color, var(--secondary-text-color));}input::-moz-placeholder{color:var(--paper-input-container-color, var(--secondary-text-color));}input::-ms-clear{@apply --paper-input-container-ms-clear;}input:-ms-input-placeholder{color:var(--paper-input-container-color, var(--secondary-text-color));}label{pointer-events:none;}</style><paper-input-container id="container" no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><slot name="prefix" slot="prefix"></slot><label hidden$="[[!label]]" aria-hidden="true" for="input" slot="label">[[label]]</label><span id="template-placeholder"></span><slot name="suffix" slot="suffix"></slot><template is="dom-if" if="[[errorMessage]]"><paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter slot="add-on"></paper-input-char-counter></template></paper-input-container></template><template id="v0"><input is="iron-input" id="input" slot="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabIndex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]"></template><template id="v1"><iron-input bind-value="{{value}}" id="input" slot="input" maxlength$="[[maxlength]]" allowed-pattern="[[allowedPattern]]" invalid="{{invalid}}" validator="[[validator]]"><input id="nativeInput" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabIndex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]"></iron-input></template></dom-module><script>Polymer({is:"paper-input",behaviors:[Polymer.PaperInputBehavior,Polymer.IronFormElementBehavior],beforeRegister:function(){var e="function"==typeof document.createElement("iron-input")._initSlottedInput?"v1":"v0",t=Polymer.DomModule.import("paper-input","template"),n=Polymer.DomModule.import("paper-input","template#"+e),i=t.content.querySelector("#template-placeholder");i&&i.parentNode.replaceChild(n.content,i)},get _focusableElement(){return Polymer.Element?this.inputElement._inputElement:this.inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});</script><script>Polymer.PaperSpinnerBehavior={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){"loading"===e?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(""===e),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){e?this.setAttribute("aria-hidden","true"):this.removeAttribute("aria-hidden")},__reset:function(){this.active=!1,this.__coolingDown=!1}};</script><dom-module id="paper-spinner-styles" assetpath="../bower_components/paper-spinner/"><template><style>:host{display:inline-block;position:relative;width:28px;height:28px;--paper-spinner-container-rotation-duration:1568ms;--paper-spinner-expand-contract-duration:1333ms;--paper-spinner-full-cycle-duration:5332ms;--paper-spinner-cooldown-duration:400ms;}#spinnerContainer{width:100%;height:100%;direction:ltr;}#spinnerContainer.active{-webkit-animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;}@-webkit-keyframes container-rotate{to{-webkit-transform:rotate(360deg);}}@keyframes container-rotate{to{transform:rotate(360deg);}}.spinner-layer{position:absolute;width:100%;height:100%;opacity:0;white-space:nowrap;border-color:var(--paper-spinner-color, var(--google-blue-500));}.layer-1{border-color:var(--paper-spinner-layer-1-color, var(--google-blue-500));}.layer-2{border-color:var(--paper-spinner-layer-2-color, var(--google-red-500));}.layer-3{border-color:var(--paper-spinner-layer-3-color, var(--google-yellow-500));}.layer-4{border-color:var(--paper-spinner-layer-4-color, var(--google-green-500));}.active .spinner-layer{-webkit-animation-name:fill-unfill-rotate;-webkit-animation-duration:var(--paper-spinner-full-cycle-duration);-webkit-animation-timing-function:cubic-bezier(0.4, 0.0, 0.2, 1);-webkit-animation-iteration-count:infinite;animation-name:fill-unfill-rotate;animation-duration:var(--paper-spinner-full-cycle-duration);animation-timing-function:cubic-bezier(0.4, 0.0, 0.2, 1);animation-iteration-count:infinite;opacity:1;}.active .spinner-layer.layer-1{-webkit-animation-name:fill-unfill-rotate, layer-1-fade-in-out;animation-name:fill-unfill-rotate, layer-1-fade-in-out;}.active .spinner-layer.layer-2{-webkit-animation-name:fill-unfill-rotate, layer-2-fade-in-out;animation-name:fill-unfill-rotate, layer-2-fade-in-out;}.active .spinner-layer.layer-3{-webkit-animation-name:fill-unfill-rotate, layer-3-fade-in-out;animation-name:fill-unfill-rotate, layer-3-fade-in-out;}.active .spinner-layer.layer-4{-webkit-animation-name:fill-unfill-rotate, layer-4-fade-in-out;animation-name:fill-unfill-rotate, layer-4-fade-in-out;}@-webkit-keyframes fill-unfill-rotate{12.5%{-webkit-transform:rotate(135deg);}25%{-webkit-transform:rotate(270deg);}37.5%{-webkit-transform:rotate(405deg);}50%{-webkit-transform:rotate(540deg);}62.5%{-webkit-transform:rotate(675deg);}75%{-webkit-transform:rotate(810deg);}87.5%{-webkit-transform:rotate(945deg);}to{-webkit-transform:rotate(1080deg);}}@keyframes fill-unfill-rotate{12.5%{transform:rotate(135deg);}25%{transform:rotate(270deg);}37.5%{transform:rotate(405deg);}50%{transform:rotate(540deg);}62.5%{transform:rotate(675deg);}75%{transform:rotate(810deg);}87.5%{transform:rotate(945deg);}to{transform:rotate(1080deg);}}@-webkit-keyframes layer-1-fade-in-out{0%{opacity:1;}25%{opacity:1;}26%{opacity:0;}89%{opacity:0;}90%{opacity:1;}to{opacity:1;}}@keyframes layer-1-fade-in-out{0%{opacity:1;}25%{opacity:1;}26%{opacity:0;}89%{opacity:0;}90%{opacity:1;}to{opacity:1;}}@-webkit-keyframes layer-2-fade-in-out{0%{opacity:0;}15%{opacity:0;}25%{opacity:1;}50%{opacity:1;}51%{opacity:0;}to{opacity:0;}}@keyframes layer-2-fade-in-out{0%{opacity:0;}15%{opacity:0;}25%{opacity:1;}50%{opacity:1;}51%{opacity:0;}to{opacity:0;}}@-webkit-keyframes layer-3-fade-in-out{0%{opacity:0;}40%{opacity:0;}50%{opacity:1;}75%{opacity:1;}76%{opacity:0;}to{opacity:0;}}@keyframes layer-3-fade-in-out{0%{opacity:0;}40%{opacity:0;}50%{opacity:1;}75%{opacity:1;}76%{opacity:0;}to{opacity:0;}}@-webkit-keyframes layer-4-fade-in-out{0%{opacity:0;}65%{opacity:0;}75%{opacity:1;}90%{opacity:1;}to{opacity:0;}}@keyframes layer-4-fade-in-out{0%{opacity:0;}65%{opacity:0;}75%{opacity:1;}90%{opacity:1;}to{opacity:0;}}.circle-clipper{display:inline-block;position:relative;width:50%;height:100%;overflow:hidden;border-color:inherit;}.spinner-layer::after{left:45%;width:10%;border-top-style:solid;}.spinner-layer::after,
.circle-clipper::after{content:'';box-sizing:border-box;position:absolute;top:0;border-width:var(--paper-spinner-stroke-width, 3px);border-color:inherit;border-radius:50%;}.circle-clipper::after{bottom:0;width:200%;border-style:solid;border-bottom-color:transparent !important;}.circle-clipper.left::after{left:0;border-right-color:transparent !important;-webkit-transform:rotate(129deg);transform:rotate(129deg);}.circle-clipper.right::after{left:-100%;border-left-color:transparent !important;-webkit-transform:rotate(-129deg);transform:rotate(-129deg);}.active .gap-patch::after,
.active .circle-clipper::after{-webkit-animation-duration:var(--paper-spinner-expand-contract-duration);-webkit-animation-timing-function:cubic-bezier(0.4, 0.0, 0.2, 1);-webkit-animation-iteration-count:infinite;animation-duration:var(--paper-spinner-expand-contract-duration);animation-timing-function:cubic-bezier(0.4, 0.0, 0.2, 1);animation-iteration-count:infinite;}.active .circle-clipper.left::after{-webkit-animation-name:left-spin;animation-name:left-spin;}.active .circle-clipper.right::after{-webkit-animation-name:right-spin;animation-name:right-spin;}@-webkit-keyframes left-spin{0%{-webkit-transform:rotate(130deg);}50%{-webkit-transform:rotate(-5deg);}to{-webkit-transform:rotate(130deg);}}@keyframes left-spin{0%{transform:rotate(130deg);}50%{transform:rotate(-5deg);}to{transform:rotate(130deg);}}@-webkit-keyframes right-spin{0%{-webkit-transform:rotate(-130deg);}50%{-webkit-transform:rotate(5deg);}to{-webkit-transform:rotate(-130deg);}}@keyframes right-spin{0%{transform:rotate(-130deg);}50%{transform:rotate(5deg);}to{transform:rotate(-130deg);}}#spinnerContainer.cooldown{-webkit-animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);animation:container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);}@-webkit-keyframes fade-out{0%{opacity:1;}to{opacity:0;}}@keyframes fade-out{0%{opacity:1;}to{opacity:0;}}</style></template></dom-module><dom-module id="paper-spinner" assetpath="../bower_components/paper-spinner/"><template strip-whitespace=""><style include="paper-spinner-styles"></style><div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]" on-animationend="__reset" on-webkit-animation-end="__reset"><div class="spinner-layer layer-1"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-2"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-3"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div><div class="spinner-layer layer-4"><div class="circle-clipper left"></div><div class="circle-clipper right"></div></div></div></template><script>Polymer({is:"paper-spinner",behaviors:[Polymer.PaperSpinnerBehavior]});</script></dom-module><dom-module id="login-form" assetpath="layouts/"><template><style is="custom-style" include="iron-flex iron-positioning"></style><style>:host{white-space:nowrap;}paper-input{display:block;margin-bottom:16px;}paper-checkbox{margin-right:8px;}paper-button{margin-left:72px;}.interact{height:125px;}#validatebox{margin-top:16px;text-align:center;}.validatemessage{margin-top:10px;}</style><div class="layout vertical center center-center fit"><img src="/static/icons/favicon-192x192.png" height="192"> <a href="#" id="hideKeyboardOnFocus"></a><div class="interact"><div id="loginform" hidden$="[[showSpinner]]"><paper-input id="passwordInput" label="Password" type="password" invalid="[[errorMessage]]" error-message="[[errorMessage]]" value="{{password}}"></paper-input><div class="layout horizontal center"><paper-checkbox for="" id="rememberLogin">Remember</paper-checkbox><paper-button on-tap="validatePassword">Log In</paper-button></div></div><div id="validatebox" hidden$="[[!showSpinner]]"><paper-spinner active="true"></paper-spinner><br><div class="validatemessage">[[computeLoadingMsg(isValidating)]]</div></div></div></div></template></dom-module><script>Polymer({is:"login-form",properties:{hass:{type:Object},connectionPromise:{type:Object,notify:!0,observer:"handleConnectionPromiseChanged"},errorMessage:{type:String,value:""},isValidating:{type:Boolean,observer:"isValidatingChanged",value:!1},showLoading:{type:Boolean,value:!1},showSpinner:{type:Boolean,computed:"computeShowSpinner(showLoading, isValidating)"},password:{type:String,value:""}},listeners:{keydown:"passwordKeyDown"},attached:function(){window.removeInitMsg()},computeLoadingMsg:function(n){return n?"Connecting":"Loading data"},computeShowSpinner:function(n,e){return n||e},isValidatingChanged:function(n){n||this.async(function(){this.$.passwordInput.inputElement.inputElement&&this.$.passwordInput.inputElement.inputElement.focus()}.bind(this),10)},passwordKeyDown:function(n){13===n.keyCode?(this.validatePassword(),n.preventDefault()):this.errorMessage&&(this.errorMessage="")},validatePassword:function(){var n=this.password;this.$.hideKeyboardOnFocus.focus(),this.connectionPromise=window.createHassConnection(n),this.$.rememberLogin.checked&&this.connectionPromise.then(function(){localStorage.authToken=n})},handleConnectionPromiseChanged:function(n){if(n){var e=this;this.isValidating=!0,this.connectionPromise.then(function(){e.isValidating=!1,e.password=""},function(n){e.isValidating=!1,n===window.HAWS.ERR_CANNOT_CONNECT?e.errorMessage="Unable to connect":n===window.HAWS.ERR_INVALID_AUTH?e.errorMessage="Invalid password":e.errorMessage="Unknown error: "+n})}}});</script><script>Polymer({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var e=this.query;e&&(this.full||"("===e[0]||(e="("+e+")"),this._mq=window.matchMedia(e),this._add(),this.queryHandler(this._mq))},queryHandler:function(e){this._setQueryMatches(e.matches)}});</script><script>Polymer.IronSelection=function(e){this.selection=[],this.selectCallback=e},Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(e){this.selection.slice().forEach(function(t){(!e||e.indexOf(t)<0)&&this.setItemSelected(t,!1)},this)},isSelected:function(e){return this.selection.indexOf(e)>=0},setItemSelected:function(e,t){if(null!=e&&t!==this.isSelected(e)){if(t)this.selection.push(e);else{var i=this.selection.indexOf(e);i>=0&&this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(e,t)}},select:function(e){this.multi?this.toggle(e):this.get()!==e&&(this.setItemSelected(this.get(),!1),this.setItemSelected(e,!0))},toggle:function(e){this.setItemSelected(e,!this.isSelected(e))}};</script><script>Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Polymer.IronSelection(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&Polymer.dom(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items.indexOf(e)},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=(Number(this._valueToIndex(this.selected))-1+e)%e;this.selected=this._indexToValue(t)},selectNext:function(){var e=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&"function"==typeof this._observer.flush?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=Polymer.dom(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return null==e?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(!this.attrForSelected)return Number(e);for(var t,i=0;t=this.items[i];i++)if(this._valueForItem(t)==e)return i},_indexToValue:function(e){if(!this.attrForSelected)return e;var t=this.items[e];return t?this._valueForItem(t):void 0},_valueForItem:function(e){if(!e)return null;var t=e[Polymer.CaseMap.dashToCamelCase(this.attrForSelected)];return void 0!=t?t:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return Polymer.dom(e).observeNodes(function(e){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",e,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,i=this.items;t&&t!=this;){var s=i.indexOf(t);if(s>=0){var l=this._indexToValue(s);return void this._itemActivate(l,t)}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}};</script><script>Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return null!=e},this)):Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter(function(e){return null!==e&&void 0!==e});this._selection.clear(t);for(var l=0;l<t.length;l++)this._selection.setItemSelected(t[l],!0);this.fallbackSelection&&!this._selection.get().length&&this._valueToItem(this.fallbackSelection)&&this.select(this.fallbackSelection)},_selectionChange:function(){var e=this._selection.get();this.multi?(this._setSelectedItems(e),this._setSelectedItem(e.length?e[0]:null)):null!==e&&void 0!==e?(this._setSelectedItems([e]),this._setSelectedItem(e)):(this._setSelectedItems([]),this._setSelectedItem(null))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e);t<0?this.push("selectedValues",e):this.splice("selectedValues",t,1)},_valuesToItems:function(e){return null==e?null:e.map(function(e){return this._valueToItem(e)},this)}},Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl];</script><script>Polymer({is:"iron-selector",behaviors:[Polymer.IronMultiSelectableBehavior]});</script><script>Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable=e},stopResizeNotificationsFor:function(e){var i=this._interestedResizables.indexOf(e);i>-1&&(this._interestedResizables.splice(i,1),this.unlisten(e,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){this._notifyingDescendant?e.stopPropagation():Polymer.Settings.useShadow||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=Polymer.dom(e).rootTarget;i!==this&&(-1===this._interestedResizables.indexOf(i)&&(this._interestedResizables.push(i),this.listen(i,"iron-resize","_onDescendantIronResize")),i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function i(){document.removeEventListener("readystatechange",i),e()})}else this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())}};</script><dom-module id="paper-drawer-panel" assetpath="../bower_components/paper-drawer-panel/"><template><style>:host{display:block;position:absolute;top:0;left:0;width:100%;height:100%;overflow:hidden;}#drawer{position:absolute;top:0;left:0;height:100%;background-color:white;-moz-box-sizing:border-box;box-sizing:border-box;@apply --paper-drawer-panel-drawer-container;}.transition-drawer{transition:-webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s;transition:transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s;}.left-drawer > #drawer{@apply --paper-drawer-panel-left-drawer-container;}.right-drawer > #drawer{left:auto;right:0;@apply --paper-drawer-panel-right-drawer-container;}#main{position:absolute;top:0;right:0;bottom:0;@apply --paper-drawer-panel-main-container;}.transition > #main{transition:left ease-in-out 0.3s, padding ease-in-out 0.3s;}.right-drawer > #main{left:0;}.right-drawer.transition > #main{transition:right ease-in-out 0.3s, padding ease-in-out 0.3s;}#main > ::slotted(*){height:100%;}#drawer > ::slotted(*){height:100%;}#scrim{position:absolute;top:0;right:0;bottom:0;left:0;visibility:hidden;opacity:0;transition:opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;background-color:rgba(0, 0, 0, 0.3);@apply --paper-drawer-panel-scrim;}.narrow-layout > #drawer{will-change:transform;}.narrow-layout > #drawer.iron-selected{box-shadow:2px 2px 4px rgba(0, 0, 0, 0.15);}.right-drawer.narrow-layout > #drawer.iron-selected{box-shadow:-2px 2px 4px rgba(0, 0, 0, 0.15);}.narrow-layout > #drawer > ::slotted(*){border:0;}.left-drawer.narrow-layout > #drawer:not(.iron-selected){visibility:hidden;-webkit-transform:translateX(-100%);transform:translateX(-100%);}.right-drawer.narrow-layout > #drawer:not(.iron-selected){left:auto;visibility:hidden;-webkit-transform:translateX(100%);transform:translateX(100%);}.left-drawer.dragging > #drawer:not(.iron-selected),
.left-drawer.peeking > #drawer:not(.iron-selected),
.right-drawer.dragging > #drawer:not(.iron-selected),
.right-drawer.peeking > #drawer:not(.iron-selected){visibility:visible;}.narrow-layout > #main{padding:0;}.right-drawer.narrow-layout > #main{left:0;right:0;}.narrow-layout > #main:not(.iron-selected) > #scrim,
.dragging > #main > #scrim{visibility:visible;opacity:var(--paper-drawer-panel-scrim-opacity, 1);}.narrow-layout > #main > *{margin:0;min-height:100%;left:0;right:0;-moz-box-sizing:border-box;box-sizing:border-box;}</style><iron-media-query id="mq" on-query-matches-changed="_onQueryMatchesChanged" query="[[_computeMediaQuery(forceNarrow, responsiveWidth)]]"></iron-media-query><iron-selector attr-for-selected="id" class$="[[_computeIronSelectorClass(narrow, _transition, dragging, rightDrawer, peeking)]]" on-transitionend="_onTransitionEnd" activate-event="" selected="[[selected]]"><div id="main" style$="[[_computeMainStyle(narrow, rightDrawer, drawerWidth)]]"><slot name="main"></slot><div id="scrim" on-tap="closeDrawer"></div></div><div id="drawer" style$="[[_computeDrawerStyle(drawerWidth)]]"><slot id="drawerSlot" name="drawer"></slot></div></iron-selector></template><script>!function(){"use strict";function e(e){var t=[];for(var i in e)e.hasOwnProperty(i)&&e[i]&&t.push(i);return t.join(" ")}var t=null;Polymer({is:"paper-drawer-panel",behaviors:[Polymer.IronResizableBehavior],properties:{defaultSelected:{type:String,value:"main"},disableEdgeSwipe:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1},dragging:{type:Boolean,value:!1,readOnly:!0,notify:!0},drawerWidth:{type:String,value:"256px"},edgeSwipeSensitivity:{type:Number,value:30},forceNarrow:{type:Boolean,value:!1},hasTransform:{type:Boolean,value:function(){return"transform"in this.style}},hasWillChange:{type:Boolean,value:function(){return"willChange"in this.style}},narrow:{reflectToAttribute:!0,type:Boolean,value:!1,readOnly:!0,notify:!0},peeking:{type:Boolean,value:!1,readOnly:!0,notify:!0},responsiveWidth:{type:String,value:"768px"},rightDrawer:{type:Boolean,value:!1},selected:{reflectToAttribute:!0,notify:!0,type:String,value:null},drawerFocusSelector:{type:String,value:'a[href]:not([tabindex="-1"]),area[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),iframe:not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])'},_transition:{type:Boolean,value:!1}},listeners:{tap:"_onTap",track:"_onTrack",down:"_downHandler",up:"_upHandler"},observers:["_forceNarrowChanged(forceNarrow, defaultSelected)","_toggleFocusListener(selected)"],ready:function(){this._transition=!0,this._boundFocusListener=this._didFocus.bind(this),console.warn(this.is,"is deprecated. Please use app-layout instead!")},togglePanel:function(){this._isMainSelected()?this.openDrawer():this.closeDrawer()},openDrawer:function(){requestAnimationFrame(function(){this.toggleClass("transition-drawer",!0,this.$.drawer),this.selected="drawer"}.bind(this))},closeDrawer:function(){requestAnimationFrame(function(){this.toggleClass("transition-drawer",!0,this.$.drawer),this.selected="main"}.bind(this))},_onTransitionEnd:function(e){if(Polymer.dom(e).localTarget===this.$.drawer&&("left"!==e.propertyName&&"right"!==e.propertyName||this.notifyResize(),"transform"===e.propertyName&&(requestAnimationFrame(function(){this.toggleClass("transition-drawer",!1,this.$.drawer)}.bind(this)),"drawer"===this.selected))){var t=this._getAutoFocusedNode();t&&t.focus()}},_computeIronSelectorClass:function(t,i,r,n,a){return e({dragging:r,"narrow-layout":t,"right-drawer":n,"left-drawer":!n,transition:i,peeking:a})},_computeDrawerStyle:function(e){return"width:"+e+";"},_computeMainStyle:function(e,t,i){var r="";return r+="left:"+(e||t?"0":i)+";",t&&(r+="right:"+(e?"":i)+";"),r},_computeMediaQuery:function(e,t){return e?"":"(max-width: "+t+")"},_computeSwipeOverlayHidden:function(e,t){return!e||t},_onTrack:function(e){if(!t||this===t)switch(e.detail.state){case"start":this._trackStart(e);break;case"track":this._trackX(e);break;case"end":this._trackEnd(e)}},_responsiveChange:function(e){this._setNarrow(e),this.selected=this.narrow?this.defaultSelected:null,this.setScrollDirection(this._swipeAllowed()?"y":"all"),this.fire("paper-responsive-change",{narrow:this.narrow})},_onQueryMatchesChanged:function(e){this._responsiveChange(e.detail.value)},_forceNarrowChanged:function(){this._responsiveChange(this.forceNarrow||this.$.mq.queryMatches)},_swipeAllowed:function(){return this.narrow&&!this.disableSwipe},_isMainSelected:function(){return"main"===this.selected},_startEdgePeek:function(){this.width=this.$.drawer.offsetWidth,this._moveDrawer(this._translateXForDeltaX(this.rightDrawer?-this.edgeSwipeSensitivity:this.edgeSwipeSensitivity)),this._setPeeking(!0)},_stopEdgePeek:function(){this.peeking&&(this._setPeeking(!1),this._moveDrawer(null))},_downHandler:function(e){!this.dragging&&this._isMainSelected()&&this._isEdgeTouch(e)&&!t&&(this._startEdgePeek(),e.preventDefault(),t=this)},_upHandler:function(){this._stopEdgePeek(),t=null},_onTap:function(e){var t=Polymer.dom(e).localTarget;t&&this.drawerToggleAttribute&&t.hasAttribute(this.drawerToggleAttribute)&&this.togglePanel()},_isEdgeTouch:function(e){var t=e.detail.x;return!this.disableEdgeSwipe&&this._swipeAllowed()&&(this.rightDrawer?t>=this.offsetWidth-this.edgeSwipeSensitivity:t<=this.edgeSwipeSensitivity)},_trackStart:function(e){this._swipeAllowed()&&(t=this,this._setDragging(!0),this._isMainSelected()&&this._setDragging(this.peeking||this._isEdgeTouch(e)),this.dragging&&(this.width=this.$.drawer.offsetWidth,this._transition=!1))},_translateXForDeltaX:function(e){var t=this._isMainSelected();return this.rightDrawer?Math.max(0,t?this.width+e:e):Math.min(0,t?e-this.width:e)},_trackX:function(e){if(this.dragging){var t=e.detail.dx;if(this.peeking){if(Math.abs(t)<=this.edgeSwipeSensitivity)return;this._setPeeking(!1)}this._moveDrawer(this._translateXForDeltaX(t))}},_trackEnd:function(e){if(this.dragging){var i=e.detail.dx>0;this._setDragging(!1),this._transition=!0,t=null,this._moveDrawer(null),this.rightDrawer?this[i?"closeDrawer":"openDrawer"]():this[i?"openDrawer":"closeDrawer"]()}},_transformForTranslateX:function(e){return null===e?"":this.hasWillChange?"translateX("+e+"px)":"translate3d("+e+"px, 0, 0)"},_moveDrawer:function(e){this.transform(this._transformForTranslateX(e),this.$.drawer)},_getDrawerSlot:function(){return Polymer.dom(this.$.drawerSlot).getDistributedNodes()[0]},_getAutoFocusedNode:function(){return this.drawerFocusSelector?Polymer.dom(this._getDrawerSlot()).querySelector(this.drawerFocusSelector):null},_toggleFocusListener:function(e){"drawer"===e?this.addEventListener("focus",this._boundFocusListener,!0):this.removeEventListener("focus",this._boundFocusListener,!0)},_didFocus:function(e){var t=this._getAutoFocusedNode();if(t){var i=Polymer.dom(e).path,r=(i[0],this._getDrawerSlot());-1!==i.indexOf(r)||(e.stopPropagation(),t.focus())}},_isDrawerClosed:function(e,t){return!e||"drawer"!==t}})}();</script></dom-module><dom-module id="iron-pages" assetpath="../bower_components/iron-pages/"><template><style>:host{display:block;}:host > ::slotted(:not(.iron-selected)){display:none !important;}</style><slot></slot></template><script>Polymer({is:"iron-pages",behaviors:[Polymer.IronResizableBehavior,Polymer.IronSelectableBehavior],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,a){this.async(this.notifyResize)}});</script></dom-module><script>!function(){"use strict";Polymer({is:"app-route",properties:{route:{type:Object,notify:!0},pattern:{type:String},data:{type:Object,value:function(){return{}},notify:!0},queryParams:{type:Object,value:function(){return{}},notify:!0},tail:{type:Object,value:function(){return{path:null,prefix:null,__queryParams:null}},notify:!0},active:{type:Boolean,notify:!0,readOnly:!0},_queryParamsUpdating:{type:Boolean,value:!1},_matched:{type:String,value:""}},observers:["__tryToMatch(route.path, pattern)","__updatePathOnDataChange(data.*)","__tailPathChanged(tail.path)","__routeQueryParamsChanged(route.__queryParams)","__tailQueryParamsChanged(tail.__queryParams)","__queryParamsChanged(queryParams.*)"],created:function(){this.linkPaths("route.__queryParams","tail.__queryParams"),this.linkPaths("tail.__queryParams","route.__queryParams")},__routeQueryParamsChanged:function(t){if(t&&this.tail){if(this.tail.__queryParams!==t&&this.set("tail.__queryParams",t),!this.active||this._queryParamsUpdating)return;var a={},i=!1;for(var e in t)a[e]=t[e],!i&&this.queryParams&&t[e]===this.queryParams[e]||(i=!0);for(var e in this.queryParams)if(i||!(e in t)){i=!0;break}if(!i)return;this._queryParamsUpdating=!0,this.set("queryParams",a),this._queryParamsUpdating=!1}},__tailQueryParamsChanged:function(t){t&&this.route&&this.route.__queryParams!=t&&this.set("route.__queryParams",t)},__queryParamsChanged:function(t){this.active&&!this._queryParamsUpdating&&this.set("route.__"+t.path,t.value)},__resetProperties:function(){this._setActive(!1),this._matched=null},__tryToMatch:function(){if(this.route){var t=this.route.path,a=this.pattern;if(a)if(t){for(var i=t.split("/"),e=a.split("/"),r=[],s={},h=0;h<e.length;h++){var n=e[h];if(!n&&""!==n)break;var u=i.shift();if(!u&&""!==u)return void this.__resetProperties();if(r.push(u),":"==n.charAt(0))s[n.slice(1)]=u;else if(n!==u)return void this.__resetProperties()}this._matched=r.join("/");var _={};this.active||(_.active=!0);var o=this.route.prefix+this._matched,l=i.join("/");i.length>0&&(l="/"+l),this.tail&&this.tail.prefix===o&&this.tail.path===l||(_.tail={prefix:o,path:l,__queryParams:this.route.__queryParams}),_.data=s,this._dataInUrl={};for(var p in s)this._dataInUrl[p]=s[p];this.setProperties?(this.active||this._setActive(!0),this.setProperties(_)):this.__setMulti(_)}else this.__resetProperties()}},__tailPathChanged:function(t){if(this.active){var a=t,i=this._matched;a&&("/"!==a.charAt(0)&&(a="/"+a),i+=a),this.set("route.path",i)}},__updatePathOnDataChange:function(){if(this.route&&this.active){var t=this.__getLink({});t!==this.__getLink(this._dataInUrl)&&this.set("route.path",t)}},__getLink:function(t){var a={tail:null};for(var i in this.data)a[i]=this.data[i];for(var i in t)a[i]=t[i];var e=this.pattern.split("/").map(function(t){return":"==t[0]&&(t=a[t.slice(1)]),t},this);return a.tail&&a.tail.path&&(e.length>0&&"/"===a.tail.path.charAt(0)?e.push(a.tail.path.slice(1)):e.push(a.tail.path)),e.join("/")},__setMulti:function(t){for(var a in t)this._propertySetter(a,t[a]);void 0!==t.data&&(this._pathEffector("data",this.data),this._notifyChange("data")),void 0!==t.active&&(this._pathEffector("active",this.active),this._notifyChange("active")),void 0!==t.tail&&(this._pathEffector("tail",this.tail),this._notifyChange("tail"))}})}();</script><script>!function(){"use strict";function t(t,a){if(void 0===e){e=!1;try{var h=new URL("b","http://a");h.pathname="c%20d",e="http://a/c%20d"===h.href,e=e&&"http://www.google.com/?foo%20bar"===new URL("http://www.google.com/?foo bar").href}catch(t){}}return e?new URL(t,a):(n||(n=document.implementation.createHTMLDocument("url"),i=n.createElement("base"),n.head.appendChild(i),o=n.createElement("a")),i.href=a,o.href=t.replace(/ /g,"%20"),o)}var e,n,i,o;Polymer({is:"iron-location",properties:{path:{type:String,notify:!0,value:function(){return window.decodeURIComponent(window.location.pathname)}},query:{type:String,notify:!0,value:function(){return window.location.search.slice(1)}},hash:{type:String,notify:!0,value:function(){return window.decodeURIComponent(window.location.hash.slice(1))}},dwellTime:{type:Number,value:2e3},urlSpaceRegex:{type:String,value:""},_urlSpaceRegExp:{computed:"_makeRegExp(urlSpaceRegex)"},_lastChangedAt:{type:Number},_initialized:{type:Boolean,value:!1}},hostAttributes:{hidden:!0},observers:["_updateUrl(path, query, hash)"],created:function(){this.__location=window.location},attached:function(){this.listen(window,"hashchange","_hashChanged"),this.listen(window,"location-changed","_urlChanged"),this.listen(window,"popstate","_urlChanged"),this.listen(document.body,"click","_globalOnClick"),this._lastChangedAt=window.performance.now()-(this.dwellTime-200),this._initialized=!0,this._urlChanged()},detached:function(){this.unlisten(window,"hashchange","_hashChanged"),this.unlisten(window,"location-changed","_urlChanged"),this.unlisten(window,"popstate","_urlChanged"),this.unlisten(document.body,"click","_globalOnClick"),this._initialized=!1},_hashChanged:function(){this.hash=window.decodeURIComponent(this.__location.hash.substring(1))},_urlChanged:function(){this._dontUpdateUrl=!0,this._hashChanged(),this.path=window.decodeURIComponent(this.__location.pathname),this.query=this.__location.search.substring(1),this._dontUpdateUrl=!1,this._updateUrl()},_getUrl:function(){var t=window.encodeURI(this.path).replace(/\#/g,"%23").replace(/\?/g,"%3F"),e="";this.query&&(e="?"+this.query.replace(/\#/g,"%23"));var n="";return this.hash&&(n="#"+window.encodeURI(this.hash)),t+e+n},_updateUrl:function(){if(!this._dontUpdateUrl&&this._initialized&&(this.path!==window.decodeURIComponent(this.__location.pathname)||this.query!==this.__location.search.substring(1)||this.hash!==window.decodeURIComponent(this.__location.hash.substring(1)))){var e=t(this._getUrl(),this.__location.protocol+"//"+this.__location.host).href,n=window.performance.now(),i=this._lastChangedAt+this.dwellTime>n;this._lastChangedAt=n,i?window.history.replaceState({},"",e):window.history.pushState({},"",e),this.fire("location-changed",{},{node:window})}},_globalOnClick:function(t){if(!t.defaultPrevented){var e=this._getSameOriginLinkHref(t);e&&(t.preventDefault(),e!==this.__location.href&&(window.history.pushState({},"",e),this.fire("location-changed",{},{node:window})))}},_getSameOriginLinkHref:function(e){if(0!==e.button)return null;if(e.metaKey||e.ctrlKey)return null;for(var n=Polymer.dom(e).path,i=null,o=0;o<n.length;o++){var a=n[o];if("A"===a.tagName&&a.href){i=a;break}}if(!i)return null;if("_blank"===i.target)return null;if(("_top"===i.target||"_parent"===i.target)&&window.top!==window)return null;var h,r=i.href;h=null!=document.baseURI?t(r,document.baseURI):t(r);var l;l=this.__location.origin?this.__location.origin:this.__location.protocol+"//"+this.__location.host;var s;if(h.origin)s=h.origin;else{var c=h.host,d=h.port,u=h.protocol,p="https:"===u&&"443"===d,_="http:"===u&&"80"===d;(p||_)&&(c=h.hostname),s=u+"//"+c}if(s!==l)return null;var w=h.pathname+h.search+h.hash;return"/"!==w[0]&&(w="/"+w),this._urlSpaceRegExp&&!this._urlSpaceRegExp.test(w)?null:t(w,this.__location.href).href},_makeRegExp:function(t){return RegExp(t)}})}();</script><script>"use strict";Polymer({is:"iron-query-params",properties:{paramsString:{type:String,notify:!0,observer:"paramsStringChanged"},paramsObject:{type:Object,notify:!0,value:function(){return{}}},_dontReact:{type:Boolean,value:!1}},hostAttributes:{hidden:!0},observers:["paramsObjectChanged(paramsObject.*)"],paramsStringChanged:function(){this._dontReact=!0,this.paramsObject=this._decodeParams(this.paramsString),this._dontReact=!1},paramsObjectChanged:function(){this._dontReact||(this.paramsString=this._encodeParams(this.paramsObject).replace(/%3F/g,"?").replace(/%2F/g,"/").replace(/'/g,"%27"))},_encodeParams:function(e){var t=[];for(var a in e){var n=e[a];""===n?t.push(encodeURIComponent(a)):n&&t.push(encodeURIComponent(a)+"="+encodeURIComponent(n.toString()))}return t.join("&")},_decodeParams:function(e){for(var t={},a=(e=(e||"").replace(/\+/g,"%20")).split("&"),n=0;n<a.length;n++){var r=a[n].split("=");r[0]&&(t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]||""))}return t}});</script><script>!function(){"use strict";Polymer.AppRouteConverterBehavior={properties:{route:{type:Object,notify:!0},queryParams:{type:Object,notify:!0},path:{type:String,notify:!0}},observers:["_locationChanged(path, queryParams)","_routeChanged(route.prefix, route.path)","_routeQueryParamsChanged(route.__queryParams)"],created:function(){this.linkPaths("route.__queryParams","queryParams"),this.linkPaths("queryParams","route.__queryParams")},_locationChanged:function(){this.route&&this.route.path===this.path&&this.queryParams===this.route.__queryParams||(this.route={prefix:"",path:this.path,__queryParams:this.queryParams})},_routeChanged:function(){this.route&&(this.path=this.route.prefix+this.route.path)},_routeQueryParamsChanged:function(t){this.route&&(this.queryParams=t)}}}();</script><dom-module id="app-location" assetpath="../bower_components/app-route/"><template><iron-query-params params-string="{{__query}}" params-object="{{queryParams}}"></iron-query-params><iron-location path="{{__path}}" query="{{__query}}" hash="{{__hash}}" url-space-regex="{{urlSpaceRegex}}"></iron-location></template><script>!function(){"use strict";Polymer({is:"app-location",properties:{route:{type:Object,notify:!0},useHashAsPath:{type:Boolean,value:!1},urlSpaceRegex:{type:String,notify:!0},__queryParams:{type:Object},__path:{type:String},__query:{type:String},__hash:{type:String},path:{type:String,observer:"__onPathChanged"},_isReady:{type:Boolean}},behaviors:[Polymer.AppRouteConverterBehavior],observers:["__computeRoutePath(useHashAsPath, __hash, __path)"],ready:function(){this._isReady=!0},__computeRoutePath:function(){this.path=this.useHashAsPath?this.__hash:this.__path},__onPathChanged:function(){this._isReady&&(this.useHashAsPath?this.__hash=this.path:this.__path=this.path)}})}();</script></dom-module><dom-module id="iron-icon" assetpath="../bower_components/iron-icon/"><template><style>:host{@apply --layout-inline;@apply --layout-center-center;position:relative;vertical-align:middle;fill:var(--iron-icon-fill-color, currentcolor);stroke:var(--iron-icon-stroke-color, none);width:var(--iron-icon-width, 24px);height:var(--iron-icon-height, 24px);@apply --iron-icon;}:host([hidden]){display:none;}</style></template><script>Polymer({is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Polymer.Base.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var i=(t||"").split(":");this._iconName=i.pop(),this._iconsetName=i.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(t){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&Polymer.dom(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,Polymer.dom(this.root).appendChild(this._img))}});</script></dom-module><script>Polymer.IronMenuBehaviorImpl={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"],_SEARCH_RESET_TIMEOUT_MS:1e3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),Polymer.IronMultiSelectableBehaviorImpl.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(t){t.setAttribute("tabindex",t===e?"0":"-1")},this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){if(-1===this._MODIFIER_KEYS.indexOf(e.key)){this.cancelDebouncer("_clearSearchText");for(var t,i=this._searchText||"",s=(i+=(e.key&&1==e.key.length?e.key:String.fromCharCode(e.keyCode)).toLocaleLowerCase()).length,o=0;t=this.items[o];o++)if(!t.hasAttribute("disabled")){var n=this.attrForItemTitle||"textContent",r=(t[n]||t.getAttribute(n)||"").trim();if(!(r.length<s)&&r.slice(0,s).toLocaleLowerCase()==i){this._setFocusedItem(t);break}}this._searchText=i,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),i=1;i<e+1;i++){var s=this.items[(t-i+e)%e];if(!s.hasAttribute("disabled")){var o=Polymer.dom(s).getOwnerRoot()||document;if(this._setFocusedItem(s),Polymer.dom(o).activeElement==s)return}}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),i=1;i<e+1;i++){var s=this.items[(t+i)%e];if(!s.hasAttribute("disabled")){var o=Polymer.dom(s).getOwnerRoot()||document;if(this._setFocusedItem(s),Polymer.dom(o).activeElement==s)return}}},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.removeAttribute("aria-selected"),Polymer.IronSelectableBehavior._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),!e||e.hasAttribute("disabled")||this.disabled||(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){e.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");Polymer.IronMenuBehaviorImpl._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1},1)},_onFocus:function(e){if(!Polymer.IronMenuBehaviorImpl._shiftTabPressed){var t=Polymer.dom(e).rootTarget;(t===this||void 0===t.tabIndex||this.isLightDescendant(t))&&(this._defaultFocusAsync=this.async(function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),e?this._setFocusedItem(e):this.items[0]&&this._focusNext()}))}},_onUpKey:function(e){this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onEscKey:function(e){var t=this.focusedItem;t&&t.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e),e.stopPropagation()},_activateHandler:function(e){Polymer.IronSelectableBehavior._activateHandler.call(this,e),e.stopPropagation()},_disabledChanged:function(e){e?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)}},Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1,Polymer.IronMenuBehavior=[Polymer.IronMultiSelectableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronMenuBehaviorImpl];</script><script>Polymer.IronMenubarBehaviorImpl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},Polymer.IronMenubarBehavior=[Polymer.IronMenuBehavior,Polymer.IronMenubarBehaviorImpl];</script><dom-module id="paper-icon-button" assetpath="../bower_components/paper-icon-button/"><template strip-whitespace=""><style>:host{display:inline-block;position:relative;padding:8px;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;z-index:0;line-height:1;width:40px;height:40px;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;box-sizing:border-box !important;@apply --paper-icon-button;}:host #ink{color:var(--paper-icon-button-ink-color, var(--primary-text-color));opacity:0.6;}:host([disabled]){color:var(--paper-icon-button-disabled-text, var(--disabled-text-color));pointer-events:none;cursor:auto;@apply --paper-icon-button-disabled;}:host([hidden]){display:none !important;}:host(:hover){@apply --paper-icon-button-hover;}iron-icon{--iron-icon-width:100%;--iron-icon-height:100%;}</style><iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon></template><script>Polymer({is:"paper-icon-button",hostAttributes:{role:"button",tabindex:"0"},behaviors:[Polymer.PaperInkyFocusBehavior],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(t,e){var r=this.getAttribute("aria-label");r&&e!=r||this.setAttribute("aria-label",t)}});</script></dom-module><script>Polymer({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new Polymer.IronMeta({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(t){return this.name+":"+t},this)},applyIcon:function(t,e){this.removeIcon(t);var n=this._cloneIcon(e,this.rtlMirroring&&this._targetIsRTL(t));if(n){var i=Polymer.dom(t.root||t);return i.insertBefore(n,i.childNodes[0]),t._svgIcon=n}return null},removeIcon:function(t){t._svgIcon&&(Polymer.dom(t.root||t).removeChild(t._svgIcon),t._svgIcon=null)},_targetIsRTL:function(t){if(null==this.__targetIsRTL)if(this.useGlobalRtlAttribute){var e=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL="rtl"===e.getAttribute("dir")}else t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.host),this.__targetIsRTL=t&&"rtl"===window.getComputedStyle(t).direction;return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var t=Object.create(null);return Polymer.dom(this).querySelectorAll("[id]").forEach(function(e){t[e.id]=e}),t},_cloneIcon:function(t,e){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[t],this.size,e)},_prepareSvgClone:function(t,e,n){if(t){var i=t.cloneNode(!0),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=i.getAttribute("viewBox")||"0 0 "+e+" "+e,s="pointer-events: none; display: block; width: 100%; height: 100%;";return n&&i.hasAttribute("mirror-in-rtl")&&(s+="-webkit-transform:scale(-1,1);transform:scale(-1,1);"),o.setAttribute("viewBox",r),o.setAttribute("preserveAspectRatio","xMidYMid meet"),o.setAttribute("focusable","false"),o.style.cssText=s,o.appendChild(i).removeAttribute("id"),o}return null}});</script><iron-iconset-svg name="paper-tabs" size="24"><svg><defs><g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g><g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g></defs></svg></iron-iconset-svg><dom-module id="paper-tab" assetpath="../bower_components/paper-tabs/"><template><style>:host{@apply --layout-inline;@apply --layout-center;@apply --layout-center-justified;@apply --layout-flex-auto;position:relative;padding:0 12px;overflow:hidden;cursor:pointer;vertical-align:middle;@apply --paper-font-common-base;@apply --paper-tab;}:host(:focus){outline:none;}:host([link]){padding:0;}.tab-content{height:100%;transform:translateZ(0);-webkit-transform:translateZ(0);transition:opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);@apply --layout-horizontal;@apply --layout-center-center;@apply --layout-flex-auto;@apply --paper-tab-content;}:host(:not(.iron-selected)) > .tab-content{opacity:0.8;@apply --paper-tab-content-unselected;}:host(:focus) .tab-content{opacity:1;font-weight:700;}paper-ripple{color:var(--paper-tab-ink, var(--paper-yellow-a100));}.tab-content > ::slotted(a){@apply --layout-flex-auto;height:100%;}</style><div class="tab-content"><slot></slot></div></template><script>Polymer({is:"paper-tab",behaviors:[Polymer.IronControlState,Polymer.IronButtonState,Polymer.PaperRippleBehavior],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var t=Polymer.dom(this).parentNode;return!!t&&!!t.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(t){if(this.link){var e=this.queryEffectiveChildren("a");if(!e)return;if(t.target===e)return;e.click()}}});</script></dom-module><dom-module id="paper-tabs" assetpath="../bower_components/paper-tabs/"><template><style>:host{@apply --layout;@apply --layout-center;height:48px;font-size:14px;font-weight:500;overflow:hidden;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent;@apply --paper-tabs;}:host-context([dir=rtl]){@apply --layout-horizontal-reverse;}#tabsContainer{position:relative;height:100%;white-space:nowrap;overflow:hidden;@apply --layout-flex-auto;@apply --paper-tabs-container;}#tabsContent{height:100%;-moz-flex-basis:auto;-ms-flex-basis:auto;flex-basis:auto;@apply --paper-tabs-content;}#tabsContent.scrollable{position:absolute;white-space:nowrap;}#tabsContent:not(.scrollable),
#tabsContent.scrollable.fit-container{@apply --layout-horizontal;}#tabsContent.scrollable.fit-container{min-width:100%;}#tabsContent.scrollable.fit-container > ::slotted(*){-ms-flex:1 0 auto;-webkit-flex:1 0 auto;flex:1 0 auto;}.hidden{display:none;}.not-visible{opacity:0;cursor:default;}paper-icon-button{width:48px;height:48px;padding:12px;margin:0 4px;}#selectionBar{position:absolute;height:0;bottom:0;left:0;right:0;border-bottom:2px solid var(--paper-tabs-selection-bar-color, var(--paper-yellow-a100));-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:left center;transform-origin:left center;transition:-webkit-transform;transition:transform;@apply --paper-tabs-selection-bar;}#selectionBar.align-bottom{top:0;bottom:auto;}#selectionBar.expand{transition-duration:0.15s;transition-timing-function:cubic-bezier(0.4, 0.0, 1, 1);}#selectionBar.contract{transition-duration:0.18s;transition-timing-function:cubic-bezier(0.0, 0.0, 0.2, 1);}#tabsContent > ::slotted(:not(#selectionBar)){height:100%;}</style><paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button><div id="tabsContainer" on-track="_scroll" on-down="_down"><div id="tabsContent" class$="[[_computeTabsContentClass(scrollable, fitContainer)]]"><div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div><slot></slot></div></div><paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button></template><script>Polymer({is:"paper-tabs",behaviors:[Polymer.IronResizableBehavior,Polymer.IronMenubarBehavior],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(t){Polymer.dom(this).querySelectorAll("paper-tab").forEach(t?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(t){t.setAttribute("noink","")},_removeNoinkAttribute:function(t){t.removeAttribute("noink")},_computeScrollButtonClass:function(t,e,i){return!e||i?"hidden":t?"not-visible":""},_computeTabsContentClass:function(t,e){return t?"scrollable"+(e?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(t,e){return t?"hidden":e?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(t){this._tabChanged(t.detail.item,this._previousTab),this._previousTab=t.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(t){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),Polymer.IronMenuBehaviorImpl._activateHandler.apply(this,arguments)},_scheduleActivation:function(t,e){this._pendingActivationItem=t,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,e)},_delayedActivationHandler:function(){var t=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,t.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(t){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(t){t.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(t,e){if(this.scrollable){var i=e&&-e.ddx||0;this._affectScroll(i)}},_down:function(t){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(t){this.$.tabsContainer.scrollLeft+=t;var e=this.$.tabsContainer.scrollLeft;this._leftHidden=0===e,this._rightHidden=e===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(t,e){if(!t)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(0,0);var i=this.$.tabsContent.getBoundingClientRect(),n=i.width,o=t.getBoundingClientRect(),s=o.left-i.left;if(this._pos={width:this._calcPercent(o.width,n),left:this._calcPercent(s,n)},this.noSlide||null==e)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(this._pos.width,this._pos.left);var a=e.getBoundingClientRect(),l=this.items.indexOf(e),c=this.items.indexOf(t);this.$.selectionBar.classList.add("expand");var r=l<c;this._isRTL&&(r=!r),r?this._positionBar(this._calcPercent(o.left+o.width-a.left,n)-5,this._left):this._positionBar(this._calcPercent(a.left+a.width-o.left,n)-5,this._calcPercent(s,n)+5),this.scrollable&&this._scrollToSelectedIfNeeded(o.width,s)},_scrollToSelectedIfNeeded:function(t,e){var i=e-this.$.tabsContainer.scrollLeft;i<0?this.$.tabsContainer.scrollLeft+=i:(i+=t-this.$.tabsContainer.offsetWidth)>0&&(this.$.tabsContainer.scrollLeft+=i)},_calcPercent:function(t,e){return 100*t/e},_positionBar:function(t,e){t=t||0,e=e||0,this._width=t,this._left=e,this.transform("translateX("+e+"%) scaleX("+t/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(t){var e=this.$.selectionBar.classList;e.contains("expand")?(e.remove("expand"),e.add("contract"),this._positionBar(this._pos.width,this._pos.left)):e.contains("contract")&&e.remove("contract")}});</script></dom-module><script>Polymer.AppLayoutBehavior=[Polymer.IronResizableBehavior,{listeners:{"app-reset-layout":"_appResetLayoutHandler","iron-resize":"resetLayout"},attached:function(){this.fire("app-reset-layout")},_appResetLayoutHandler:function(e){Polymer.dom(e).path[0]!==this&&(this.resetLayout(),e.stopPropagation())},_updateLayoutStates:function(){console.error("unimplemented")},resetLayout:function(){var e=this._updateLayoutStates.bind(this);Polymer.Async&&Polymer.Async.animationFrame?(this._layoutDebouncer=Polymer.Debouncer.debounce(this._layoutDebouncer,Polymer.Async.animationFrame,e),Polymer.enqueueDebouncer(this._layoutDebouncer)):this.debounce("resetLayout",e),this._notifyDescendantResize()},_notifyLayoutChanged:function(){var e=this;requestAnimationFrame(function(){e.fire("app-reset-layout")})},_notifyDescendantResize:function(){this.isAttached&&this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this)}}];</script><dom-module id="app-header-layout" assetpath="../bower_components/app-layout/app-header-layout/"><template><style>:host{display:block;position:relative;z-index:0;}#wrapper ::slotted([slot=header]){@apply --layout-fixed-top;z-index:1;}#wrapper.initializing ::slotted([slot=header]){position:relative;}:host([has-scrolling-region]){height:100%;}:host([has-scrolling-region]) #wrapper ::slotted([slot=header]){position:absolute;}:host([has-scrolling-region]) #wrapper.initializing ::slotted([slot=header]){position:relative;}:host([has-scrolling-region]) #wrapper #contentContainer{@apply --layout-fit;overflow-y:auto;-webkit-overflow-scrolling:touch;}:host([has-scrolling-region]) #wrapper.initializing #contentContainer{position:relative;}:host([fullbleed]){@apply --layout-vertical;@apply --layout-fit;}:host([fullbleed]) #wrapper,
:host([fullbleed]) #wrapper #contentContainer{@apply --layout-vertical;@apply --layout-flex;}#contentContainer{position:relative;z-index:0;}@media print{:host([has-scrolling-region]) #wrapper #contentContainer{overflow-y:visible;}}</style><div id="wrapper" class="initializing"><slot id="headerSlot" name="header"></slot><div id="contentContainer"><slot></slot></div></div></template><script>Polymer({is:"app-header-layout",behaviors:[Polymer.AppLayoutBehavior],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return Polymer.dom(this.$.headerSlot).getDistributedNodes()[0]},_updateLayoutStates:function(){var e=this.header;if(this.isAttached&&e){this.$.wrapper.classList.remove("initializing"),e.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement;var t=e.offsetHeight;this.hasScrollingRegion?(e.style.left="",e.style.right=""):requestAnimationFrame(function(){var t=this.getBoundingClientRect(),i=document.documentElement.clientWidth-t.right;e.style.left=t.left+"px",e.style.right=i+"px"}.bind(this));var i=this.$.contentContainer.style;e.fixed&&!e.condenses&&this.hasScrollingRegion?(i.marginTop=t+"px",i.paddingTop=""):(i.paddingTop=t+"px",i.marginTop="")}}});</script></dom-module><script>Polymer.IronScrollTargetBehavior={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(l,t){if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),t)if("document"===l)this.scrollTarget=this._doc;else if("string"==typeof l){var r=this.domHost;this.scrollTarget=r&&r.$?r.$[l]:Polymer.dom(this.ownerDocument).querySelector("#"+l)}else this._isValidScrollTarget()&&(this._oldScrollTarget=l,this._toggleScrollListener(this._shouldHaveListener,l))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(l){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,l):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=l)},set _scrollLeft(l){this.scrollTarget===this._doc?window.scrollTo(l,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=l)},scroll:function(l,t){this.scrollTarget===this._doc?window.scrollTo(l,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=l,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(l,t){var r=t===this._doc?window:t;l?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(l){this._shouldHaveListener=l,this._toggleScrollListener(l,this.scrollTarget)}};</script><script>Polymer.AppLayout=Polymer.AppLayout||{},Polymer.AppLayout._scrollEffects={},Polymer.AppLayout._scrollTimer=null,Polymer.AppLayout.scrollTimingFunction=function(o,e,l,r){return o/=r,-l*o*(o-2)+e},Polymer.AppLayout.registerEffect=function(o,e){if(null!=Polymer.AppLayout._scrollEffects[o])throw new Error("effect `"+o+"` is already registered.");Polymer.AppLayout._scrollEffects[o]=e},Polymer.AppLayout.queryAllRoot=function(o,e){for(var l=[e],r=[];l.length>0;){var t=l.shift();r.push.apply(r,t.querySelectorAll(o));for(var n=0;t.children[n];n++)t.children[n].shadowRoot&&l.push(t.children[n].shadowRoot)}return r},Polymer.AppLayout.scroll=function(o){o=o||{};var e=document.documentElement,l=o.target||e,r="scrollBehavior"in l.style&&l.scroll,t=o.top||0,n=o.left||0,i=l===e?window.scrollTo:function(o,e){l.scrollLeft=o,l.scrollTop=e};if("smooth"===o.behavior)if(r)l.scroll(o);else{var c=Polymer.AppLayout.scrollTimingFunction,a=Date.now(),s=l===e?window.pageYOffset:l.scrollTop,u=l===e?window.pageXOffset:l.scrollLeft,p=t-s,y=n-u;(function o(){var e=Date.now()-a;e<300?(i(c(e,u,y,300),c(e,s,p,300)),requestAnimationFrame(o)):i(n,t)}).bind(this)()}else if("silent"===o.behavior){var f=Polymer.AppLayout.queryAllRoot("app-header",document.body);f.forEach(function(o){o.setAttribute("silent-scroll","")}),window.cancelAnimationFrame(Polymer.AppLayout._scrollTimer),Polymer.AppLayout._scrollTimer=window.requestAnimationFrame(function(){f.forEach(function(o){o.removeAttribute("silent-scroll")}),Polymer.AppLayout._scrollTimer=null}),i(n,t)}else i(n,t)};</script><script>Polymer.AppScrollEffectsBehavior=[Polymer.IronScrollTargetBehavior,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},detached:function(){this._tearDownEffects()},createEffect:function(t,e){var n=Polymer.AppLayout._scrollEffects[t];if(!n)throw new ReferenceError(this._getUndefinedMsg(t));var f=this._boundEffect(n,e||{});return f.setUp(),f},_effectsChanged:function(t,e,n){this._tearDownEffects(),t&&n&&(t.split(" ").forEach(function(t){var n;""!==t&&((n=Polymer.AppLayout._scrollEffects[t])?this._effects.push(this._boundEffect(n,e[t])):console.warn(this._getUndefinedMsg(t)))},this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(t,e){e=e||{};var n=parseFloat(e.startsAt||0),f=parseFloat(e.endsAt||1),s=f-n,r=function(){},o=0===n&&1===f?t.run:function(e,f){t.run.call(this,Math.max(0,(e-n)/s),f)};return{setUp:t.setUp?t.setUp.bind(this,e):r,run:t.run?o.bind(this):r,tearDown:t.tearDown?t.tearDown.bind(this):r}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(t){!1!==t.setUp()&&this._effectsRunFn.push(t.run)},this))},_tearDownEffects:function(){this._effects&&this._effects.forEach(function(t){t.tearDown()}),this._effectsRunFn=[],this._effects=[]},_runEffects:function(t,e){this._effectsRunFn&&this._effectsRunFn.forEach(function(n){n(t,e)})},_scrollHandler:function(){if(!this.disabled){var t=this._clampedScrollTop;this._updateScrollState(t),this.threshold>0&&this._setThresholdTriggered(t>=this.threshold)}},_getDOMRef:function(t){console.warn("_getDOMRef","`"+t+"` is undefined")},_getUndefinedMsg:function(t){return"Scroll effect `"+t+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+t+".html ?"}}];</script><script>Polymer.AppLayout.registerEffect("waterfall",{run:function(){this.shadow=this.isOnScreen()&&this.isContentBelow()}});</script><dom-module id="app-header" assetpath="../bower_components/app-layout/app-header/"><template><style>:host{position:relative;display:block;transition-timing-function:linear;transition-property:-webkit-transform;transition-property:transform;}:host::before{position:absolute;right:0px;bottom:-5px;left:0px;width:100%;height:5px;content:"";transition:opacity 0.4s;pointer-events:none;opacity:0;box-shadow:inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);will-change:opacity;@apply --app-header-shadow;}:host([shadow])::before{opacity:1;}#background{@apply --layout-fit;overflow:hidden;}#backgroundFrontLayer,
#backgroundRearLayer{@apply --layout-fit;height:100%;pointer-events:none;background-size:cover;}#backgroundFrontLayer{@apply --app-header-background-front-layer;}#backgroundRearLayer{opacity:0;@apply --app-header-background-rear-layer;}#contentContainer{position:relative;width:100%;height:100%;}:host([disabled]),
:host([disabled])::after,
:host([disabled]) #backgroundFrontLayer,
:host([disabled]) #backgroundRearLayer,
/* Silent scrolling should not run CSS transitions */
:host([silent-scroll]),
:host([silent-scroll])::after,
:host([silent-scroll]) #backgroundFrontLayer,
:host([silent-scroll]) #backgroundRearLayer{transition:none !important;}:host([disabled]) ::slotted(app-toolbar:first-of-type),
:host([disabled]) ::slotted([sticky]),
/* Silent scrolling should not run CSS transitions */
:host([silent-scroll]) ::slotted(app-toolbar:first-of-type),
:host([silent-scroll]) ::slotted([sticky]){transition:none !important;}</style><div id="contentContainer"><slot id="slot"></slot></div></template><script>Polymer({is:"app-header",behaviors:[Polymer.AppScrollEffectsBehavior,Polymer.AppLayoutBehavior],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["_configChanged(isAttached, condenses, fixed)"],_height:0,_dHeight:0,_stickyElTop:0,_stickyElRef:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},get _stickyEl(){if(this._stickyElRef)return this._stickyElRef;for(var t,i=Polymer.dom(this.$.slot).getDistributedNodes(),e=0;t=i[e];e++)if(t.nodeType===Node.ELEMENT_NODE){if(t.hasAttribute("sticky")){this._stickyElRef=t;break}this._stickyElRef||(this._stickyElRef=t)}return this._stickyElRef},_configChanged:function(){this.resetLayout(),this._notifyLayoutChanged()},_updateLayoutStates:function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var t=this._clampedScrollTop,i=0===this._height||0===t,e=this.disabled;this._height=this.offsetHeight,this._stickyElRef=null,this.disabled=!0,i||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),i?this._updateScrollState(t,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=e}},_updateScrollState:function(t,i){if(0!==this._height){var e=0,s=0,h=this._top,o=(this._lastScrollTop,this._maxHeaderTop),r=t-this._lastScrollTop,n=Math.abs(r),a=t>this._lastScrollTop,l=performance.now();if(this._mayMove()&&(s=this._clamp(this.reveals?h+r:t,0,o)),t>=this._dHeight&&(s=this.condenses&&!this.fixed?Math.max(this._dHeight,s):s,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&n<100&&((l-this._initTimestamp>300||this._wasScrollingDown!==a)&&(this._initScrollTop=t,this._initTimestamp=l),t>=o))if(Math.abs(this._initScrollTop-t)>30||n>10){a&&t>=o?s=o:!a&&t>=this._dHeight&&(s=this.condenses&&!this.fixed?this._dHeight:0);var _=r/(l-this._lastTimestamp);this.style.transitionDuration=this._clamp((s-h)/_,0,300)+"ms"}else s=this._top;e=0===this._dHeight?t>0?1:0:s/this._dHeight,i||(this._lastScrollTop=t,this._top=s,this._wasScrollingDown=a,this._lastTimestamp=l),(i||e!==this._progress||h!==s||0===t)&&(this._progress=e,this._runEffects(e,s),this._transformHeader(s))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top<this._height},isContentBelow:function(){return 0===this._top?this._clampedScrollTop>0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(t){this.translate3d(0,-t+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&t>=this._stickyElTop?Math.min(t,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_clamp:function(t,i,e){return Math.min(e,Math.max(i,t))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Polymer.dom(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(t){switch(t){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Polymer.dom(this).querySelector("[main-title]");case"condensedTitle":return Polymer.dom(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}});</script></dom-module><dom-module id="app-toolbar" assetpath="../bower_components/app-layout/app-toolbar/"><template><style>:host{@apply --layout-horizontal;@apply --layout-center;position:relative;height:64px;padding:0 16px;pointer-events:none;font-size:var(--app-toolbar-font-size, 20px);}:host ::slotted(*){pointer-events:auto;}:host ::slotted(paper-icon-button){font-size:0;}:host ::slotted([main-title]),
:host ::slotted([condensed-title]){pointer-events:none;@apply --layout-flex;}:host ::slotted([bottom-item]){position:absolute;right:0;bottom:0;left:0;}:host ::slotted([top-item]){position:absolute;top:0;right:0;left:0;}:host ::slotted([spacer]){margin-left:64px;}</style><slot></slot></template><script>Polymer({is:"app-toolbar"});</script></dom-module><dom-module id="ha-menu-button" assetpath="components/"><template><style>.invisible{visibility:hidden;}</style><paper-icon-button icon="mdi:menu" class$="[[computeMenuButtonClass(narrow, showMenu)]]" on-tap="toggleMenu"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-menu-button",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1}},computeMenuButtonClass:function(e,n){return!e&&n?"invisible":""},toggleMenu:function(e){e.stopPropagation(),this.fire("hass-open-menu")}});</script><dom-module id="ha-start-voice-button" assetpath="components/"><template><paper-icon-button icon="mdi:microphone" hidden$="[[!canListen]]" on-tap="handleListenClick"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-start-voice-button",properties:{hass:{type:Object,value:null},canListen:{type:Boolean,computed:"computeCanListen(hass)"}},computeCanListen:function(e){return"webkitSpeechRecognition"in window&&window.hassUtil.isComponentLoaded(e,"conversation")},handleListenClick:function(){this.fire("hass-start-voice")}});</script><dom-module id="ha-label-badge" assetpath="components/"><template><style>.badge-container{display:inline-block;text-align:center;vertical-align:top;}.label-badge{position:relative;display:block;margin:0 auto;width:var(--ha-label-badge-size, 2.5em);text-align:center;height:var(--ha-label-badge-size, 2.5em);line-height:var(--ha-label-badge-size, 2.5em);font-size:var(--ha-label-badge-font-size, 1.5em);border-radius:50%;border:0.1em solid var(--ha-label-badge-color, --primary-color);color:var(--label-badge-text-color, rgb(76, 76, 76));white-space:nowrap;background-color:var(--label-badge-background-color, white);background-size:cover;transition:border .3s ease-in-out;}.label-badge .value{font-size:90%;overflow:hidden;text-overflow:ellipsis;}.label-badge .value.big{font-size:70%;}.label-badge .label{position:absolute;bottom:-1em;left:0;right:0;line-height:1em;font-size:0.5em;}.label-badge .label span{max-width:80%;display:inline-block;background-color:var(--ha-label-badge-color, --primary-color);color:white;border-radius:1em;padding:4px 8px;font-weight:500;text-transform:uppercase;overflow:hidden;text-overflow:ellipsis;transition:background-color .3s ease-in-out;}.badge-container .title{margin-top:1em;font-size:var(--ha-label-badge-title-font-size, .9em);width:var(--ha-label-badge-title-width, 5em);font-weight:300;overflow:hidden;text-overflow:ellipsis;line-height:normal;}[hidden]{display:none !important;}</style><div class="badge-container"><div class="label-badge" id="badge"><div class$="[[computeClasses(value)]]"><iron-icon icon="[[icon]]" hidden$="[[computeHideIcon(icon, value, image)]]"></iron-icon><span hidden$="[[computeHideValue(value, image)]]">[[value]]</span></div><div class="label" hidden$="[[!label]]"><span>[[label]]</span></div></div><div class="title" hidden$="[[!description]]">[[description]]</div></div></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),HaLabelBadge=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"computeClasses",value:function(e){return e&&e.length>4?"value big":"value"}},{key:"computeHideIcon",value:function(e,t,n){return!e||t||n}},{key:"computeHideValue",value:function(e,t){return!e||t}},{key:"imageChanged",value:function(e){this.$.badge.style.backgroundImage=e?"url("+e+")":""}}],[{key:"is",get:function(){return"ha-label-badge"}},{key:"properties",get:function(){return{value:String,icon:String,label:String,description:String,image:{type:String,observer:"imageChanged"}}}}]),t}();customElements.define(HaLabelBadge.is,HaLabelBadge);</script><dom-module id="ha-demo-badge" assetpath="components/"><template><style>:host{--ha-label-badge-color:#dac90d;}</style><ha-label-badge icon="mdi:emoticon" label="Demo" description=""></ha-label-badge></template></dom-module><script>Polymer({is:"ha-demo-badge"});</script><dom-module id="ha-state-label-badge" assetpath="components/entity/"><template><style>:host{cursor:pointer;}ha-label-badge{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.red{--ha-label-badge-color:var(--label-badge-red, #DF4C1E);}.blue{--ha-label-badge-color:var(--label-badge-blue, #039be5);}.green{--ha-label-badge-color:var(--label-badge-green, #0DA035);}.yellow{--ha-label-badge-color:var(--label-badge-yellow, #f4b400);}.grey{--ha-label-badge-color:var(--label-badge-grey, --paper-grey-500);}</style><ha-label-badge class$="[[computeClasses(state)]]" value="[[computeValue(state)]]" icon="[[computeIcon(state)]]" image="[[computeImage(state)]]" label="[[computeLabel(state)]]" description="[[computeDescription(state)]]"></ha-label-badge></template></dom-module><script>Polymer({is:"ha-state-label-badge",properties:{hass:{type:Object},state:{type:Object,observer:"stateChanged"}},listeners:{tap:"badgeTap"},badgeTap:function(e){e.stopPropagation(),this.fire("hass-more-info",{entityId:this.state.entity_id})},computeClasses:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"updater":return"blue";default:return""}},computeValue:function(e){switch(window.hassUtil.computeDomain(e)){case"binary_sensor":case"device_tracker":case"updater":case"sun":case"alarm_control_panel":return null;case"sensor":default:return"unknown"===e.state?"-":e.state}},computeIcon:function(e){if("unavailable"===e.state)return null;var t=window.hassUtil.computeDomain(e);switch(t){case"alarm_control_panel":return"pending"===e.state?"mdi:clock-fast":"armed_away"===e.state?"mdi:nature":"armed_home"===e.state?"mdi:home-variant":"triggered"===e.state?"mdi:alert-circle":window.hassUtil.domainIcon(t,e.state);case"binary_sensor":case"device_tracker":case"updater":return window.hassUtil.stateIcon(e);case"sun":return"above_horizon"===e.state?window.hassUtil.domainIcon(t):"mdi:brightness-3";default:return null}},computeImage:function(e){return e.attributes.entity_picture||null},computeLabel:function(e){if("unavailable"===e.state)return"unavai";switch(window.hassUtil.computeDomain(e)){case"device_tracker":return"not_home"===e.state?"Away":e.state;case"alarm_control_panel":return"pending"===e.state?"pend":"armed_away"===e.state||"armed_home"===e.state?"armed":"triggered"===e.state?"trig":"disarm";default:return e.attributes.unit_of_measurement||null}},computeDescription:function(e){return window.hassUtil.computeStateName(e)},stateChanged:function(){this.updateStyles()}});</script><dom-module id="ha-badges-card" assetpath="cards/"><template><style>ha-state-label-badge{display:inline-block;margin-bottom:var(--ha-state-label-badge-margin-bottom, 16px);}</style><template is="dom-repeat" items="[[states]]"><ha-state-label-badge hass="[[hass]]" state="[[item]]"></ha-state-label-badge></template></template></dom-module><script>Polymer({is:"ha-badges-card",properties:{hass:{type:Object},states:{type:Array}}});</script><dom-module id="paper-material-shared-styles" assetpath="../bower_components/paper-material/"><template><style>:host{display:block;position:relative;}:host([elevation="1"]){@apply --shadow-elevation-2dp;}:host([elevation="2"]){@apply --shadow-elevation-4dp;}:host([elevation="3"]){@apply --shadow-elevation-6dp;}:host([elevation="4"]){@apply --shadow-elevation-8dp;}:host([elevation="5"]){@apply --shadow-elevation-16dp;}</style></template></dom-module><dom-module id="paper-material" assetpath="../bower_components/paper-material/"><template><style include="paper-material-shared-styles"></style><style>:host([animated]){@apply --shadow-transition;}:host{@apply --paper-material;}</style><slot></slot></template></dom-module><script>Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});</script><dom-module id="ha-camera-card" assetpath="cards/"><template><style include="paper-material">:host{display:block;position:relative;font-size:0px;border-radius:2px;cursor:pointer;min-height:48px;line-height:0;}.camera-feed{width:100%;height:auto;border-radius:2px;}.caption{@apply (--paper-font-common-nowrap);position:absolute;left:0px;right:0px;bottom:0px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:rgba(0, 0, 0, 0.3);padding:16px;font-size:16px;font-weight:500;line-height:16px;color:white;}</style><img src="[[cameraFeedSrc]]" class="camera-feed" hidden$="[[!imageLoaded]]" on-load="imageLoadSuccess" on-error="imageLoadFail" alt="[[computeStateName(stateObj)]]"><div class="caption">[[computeStateName(stateObj)]]<template is="dom-if" if="[[!imageLoaded]]">(Image not available)</template></div></template></dom-module><script>Polymer({is:"ha-camera-card",UPDATE_INTERVAL:1e4,properties:{hass:{type:Object},stateObj:{type:Object,observer:"updateCameraFeedSrc"},cameraFeedSrc:{type:String},imageLoaded:{type:Boolean,value:!0},elevation:{type:Number,value:1,reflectToAttribute:!0}},listeners:{tap:"cardTapped"},attached:function(){this.timer=setInterval(function(){this.updateCameraFeedSrc(this.stateObj)}.bind(this),this.UPDATE_INTERVAL)},detached:function(){clearInterval(this.timer)},cardTapped:function(){this.fire("hass-more-info",{entityId:this.stateObj.entity_id})},updateCameraFeedSrc:function(e){var t=e.attributes,a=(new Date).getTime();this.cameraFeedSrc=t.entity_picture+"&time="+a},imageLoadSuccess:function(){this.imageLoaded=!0},imageLoadFail:function(){this.imageLoaded=!1},computeStateName:function(e){return window.hassUtil.computeStateName(e)}});</script><dom-module id="ha-card" assetpath="components/"><template><style include="paper-material">:host{display:block;border-radius:2px;transition:all 0.30s ease-out;background-color:var(--paper-card-background-color, white);}.header{@apply (--paper-font-headline);@apply (--paper-font-common-expensive-kerning);opacity:var(--dark-primary-opacity);padding:24px 16px 16px;text-transform:capitalize;}</style><template is="dom-if" if="[[header]]"><div class="header">[[header]]</div></template><slot></slot></template></dom-module><script>Polymer({is:"ha-card",properties:{header:{type:String},elevation:{type:Number,value:1,reflectToAttribute:!0}}});</script><dom-module id="paper-toggle-button" assetpath="../bower_components/paper-toggle-button/"><template strip-whitespace=""><style>:host{display:inline-block;@apply --layout-horizontal;@apply --layout-center;@apply --paper-font-common-base;}:host([disabled]){pointer-events:none;}:host(:focus){outline:none;}.toggle-bar{position:absolute;height:100%;width:100%;border-radius:8px;pointer-events:none;opacity:0.4;transition:background-color linear .08s;background-color:var(--paper-toggle-button-unchecked-bar-color, #000000);@apply --paper-toggle-button-unchecked-bar;}.toggle-button{position:absolute;top:-3px;left:0;height:20px;width:20px;border-radius:50%;box-shadow:0 1px 5px 0 rgba(0, 0, 0, 0.6);transition:-webkit-transform linear .08s, background-color linear .08s;transition:transform linear .08s, background-color linear .08s;will-change:transform;background-color:var(--paper-toggle-button-unchecked-button-color, var(--paper-grey-50));@apply --paper-toggle-button-unchecked-button;}.toggle-button.dragging{-webkit-transition:none;transition:none;}:host([checked]:not([disabled])) .toggle-bar{opacity:0.5;background-color:var(--paper-toggle-button-checked-bar-color, var(--primary-color));@apply --paper-toggle-button-checked-bar;}:host([disabled]) .toggle-bar{background-color:#000;opacity:0.12;}:host([checked]) .toggle-button{-webkit-transform:translate(16px, 0);transform:translate(16px, 0);}:host([checked]:not([disabled])) .toggle-button{background-color:var(--paper-toggle-button-checked-button-color, var(--primary-color));@apply --paper-toggle-button-checked-button;}:host([disabled]) .toggle-button{background-color:#bdbdbd;opacity:1;}.toggle-ink{position:absolute;top:-14px;left:-14px;right:auto;bottom:auto;width:48px;height:48px;opacity:0.5;pointer-events:none;color:var(--paper-toggle-button-unchecked-ink-color, var(--primary-text-color));@apply --paper-toggle-button-unchecked-ink;}:host([checked]) .toggle-ink{color:var(--paper-toggle-button-checked-ink-color, var(--primary-color));@apply --paper-toggle-button-checked-ink;}.toggle-container{display:inline-block;position:relative;width:36px;height:14px;margin:4px 1px;}.toggle-label{position:relative;display:inline-block;vertical-align:middle;padding-left:var(--paper-toggle-button-label-spacing, 8px);pointer-events:none;color:var(--paper-toggle-button-label-color, var(--primary-text-color));}:host([invalid]) .toggle-bar{background-color:var(--paper-toggle-button-invalid-bar-color, var(--error-color));}:host([invalid]) .toggle-button{background-color:var(--paper-toggle-button-invalid-button-color, var(--error-color));}:host([invalid]) .toggle-ink{color:var(--paper-toggle-button-invalid-ink-color, var(--error-color));}</style><div class="toggle-container"><div id="toggleBar" class="toggle-bar"></div><div id="toggleButton" class="toggle-button"></div></div><div class="toggle-label"><slot></slot></div></template><script>Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){Polymer.Gestures.setTouchAction(this,"pan-y")})},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(t){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(t){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}});</script></dom-module><dom-module id="ha-entity-toggle" assetpath="components/entity/"><template><style>:host{white-space:nowrap;}paper-icon-button{color:var(--primary-text-color);transition:color .5s;}paper-icon-button[state-active]{color:var(--primary-color);}paper-toggle-button{cursor:pointer;--paper-toggle-button-label-spacing:0;padding:13px 5px;margin:-4px -5px;}</style><template is="dom-if" if="[[stateObj.attributes.assumed_state]]"><paper-icon-button icon="mdi:flash-off" on-tap="turnOff" state-active$="[[!isOn]]"></paper-icon-button><paper-icon-button icon="mdi:flash" on-tap="turnOn" state-active$="[[isOn]]"></paper-icon-button></template><template is="dom-if" if="[[!stateObj.attributes.assumed_state]]"><paper-toggle-button checked="[[toggleChecked]]" on-change="toggleChanged"></paper-toggle-button></template></template></dom-module><script>Polymer({is:"ha-entity-toggle",properties:{hass:{type:Object},stateObj:{type:Object},toggleChecked:{type:Boolean,value:!1},isOn:{type:Boolean,computed:"computeIsOn(stateObj)",observer:"isOnChanged"}},listeners:{tap:"onTap"},onTap:function(t){t.stopPropagation()},ready:function(){this.forceStateChange()},toggleChanged:function(t){var e=t.target.checked;setTimeout(function(){var t=document.activeElement;t.blur(),t.focus()},0),e&&!this.isOn?this.callService(!0):!e&&this.isOn&&this.callService(!1)},isOnChanged:function(t){this.toggleChecked=t;var e=this.shadowRoot.querySelector("paper-toggle-button");e&&(e.focus(),e.blur())},forceStateChange:function(){this.toggleChecked===this.isOn&&(this.toggleChecked=!this.toggleChecked),this.toggleChecked=this.isOn},turnOn:function(){this.callService(!0)},turnOff:function(){this.callService(!1)},computeIsOn:function(t){return t&&-1===window.hassUtil.OFF_STATES.indexOf(t.state)},callService:function(t){var e,i,n,o=window.hassUtil.computeDomain(this.stateObj);"lock"===o?(e="lock",i=t?"lock":"unlock"):"cover"===o?(e="cover",i=t?"open":"close"):(e="homeassistant",i=t?"turn_on":"turn_off"),n=this.stateObj,this.hass.callService(e,i,{entity_id:this.stateObj.entity_id}).then(function(){setTimeout(function(){this.stateObj===n&&this.forceStateChange()}.bind(this),2e3)}.bind(this))}});</script><dom-module id="ha-state-icon" assetpath="components/entity/"><template><iron-icon icon="[[computeIcon(stateObj)]]"></iron-icon></template></dom-module><script>Polymer({is:"ha-state-icon",properties:{stateObj:{type:Object}},computeIcon:function(t){return window.hassUtil.stateIcon(t)}});</script><dom-module id="state-badge" assetpath="components/entity/"><template><style>:host{position:relative;display:inline-block;width:40px;color:var(--paper-item-icon-color, #44739e);border-radius:50%;height:40px;text-align:center;background-size:cover;line-height:40px;}ha-state-icon{transition:color .3s ease-in-out;}ha-state-icon[data-domain=light][data-state=on],
ha-state-icon[data-domain=switch][data-state=on],
ha-state-icon[data-domain=binary_sensor][data-state=on],
ha-state-icon[data-domain=fan][data-state=on],
ha-state-icon[data-domain=sun][data-state=above_horizon]{color:var(--paper-item-icon-active-color, #FDD835);}ha-state-icon[data-state=unavailable]{color:var(--disabled-text-color);}</style><ha-state-icon id="icon" state-obj="[[stateObj]]" data-domain$="[[computeDomain(stateObj)]]" data-state$="[[stateObj.state]]"></ha-state-icon></template></dom-module><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var r=0;r<e.length;r++){var o=e[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),e}}(),StateBadge=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,Polymer.Element),_createClass(e,[{key:"computeDomain",value:function(t){return window.hassUtil.computeDomain(t)}},{key:"_rgbFromBrightness",value:function(t){var e=(t+45)/300,r=1-e,o=/rgb\((\d+), (\d+), (\d+)\)/,n=window.getComputedStyle(this.$.icon).color.match(o),i=window.getComputedStyle(this).color.match(o),s=void 0;if(n&&i){var u=n.slice(1).map(function(t){return Number.parseInt(t,10)}),a=i.slice(1).map(function(t){return Number.parseInt(t,10)});if((s=[Math.round(u[0]*e+a[0]*r),Math.round(u[1]*e+a[1]*r),Math.round(u[2]*e+a[2]*r)]).some(function(t){return Number.isNaN(t)}))return}return s}},{key:"updateIconColor",value:function(t){var e=this.$.icon;if(t.attributes.entity_picture)return this.style.backgroundImage="url("+t.attributes.entity_picture+")",void(e.style.display="none");if(this._timeoutId&&(window.clearTimeout(this._timeoutId),this._timeoutId=null),this.style.backgroundImage="",e.style.display="inline","unavailable"!==t.state){var r=void 0,o=void 0;t.attributes.rgb_color?r=t.attributes.rgb_color:t.attributes.brightness&&255!==t.attributes.brightness&&(""!==e.style.color&&(o=e.style.color,e.style.transition="none",e.style.color=""),r=this._rgbFromBrightness(t.attributes.brightness)),r&&r.reduce(function(t,e){return t+e},0)<730?(o&&(e.style.color=o),e.style.transition&&o?this._timeoutId=window.setTimeout(function(){e.style.transition="",e.style.color="rgb("+r.join(",")+")"},10):e.style.color="rgb("+r.join(",")+")"):e.style.color=""}}}],[{key:"is",get:function(){return"state-badge"}},{key:"properties",get:function(){return{stateObj:{type:Object,observer:"updateIconColor"}}}}]),e}();customElements.define(StateBadge.is,StateBadge);</script><script>Polymer({is:"ha-relative-time",properties:{datetime:{type:String,observer:"datetimeChanged"},datetimeObj:{type:Object,observer:"datetimeObjChanged"},parsedDateTime:{type:Object}},created:function(){this.updateRelative=this.updateRelative.bind(this)},attached:function(){this.updateInterval=setInterval(this.updateRelative,6e4)},detached:function(){clearInterval(this.updateInterval)},datetimeChanged:function(e){this.parsedDateTime=e?new Date(e):null,this.updateRelative()},datetimeObjChanged:function(e){this.parsedDateTime=e,this.updateRelative()},updateRelative:function(){Polymer.dom(this).innerHTML=this.parsedDateTime?window.hassUtil.relativeTime(this.parsedDateTime):"never"}});</script><dom-module id="state-info" assetpath="components/entity/"><template><style>:host{@apply (--paper-font-body1);min-width:150px;white-space:nowrap;}state-badge{float:left;}.info{margin-left:56px;}.name{@apply (--paper-font-common-nowrap);color:var(--primary-text-color);line-height:40px;}.name[in-dialog], :host([secondary-line]) .name{line-height:20px;}.time-ago, ::slotted(*){@apply (--paper-font-common-nowrap);color:var(--secondary-text-color);}</style><div><state-badge state-obj="[[stateObj]]"></state-badge><div class="info"><div class="name" in-dialog$="[[inDialog]]">[[computeStateName(stateObj)]]</div><template is="dom-if" if="[[inDialog]]"><div class="time-ago"><ha-relative-time datetime="[[stateObj.last_changed]]"></ha-relative-time></div></template><template is="dom-if" if="[[!inDialog]]"><slot></slot></template></div></div></template></dom-module><script>Polymer({is:"state-info",properties:{detailed:{type:Boolean,value:!1},stateObj:{type:Object},inDialog:{type:Boolean}},computeStateName:function(e){return window.hassUtil.computeStateName(e)}});</script><dom-module id="state-card-climate" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{@apply (--paper-font-body1);line-height:1.5;}.state{margin-left:16px;text-align:right;}.target{color:var(--primary-text-color);}.current{color:var(--secondary-text-color);}.operation-mode{font-weight:bold;text-transform:capitalize;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="target"><span class="operation-mode">[[stateObj.attributes.operation_mode]] </span><span>[[computeTargetTemperature(stateObj)]]</span></div><div class="current"><span>Currently: </span><span>[[stateObj.attributes.current_temperature]]</span> <span></span> <span>[[stateObj.attributes.unit_of_measurement]]</span></div></div></div></template></dom-module><script>Polymer({is:"state-card-climate",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeTargetTemperature:function(t){var e="";return t.attributes.target_temp_low&&t.attributes.target_temp_high?e=t.attributes.target_temp_low+" - "+t.attributes.target_temp_high+" "+t.attributes.unit_of_measurement:t.attributes.temperature&&(e=t.attributes.temperature+" "+t.attributes.unit_of_measurement),e}});</script><dom-module id="state-card-configurator" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-button hidden$="[[inDialog]]">[[stateObj.state]]</paper-button></div><template is="dom-if" if="[[stateObj.attributes.description_image]]"><img hidden="" src="[[stateObj.attributes.description_image]]"></template></template></dom-module><script>Polymer({is:"state-card-configurator",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}});</script><script>!function(){function t(t,s){Object.defineProperty(window.CoverEntity.prototype,t,{get:s})}window.CoverEntity=function(t,s){this.hass=t,this.stateObj=s},t("isFullyOpen",function(){return void 0!==this.stateObj.attributes.current_position?100===this.stateObj.attributes.current_position:"open"===this.stateObj.state}),t("isFullyClosed",function(){return void 0!==this.stateObj.attributes.current_position?0===this.stateObj.attributes.current_position:"closed"===this.stateObj.state}),t("isFullyOpenTilt",function(){return 100===this.stateObj.attributes.current_tilt_position}),t("isFullyClosedTilt",function(){return 0===this.stateObj.attributes.current_tilt_position}),t("supportsOpen",function(){return 0!=(1&this.stateObj.attributes.supported_features)}),t("supportsClose",function(){return 0!=(2&this.stateObj.attributes.supported_features)}),t("supportsSetPosition",function(){return 0!=(4&this.stateObj.attributes.supported_features)}),t("supportsStop",function(){return 0!=(8&this.stateObj.attributes.supported_features)}),t("supportsOpenTilt",function(){return 0!=(16&this.stateObj.attributes.supported_features)}),t("supportsCloseTilt",function(){return 0!=(32&this.stateObj.attributes.supported_features)}),t("supportsStopTilt",function(){return 0!=(64&this.stateObj.attributes.supported_features)}),t("supportsSetTiltPosition",function(){return 0!=(128&this.stateObj.attributes.supported_features)}),t("isTiltOnly",function(){var t=this.supportsOpen||this.supportsClose||this.supportsStop;return(this.supportsOpenTilt||this.supportsCloseTilt||this.supportsStopTilt)&&!t}),Object.assign(window.CoverEntity.prototype,{openCover:function(){this.callService("open_cover")},closeCover:function(){this.callService("close_cover")},stopCover:function(){this.callService("stop_cover")},openCoverTilt:function(){this.callService("open_cover_tilt")},closeCoverTilt:function(){this.callService("close_cover_tilt")},stopCoverTilt:function(){this.callService("stop_cover_tilt")},setCoverPosition:function(t){this.callService("set_cover_position",{position:t})},setCoverTiltPosition:function(t){this.callService("set_cover_tilt_position",{tilt_position:t})},callService:function(t,s){var e=s||{};e.entity_id=this.stateObj.entity_id,this.hass.callService("cover",t,e)}})}();</script><dom-module id="ha-cover-controls" assetpath="components/"><template><style>.state{white-space:nowrap;}[invisible]{visibility:hidden !important;}</style><div class="state"><paper-icon-button icon="mdi:arrow-up" on-tap="onOpenTap" invisible$="[[!entityObj.supportsOpen]]" disabled="[[computeOpenDisabled(stateObj, entityObj)]]"></paper-icon-button><paper-icon-button icon="mdi:stop" on-tap="onStopTap" invisible$="[[!entityObj.supportsStop]]"></paper-icon-button><paper-icon-button icon="mdi:arrow-down" on-tap="onCloseTap" invisible$="[[!entityObj.supportsClose]]" disabled="[[computeClosedDisabled(stateObj, entityObj)]]"></paper-icon-button></div></template></dom-module><script>Polymer({is:"ha-cover-controls",properties:{hass:{type:Object},stateObj:{type:Object},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"}},computeEntityObj:function(t,e){return new window.CoverEntity(t,e)},computeOpenDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyOpen&&!o},computeClosedDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyClosed&&!o},onOpenTap:function(t){t.stopPropagation(),this.entityObj.openCover()},onCloseTap:function(t){t.stopPropagation(),this.entityObj.closeCover()},onStopTap:function(t){t.stopPropagation(),this.entityObj.stopCover()}});</script><script>Polymer.IronRangeBehavior={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(t){return(this._clampValue(t)-this.min)/(this.max-this.min)},_clampValue:function(t){return Math.min(this.max,Math.max(this.min,this._calcStep(t)))},_calcStep:function(t){if(t=parseFloat(t),!this.step)return t;var e=Math.round((t-this.min)/this.step);return this.step<1?e/(1/this.step)+this.min:e*this.step+this.min},_validateValue:function(){var t=this._clampValue(this.value);return this.value=this.oldValue=isNaN(t)?this.oldValue:t,this.value!==t},_update:function(){this._validateValue(),this._setRatio(100*this._calcRatio(this.value))}};</script><dom-module id="paper-progress" assetpath="../bower_components/paper-progress/"><template><style>:host{display:block;width:200px;position:relative;overflow:hidden;}:host([hidden]), [hidden]{display:none !important;}#progressContainer{@apply --paper-progress-container;position:relative;}#progressContainer,
/* the stripe for the indeterminate animation*/
.indeterminate::after{height:var(--paper-progress-height, 4px);}#primaryProgress,
#secondaryProgress,
.indeterminate::after{@apply --layout-fit;}#progressContainer,
.indeterminate::after{background:var(--paper-progress-container-color, var(--google-grey-300));}:host(.transiting) #primaryProgress,
:host(.transiting) #secondaryProgress{-webkit-transition-property:-webkit-transform;transition-property:transform;-webkit-transition-duration:var(--paper-progress-transition-duration, 0.08s);transition-duration:var(--paper-progress-transition-duration, 0.08s);-webkit-transition-timing-function:var(--paper-progress-transition-timing-function, ease);transition-timing-function:var(--paper-progress-transition-timing-function, ease);-webkit-transition-delay:var(--paper-progress-transition-delay, 0s);transition-delay:var(--paper-progress-transition-delay, 0s);}#primaryProgress,
#secondaryProgress{@apply --layout-fit;-webkit-transform-origin:left center;transform-origin:left center;-webkit-transform:scaleX(0);transform:scaleX(0);will-change:transform;}#primaryProgress{background:var(--paper-progress-active-color, var(--google-green-500));}#secondaryProgress{background:var(--paper-progress-secondary-color, var(--google-green-100));}:host([disabled]) #primaryProgress{background:var(--paper-progress-disabled-active-color, var(--google-grey-500));}:host([disabled]) #secondaryProgress{background:var(--paper-progress-disabled-secondary-color, var(--google-grey-300));}:host(:not([disabled])) #primaryProgress.indeterminate{-webkit-transform-origin:right center;transform-origin:right center;-webkit-animation:indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;animation:indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;}:host(:not([disabled])) #primaryProgress.indeterminate::after{content:"";-webkit-transform-origin:center center;transform-origin:center center;-webkit-animation:indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;animation:indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;}@-webkit-keyframes indeterminate-bar{0%{-webkit-transform:scaleX(1) translateX(-100%);}50%{-webkit-transform:scaleX(1) translateX(0%);}75%{-webkit-transform:scaleX(1) translateX(0%);-webkit-animation-timing-function:cubic-bezier(.28,.62,.37,.91);}100%{-webkit-transform:scaleX(0) translateX(0%);}}@-webkit-keyframes indeterminate-splitter{0%{-webkit-transform:scaleX(.75) translateX(-125%);}30%{-webkit-transform:scaleX(.75) translateX(-125%);-webkit-animation-timing-function:cubic-bezier(.42,0,.6,.8);}90%{-webkit-transform:scaleX(.75) translateX(125%);}100%{-webkit-transform:scaleX(.75) translateX(125%);}}@keyframes indeterminate-bar{0%{transform:scaleX(1) translateX(-100%);}50%{transform:scaleX(1) translateX(0%);}75%{transform:scaleX(1) translateX(0%);animation-timing-function:cubic-bezier(.28,.62,.37,.91);}100%{transform:scaleX(0) translateX(0%);}}@keyframes indeterminate-splitter{0%{transform:scaleX(.75) translateX(-125%);}30%{transform:scaleX(.75) translateX(-125%);animation-timing-function:cubic-bezier(.42,0,.6,.8);}90%{transform:scaleX(.75) translateX(125%);}100%{transform:scaleX(.75) translateX(125%);}}</style><div id="progressContainer"><div id="secondaryProgress" hidden$="[[_hideSecondaryProgress(secondaryRatio)]]"></div><div id="primaryProgress"></div></div></template></dom-module><script>Polymer({is:"paper-progress",behaviors:[Polymer.IronRangeBehavior],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(e){this.toggleClass("indeterminate",e,this.$.primaryProgress)},_transformProgress:function(e,r){var s="scaleX("+r/100+")";e.style.transform=e.style.webkitTransform=s},_mainRatioChanged:function(e){this._transformProgress(this.$.primaryProgress,e)},_progressChanged:function(e,r,s,t,a){e=this._clampValue(e),r=this._clampValue(r);var i=100*this._calcRatio(e),o=100*this._calcRatio(r);this._setSecondaryRatio(i),this._transformProgress(this.$.secondaryProgress,i),this._transformProgress(this.$.primaryProgress,o),this.secondaryProgress=e,a?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",r),this.setAttribute("aria-valuemin",s),this.setAttribute("aria-valuemax",t)},_disabledChanged:function(e){this.setAttribute("aria-disabled",e?"true":"false")},_hideSecondaryProgress:function(e){return 0===e}});</script><dom-module id="paper-slider" assetpath="../bower_components/paper-slider/"><template strip-whitespace=""><style>:host{@apply --layout;@apply --layout-justified;@apply --layout-center;width:200px;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);--paper-progress-active-color:var(--paper-slider-active-color, var(--google-blue-700));--paper-progress-secondary-color:var(--paper-slider-secondary-color, var(--google-blue-300));--paper-progress-disabled-active-color:var(--paper-slider-disabled-active-color, var(--paper-grey-400));--paper-progress-disabled-secondary-color:var(--paper-slider-disabled-secondary-color, var(--paper-grey-400));--calculated-paper-slider-height:var(--paper-slider-height, 2px);}:host(:focus){outline:none;}:host-context([dir="rtl"]) #sliderContainer{-webkit-transform:scaleX(-1);transform:scaleX(-1);}:host([dir="rtl"]) #sliderContainer{-webkit-transform:scaleX(-1);transform:scaleX(-1);}:host([dir="ltr"]) #sliderContainer{-webkit-transform:scaleX(1);transform:scaleX(1);}#sliderContainer{position:relative;width:100%;height:calc(30px + var(--calculated-paper-slider-height));margin-left:calc(15px + var(--calculated-paper-slider-height)/2);margin-right:calc(15px + var(--calculated-paper-slider-height)/2);}#sliderContainer:focus{outline:0;}#sliderContainer.editable{margin-top:12px;margin-bottom:12px;}.bar-container{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;}.ring > .bar-container{left:calc(5px + var(--calculated-paper-slider-height)/2);transition:left 0.18s ease;}.ring.expand.dragging > .bar-container{transition:none;}.ring.expand:not(.pin) > .bar-container{left:calc(8px + var(--calculated-paper-slider-height)/2);}#sliderBar{padding:15px 0;width:100%;background-color:var(--paper-slider-bar-color, transparent);--paper-progress-container-color:var(--paper-slider-container-color, var(--paper-grey-400));--paper-progress-height:var(--calculated-paper-slider-height);}.slider-markers{position:absolute;top:calc(14px + var(--paper-slider-height,2px)/2);height:var(--calculated-paper-slider-height);left:0;right:-1px;box-sizing:border-box;pointer-events:none;@apply --layout-horizontal;}.slider-marker{@apply --layout-flex;}.slider-markers::after,
.slider-marker::after{content:"";display:block;margin-left:-1px;width:2px;height:var(--calculated-paper-slider-height);border-radius:50%;background-color:var(--paper-slider-markers-color, #000);}.slider-knob{position:absolute;left:0;top:0;margin-left:calc(-15px - var(--calculated-paper-slider-height)/2);width:calc(30px + var(--calculated-paper-slider-height));height:calc(30px + var(--calculated-paper-slider-height));}.transiting > .slider-knob{transition:left 0.08s ease;}.slider-knob:focus{outline:none;}.slider-knob.dragging{transition:none;}.snaps > .slider-knob.dragging{transition:-webkit-transform 0.08s ease;transition:transform 0.08s ease;}.slider-knob-inner{margin:10px;width:calc(100% - 20px);height:calc(100% - 20px);background-color:var(--paper-slider-knob-color, var(--google-blue-700));border:2px solid var(--paper-slider-knob-color, var(--google-blue-700));border-radius:50%;-moz-box-sizing:border-box;box-sizing:border-box;transition-property:-webkit-transform, background-color, border;transition-property:transform, background-color, border;transition-duration:0.18s;transition-timing-function:ease;}.expand:not(.pin) > .slider-knob > .slider-knob-inner{-webkit-transform:scale(1.5);transform:scale(1.5);}.ring > .slider-knob > .slider-knob-inner{background-color:var(--paper-slider-knob-start-color, transparent);border:2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));}.slider-knob-inner::before{background-color:var(--paper-slider-pin-color, var(--google-blue-700));}.pin > .slider-knob > .slider-knob-inner::before{content:"";position:absolute;top:0;left:50%;margin-left:-13px;width:26px;height:26px;border-radius:50% 50% 50% 0;-webkit-transform:rotate(-45deg) scale(0) translate(0);transform:rotate(-45deg) scale(0) translate(0);}.slider-knob-inner::before,
.slider-knob-inner::after{transition:-webkit-transform .18s ease, background-color .18s ease;transition:transform .18s ease, background-color .18s ease;}.pin.ring > .slider-knob > .slider-knob-inner::before{background-color:var(--paper-slider-pin-start-color, var(--paper-grey-400));}.pin.expand > .slider-knob > .slider-knob-inner::before{-webkit-transform:rotate(-45deg) scale(1) translate(17px, -17px);transform:rotate(-45deg) scale(1) translate(17px, -17px);}.pin > .slider-knob > .slider-knob-inner::after{content:attr(value);position:absolute;top:0;left:50%;margin-left:-16px;width:32px;height:26px;text-align:center;color:var(--paper-slider-font-color, #fff);font-size:10px;-webkit-transform:scale(0) translate(0);transform:scale(0) translate(0);}.pin.expand > .slider-knob > .slider-knob-inner::after{-webkit-transform:scale(1) translate(0, -17px);transform:scale(1) translate(0, -17px);}.slider-input{width:50px;overflow:hidden;--paper-input-container-input:{text-align:center;};@apply --paper-slider-input;}#sliderContainer.disabled{pointer-events:none;}.disabled > .slider-knob > .slider-knob-inner{background-color:var(--paper-slider-disabled-knob-color, var(--paper-grey-400));border:2px solid var(--paper-slider-disabled-knob-color, var(--paper-grey-400));-webkit-transform:scale3d(0.75, 0.75, 1);transform:scale3d(0.75, 0.75, 1);}.disabled.ring > .slider-knob > .slider-knob-inner{background-color:var(--paper-slider-knob-start-color, transparent);border:2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));}paper-ripple{color:var(--paper-slider-knob-color, var(--google-blue-700));}</style><div id="sliderContainer" class$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]"><div class="bar-container"><paper-progress disabled$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_onTrack"></paper-progress></div><template is="dom-if" if="[[snaps]]"><div class="slider-markers"><template is="dom-repeat" items="[[markers]]"><div class="slider-marker"></div></template></div></template><div id="sliderKnob" class="slider-knob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd"><div class="slider-knob-inner" value$="[[immediateValue]]"></div></div></div><template is="dom-if" if="[[editable]]"><paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float=""></paper-input></template></template><script>Polymer({is:"paper-slider",behaviors:[Polymer.IronA11yKeysBehavior,Polymer.IronFormElementBehavior,Polymer.PaperInkyFocusBehavior,Polymer.IronRangeBehavior],properties:{snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},dragging:{type:Boolean,value:!1,readOnly:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(t,e,i,s,a){this.setAttribute("aria-valuemin",e),this.setAttribute("aria-valuemax",i),this.setAttribute("aria-valuenow",t),this._positionKnob(100*this._calcRatio(t))},_valueChanged:function(){this.fire("value-change",{composed:!0})},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(t){this._setImmediateValue(this._calcStep(this._calcKnobPosition(t))),this._setRatio(100*this._calcRatio(this.immediateValue)),this.$.sliderKnob.style.left=this.ratio+"%",this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))},_calcKnobPosition:function(t){return(this.max-this.min)*t/100+this.min},_onTrack:function(t){switch(t.stopPropagation(),t.detail.state){case"start":this._trackStart(t);break;case"track":this._trackX(t);break;case"end":this._trackEnd()}},_trackStart:function(t){this._setTransiting(!1),this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w/100,this._startx=this._x,this._knobstartx=this._startx,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(t){this.dragging||this._trackStart(t);var e=this._isRTL?-1:1,i=Math.min(this._maxx,Math.max(this._minx,t.detail.dx*e));this._x=this._startx+i;var s=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(s);var a=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(a+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var t=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,t.transform=t.webkitTransform="",this.fire("change",{composed:!0})},_knobdown:function(t){this._expandKnob(),t.preventDefault(),this.focus()},_bardown:function(t){this._w=this.$.sliderBar.offsetWidth;var e=this.$.sliderBar.getBoundingClientRect(),i=(t.detail.x-e.left)/this._w*100;this._isRTL&&(i=100-i);var s=this.ratio;this._setTransiting(!0),this._positionKnob(i),this.debounce("expandKnob",this._expandKnob,60),s===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change",{composed:!0})}),t.preventDefault(),this.focus()},_knobTransitionEnd:function(t){t.target===this.$.sliderKnob&&this._setTransiting(!1)},_updateMarkers:function(t,e,i,s){s||this._setMarkers([]);var a=Math.round((i-e)/this.step);a>t&&(a=t),(a<0||!isFinite(a))&&(a=0),this._setMarkers(new Array(a))},_mergeClasses:function(t){return Object.keys(t).filter(function(e){return t[e]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},get _isRTL(){return void 0===this.__isRTL&&(this.__isRTL="rtl"===window.getComputedStyle(this).direction),this.__isRTL},_leftKey:function(t){this._isRTL?this._incrementKey(t):this._decrementKey(t)},_rightKey:function(t){this._isRTL?this._decrementKey(t):this._incrementKey(t)},_incrementKey:function(t){this.disabled||("end"===t.detail.key?this.value=this.max:this.increment(),this.fire("change"),t.preventDefault())},_decrementKey:function(t){this.disabled||("home"===t.detail.key?this.value=this.min:this.decrement(),this.fire("change"),t.preventDefault())},_changeValue:function(t){this.value=t.target.value,this.fire("change",{composed:!0})},_inputKeyDown:function(t){t.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,Polymer.PaperInkyFocusBehaviorImpl._createRipple.call(this)},_focusedChanged:function(t){t&&this.ensureRipple(),this.hasRipple()&&(this._ripple.style.display=t?"":"none",this._ripple.holdDown=t)}});</script></dom-module><dom-module id="ha-cover-tilt-controls" assetpath="components/"><template><style is="custom-style" include="iron-flex"></style><style>:host{white-space:nowrap;}[invisible]{visibility:hidden !important;}</style><paper-icon-button icon="mdi:arrow-top-right" on-tap="onOpenTiltTap" title="Open tilt" invisible$="[[!entityObj.supportsOpenTilt]]" disabled="[[computeOpenDisabled(stateObj, entityObj)]]"></paper-icon-button><paper-icon-button icon="mdi:stop" on-tap="onStopTiltTap" invisible$="[[!entityObj.supportsStopTilt]]" title="Stop tilt"></paper-icon-button><paper-icon-button icon="mdi:arrow-bottom-left" on-tap="onCloseTiltTap" title="Close tilt" invisible$="[[!entityObj.supportsCloseTilt]]" disabled="[[computeClosedDisabled(stateObj, entityObj)]]"></paper-icon-button></template></dom-module><script>Polymer({is:"ha-cover-tilt-controls",properties:{hass:{type:Object},stateObj:{type:Object},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"}},computeEntityObj:function(t,e){return new window.CoverEntity(t,e)},computeOpenDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyOpenTilt&&!o},computeClosedDisabled:function(t,e){var o=!0===t.attributes.assumed_state;return e.isFullyClosedTilt&&!o},onOpenTiltTap:function(t){t.stopPropagation(),this.entityObj.openCoverTilt()},onCloseTiltTap:function(t){t.stopPropagation(),this.entityObj.closeCoverTilt()},onStopTiltTap:function(t){t.stopPropagation(),this.entityObj.stopCoverTilt()}});</script><dom-module id="state-card-cover" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{line-height:1.5;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="horizontal layout"><ha-cover-controls hidden$="[[entityObj.isTiltOnly]]" hass="[[hass]]" state-obj="[[stateObj]]"></ha-cover-controls><ha-cover-tilt-controls hidden$="[[!entityObj.isTiltOnly]]" hass="[[hass]]" state-obj="[[stateObj]]"></ha-cover-tilt-controls></div></div></template></dom-module><script>Polymer({is:"state-card-cover",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"}},computeEntityObj:function(t,e){return new window.CoverEntity(t,e)}});</script><dom-module id="state-card-display" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.state{@apply (--paper-font-body1);color:var(--primary-text-color);margin-left:16px;text-align:right;line-height:40px;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state">[[computeStateDisplay(stateObj)]]</div></div></template></dom-module><script>Polymer({is:"state-card-display",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},computeStateDisplay:function(t){return window.hassUtil.computeStateState(t)}});</script><script>Polymer.IronFitBehavior={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){return this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){return this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){return this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var t=Polymer.dom(this).parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(t=t.host),t},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},attached:function(){void 0===this._isRTL&&(this._isRTL="rtl"==window.getComputedStyle(this).direction),this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),i=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null},sizedBy:{height:"none"!==i.maxHeight,width:"none"!==i.maxWidth,minWidth:parseInt(i.minWidth,10)||0,minHeight:parseInt(i.minHeight,10)||0},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}}}},resetFit:function(){var t=this._fitInfo||{};for(var i in t.sizerInlineStyle)this.sizingTarget.style[i]=t.sizerInlineStyle[i];for(var i in t.inlineStyle)this.style[i]=t.inlineStyle[i];this._fitInfo=null},refit:function(){var t=this.sizingTarget.scrollLeft,i=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=t,this.sizingTarget.scrollTop=i},position:function(){if(this.horizontalAlign||this.verticalAlign){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var t=this.getBoundingClientRect(),i=this.__getNormalizedRect(this.positionTarget),e=this.__getNormalizedRect(this.fitInto),n=this._fitInfo.margin,o={width:t.width+n.left+n.right,height:t.height+n.top+n.bottom},h=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,o,i,e),s=h.left+n.left,l=h.top+n.top,r=Math.min(e.right-n.right,s+t.width),a=Math.min(e.bottom-n.bottom,l+t.height);s=Math.max(e.left+n.left,Math.min(s,r-this._fitInfo.sizedBy.minWidth)),l=Math.max(e.top+n.top,Math.min(l,a-this._fitInfo.sizedBy.minHeight)),this.sizingTarget.style.maxWidth=Math.max(r-s,this._fitInfo.sizedBy.minWidth)+"px",this.sizingTarget.style.maxHeight=Math.max(a-l,this._fitInfo.sizedBy.minHeight)+"px",this.style.left=s-t.left+"px",this.style.top=l-t.top+"px"}},constrain:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo;t.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),t.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var i=this.getBoundingClientRect();t.sizedBy.height||this.__sizeDimension(i,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this.__sizeDimension(i,t.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(t,i,e,n,o){this.__sizeDimension(t,i,e,n,o)},__sizeDimension:function(t,i,e,n,o){var h=this._fitInfo,s=this.__getNormalizedRect(this.fitInto),l="Width"===o?s.width:s.height,r=i===n,a=r?l-t[n]:t[e],f=h.margin[r?e:n],g="offset"+o,d=this[g]-this.sizingTarget[g];this.sizingTarget.style["max"+o]=l-f-a-d+"px"},center:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo.positionedBy;if(!t.vertically||!t.horizontally){this.style.position="fixed",t.vertically||(this.style.top="0px"),t.horizontally||(this.style.left="0px");var i=this.getBoundingClientRect(),e=this.__getNormalizedRect(this.fitInto);if(!t.vertically){var n=e.top-i.top+(e.height-i.height)/2;this.style.top=n+"px"}if(!t.horizontally){var o=e.left-i.left+(e.width-i.width)/2;this.style.left=o+"px"}}}},__getNormalizedRect:function(t){return t===document.documentElement||t===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:t.getBoundingClientRect()},__getCroppedArea:function(t,i,e){var n=Math.min(0,t.top)+Math.min(0,e.bottom-(t.top+i.height)),o=Math.min(0,t.left)+Math.min(0,e.right-(t.left+i.width));return Math.abs(n)*i.width+Math.abs(o)*i.height},__getPosition:function(t,i,e,n,o){var h=[{verticalAlign:"top",horizontalAlign:"left",top:n.top+this.verticalOffset,left:n.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:n.top+this.verticalOffset,left:n.right-e.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:n.bottom-e.height-this.verticalOffset,left:n.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:n.bottom-e.height-this.verticalOffset,left:n.right-e.width-this.horizontalOffset}];if(this.noOverlap){for(var s=0,l=h.length;s<l;s++){var r={};for(var a in h[s])r[a]=h[s][a];h.push(r)}h[0].top=h[1].top+=n.height,h[2].top=h[3].top-=n.height,h[4].left=h[6].left+=n.width,h[5].left=h[7].left-=n.width}i="auto"===i?null:i,t="auto"===t?null:t;for(var f,s=0;s<h.length;s++){var g=h[s];if(!this.dynamicAlign&&!this.noOverlap&&g.verticalAlign===i&&g.horizontalAlign===t){f=g;break}var d=!(i&&g.verticalAlign!==i||t&&g.horizontalAlign!==t);if(this.dynamicAlign||d){f=f||g,g.croppedArea=this.__getCroppedArea(g,e,o);var p=g.croppedArea-f.croppedArea;if((p<0||0===p&&d)&&(f=g),0===f.croppedArea&&d)break}}return f}};</script><dom-module id="iron-overlay-backdrop" assetpath="../bower_components/iron-overlay-behavior/"><template><style>:host{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--iron-overlay-backdrop-background-color, #000);opacity:0;transition:opacity 0.2s;pointer-events:none;@apply --iron-overlay-backdrop;}:host(.opened){opacity:var(--iron-overlay-backdrop-opacity, 0.6);pointer-events:auto;@apply --iron-overlay-backdrop-opened;}</style><slot></slot></template></dom-module><script>!function(){"use strict";Polymer({is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Polymer.dom(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Polymer.dom(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);"0s"!==t.transitionDuration&&0!=t.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}})}();</script><script>Polymer.IronOverlayManagerClass=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Polymer.Gestures.add(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)},Polymer.IronOverlayManagerClass.prototype={constructor:Polymer.IronOverlayManagerClass,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){var e=document.activeElement;for(e&&e instanceof Element!=!1||(e=document.body);e.root&&Polymer.dom(e.root).activeElement;)e=Polymer.dom(e.root).activeElement;return e},_bringOverlayAtIndexToFront:function(e){var t=this._overlays[e];if(t){var r=this._overlays.length-1,a=this._overlays[r];if(a&&this._shouldBeBehindOverlay(t,a)&&r--,!(e>=r)){var n=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(t)<=n&&this._applyOverlayZ(t,n);e<r;)this._overlays[e]=this._overlays[e+1],e++;this._overlays[r]=t}}},addOrRemoveOverlay:function(e){e.opened?this.addOverlay(e):this.removeOverlay(e)},addOverlay:function(e){var t=this._overlays.indexOf(e);if(t>=0)return this._bringOverlayAtIndexToFront(t),void this.trackBackdrop();var r=this._overlays.length,a=this._overlays[r-1],n=Math.max(this._getZ(a),this._minimumZ),o=this._getZ(e);if(a&&this._shouldBeBehindOverlay(e,a)){this._applyOverlayZ(a,n),r--;var i=this._overlays[r-1];n=Math.max(this._getZ(i),this._minimumZ)}o<=n&&this._applyOverlayZ(e,n),this._overlays.splice(r,0,e),this.trackBackdrop()},removeOverlay:function(e){var t=this._overlays.indexOf(e);-1!==t&&(this._overlays.splice(t,1),this.trackBackdrop())},currentOverlay:function(){var e=this._overlays.length-1;return this._overlays[e]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(e){this._minimumZ=Math.max(this._minimumZ,e)},focusOverlay:function(){var e=this.currentOverlay();e&&e._applyFocus()},trackBackdrop:function(){var e=this._overlayWithBackdrop();(e||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(e)-1,this.backdropElement.opened=!!e,this.backdropElement.prepare())},getBackdrops:function(){for(var e=[],t=0;t<this._overlays.length;t++)this._overlays[t].withBackdrop&&e.push(this._overlays[t]);return e},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var e=0;e<this._overlays.length;e++)if(this._overlays[e].withBackdrop)return this._overlays[e]},_getZ:function(e){var t=this._minimumZ;if(e){var r=Number(e.style.zIndex||window.getComputedStyle(e).zIndex);r===r&&(t=r)}return t},_setZ:function(e,t){e.style.zIndex=t},_applyOverlayZ:function(e,t){this._setZ(e,t+2)},_overlayInPath:function(e){e=e||[];for(var t=0;t<e.length;t++)if(e[t]._manager===this)return e[t]},_onCaptureClick:function(e){var t=this._overlays.length-1;if(-1!==t)for(var r,a=Polymer.dom(e).path;(r=this._overlays[t])&&this._overlayInPath(a)!==r&&(r._onCaptureClick(e),r.allowClickThrough);)t--},_onCaptureFocus:function(e){var t=this.currentOverlay();t&&t._onCaptureFocus(e)},_onCaptureKeyDown:function(e){var t=this.currentOverlay();t&&(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"esc")?t._onCaptureEsc(e):Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,"tab")&&t._onCaptureTab(e))},_shouldBeBehindOverlay:function(e,t){return!e.alwaysOnTop&&t.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass;</script><script>!function(){"use strict";var e=Element.prototype,t=e.matches||e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;Polymer.IronFocusablesHelper={getTabbableNodes:function(e){var t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t},isFocusable:function(e){return t.call(e,"input, select, textarea, button, object")?t.call(e,":not([disabled])"):t.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")},isTabbable:function(e){return this.isFocusable(e)&&t.call(e,':not([tabindex="-1"])')&&this._isVisible(e)},_normalizedTabIndex:function(e){if(this.isFocusable(e)){var t=e.getAttribute("tabindex")||0;return Number(t)}return-1},_collectTabbableNodes:function(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;var r=e,a=this._normalizedTabIndex(r),i=a>0;a>=0&&t.push(r);var n;n="content"===r.localName||"slot"===r.localName?Polymer.dom(r).getDistributedNodes():Polymer.dom(r.root||r).children;for(var o=0;o<n.length;o++)i=this._collectTabbableNodes(n[o],t)||i;return i},_isVisible:function(e){var t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&("hidden"!==(t=window.getComputedStyle(e)).visibility&&"none"!==t.display)},_sortByTabIndex:function(e){var t=e.length;if(t<2)return e;var r=Math.ceil(t/2),a=this._sortByTabIndex(e.slice(0,r)),i=this._sortByTabIndex(e.slice(r));return this._mergeSortByTabIndex(a,i)},_mergeSortByTabIndex:function(e,t){for(var r=[];e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?r.push(t.shift()):r.push(e.shift());return r.concat(e,t)},_hasLowerTabOrder:function(e,t){var r=Math.max(e.tabIndex,0),a=Math.max(t.tabIndex,0);return 0===r||0===a?a>r:r>a}}}();</script><script>!function(){"use strict";Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},_manager:{type:Object,value:Polymer.IronOverlayManager},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Polymer.dom(this).querySelector("[autofocus]")||this},get _focusableNodes(){return Polymer.IronFocusablesHelper.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__raf=null,this.__restoreFocusNode=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.__raf&&(window.cancelAnimationFrame(this.__raf),this.__raf=null),this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){this.fire("iron-overlay-canceled",e,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__onNextAnimationFrame(this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this._focusNode.blur(),this._focusedChild=null,this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Polymer.dom(this).deepContains(e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null;var t=this._manager.currentOverlay();t&&this!==t&&t._applyFocus()}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(this.withBackdrop){var t=Polymer.dom(e).path;-1===t.indexOf(this)?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,s=t?this.__firstFocusableNode:this.__lastFocusableNode,i=t?this.__lastFocusableNode:this.__firstFocusableNode,o=!1;if(s===i)o=!0;else{var n=this._manager.deepActiveElement;o=n===s||n===this}o&&(e.preventDefault(),this._focusedChild=i,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__onNextAnimationFrame(this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__onNextAnimationFrame:function(e){this.__raf&&window.cancelAnimationFrame(this.__raf);var t=this;this.__raf=window.requestAnimationFrame(function(){t.__raf=null,e.call(t)})}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}();</script><script>Polymer.NeonAnimatableBehavior={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(i,n){for(var t in n)i[t]=n[t]},_cloneConfig:function(i){var n={isClone:!0};return this._copyProperties(n,i),n},_getAnimationConfigRecursive:function(i,n,t){if(this.animationConfig)if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));else{var o;if(o=i?this.animationConfig[i]:this.animationConfig,Array.isArray(o)||(o=[o]),o)for(var e,a=0;e=o[a];a++)if(e.animatable)e.animatable._getAnimationConfigRecursive(e.type||i,n,t);else if(e.id){var r=n[e.id];r?(r.isClone||(n[e.id]=this._cloneConfig(r),r=n[e.id]),this._copyProperties(r,e)):n[e.id]=e}else t.push(e)}},getAnimationConfig:function(i){var n={},t=[];this._getAnimationConfigRecursive(i,n,t);for(var o in n)t.push(n[o]);return t}};</script><script>Polymer.NeonAnimationRunnerBehaviorImpl={_configureAnimations:function(n){var i=[];if(n.length>0)for(var e,t=0;e=n[t];t++){var o=document.createElement(e.name);if(o.isNeonAnimation){var a=null;try{"function"!=typeof(a=o.configure(e)).cancel&&(a=document.timeline.play(a))}catch(n){a=null,console.warn("Couldnt play","(",e.name,").",n)}a&&i.push({neonAnimation:o,config:e,animation:a})}else console.warn(this.is+":",e.name,"not found!")}return i},_shouldComplete:function(n){for(var i=!0,e=0;e<n.length;e++)if("finished"!=n[e].animation.playState){i=!1;break}return i},_complete:function(n){for(i=0;i<n.length;i++)n[i].neonAnimation.complete(n[i].config);for(var i=0;i<n.length;i++)n[i].animation.cancel()},playAnimation:function(n,i){var e=this.getAnimationConfig(n);if(e){this._active=this._active||{},this._active[n]&&(this._complete(this._active[n]),delete this._active[n]);var t=this._configureAnimations(e);if(0!=t.length){this._active[n]=t;for(var o=0;o<t.length;o++)t[o].animation.onfinish=function(){this._shouldComplete(t)&&(this._complete(t),delete this._active[n],this.fire("neon-animation-finish",i,{bubbles:!1}))}.bind(this)}else this.fire("neon-animation-finish",i,{bubbles:!1})}},cancelAnimation:function(){for(var n in this._animations)this._animations[n].cancel();this._animations={}}},Polymer.NeonAnimationRunnerBehavior=[Polymer.NeonAnimatableBehavior,Polymer.NeonAnimationRunnerBehaviorImpl];</script><script>!function(){"use strict";var e={pageX:0,pageY:0},t=null,l=[],n=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"];Polymer.IronDropdownScrollManager={get currentLockingElement(){return this._lockingElements[this._lockingElements.length-1]},elementIsScrollLocked:function(e){var t=this.currentLockingElement;if(void 0===t)return!1;var l;return!!this._hasCachedLockedElement(e)||!this._hasCachedUnlockedElement(e)&&((l=!!t&&t!==e&&!this._composedTreeContains(t,e))?this._lockedElementCache.push(e):this._unlockedElementCache.push(e),l)},pushScrollLock:function(e){this._lockingElements.indexOf(e)>=0||(0===this._lockingElements.length&&this._lockScrollInteractions(),this._lockingElements.push(e),this._lockedElementCache=[],this._unlockedElementCache=[])},removeScrollLock:function(e){var t=this._lockingElements.indexOf(e);-1!==t&&(this._lockingElements.splice(t,1),this._lockedElementCache=[],this._unlockedElementCache=[],0===this._lockingElements.length&&this._unlockScrollInteractions())},_lockingElements:[],_lockedElementCache:null,_unlockedElementCache:null,_hasCachedLockedElement:function(e){return this._lockedElementCache.indexOf(e)>-1},_hasCachedUnlockedElement:function(e){return this._unlockedElementCache.indexOf(e)>-1},_composedTreeContains:function(e,t){var l,n,o,r;if(e.contains(t))return!0;for(l=Polymer.dom(e).querySelectorAll("content,slot"),o=0;o<l.length;++o)for(n=Polymer.dom(l[o]).getDistributedNodes(),r=0;r<n.length;++r)if(n[r].nodeType===Node.ELEMENT_NODE&&this._composedTreeContains(n[r],t))return!0;return!1},_scrollInteractionHandler:function(t){if(t.cancelable&&this._shouldPreventScrolling(t)&&t.preventDefault(),t.targetTouches){var l=t.targetTouches[0];e.pageX=l.pageX,e.pageY=l.pageY}},_lockScrollInteractions:function(){this._boundScrollHandler=this._boundScrollHandler||this._scrollInteractionHandler.bind(this);for(var e=0,t=n.length;e<t;e++)document.addEventListener(n[e],this._boundScrollHandler,{capture:!0,passive:!1})},_unlockScrollInteractions:function(){for(var e=0,t=n.length;e<t;e++)document.removeEventListener(n[e],this._boundScrollHandler,{capture:!0,passive:!1})},_shouldPreventScrolling:function(e){var n=Polymer.dom(e).rootTarget;if("touchmove"!==e.type&&t!==n&&(t=n,l=this._getScrollableNodes(Polymer.dom(e).path)),!l.length)return!0;if("touchstart"===e.type)return!1;var o=this._getScrollInfo(e);return!this._getScrollingNode(l,o.deltaX,o.deltaY)},_getScrollableNodes:function(e){for(var t=[],l=e.indexOf(this.currentLockingElement),n=0;n<=l;n++)if(e[n].nodeType===Node.ELEMENT_NODE){var o=e[n],r=o.style;"scroll"!==r.overflow&&"auto"!==r.overflow&&(r=window.getComputedStyle(o)),"scroll"!==r.overflow&&"auto"!==r.overflow||t.push(o)}return t},_getScrollingNode:function(e,t,l){if(t||l)for(var n=Math.abs(l)>=Math.abs(t),o=0;o<e.length;o++){var r=e[o];if(n?l<0?r.scrollTop>0:r.scrollTop<r.scrollHeight-r.clientHeight:t<0?r.scrollLeft>0:r.scrollLeft<r.scrollWidth-r.clientWidth)return r}},_getScrollInfo:function(t){var l={deltaX:t.deltaX,deltaY:t.deltaY};if("deltaX"in t);else if("wheelDeltaX"in t)l.deltaX=-t.wheelDeltaX,l.deltaY=-t.wheelDeltaY;else if("axis"in t)l.deltaX=1===t.axis?t.detail:0,l.deltaY=2===t.axis?t.detail:0;else if(t.targetTouches){var n=t.targetTouches[0];l.deltaX=e.pageX-n.pageX,l.deltaY=e.pageY-n.pageY}return l}}}();</script><dom-module id="iron-dropdown" assetpath="../bower_components/iron-dropdown/"><template><style>:host{position:fixed;}#contentWrapper ::slotted(*){overflow:auto;}#contentWrapper.animating ::slotted(*){overflow:hidden;}</style><div id="contentWrapper"><slot id="content" name="dropdown-content"></slot></div></template><script>!function(){"use strict";Polymer({is:"iron-dropdown",behaviors:[Polymer.IronControlState,Polymer.IronA11yKeysBehavior,Polymer.IronOverlayBehavior,Polymer.NeonAnimationRunnerBehavior],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1},_boundOnCaptureScroll:{type:Function,value:function(){return this._onCaptureScroll.bind(this)}}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var o=Polymer.dom(this.$.content).getDistributedNodes(),n=0,t=o.length;n<t;n++)if(o[n].nodeType===Node.ELEMENT_NODE)return o[n]},ready:function(){this._scrollTop=0,this._scrollLeft=0,this._refitOnScrollRAF=null},attached:function(){this.sizingTarget&&this.sizingTarget!==this||(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation(),document.removeEventListener("scroll",this._boundOnCaptureScroll),Polymer.IronDropdownScrollManager.removeScrollLock(this)},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),this._saveScrollPosition(),this.opened?(document.addEventListener("scroll",this._boundOnCaptureScroll),!this.allowOutsideScroll&&Polymer.IronDropdownScrollManager.pushScrollLock(this)):(document.removeEventListener("scroll",this._boundOnCaptureScroll),Polymer.IronDropdownScrollManager.removeScrollLock(this)),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_onCaptureScroll:function(){this.allowOutsideScroll?(this._refitOnScrollRAF&&window.cancelAnimationFrame(this._refitOnScrollRAF),this._refitOnScrollRAF=window.requestAnimationFrame(this.refit.bind(this))):this._restoreScrollPosition()},_saveScrollPosition:function(){document.scrollingElement?(this._scrollTop=document.scrollingElement.scrollTop,this._scrollLeft=document.scrollingElement.scrollLeft):(this._scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this._scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},_restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this._scrollTop,document.scrollingElement.scrollLeft=this._scrollLeft):(document.documentElement.scrollTop=this._scrollTop,document.documentElement.scrollLeft=this._scrollLeft,document.body.scrollTop=this._scrollTop,document.body.scrollLeft=this._scrollLeft)},_updateAnimationConfig:function(){for(var o=this.containedElement,n=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),t=0;t<n.length;t++)n[t].node=o;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_applyFocus:function(){var o=this.focusTarget||this.containedElement;o&&this.opened&&!this.noAutoFocus?o.focus():Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this,arguments)}})}();</script></dom-module><script>Polymer.NeonAnimationBehavior={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},timingFromConfig:function(i){if(i.timing)for(var n in i.timing)this.animationTiming[n]=i.timing[n];return this.animationTiming},setPrefixedProperty:function(i,n,t){for(var o,e={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]}[n],r=0;o=e[r];r++)i.style[o]=t;i.style[n]=t},complete:function(){}};</script><script>Polymer({is:"fade-in-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(i){var e=i.node;return this._effect=new KeyframeEffect(e,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(i)),this._effect}});</script><script>Polymer({is:"fade-out-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node;return this._effect=new KeyframeEffect(i,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}});</script><script>Polymer({is:"paper-menu-grow-height-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect().height;return this._effect=new KeyframeEffect(i,[{height:t/2+"px"},{height:t+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-grow-width-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect().width;return this._effect=new KeyframeEffect(i,[{width:t/2+"px"},{width:t+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-shrink-width-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect().width;return this._effect=new KeyframeEffect(i,[{width:t+"px"},{width:t-t/20+"px"}],this.timingFromConfig(e)),this._effect}}),Polymer({is:"paper-menu-shrink-height-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(e){var i=e.node,t=i.getBoundingClientRect(),n=t.height;t.top;return this.setPrefixedProperty(i,"transformOrigin","0 0"),this._effect=new KeyframeEffect(i,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}});</script><dom-module id="paper-menu-button" assetpath="../bower_components/paper-menu-button/"><template><style>:host{display:inline-block;position:relative;padding:8px;outline:none;@apply --paper-menu-button;}:host([disabled]){cursor:auto;color:var(--disabled-text-color);@apply --paper-menu-button-disabled;}iron-dropdown{@apply --paper-menu-button-dropdown;}.dropdown-content{@apply --shadow-elevation-2dp;position:relative;border-radius:2px;background-color:var(--paper-menu-button-dropdown-background, var(--primary-background-color));@apply --paper-menu-button-content;}:host([vertical-align="top"]) .dropdown-content{margin-bottom:20px;margin-top:-10px;top:10px;}:host([vertical-align="bottom"]) .dropdown-content{bottom:10px;margin-bottom:-10px;margin-top:20px;}#trigger{cursor:pointer;}</style><div id="trigger" on-tap="toggle"><slot name="dropdown-trigger"></slot></div><iron-dropdown id="dropdown" opened="{{opened}}" horizontal-align="[[horizontalAlign]]" vertical-align="[[verticalAlign]]" dynamic-align="[[dynamicAlign]]" horizontal-offset="[[horizontalOffset]]" vertical-offset="[[verticalOffset]]" no-overlap="[[noOverlap]]" open-animation-config="[[openAnimationConfig]]" close-animation-config="[[closeAnimationConfig]]" no-animations="[[noAnimations]]" focus-target="[[_dropdownContent]]" allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" on-iron-overlay-canceled="__onIronOverlayCanceled"><div slot="dropdown-content" class="dropdown-content"><slot id="content" name="dropdown-content"></slot></div></iron-dropdown></template><script>!function(){"use strict";var e={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},n=Polymer({is:"paper-menu-button",behaviors:[Polymer.IronA11yKeysBehavior,Polymer.IronControlState],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:e.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:e.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:e.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=Polymer.dom(this.$.content).getDistributedNodes(),n=0,t=e.length;n<t;n++)if(e[n].nodeType===Node.ELEMENT_NODE)return e[n]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,n){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):null!=n&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){Polymer.IronControlState._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var n=e.detail,t=(Polymer.dom(n).rootTarget,this.$.trigger);Polymer.dom(n).path.indexOf(t)>-1&&e.preventDefault()}});Object.keys(e).forEach(function(t){n[t]=e[t]}),Polymer.PaperMenuButton=n}();</script></dom-module><iron-iconset-svg name="paper-dropdown-menu" size="24"><svg><defs><g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g></defs></svg></iron-iconset-svg><dom-module id="paper-dropdown-menu-shared-styles" assetpath="../bower_components/paper-dropdown-menu/"><template><style>:host{display:inline-block;position:relative;text-align:left;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent;--paper-input-container-input:{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%;box-sizing:border-box;cursor:pointer;};@apply --paper-dropdown-menu;}:host([disabled]){@apply --paper-dropdown-menu-disabled;}:host([noink]) paper-ripple{display:none;}:host([no-label-float]) paper-ripple{top:8px;}paper-ripple{top:12px;left:0px;bottom:8px;right:0px;@apply --paper-dropdown-menu-ripple;}paper-menu-button{display:block;padding:0;@apply --paper-dropdown-menu-button;}paper-input{@apply --paper-dropdown-menu-input;}iron-icon{color:var(--disabled-text-color);@apply --paper-dropdown-menu-icon;}</style></template></dom-module><dom-module id="paper-dropdown-menu" assetpath="../bower_components/paper-dropdown-menu/"><template><style include="paper-dropdown-menu-shared-styles"></style><span role="button"></span><paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate="" allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]"><div class="dropdown-trigger" slot="dropdown-trigger"><paper-ripple></paper-ripple><paper-input type="text" invalid="[[invalid]]" readonly="" disabled="[[disabled]]" value="[[selectedItemLabel]]" placeholder="[[placeholder]]" error-message="[[errorMessage]]" always-float-label="[[alwaysFloatLabel]]" no-label-float="[[noLabelFloat]]" label="[[label]]"><iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix="" slot="suffix"></iron-icon></paper-input></div><slot id="content" name="dropdown-content" slot="dropdown-content"></slot></paper-menu-button></template><script>!function(){"use strict";Polymer({is:"paper-dropdown-menu",behaviors:[Polymer.IronButtonState,Polymer.IronControlState,Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,readOnly:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=Polymer.dom(this.$.content).getDistributedNodes(),t=0,n=e.length;t<n;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){Polymer.Gestures.findOriginalTarget(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this._setValue(t),this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e){return e?-4:8},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}})}();</script></dom-module><dom-module id="paper-listbox" assetpath="../bower_components/paper-listbox/"><template><style>:host{display:block;padding:8px 0;background:var(--paper-listbox-background-color, var(--primary-background-color));color:var(--paper-listbox-color, var(--primary-text-color));@apply --paper-listbox;}</style><slot></slot></template><script>Polymer({is:"paper-listbox",behaviors:[Polymer.IronMenuBehavior],hostAttributes:{role:"listbox"}});</script></dom-module><script>Polymer.PaperItemBehaviorImpl={hostAttributes:{role:"option",tabindex:"0"}},Polymer.PaperItemBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperItemBehaviorImpl];</script><dom-module id="paper-item-shared-styles" assetpath="../bower_components/paper-item/"><template><style>:host, .paper-item{display:block;position:relative;min-height:var(--paper-item-min-height, 48px);padding:0px 16px;}.paper-item{@apply --paper-font-subhead;border:none;outline:none;background:white;width:100%;text-align:left;}:host([hidden]), .paper-item[hidden]{display:none !important;}:host(.iron-selected), .paper-item.iron-selected{font-weight:var(--paper-item-selected-weight, bold);@apply --paper-item-selected;}:host([disabled]), .paper-item[disabled]{color:var(--paper-item-disabled-color, var(--disabled-text-color));@apply --paper-item-disabled;}:host(:focus), .paper-item:focus{position:relative;outline:0;@apply --paper-item-focused;}:host(:focus):before, .paper-item:focus:before{@apply --layout-fit;background:currentColor;content:'';opacity:var(--dark-divider-opacity);pointer-events:none;@apply --paper-item-focused-before;}</style></template></dom-module><dom-module id="paper-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host{@apply --layout-horizontal;@apply --layout-center;@apply --paper-font-subhead;@apply --paper-item;}</style><slot></slot></template><script>Polymer({is:"paper-item",behaviors:[Polymer.PaperItemBehavior]});</script></dom-module><dom-module id="state-card-input_select" assetpath="state-summary/"><template><style>:host{display:block;}state-badge{float:left;margin-top:10px;}paper-dropdown-menu{display:block;margin-left:53px;}paper-item{cursor:pointer;}</style><state-badge state-obj="[[stateObj]]"></state-badge><paper-dropdown-menu on-tap="stopPropagation" selected-item-label="{{selectedOption}}" label="[[computeStateName(stateObj)]]"><paper-listbox slot="dropdown-content" selected="[[computeSelected(stateObj)]]"><template is="dom-repeat" items="[[stateObj.attributes.options]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></template></dom-module><script>Polymer({is:"state-card-input_select",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},selectedOption:{type:String,observer:"selectedOptionChanged"}},computeStateName:function(t){return window.hassUtil.computeStateName(t)},computeSelected:function(t){return t.attributes.options.indexOf(t.state)},selectedOptionChanged:function(t){""!==t&&t!==this.stateObj.state&&this.hass.callService("input_select","select_option",{option:t,entity_id:this.stateObj.entity_id})},stopPropagation:function(t){t.stopPropagation()}});</script><dom-module id="state-card-input_number" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-slider{margin-left:16px;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div hidden="[[hiddenslider]]"><paper-slider min="[[min]]" max="[[max]]" value="{{value}}" step="[[step]]" pin="" on-change="selectedValueChanged" on-tap="stopPropagation"></paper-slider></div><paper-input no-label-float="" auto-validate="" pattern="[0-9]*" value="{{value}}" type="number" on-change="selectedValueChanged" on-tap="stopPropagation" hidden="[[hiddenbox]]"></paper-input></div></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),StateCardInputNumber=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"stateObjectChanged",value:function(e){this.min=Number(e.attributes.min),this.max=Number(e.attributes.max),this.step=Number(e.attributes.step),this.value=Number(e.state),this.maxlength=this.max.legnth,"slider"===e.attributes.mode?(this.hiddenbox=!0,this.hiddenslider=!1):(this.hiddenbox=!1,this.hiddenslider=!0)}},{key:"selectedValueChanged",value:function(){this.value!==Number(this.stateObj.state)&&this.hass.callService("input_number","set_value",{value:this.value,entity_id:this.stateObj.entity_id})}},{key:"stopPropagation",value:function(e){e.stopPropagation()}}],[{key:"is",get:function(){return"state-card-input_number"}},{key:"properties",get:function(){return{hass:Object,hiddenbox:{type:Boolean,value:!0},hiddenslider:{type:Boolean,value:!0},inDialog:{type:Boolean,value:!1},stateObj:{type:Object,observer:"stateObjectChanged"},min:{type:Number,value:0},max:{type:Number,value:100},maxlength:{type:Number,value:3},step:{type:Number},value:{type:Number}}}}]),t}();customElements.define(StateCardInputNumber.is,StateCardInputNumber);</script><dom-module id="state-card-input_text" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-input{margin-left:16px;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-input no-label-float="" minlength="[[stateObj.attributes.min]]" maxlength="[[stateObj.attributes.max]]" value="{{value}}" auto-validate="[[stateObj.attributes.pattern]]" pattern="[[stateObj.attributes.pattern]]" on-change="selectedValueChanged" on-tap="stopPropagation" placeholder="(empty value)"></paper-input></div></template></dom-module><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),StateCardInputText=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,Polymer.Element),_createClass(e,[{key:"stateObjectChanged",value:function(t){this.value=t.state}},{key:"selectedValueChanged",value:function(){this.value!==this.stateObj.state&&this.hass.callService("input_text","set_value",{value:this.value,entity_id:this.stateObj.entity_id})}},{key:"stopPropagation",value:function(t){t.stopPropagation()}}],[{key:"is",get:function(){return"state-card-input_text"}},{key:"properties",get:function(){return{hass:Object,inDialog:{type:Boolean,value:!1},stateObj:{type:Object,observer:"stateObjectChanged"},pattern:{type:String},value:{type:String}}}}]),e}();customElements.define(StateCardInputText.is,StateCardInputText);</script><dom-module id="state-card-media_player" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{line-height:1.5;}.state{@apply (--paper-font-common-nowrap);@apply (--paper-font-body1);margin-left:16px;text-align:right;}.main-text{@apply (--paper-font-common-nowrap);color:var(--primary-text-color);text-transform:capitalize;}.main-text[take-height]{line-height:40px;}.secondary-text{@apply (--paper-font-common-nowrap);color:var(--secondary-text-color);}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><div class="state"><div class="main-text" take-height$="[[!playerObj.secondaryText]]">[[playerObj.primaryText]]</div><div class="secondary-text">[[playerObj.secondaryText]]</div></div></div></template></dom-module><script>Polymer({PLAYING_STATES:["playing","paused"],is:"state-card-media_player",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},playerObj:{type:Object,computed:"computePlayerObj(hass, stateObj)"}},computePlayerObj:function(e,t){return new window.MediaPlayerEntity(e,t)}});</script><dom-module id="state-card-scene" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><paper-button on-tap="activateScene">ACTIVATE</paper-button></div></template></dom-module><script>Polymer({is:"state-card-scene",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},activateScene:function(e){e.stopPropagation(),this.hass.callService("scene","turn_on",{entity_id:this.stateObj.entity_id})}});</script><dom-module id="state-card-script" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>paper-button{color:var(--primary-color);font-weight:500;top:3px;height:37px;margin-right:-.57em;}ha-entity-toggle{margin-left:16px;}dom-if{display:none;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><template is="dom-if" if="[[stateObj.attributes.can_cancel]]"><ha-entity-toggle state-obj="[[stateObj]]" hass="[[hass]]"></ha-entity-toggle></template><template is="dom-if" if="[[!stateObj.attributes.can_cancel]]"><paper-button on-tap="fireScript">ACTIVATE</paper-button></template></div></template></dom-module><script>Polymer({is:"state-card-script",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},fireScript:function(t){t.stopPropagation(),this.hass.callService("script","turn_on",{entity_id:this.stateObj.entity_id})}});</script><dom-module id="state-card-toggle" assetpath="state-summary/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>ha-entity-toggle{margin-left:16px;}</style><div class="horizontal justified layout"><state-info state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-info><ha-entity-toggle state-obj="[[stateObj]]" hass="[[hass]]"></ha-entity-toggle></div></template></dom-module><script>Polymer({is:"state-card-toggle",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object}}});</script><dom-module id="state-card-weblink" assetpath="state-summary/"><template><style>:host{display:block;}.name{@apply (--paper-font-common-nowrap);@apply (--paper-font-body1);color:var(--primary-color);text-transform:capitalize;line-height:40px;margin-left:16px;}</style><state-badge state-obj="[[stateObj]]" in-dialog="[[inDialog]]"></state-badge><a href$="[[stateObj.state]]" target="_blank" class="name" id="link">[[computeStateName(stateObj)]]</a></template></dom-module><script>Polymer({is:"state-card-weblink",properties:{inDialog:{type:Boolean,value:!1},stateObj:{type:Object}},listeners:{tap:"onTap"},computeStateName:function(t){return window.hassUtil.computeStateName(t)},onTap:function(t){t.stopPropagation(),t.preventDefault(),window.open(this.stateObj.state,"_blank")}});</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),StateCardContent=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,Polymer.Element),_createClass(e,[{key:"inputChanged",value:function(t,e,n){var r=void 0;n&&t&&(r=n.attributes&&"custom_ui_state_card"in n.attributes?n.attributes.custom_ui_state_card:"state-card-"+window.hassUtil.stateCardType(t,n),window.hassUtil.dynamicContentUpdater(this,r.toUpperCase(),{hass:t,stateObj:n,inDialog:e}))}}],[{key:"is",get:function(){return"state-card-content"}},{key:"properties",get:function(){return{hass:Object,inDialog:{type:Boolean,value:!1},stateObj:Object}}},{key:"observers",get:function(){return["inputChanged(hass, inDialog, stateObj)"]}}]),e}();customElements.define(StateCardContent.is,StateCardContent);</script><dom-module id="ha-entities-card" assetpath="cards/"><template><style is="custom-style" include="iron-flex"></style><style>.states{padding-bottom:16px;}.state{padding:4px 16px;cursor:pointer;}.header{@apply (--paper-font-headline);line-height:40px;color:var(--primary-text-color);padding:20px 16px 12px;}.header .name{@apply (--paper-font-common-nowrap);}.header.domain .name{text-transform:capitalize;}ha-entity-toggle{margin-left:16px;}.header-more-info{cursor:pointer;}</style><ha-card><div class$="[[computeTitleClass(groupEntity)]]" on-tap="entityTapped"><div class="flex name">[[computeTitle(states, groupEntity)]]</div><template is="dom-if" if="[[showGroupToggle(groupEntity, states)]]"><ha-entity-toggle hass="[[hass]]" state-obj="[[groupEntity]]"></ha-entity-toggle></template></div><div class="states"><template is="dom-repeat" items="[[states]]"><div class="state" on-tap="entityTapped"><state-card-content hass="[[hass]]" class="state-card" state-obj="[[item]]"></state-card-content></div></template></div></ha-card></template></dom-module><script>Polymer({is:"ha-entities-card",properties:{hass:{type:Object},states:{type:Array},groupEntity:{type:Object}},computeTitle:function(t,e){return e?window.hassUtil.computeStateName(e):window.hassUtil.computeDomain(t[0]).replace(/_/g," ")},computeTitleClass:function(t){var e="header horizontal layout center ";return e+=t?"header-more-info":"domain"},entityTapped:function(t){var e;"STATE-CARD-INPUT_TEXT"!==t.target.nodeName&&(t.model||this.groupEntity)&&(t.stopPropagation(),e=t.model?t.model.item.entity_id:this.groupEntity.entity_id,this.fire("hass-more-info",{entityId:e}))},showGroupToggle:function(t,e){if(!t||!e||"hidden"===t.attributes.control||"on"!==t.state&&"off"!==t.state)return!1;for(var o=0,i=0;i<e.length&&!(window.hassUtil.canToggleState(this.hass,e[i])&&++o>1);i++);return o>1}});</script><dom-module id="iron-image" assetpath="../bower_components/iron-image/"><template><style>:host{display:inline-block;overflow:hidden;position:relative;}#baseURIAnchor{display:none;}#sizedImgDiv{position:absolute;top:0px;right:0px;bottom:0px;left:0px;display:none;}#img{display:block;width:var(--iron-image-width, auto);height:var(--iron-image-height, auto);}:host([sizing]) #sizedImgDiv{display:block;}:host([sizing]) #img{display:none;}#placeholder{position:absolute;top:0px;right:0px;bottom:0px;left:0px;background-color:inherit;opacity:1;@apply --iron-image-placeholder;}#placeholder.faded-out{transition:opacity 0.5s linear;opacity:0;}</style><a id="baseURIAnchor" href="#"></a><div id="sizedImgDiv" role="img" hidden$="[[_computeImgDivHidden(sizing)]]" aria-hidden$="[[_computeImgDivARIAHidden(alt)]]" aria-label$="[[_computeImgDivARIALabel(alt, src)]]"></div><img id="img" alt$="[[alt]]" hidden$="[[_computeImgHidden(sizing)]]" crossorigin$="[[crossorigin]]" on-load="_imgOnLoad" on-error="_imgOnError"><div id="placeholder" hidden$="[[_computePlaceholderHidden(preload, fade, loading, loaded)]]" class$="[[_computePlaceholderClassName(preload, fade, loading, loaded)]]"></div></template><script>Polymer({is:"iron-image",properties:{src:{type:String,value:""},alt:{type:String,value:null},crossorigin:{type:String,value:null},preventLoad:{type:Boolean,value:!1},sizing:{type:String,value:null,reflectToAttribute:!0},position:{type:String,value:"center"},preload:{type:Boolean,value:!1},placeholder:{type:String,value:null,observer:"_placeholderChanged"},fade:{type:Boolean,value:!1},loaded:{notify:!0,readOnly:!0,type:Boolean,value:!1},loading:{notify:!0,readOnly:!0,type:Boolean,value:!1},error:{notify:!0,readOnly:!0,type:Boolean,value:!1},width:{observer:"_widthChanged",type:Number,value:null},height:{observer:"_heightChanged",type:Number,value:null}},observers:["_transformChanged(sizing, position)","_loadStateObserver(src, preventLoad)"],created:function(){this._resolvedSrc=""},_imgOnLoad:function(){this.$.img.src===this._resolveSrc(this.src)&&(this._setLoading(!1),this._setLoaded(!0),this._setError(!1))},_imgOnError:function(){this.$.img.src===this._resolveSrc(this.src)&&(this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",this._setLoading(!1),this._setLoaded(!1),this._setError(!0))},_computePlaceholderHidden:function(){return!this.preload||!this.fade&&!this.loading&&this.loaded},_computePlaceholderClassName:function(){return this.preload&&this.fade&&!this.loading&&this.loaded?"faded-out":""},_computeImgDivHidden:function(){return!this.sizing},_computeImgDivARIAHidden:function(){return""===this.alt?"true":void 0},_computeImgDivARIALabel:function(){return null!==this.alt?this.alt:""===this.src?"":this._resolveSrc(this.src).replace(/[?|#].*/g,"").split("/").pop()},_computeImgHidden:function(){return!!this.sizing},_widthChanged:function(){this.style.width=isNaN(this.width)?this.width:this.width+"px"},_heightChanged:function(){this.style.height=isNaN(this.height)?this.height:this.height+"px"},_loadStateObserver:function(e,t){var i=this._resolveSrc(e);i!==this._resolvedSrc&&(this._resolvedSrc="",this.$.img.removeAttribute("src"),this.$.sizedImgDiv.style.backgroundImage="",""===e||t?(this._setLoading(!1),this._setLoaded(!1),this._setError(!1)):(this._resolvedSrc=i,this.$.img.src=this._resolvedSrc,this.$.sizedImgDiv.style.backgroundImage='url("'+this._resolvedSrc+'")',this._setLoading(!0),this._setLoaded(!1),this._setError(!1)))},_placeholderChanged:function(){this.$.placeholder.style.backgroundImage=this.placeholder?'url("'+this.placeholder+'")':""},_transformChanged:function(){var e=this.$.sizedImgDiv.style,t=this.$.placeholder.style;e.backgroundSize=t.backgroundSize=this.sizing,e.backgroundPosition=t.backgroundPosition=this.sizing?this.position:"",e.backgroundRepeat=t.backgroundRepeat=this.sizing?"no-repeat":""},_resolveSrc:function(e){var t=Polymer.ResolveUrl.resolveUrl(e,this.$.baseURIAnchor.href);return"/"===t[0]&&(t=(location.origin||location.protocol+"//"+location.host)+t),t}});</script></dom-module><dom-module id="paper-card" assetpath="../bower_components/paper-card/"><template><style include="paper-material-styles">:host{display:inline-block;position:relative;box-sizing:border-box;background-color:var(--paper-card-background-color, var(--primary-background-color));border-radius:2px;@apply --paper-font-common-base;@apply --paper-card;}[hidden]{display:none !important;}.header{position:relative;border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;@apply --paper-card-header;}.header iron-image{display:block;width:100%;--iron-image-width:100%;pointer-events:none;@apply --paper-card-header-image;}.header .title-text{padding:16px;font-size:24px;font-weight:400;color:var(--paper-card-header-color, #000);@apply --paper-card-header-text;}.header .title-text.over-image{position:absolute;bottom:0px;@apply --paper-card-header-image-text;}:host ::slotted(.card-content){padding:16px;position:relative;@apply --paper-card-content;}:host ::slotted(.card-actions){border-top:1px solid #e8e8e8;padding:5px 16px;position:relative;@apply --paper-card-actions;}:host([elevation="1"]){@apply --paper-material-elevation-1;}:host([elevation="2"]){@apply --paper-material-elevation-2;}:host([elevation="3"]){@apply --paper-material-elevation-3;}:host([elevation="4"]){@apply --paper-material-elevation-4;}:host([elevation="5"]){@apply --paper-material-elevation-5;}</style><div class="header"><iron-image hidden$="[[!image]]" aria-hidden$="[[_isHidden(image)]]" src="[[image]]" alt="[[alt]]" placeholder="[[placeholderImage]]" preload="[[preloadImage]]" fade="[[fadeImage]]"></iron-image><div hidden$="[[!heading]]" class$="title-text [[_computeHeadingClass(image)]]">[[heading]]</div></div><slot></slot></template><script>Polymer({is:"paper-card",properties:{heading:{type:String,value:"",observer:"_headingChanged"},image:{type:String,value:""},alt:{type:String},preloadImage:{type:Boolean,value:!1},fadeImage:{type:Boolean,value:!1},placeholderImage:{type:String,value:null},elevation:{type:Number,value:1,reflectToAttribute:!0},animatedShadow:{type:Boolean,value:!1},animated:{type:Boolean,reflectToAttribute:!0,readOnly:!0,computed:"_computeAnimated(animatedShadow)"}},_isHidden:function(e){return e?"false":"true"},_headingChanged:function(e){var t=this.getAttribute("heading"),a=this.getAttribute("aria-label");"string"==typeof a&&a!==t||this.setAttribute("aria-label",e)},_computeHeadingClass:function(e){return e?" over-image":""},_computeAnimated:function(e){return e}});</script></dom-module><script>!function(){"use strict";Polymer.IronJsonpLibraryBehavior={properties:{libraryLoaded:{type:Boolean,value:!1,notify:!0,readOnly:!0},libraryErrorMessage:{type:String,value:null,notify:!0,readOnly:!0}},observers:["_libraryUrlChanged(libraryUrl)"],_libraryUrlChanged:function(r){this._isReady&&this.libraryUrl&&this._loadLibrary()},_libraryLoadCallback:function(r,i){r?(Polymer.Base._warn("Library load failed:",r.message),this._setLibraryErrorMessage(r.message)):(this._setLibraryErrorMessage(null),this._setLibraryLoaded(!0),this.notifyEvent&&this.fire(this.notifyEvent,i,{composed:!0}))},_loadLibrary:function(){r.require(this.libraryUrl,this._libraryLoadCallback.bind(this),this.callbackName)},ready:function(){this._isReady=!0,this.libraryUrl&&this._loadLibrary()}};var r={apiMap:{},require:function(r,t,e){var a=this.nameFromUrl(r);this.apiMap[a]||(this.apiMap[a]=new i(a,r,e)),this.apiMap[a].requestNotify(t)},nameFromUrl:function(r){return r.replace(/[\:\/\%\?\&\.\=\-\,]/g,"_")+"_api"}},i=function(r,i,t){if(this.notifiers=[],!t){if(!(i.indexOf(this.callbackMacro)>=0))return void(this.error=new Error("IronJsonpLibraryBehavior a %%callback%% parameter is required in libraryUrl"));t=r+"_loaded",i=i.replace(this.callbackMacro,t)}this.callbackName=t,window[this.callbackName]=this.success.bind(this),this.addScript(i)};i.prototype={callbackMacro:"%%callback%%",loaded:!1,addScript:function(r){var i=document.createElement("script");i.src=r,i.onerror=this.handleError.bind(this);var t=document.querySelector("script")||document.body;t.parentNode.insertBefore(i,t),this.script=i},removeScript:function(){this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.script=null},handleError:function(r){this.error=new Error("Library failed to load"),this.notifyAll(),this.cleanup()},success:function(){this.loaded=!0,this.result=Array.prototype.slice.call(arguments),this.notifyAll(),this.cleanup()},cleanup:function(){delete window[this.callbackName]},notifyAll:function(){this.notifiers.forEach(function(r){r(this.error,this.result)}.bind(this)),this.notifiers=[]},requestNotify:function(r){this.loaded||this.error?r(this.error,this.result):this.notifiers.push(r)}}}();</script><script>Polymer({is:"iron-jsonp-library",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:String,callbackName:String,notifyEvent:String}});</script><script>Polymer({is:"google-legacy-loader",behaviors:[Polymer.IronJsonpLibraryBehavior],properties:{libraryUrl:{type:String,value:"https://www.google.com/jsapi?callback=%%callback%%"},notifyEvent:{type:String,value:"api-load"}},get api(){return google}});</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),_get=function e(t,n,a){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,n);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,a)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(a)},StateHistoryChartTimeline=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.mixinBehaviors([Polymer.IronResizableBehavior],Polymer.Element)),_createClass(t,[{key:"connectedCallback",value:function(){var e=this;_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this._isAttached=!0,this.drawChart(),this.addEventListener("iron-resize",function(){e.async(e.drawChart,10)})}},{key:"dataChanged",value:function(){this.drawChart()}},{key:"drawChart",value:function(){function e(e,t,a,r){var i=t.replace(/_/g," ");n.addRow([e,i,a,r])}var t,n,a,r,i,o,l,s=this.data;if(this._isAttached){for(;this.lastChild;)this.removeChild(this.lastChild);s&&0!==s.length&&(t=new window.google.visualization.Timeline(this),(n=new window.google.visualization.DataTable).addColumn({type:"string",id:"Entity"}),n.addColumn({type:"string",id:"State"}),n.addColumn({type:"date",id:"Start"}),n.addColumn({type:"date",id:"End"}),a=new Date(s.reduce(function(e,t){return Math.min(e,new Date(t.data[0].last_changed))},new Date)),(r=this.endTime||new Date(s.reduce(function(e,t){return Math.max(e,new Date(t.data[t.data.length-1].last_changed))},a)))>new Date&&(r=new Date),o="H:mm",(l=(r-a)/864e5)>30.1?o="MMM d":l>3.1?o="EEE, MMM d":l>1.1&&(o="EEE, MMM d, H:mm"),i=0,s.forEach(function(t){var n,a,o=null,l=null;0!==t.data.length&&(n=t.name,t.data.forEach(function(t){new Date(t.last_changed)>r||(null!==o&&t.state!==o?(a=new Date(t.last_changed),e(n,o,l,a),o=t.state,l=a):null===o&&(o=t.state,l=new Date(t.last_changed)))}),e(n,o,l,r),i++)}),t.draw(n,{backgroundColor:"#fafafa",height:55+42*i,timeline:{showRowLabels:this.noSingle||s.length>1},hAxis:{format:o}}))}}}],[{key:"is",get:function(){return"state-history-chart-timeline"}},{key:"properties",get:function(){return{data:{type:Object},noSingle:Boolean,endTime:Date}}},{key:"observers",get:function(){return["dataChanged(data, endTime)"]}}]),t}();customElements.define(StateHistoryChartTimeline.is,StateHistoryChartTimeline);</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),_get=function t(e,n,r){null===e&&(e=Function.prototype);var a=Object.getOwnPropertyDescriptor(e,n);if(void 0===a){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in a)return a.value;var o=a.get;if(void 0!==o)return o.call(r)};!function(){"use strict";function t(t,e){var n,r=[];for(n=t;n<e;n++)r.push(n);return r}function e(t){var e=parseFloat(t);return!isNaN(e)&&isFinite(e)?e:null}var n=function(n){function r(){return _classCallCheck(this,r),_possibleConstructorReturn(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments))}return _inherits(r,Polymer.mixinBehaviors([Polymer.IronResizableBehavior],Polymer.Element)),_createClass(r,[{key:"connectedCallback",value:function(){var t=this;_get(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"connectedCallback",this).call(this),this._isAttached=!0,this.drawChart(),this.addEventListener("iron-resize",function(){t.async(t.drawChart,10)})}},{key:"dataChanged",value:function(){this.drawChart()}},{key:"drawChart",value:function(){var n,r,a,i,o,u,s=this.unit,l=this.data;this._isAttached&&(this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this)),0!==l.length&&(n={backgroundColor:"#fafafa",legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",vAxes:{0:{title:s}},hAxis:{format:"H:mm"},chartArea:{left:"60",width:"95%"},explorer:{actions:["dragToZoom","rightClickToReset","dragToPan"],keepInBounds:!0,axis:"horizontal",maxZoomIn:.1}},this.isSingleDevice&&(n.legend.position="none",n.vAxes[0].title=null,n.chartArea.left=40,n.chartArea.height="80%",n.chartArea.top=5),r=new Date(Math.min.apply(null,l.map(function(t){return new Date(t.states[0].last_changed)}))),(a=this.endTime||new Date(Math.max.apply(null,l.map(function(t){return new Date(t.states[t.states.length-1].last_changed)}))))>new Date&&(a=new Date),(u=(a-r)/864e5)>30.1?n.hAxis.format="MMM d":u>3.1?n.hAxis.format="EEE, MMM d":u>1.1&&(n.hAxis.format="EEE, MMM d, H:mm"),o=1===(i=l.map(function(t){function n(t,e){var n=t[0];n>a||(r&&e&&c.push([n].concat(r.slice(1).map(function(t,n){return e[n]?t:null}))),c.push(t),r=t)}var r,i,o,u,s=t.domain,l=t.name,c=[],h=new window.google.visualization.DataTable;return h.addColumn({type:"datetime",id:"Time"}),"thermostat"===s||"climate"===s?(i=t.states.reduce(function(t,e){return t||e.attributes.target_temp_high!==e.attributes.target_temp_low},!1),h.addColumn("number",l+" current temperature"),i?(h.addColumn("number",l+" target temperature high"),h.addColumn("number",l+" target temperature low"),u=[!1,!0,!0],o=function(t){var r=e(t.attributes.current_temperature),a=e(t.attributes.target_temp_high),i=e(t.attributes.target_temp_low);n([new Date(t.last_changed),r,a,i],u)}):(h.addColumn("number",l+" target temperature"),u=[!1,!0],o=function(t){var r=e(t.attributes.current_temperature),a=e(t.attributes.temperature);n([new Date(t.last_changed),r,a],u)}),t.states.forEach(o)):(h.addColumn("number",l),u="sensor"!==s&&[!0],t.states.forEach(function(t){var r=e(t.state);n([new Date(t.last_changed),r],u)})),n([a].concat(r.slice(1)),!1),h.addRows(c),h})).length?i[0]:i.slice(1).reduce(function(e,n){return window.google.visualization.data.join(e,n,"full",[[0,0]],t(1,e.getNumberOfColumns()),t(1,n.getNumberOfColumns()))},i[0]),this.chartEngine.draw(o,n)))}}],[{key:"is",get:function(){return"state-history-chart-line"}},{key:"properties",get:function(){return{data:{type:Object},unit:{type:String},isSingleDevice:{type:Boolean,value:!1},endTime:{type:Object},chartEngine:{type:Object}}}},{key:"observers",get:function(){return["dataChanged(data, endTime)"]}}]),r}();customElements.define(n.is,n)}();</script><dom-module id="state-history-charts" assetpath="components/"><template><link href="https://ajax.googleapis.com/ajax/static/modules/gviz/1.0/core/tooltip.css" rel="stylesheet" type="text/css"><style>:host{display:block;}.google-visualization-tooltip{z-index:200;}state-history-chart-timeline, state-history-chart-line{display:block;}.loading-container{text-align:center;padding:8px;}.loading{height:0px;overflow:hidden;}</style><google-legacy-loader on-api-load="_googleApiLoaded"></google-legacy-loader><template is="dom-if" if="[[_isLoading]]"><div class="loading-container"><paper-spinner active="" alt="Updating history data"></paper-spinner></div></template><template is="dom-if" if="[[!_isLoading]]"><template is="dom-if" if="[[_computeIsEmpty(historyData)]]">No state history found.</template><state-history-chart-timeline data="[[historyData.timeline]]" end-time="[[_computeEndTime(endTime, upToNow, historyData)]]" no-single="[[noSingle]]"></state-history-chart-timeline><template is="dom-repeat" items="[[historyData.line]]"><state-history-chart-line unit="[[item.unit]]" data="[[item.data]]" is-single-device="[[_computeIsSingleLineChart(historyData, noSingle)]]" end-time="[[_computeEndTime(endTime, upToNow, historyData)]]"></state-history-chart-line></template></template></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),StateHistoryCharts=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"_computeIsSingleLineChart",value:function(e,t){return!t&&e&&1===e.line.length}},{key:"_googleApiLoaded",value:function(){window.google.load("visualization","1",{packages:["timeline","corechart"],callback:function(){this._apiLoaded=!0}.bind(this)})}},{key:"_computeIsLoading",value:function(e,t){return e||!t}},{key:"_computeIsEmpty",value:function(e){return e&&0===e.timeline.length&&0===e.line.length}},{key:"_computeEndTime",value:function(e,t){return t?new Date:e}}],[{key:"is",get:function(){return"state-history-charts"}},{key:"properties",get:function(){return{historyData:{type:Object,value:null},isLoadingData:{type:Boolean,value:!0},endTime:{type:Object},upToNow:Boolean,noSingle:Boolean,_apiLoaded:{type:Boolean,value:!1},_isLoading:{type:Boolean,computed:"_computeIsLoading(isLoadingData, _apiLoaded)"}}}}]),t}();customElements.define(StateHistoryCharts.is,StateHistoryCharts);</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),_get=function t(e,n,i){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,n);if(void 0===r){var a=Object.getPrototypeOf(e);return null===a?void 0:t(a,n,i)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(i)},computeHistory=function(t){var e={},n=[];return t?(t.forEach(function(t){if(0!==t.length){var i=t.find(function(t){return"unit_of_measurement"in t.attributes}),r=!!i&&i.attributes.unit_of_measurement;r?r in e?e[r].push(t):e[r]=[t]:n.push({name:window.hassUtil.computeStateName(t[0]),entity_id:t[0].entity_id,data:t.map(function(t){return{state:t.state,last_changed:t.last_changed}}).filter(function(t,e,n){return 0===e||t.state!==n[e-1].state})})}}),{line:Object.keys(e).map(function(t){return{unit:t,data:e[t].map(function(t){var e=t[t.length-1],n=window.hassUtil.computeDomain(e);return{domain:n,name:window.hassUtil.computeStateName(e),entity_id:e.entity_id,states:t.map(function(t){var e={state:t.state,last_changed:t.last_changed};return-1!==DOMAINS_USE_LAST_UPDATED.indexOf(n)&&(e.last_changed=t.last_updated),LINE_ATTRIBUTES_TO_KEEP.forEach(function(n){n in t.attributes&&(e.attributes=e.attributes||{},e.attributes[n]=t.attributes[n])}),e})}})}}),timeline:n}):{line:[],timeline:[]}},RECENT_THRESHOLD=6e4,RECENT_CACHE={},DOMAINS_USE_LAST_UPDATED=["thermostat","climate"],LINE_ATTRIBUTES_TO_KEEP=["temperature","current_temperature","target_temp_low","target_temp_high"];window.stateHistoryCache=window.stateHistoryCache||{};var HaStateHistoryData=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,Polymer.Element),_createClass(e,[{key:"disconnectedCallback",value:function(){this._refreshTimeoutId&&(window.clearInterval(this._refreshTimeoutId),this._refreshTimeoutId=null),_get(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"disconnectedCallback",this).call(this)}},{key:"hassChanged",value:function(t,e){e||this._madeFirstCall||this.filterChanged(this.filterType,this.entityId,this.startTime,this.endTime,this.cacheConfig)}},{key:"filterChanged",value:function(t,e,n,i,r){var a=this;if(this.hass){this._madeFirstCall=!0;var o=void 0;if("date"===t){if(!n||!i)return;o=this.getDate(n,i)}else{if("recent-entity"!==t)return;if(!e)return;o=r?this.getRecentWithCacheRefresh(e,r):this.getRecent(e,n,i)}this._setIsLoading(!0),o.then(function(t){a._setData(t),a._setIsLoading(!1)})}}},{key:"getEmptyCache",value:function(){return{prom:Promise.resolve({line:[],timeline:[]}),data:{line:[],timeline:[]}}}},{key:"getRecentWithCacheRefresh",value:function(t,e){var n=this;return this._refreshTimeoutId&&window.clearInterval(this._refreshTimeoutId),e.refresh&&(this._refreshTimeoutId=window.setInterval(function(){n.getRecentWithCache(t,e).then(function(t){n._setData(Object.assign({},t))})},1e3*e.refresh)),this.getRecentWithCache(t,e)}},{key:"mergeLine",value:function(t,e){t.forEach(function(t){var n=t.unit,i=e.find(function(t){return t.unit===n});i?t.data.forEach(function(t){var e=i.data.find(function(e){return t.entity_id===e.entity_id});e?e.states=e.state.concat(t.states):i.data.push(t)}):e.push(t)})}},{key:"mergeTimeline",value:function(t,e){t.forEach(function(t){var n=e.find(function(e){return e.entity_id===t.entity_id});n?n.data=n.data.concat(t.data):e.push(t)})}},{key:"pruneArray",value:function(t,e){if(0===e.length)return e;var n=e.findIndex(function(e){return new Date(e.last_changed)>t});if(0===n)return e;var i=-1===n?e.length-1:n-1;return e[i].last_changed=t,e.slice(i)}},{key:"pruneStartTime",value:function(t,e){var n=this;e.line.forEach(function(e){e.data.forEach(function(e){e.states=n.pruneArray(t,e.states)})}),e.timeline.forEach(function(e){e.data=n.pruneArray(t,e.data)})}},{key:"getRecentWithCache",value:function(t,e){var n=this,i=e.cacheKey,r=new Date,a=new Date(r);a.setHours(a.getHours()-e.hoursToShow);var o=a,s=!1,u=window.stateHistoryCache[i];if(u&&o>=u.startTime&&o<=u.endTime){if(o=u.endTime,s=!0,r<=u.endTime)return u.prom}else u=window.stateHistoryCache[i]=this.getEmptyCache();var c=Promise.all([u.prom,this.fetchRecent(t,o,r,s)]).then(function(t){return t[1]}).then(function(t){return computeHistory(t)}).then(function(t){return n.mergeLine(t.line,u.data.line),n.mergeTimeline(t.timeline,u.data.timeline),s&&n.pruneStartTime(a,u.data),u.data}).catch(function(){window.stateHistoryCache[i]=void 0});return u.prom=c,u.startTime=a,u.endTime=r,c}},{key:"getRecent",value:function(t,e,n){var i=t,r=RECENT_CACHE[i];if(r&&Date.now()-r.created<RECENT_THRESHOLD)return r.data;var a=this.fetchRecent(t,e,n).then(function(t){return computeHistory(t)},function(){return RECENT_CACHE[t]=!1,null});return RECENT_CACHE[i]={created:Date.now(),data:a},a}},{key:"fetchRecent",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r="history/period";return e&&(r+="/"+e.toISOString()),r+="?filter_entity_id="+t,n&&(r+="&end_time="+n.toISOString()),i&&(r+="&skip_initial_state"),this.hass.callApi("GET",r)}},{key:"getDate",value:function(t,e){var n=t.toISOString()+"?end_time="+e.toISOString();return this.hass.callApi("GET","history/period/"+n).then(function(t){return computeHistory(t)},function(){return null})}}],[{key:"is",get:function(){return"ha-state-history-data"}},{key:"properties",get:function(){return{hass:{type:Object,observer:"hassChanged"},filterType:String,cacheConfig:Object,startTime:Date,endTime:Date,entityId:String,isLoading:{type:Boolean,value:!0,readOnly:!0,notify:!0},data:{type:Object,value:null,readOnly:!0,notify:!0}}}},{key:"observers",get:function(){return["filterChanged(filterType, entityId, startTime, endTime, cacheConfig)"]}}]),e}();customElements.define(HaStateHistoryData.is,HaStateHistoryData);</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();window.hassMixins=window.hassMixins||{},window.hassMixins.EventsMixin=Polymer.dedupingMixin(function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,e),_createClass(n,[{key:"fire",value:function(e,t,n){n=n||{},t=null===t||void 0===t?{}:t;var o=new Event(e,{bubbles:void 0===n.bubbles||n.bubbles,cancelable:Boolean(n.cancelable),composed:void 0===n.composed||n.composed});return o.detail=t,(n.node||this).dispatchEvent(o),o}}]),n}()}),window.hassMixins.NavigateMixin=Polymer.dedupingMixin(function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,window.hassMixins.EventsMixin(e)),_createClass(n,[{key:"navigate",value:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?history.replaceState(null,null,e):history.pushState(null,null,e),this.fire("location-changed")}}]),n}()});</script><dom-module id="ha-history_graph-card" assetpath="cards/"><template><style>paper-card:not([dialog]) .content{padding:0 16px 16px;}paper-card{width:100%;}.header{@apply (--paper-font-headline);line-height:40px;color:var(--primary-text-color);padding:20px 16px 12px;@apply (--paper-font-common-nowrap);}paper-card[dialog] .header{padding-top:0;padding-left:0;}</style><ha-state-history-data hass="[[hass]]" filter-type="recent-entity" entity-id="[[computeHistoryEntities(stateObj)]]" data="{{stateHistory}}" is-loading="{{stateHistoryLoading}}" cache-config="[[computeCacheConfig(stateObj)]]"></ha-state-history-data><paper-card dialog$="[[inDialog]]" on-tap="cardTapped" elevation="[[computeElevation(inDialog)]]"><div class="header">[[computeTitle(stateObj)]]</div><div class="content"><state-history-charts history-data="[[stateHistory]]" is-loading-data="[[stateHistoryLoading]]" up-to-now="" no-single=""></state-history-charts></div></paper-card></template></dom-module><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),HaHistoryGraphCard=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return _inherits(e,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(e,[{key:"computeTitle",value:function(t){return window.hassUtil.computeStateName(t)}},{key:"computeContentClass",value:function(t){return t?"":"content"}},{key:"computeHistoryEntities",value:function(t){return t.attributes.entity_id}},{key:"computeCacheConfig",value:function(t){return{refresh:t.attributes.refresh||0,cacheKey:t.entity_id,hoursToShow:t&&t.attributes.hours_to_show||24}}},{key:"computeElevation",value:function(t){return t?0:1}},{key:"cardTapped",value:function(t){window.matchMedia("(min-width: 610px) and (min-height: 550px)").matches&&(t.stopPropagation(),this.fire("hass-more-info",{entityId:this.stateObj.entity_id}))}}],[{key:"is",get:function(){return"ha-history_graph-card"}},{key:"properties",get:function(){return{hass:Object,stateObj:Object,inDialog:{type:Boolean,value:!1},stateHistory:Object,stateHistoryLoading:Boolean}}}]),e}();customElements.define(HaHistoryGraphCard.is,HaHistoryGraphCard);</script><dom-module id="ha-introduction-card" assetpath="cards/"><template><style>:host{@apply (--paper-font-body1);}a{color:var(--dark-primary-color);}ul{margin:8px;padding-left:16px;}li{margin-bottom:8px;}.content{padding:0 16px 16px;}.install{display:block;line-height:1.5em;margin-top:8px;margin-bottom:16px;}</style><ha-card header="Welcome Home!"><div class="content"><template is="dom-if" if="[[hass.demo]]">To install Home Assistant, run:<br><code class="install">pip3 install homeassistant<br>hass --open-ui</code></template>Here are some resources to get you started.<ul><template is="dom-if" if="[[hass.demo]]"><li><a href="https://home-assistant.io/getting-started/">Home Assistant website</a></li><li><a href="https://home-assistant.io/getting-started/">Installation instructions</a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting/">Troubleshooting your installation</a></li></template><li><a href="https://home-assistant.io/getting-started/configuration/" target="_blank">Configuring Home Assistant </a></li><li><a href="https://home-assistant.io/components/" target="_blank">Available components </a></li><li><a href="https://home-assistant.io/getting-started/troubleshooting-configuration/" target="_blank">Troubleshooting your configuration</a></li><li><a href="https://home-assistant.io/help/" target="_blank">Ask the community for help </a></li></ul><template is="dom-if" if="[[showHideInstruction]]">To remove this card, edit your config in <code>configuration.yaml</code> and disable the <code>introduction</code> component.</template></div></ha-card></template></dom-module><script>Polymer({is:"ha-introduction-card",properties:{hass:{type:Object},showHideInstruction:{type:Boolean,value:!0}}});</script><script>!function(){function t(t,e){Object.defineProperty(window.MediaPlayerEntity.prototype,t,{get:e})}window.MediaPlayerEntity=function(t,e){this.hass=t,this.stateObj=e},t("isOff",function(){return"off"===this.stateObj.state}),t("isIdle",function(){return"idle"===this.stateObj.state}),t("isMuted",function(){return this.stateObj.attributes.is_volume_muted}),t("isPaused",function(){return"paused"===this.stateObj.state}),t("isPlaying",function(){return"playing"===this.stateObj.state}),t("isMusic",function(){return"music"===this.stateObj.attributes.media_content_type}),t("isTVShow",function(){return"tvshow"===this.stateObj.attributes.media_content_type}),t("hasMediaControl",function(){return-1!==["playing","paused","unknown"].indexOf(this.stateObj.state)}),t("volumeSliderValue",function(){return 100*this.stateObj.attributes.volume_level}),t("showProgress",function(){return(this.isPlaying||this.isPaused)&&"media_position"in this.stateObj.attributes&&"media_position_updated_at"in this.stateObj.attributes}),t("currentProgress",function(){return this.stateObj.attributes.media_position+(Date.now()-new Date(this.stateObj.attributes.media_position_updated_at))/1e3}),t("supportsPause",function(){return 0!=(1&this.stateObj.attributes.supported_features)}),t("supportsVolumeSet",function(){return 0!=(4&this.stateObj.attributes.supported_features)}),t("supportsVolumeMute",function(){return 0!=(8&this.stateObj.attributes.supported_features)}),t("supportsPreviousTrack",function(){return 0!=(16&this.stateObj.attributes.supported_features)}),t("supportsNextTrack",function(){return 0!=(32&this.stateObj.attributes.supported_features)}),t("supportsTurnOn",function(){return 0!=(128&this.stateObj.attributes.supported_features)}),t("supportsTurnOff",function(){return 0!=(256&this.stateObj.attributes.supported_features)}),t("supportsPlayMedia",function(){return 0!=(512&this.stateObj.attributes.supported_features)}),t("supportsVolumeButtons",function(){return 0!=(1024&this.stateObj.attributes.supported_features)}),t("supportsPlay",function(){return 0!=(16384&this.stateObj.attributes.supported_features)}),t("primaryText",function(){return this.stateObj.attributes.media_title||window.hassUtil.computeStateState(this.stateObj)}),t("secondaryText",function(){if(this.isMusic)return this.stateObj.attributes.media_artist;if(this.isTVShow){var t=this.stateObj.attributes.media_series_title;return this.stateObj.attributes.media_season&&(t+=" S"+this.stateObj.attributes.media_season,this.stateObj.attributes.media_episode&&(t+="E"+this.stateObj.attributes.media_episode)),t}return this.stateObj.attributes.app_name?this.stateObj.attributes.app_name:""}),Object.assign(window.MediaPlayerEntity.prototype,{mediaPlayPause:function(){this.callService("media_play_pause")},nextTrack:function(){this.callService("media_next_track")},playbackControl:function(){this.callService("media_play_pause")},previousTrack:function(){this.callService("media_previous_track")},setVolume:function(t){this.callService("volume_set",{volume_level:t})},togglePower:function(){this.isOff?this.turnOn():this.turnOff()},turnOff:function(){this.callService("turn_off")},turnOn:function(){this.callService("turn_on")},volumeDown:function(){this.callService("volume_down")},volumeMute:function(t){if(!this.supportsVolumeMute)throw new Error("Muting volume not supported");this.callService("volume_mute",{is_volume_muted:t})},volumeUp:function(){this.callService("volume_up")},callService:function(t,e){var s=e||{};s.entity_id=this.stateObj.entity_id,this.hass.callService("media_player",t,s)}})}();</script><dom-module id="ha-media_player-card" assetpath="cards/"><template><style include="paper-material iron-flex iron-flex-alignment iron-positioning">:host{display:block;position:relative;font-size:0px;border-radius:2px;overflow:hidden;}.banner{position:relative;background-color:white;border-top-left-radius:2px;border-top-right-radius:2px;}.banner:before{display:block;content:"";width:100%;padding-top:56%;transition:padding-top .8s;}.banner.no-cover{background-position:center center;background-image:url(/static/images/card_media_player_bg.png);background-repeat:no-repeat;background-color:var(--primary-color);}.banner.content-type-music:before{padding-top:100%;}.banner.no-cover:before{padding-top:88px;}.banner > .cover{position:absolute;top:0;left:0;right:0;bottom:0;border-top-left-radius:2px;border-top-right-radius:2px;background-position:center center;background-size:cover;transition:opacity .8s;opacity:1;}.banner.is-off > .cover{opacity:0;}.banner > .caption{@apply (--paper-font-caption);position:absolute;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, var(--dark-secondary-opacity));padding:8px 16px;font-size:14px;font-weight:500;color:white;transition:background-color .5s;}.banner.is-off > .caption{background-color:initial;}.banner > .caption .title{@apply (--paper-font-common-nowrap);font-size:1.2em;margin:8px 0 4px;}.progress{width:100%;--paper-progress-active-color:var(--accent-color);--paper-progress-container-color:#FFF;}.controls{position:relative;@apply (--paper-font-body1);padding:8px;border-bottom-left-radius:2px;border-bottom-right-radius:2px;background-color:var(--paper-card-background-color, white);}.controls paper-icon-button{width:44px;height:44px;}paper-icon-button{opacity:var(--dark-primary-opacity);}paper-icon-button[disabled]{opacity:var(--dark-disabled-opacity);}paper-icon-button.primary{width:56px !important;height:56px !important;background-color:var(--primary-color);color:white;border-radius:50%;padding:8px;transition:background-color .5s;}paper-icon-button.primary[disabled]{background-color:rgba(0, 0, 0, var(--dark-disabled-opacity));}[invisible]{visibility:hidden !important;}</style><div class$="[[computeBannerClasses(playerObj)]]"><div class="cover" id="cover"></div><div class="caption">[[computeStateName(stateObj)]]<div class="title">[[playerObj.primaryText]]</div>[[playerObj.secondaryText]]<br></div></div><paper-progress max="[[stateObj.attributes.media_duration]]" value="[[playbackPosition]]" hidden$="[[computeHideProgress(playerObj)]]" class="progress"></paper-progress><div class="controls layout horizontal justified"><paper-icon-button icon="mdi:power" on-tap="handleTogglePower" invisible$="[[computeHidePowerButton(playerObj)]]" class="self-center secondary"></paper-icon-button><div><paper-icon-button icon="mdi:skip-previous" invisible$="[[!playerObj.supportsPreviousTrack]]" disabled="[[playerObj.isOff]]" on-tap="handlePrevious"></paper-icon-button><paper-icon-button class="primary" icon="[[computePlaybackControlIcon(playerObj)]]" invisible$="[[!computePlaybackControlIcon(playerObj)]]" disabled="[[playerObj.isOff]]" on-tap="handlePlaybackControl"></paper-icon-button><paper-icon-button icon="mdi:skip-next" invisible$="[[!playerObj.supportsNextTrack]]" disabled="[[playerObj.isOff]]" on-tap="handleNext"></paper-icon-button></div><paper-icon-button icon="mdi:dots-vertical" on-tap="handleOpenMoreInfo" class="self-center secondary"></paper-icon-button></div></template></dom-module><script>Polymer({is:"ha-media_player-card",properties:{hass:{type:Object},stateObj:{type:Object},playerObj:{type:Object,computed:"computePlayerObj(hass, stateObj)",observer:"playerObjChanged"},playbackControlIcon:{type:String,computed:"computePlaybackControlIcon(playerObj)"},playbackPosition:{type:Number},elevation:{type:Number,value:1,reflectToAttribute:!0}},created:function(){this.updatePlaybackPosition=this.updatePlaybackPosition.bind(this)},playerObjChanged:function(t){var e,o=t.stateObj.attributes.entity_picture;o?((e=document.createElement("IMG")).onload=function(){this.$.cover.style.backgroundImage="url("+o+")",e.onerror=e.onload=null,e.src="",e=null}.bind(this),e.onerror=function(){this.$.cover.style.backgroundImage="",this.toggleClass("no-cover",!0,this.$.cover.parentElement),e.onerror=e.onload=null,e.src="",e=null}.bind(this),this._timeout_id&&clearTimeout(this._timeout_id),this._timeout_id=setTimeout(function(){e&&(this.$.cover.style.backgroundImage=""),this._timeout_id=null},5e3),e.src=o):this.$.cover.style.backgroundImage="",t.isPlaying?(this._positionTracking||(this._positionTracking=setInterval(this.updatePlaybackPosition,1e3)),this.updatePlaybackPosition()):this._positionTracking&&(clearInterval(this._positionTracking),this._positionTracking=null,this.playbackPosition=0)},updatePlaybackPosition:function(){this.playbackPosition=this.playerObj.currentProgress},computeBannerClasses:function(t){var e="banner";return t.isOff||t.isIdle?e+=" is-off no-cover":t.stateObj.attributes.entity_picture?"music"===t.stateObj.attributes.media_content_type&&(e+=" content-type-music"):e+=" no-cover",e},computeHideProgress:function(t){return!t.showProgress},computeHidePowerButton:function(t){return t.isOff?!t.supportsTurnOn:!t.supportsTurnOff},computePlayerObj:function(t,e){return new window.MediaPlayerEntity(t,e)},computePlaybackControlIcon:function(t){return t.isPlaying?t.supportsPause?"mdi:pause":"mdi:stop":t.isPaused||t.isOff||t.isIdle?t.supportsPlay?"mdi:play":null:""},computeStateName:function(t){return window.hassUtil.computeStateName(t)},handleNext:function(t){t.stopPropagation(),this.playerObj.nextTrack()},handleOpenMoreInfo:function(t){t.stopPropagation(),this.fire("hass-more-info",{entityId:this.stateObj.entity_id})},handlePlaybackControl:function(t){t.stopPropagation(),this.playerObj.mediaPlayPause()},handlePrevious:function(t){t.stopPropagation(),this.playerObj.previousTrack()},handleTogglePower:function(t){t.stopPropagation(),this.playerObj.togglePower()}});</script><dom-module id="ha-weather-card" assetpath="cards/"><template><style>.content{padding:0 16px 16px;}.attribution{color:var(--secondary-text-color);text-align:right;}.condicon{text-align:center;font-size:4em;}.condtemp{text-align:center;font-size:4em;}div.cond{display:inline;}div.conddetails{float:right;display:block table;overflow:auto;text-align:right;}span.line{display:block;}.condsmall{font-size:1em;}.clear{clear:both;}</style><google-legacy-loader on-api-load="googleApiLoaded"></google-legacy-loader><ha-card header="[[computeTitle(stateObj)]]"><div class="content"><div class="condpanel"><div class="cond condicon">[[nowCond]]</div><div class="cond condtemp">[[attr.temperature]]°</div><div class="cond conddetails"><div class="condsmall" hidden$="[[!attr.wind_speed]]">Wind: <span hidden$="[[!attr.wind_speed]]">[[attr.wind_speed]] </span><span hidden$="[[!windBearing]]">[[windBearing]]</span></div><div class="condsmall" hidden$="[[!attr.humidity]]">Humidity: [[attr.humidity]]%</div><div class="condsmall" hidden$="[[!attr.visibility]]">Visibility: [[attr.visibility]]</div></div><div class="clear"></div></div><div id="chart_id" hidden$="[[!attr.forecast]]"></div></div></ha-card></template></dom-module><script>!function(){"use strict";var t={cloudy:"☁️",fog:"🌫️",hail:"Hail",lightning:"🌩️","lightning-rainy":"⛈️",partlycloudy:"⛅️",pouring:"💧️",rainy:"🌧️",snowy:"🌨️","snowy-rainy":"🌨️",sunny:"☀️",windy:"🌬️","windy-variant":"🌬️",exceptional:"⭕️"},e=["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW","N"];Polymer({is:"ha-weather-card",properties:{hass:{type:Object},stateObj:{type:Object,observer:"checkRequirements"}},computeTitle:function(t){return t.attributes.friendly_name},getDataArray:function(){var e,i=[],a=this.stateObj.attributes.forecast;if(!this.stateObj.attributes.forecast)return[];for(e=0;e<a.length;e++){var n=a[e];n.condition?i.push([new Date(n.datetime),t[a[e].condition],n.temperature,n.templow]):i.push([new Date(n.datetime),null,n.temperature,n.templow])}return i},checkRequirements:function(){this.stateObj&&this.stateObj.attributes&&(this.attr=this.stateObj.attributes,this.nowCond=t[this.stateObj.state],this.windBearing=this.windBearingToText(this.attr.wind_bearing),window.google&&(this.chartEngine||(this.chartEngine=new window.google.visualization.LineChart(this.$.chart_id)),this.attr.forecast&&(this.data=this.getDataArray(),this.drawChart())))},drawChart:function(){var t=new window.google.visualization.DataTable,e={legend:{position:"top"},interpolateNulls:!0,titlePosition:"none",chartArea:{left:25,top:5,height:"100%",width:"90%",bottom:25},curveType:"function",focusTarget:"category",colors:["red","blue"],annotations:{textStyle:{fontSize:"24"}}};t.addColumn("datetime","Time"),t.addColumn({type:"string",role:"annotation"}),t.addColumn("number","Temperature"),t.addColumn("number","Temperature Low");var i=this.getDataArray();t.addRows(i),this.chartEngine.draw(t,e)},googleApiLoaded:function(){window.google.load("visualization","1",{packages:["corechart"],callback:function(){this.checkRequirements()}.bind(this)})},windBearingToText:function(t){var i=parseInt(t);return isFinite(i)?e[((i+11.25)/22.5|0)%16]:""}})}();</script><dom-module id="ha-persistent_notification-card" assetpath="cards/"><template><style>:host{@apply (--paper-font-body1);}.content{padding:0 16px 16px;-ms-user-select:initial;-webkit-user-select:initial;-moz-user-select:initial;}paper-button{margin:8px;font-weight:500;}</style><ha-card header="[[computeTitle(stateObj)]]"><div id="pnContent" class="content"></div><paper-button on-tap="dismissTap">DISMISS</paper-button></ha-card></template></dom-module><script>Polymer({is:"ha-persistent_notification-card",properties:{hass:{type:Object},stateObj:{type:Object},scriptLoaded:{type:Boolean,value:!1}},observers:["computeContent(stateObj, scriptLoaded)"],computeTitle:function(t){return t.attributes.title||window.hassUtil.computeStateName(t)},loadScript:function(){var t=function(){this.scriptLoaded=!0}.bind(this);this.importHref("/static/micromarkdown-js.html",t,function(){console.error("Micromarkdown was not loaded.")})},computeContent:function(t,e){var i="",o="";e&&(i=this.$.pnContent,o=window.micromarkdown.parse(t.state),i.innerHTML=o)},ready:function(){this.loadScript()},dismissTap:function(t){t.preventDefault(),this.hass.callApi("DELETE","states/"+this.stateObj.entity_id)}});</script><script>Polymer({is:"ha-card-chooser",properties:{cardData:{type:Object,observer:"cardDataChanged"}},cardDataChanged:function(a){a&&window.hassUtil.dynamicContentUpdater(this,"HA-"+a.cardType.toUpperCase()+"-CARD",a)}});</script><dom-module id="ha-cards" assetpath="components/"><template><style is="custom-style" include="iron-flex iron-flex-factors"></style><style>:host{display:block;padding-top:8px;padding-right:8px;}.badges{font-size:85%;text-align:center;}.column{max-width:500px;overflow-x:hidden;}.zone-card{margin-left:8px;margin-bottom:8px;}@media (max-width: 500px){:host{padding-right:0;}.zone-card{margin-left:0;}}@media (max-width: 599px){.column{max-width:600px;}}</style><div class="main"><template is="dom-if" if="[[cards.badges]]"><div class="badges"><template is="dom-if" if="[[cards.demo]]"><ha-demo-badge></ha-demo-badge></template><ha-badges-card states="[[cards.badges]]" hass="[[hass]]"></ha-badges-card></div></template><div class="horizontal layout center-justified"><template is="dom-repeat" items="[[cards.columns]]" as="column"><div class="column flex-1"><template is="dom-repeat" items="[[column]]" as="card"><div class="zone-card"><ha-card-chooser card-data="[[card]]" hass="[[hass]]"></ha-card-chooser></div></template></div></template></div></div></template></dom-module><script>!function(){"use strict";function t(t){return t in o?o[t]:100}function e(t,e){return t.priority-e.priority}function n(t,e){var n=(t.attributes.friendly_name||t.entity_id).toLowerCase(),s=(e.attributes.friendly_name||e.entity_id).toLowerCase();return n<s?-1:n>s?1:0}function s(t,s){Object.keys(t).map(function(e){return t[e]}).sort(e).forEach(function(t){t.states.sort(n),s(t)})}var i={camera:4,history_graph:4,media_player:3,persistent_notification:0,weather:4},o={configurator:-20,persistent_notification:-15,updater:0,sun:1,device_tracker:2,alarm_control_panel:3,sensor:5,binary_sensor:6,mailbox:7},r=window.hassUtil.computeDomain;Polymer({is:"ha-cards",properties:{hass:{type:Object},showIntroduction:{type:Boolean,value:!1},columns:{type:Number,value:2},states:{type:Object},panelVisible:{type:Boolean},viewVisible:{type:Boolean,value:!1},cards:{type:Object}},observers:["updateCards(columns, states, showIntroduction, panelVisible, viewVisible)"],updateCards:function(t,e,n,s,i){s&&i&&this.debounce("updateCards",function(){this.panelVisible&&this.viewVisible&&(this.cards=this.computeCards(t,e,n))}.bind(this),10)},computeCards:function(e,n,o){function a(t){var e=0;for(c=0;c<l.length;c++){if(l[c]<5){e=c;break}l[c]<l[e]&&(e=c)}return l[e]+=t,e}function u(t,e,n){var s,o,u,c;0!==e.length&&(s=[],o=[],u=0,e.forEach(function(t){var e=r(t);e in i?(s.push(t),u+=i[e]):(o.push(t),u++)}),u+=o.length>0,c=a(u),o.length>0&&d.columns[c].push({hass:p,cardType:"entities",states:o,groupEntity:n||!1}),s.forEach(function(t){d.columns[c].push({hass:p,cardType:r(t),stateObj:t})}))}var c,p=this.hass,d={demo:!1,badges:[],columns:[]},l=[];for(c=0;c<e;c++)d.columns.push([]),l.push(0);o&&d.columns[a(5)].push({hass:p,cardType:"introduction",showHideInstruction:n.size>0&&!window.HASS_DEMO});var h=window.HAWS.splitByGroups(n),f={},m={},y={};return Object.keys(h.ungrouped).forEach(function(e){var n=h.ungrouped[e],s=r(n);if("a"!==s){var i,o=t(s);s in(i=o<0?m:o<10?f:y)||(i[s]={domain:s,priority:o,states:[]}),i[s].states.push(n)}else d.demo=!0}),s(f,function(t){d.badges.push.apply(d.badges,t.states)}),s(m,function(t){u(t.domain,t.states)}),h.groups.forEach(function(t){var e=window.HAWS.getGroupEntities(n,t);u(t.entity_id,Object.keys(e).map(function(t){return e[t]}),t)}),s(y,function(t){u(t.domain,t.states)}),d.columns=d.columns.filter(function(t){return t.length>0}),d}})}();</script><dom-module id="partial-cards" assetpath="layouts/"><template><style include="iron-flex iron-positioning ha-style">:host{-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;}app-header-layout{background-color:var(--secondary-background-color, #E5E5E5);}paper-tabs{margin-left:12px;--paper-tabs-selection-bar-color:#FFF;text-transform:uppercase;}</style><app-route route="{{route}}" pattern="/:view" data="{{routeData}}" active="{{routeMatch}}"></app-route><app-header-layout has-scrolling-region="" id="layout"><app-header effects="waterfall" condenses="" fixed="" slot="header"><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button><div main-title="">[[computeTitle(views, locationName)]]</div><ha-start-voice-button hass="[[hass]]"></ha-start-voice-button></app-toolbar><div sticky="" hidden$="[[areTabsHidden(views, showTabs)]]"><paper-tabs scrollable="" selected="[[currentView]]" attr-for-selected="data-entity" on-iron-activate="handleViewSelected"><paper-tab data-entity="" on-tap="scrollToTop"><template is="dom-if" if="[[!defaultView]]">[[locationName]]</template><template is="dom-if" if="[[defaultView]]"><template is="dom-if" if="[[defaultView.attributes.icon]]"><iron-icon title$="[[computeStateName(defaultView)]]" icon="[[defaultView.attributes.icon]]"></iron-icon></template><template is="dom-if" if="[[!defaultView.attributes.icon]]">[[computeStateName(defaultView)]]</template></template></paper-tab><template is="dom-repeat" items="[[views]]"><paper-tab data-entity$="[[item.entity_id]]" on-tap="scrollToTop"><template is="dom-if" if="[[item.attributes.icon]]"><iron-icon title$="[[computeStateName(item)]]" icon="[[item.attributes.icon]]"></iron-icon></template><template is="dom-if" if="[[!item.attributes.icon]]">[[computeStateName(item)]]</template></paper-tab></template></paper-tabs></div></app-header><iron-pages attr-for-selected="data-view" selected="[[currentView]]" selected-attribute="view-visible"><ha-cards data-view="" show-introduction="[[computeShowIntroduction(currentView, introductionLoaded, viewStates)]]" states="[[viewStates]]" columns="[[_columns]]" hass="[[hass]]" panel-visible="[[panelVisible]]"></ha-cards><template is="dom-repeat" items="[[views]]"><ha-cards data-view$="[[item.entity_id]]" states="[[viewStates]]" columns="[[_columns]]" hass="[[hass]]" panel-visible="[[panelVisible]]"></ha-cards></template></iron-pages></app-header-layout></template></dom-module><script>Polymer({DEFAULT_VIEW_ENTITY_ID:"group.default_view",ALWAYS_SHOW_DOMAIN:["persistent_notification","configurator"],is:"partial-cards",properties:{hass:{type:Object,value:null,observer:"hassChanged"},narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,observer:"handleWindowChange"},panelVisible:{type:Boolean,value:!1},route:Object,routeData:Object,routeMatch:Boolean,_columns:{type:Number,value:1},introductionLoaded:{type:Boolean,computed:"computeIntroductionLoaded(hass)"},locationName:{type:String,value:"",computed:"computeLocationName(hass)"},currentView:{type:String,computed:"_computeCurrentView(routeMatch, routeData)"},views:{type:Array},defaultView:{type:Object},viewStates:{type:Object,computed:"computeViewStates(currentView, hass, defaultView)"},showTabs:{type:Boolean,value:!1}},created:function(){this.handleWindowChange=this.handleWindowChange.bind(this),this.mqls=[300,600,900,1200].map(function(t){var e=window.matchMedia("(min-width: "+t+"px)");return e.addListener(this.handleWindowChange),e}.bind(this))},detached:function(){this.mqls.forEach(function(t){t.removeListener(this.handleWindowChange)})},handleWindowChange:function(){var t=this.mqls.reduce(function(t,e){return t+e.matches},0);this._columns=Math.max(1,t-(!this.narrow&&this.showMenu))},areTabsHidden:function(t,e){return!t||!t.length||!e},scrollToTop:function(){var t=this.$.layout.header.scrollTarget,e=function(t,e,n,i){return t/=i,-n*t*(t-2)+e},n=Math.random(),i=Date.now(),a=t.scrollTop,o=0-a;this._currentAnimationId=n,function s(){var r=Date.now()-i;r>200?t.scrollTop=0:this._currentAnimationId===n&&(t.scrollTop=e(r,a,o,200),requestAnimationFrame(s.bind(this)))}.call(this)},handleViewSelected:function(t){var e=t.detail.item.getAttribute("data-entity")||null;if(e!==this.currentView){var n="/states";e&&(n+="/"+e),history.pushState(null,null,n),this.fire("location-changed")}},_computeCurrentView:function(t,e){return t?e.view:""},computeTitle:function(t,e){return t&&t.length>0?"Home Assistant":e},computeShowIntroduction:function(t,e,n){return""===t&&(e||0===n.size)},computeStateName:function(t){return t.entity_id===this.DEFAULT_VIEW_ENTITY_ID?t.attributes.friendly_name&&"default_view"!==t.attributes.friendly_name?t.attributes.friendly_name:this.computeLocationName(this.hass):window.hassUtil.computeStateName(t)},computeLocationName:function(t){return window.hassUtil.computeLocationName(t)},computeIntroductionLoaded:function(t){return window.hassUtil.isComponentLoaded(t,"introduction")},hassChanged:function(t){if(t){var e=window.HAWS.extractViews(t.states);e.length>0&&e[0].entity_id===this.DEFAULT_VIEW_ENTITY_ID?this.defaultView=e.shift():this.defaultView=null,this.views=e}},computeViewStates:function(t,e,n){var i,a,o,s,r=Object.keys(e.states);if(!t&&!n){for(s={},i=0;i<r.length;i++)a=r[i],(o=e.states[a]).attributes.hidden||(s[a]=o);return s}for(s=t?window.HAWS.getViewEntities(e.states,e.states[t]):window.HAWS.getViewEntities(e.states,e.states[this.DEFAULT_VIEW_ENTITY_ID]),i=0;i<r.length;i++)a=r[i],o=e.states[a],-1!==this.ALWAYS_SHOW_DOMAIN.indexOf(window.hassUtil.computeDomain(o))&&(s[a]=o);return s}});</script><dom-module id="hass-loading-screen" assetpath="layouts/"><template><style include="iron-flex ha-style">.placeholder{height:100%;}.layout{height:calc(100% - 64px);}</style><div class="placeholder"><app-toolbar><ha-menu-button narrow="[[narrow]]" show-menu="[[showMenu]]"></ha-menu-button><div main-title="">[[title]]</div></app-toolbar><div class="layout horizontal center-center"><paper-spinner active=""></paper-spinner></div></div></template></dom-module><script>Polymer({is:"hass-loading-screen",properties:{narrow:{type:Boolean,value:!1},showMenu:{type:Boolean,value:!1},title:{type:String,value:""}}});</script><dom-module id="partial-panel-resolver" assetpath="layouts/"><template><style>[hidden]{display:none !important;}</style><app-route route="{{route}}" pattern="/:panel" data="{{routeData}}" tail="{{routeTail}}"></app-route><template is="dom-if" if="[[!resolved]]"><hass-loading-screen narrow="[[narrow]]" show-menu="[[showMenu]]"></hass-loading-screen></template><span id="panel" hidden$="[[!resolved]]"></span></template></dom-module><script>Polymer({is:"partial-panel-resolver",properties:{hass:{type:Object,observer:"updateAttributes"},narrow:{type:Boolean,value:!1,observer:"updateAttributes"},showMenu:{type:Boolean,value:!1,observer:"updateAttributes"},route:Object,routeData:Object,routeTail:{type:Object,observer:"updateAttributes"},resolved:{type:Boolean,value:!1},errorLoading:{type:Boolean,value:!1},panel:{type:Object,computed:"computeCurrentPanel(hass, routeData)",observer:"panelChanged"}},computeCurrentPanel:function(e,t){return t?e.config.panels[t.panel]:null},panelChanged:function(e){e?(this.resolved=!1,this.errorLoading=!1,this.importHref(e.url,function(){window.hassUtil.dynamicContentUpdater(this.$.panel,"ha-panel-"+e.component_name,{hass:this.hass,narrow:this.narrow,showMenu:this.showMenu,route:this.routeTail,panel:e}),this.resolved=!0}.bind(this),function(){this.errorLoading=!0}.bind(this),!0)):this.$.panel.lastChild&&this.$.panel.removeChild(this.$.panel.lastChild)},updateAttributes:function(){var e=Polymer.dom(this.$.panel).lastChild;e&&(e.hass=this.hass,e.narrow=this.narrow,e.showMenu=this.showMenu,e.route=this.routeTail)}});</script><script>!function(){"use strict";Polymer.PaperDialogBehaviorImpl={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(i,e){e&&(i?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(i){this.closingReason=this.closingReason||{},this.closingReason.confirmed=i},_onDialogClick:function(i){for(var e=Polymer.dom(i).path,o=0,t=e.indexOf(this);o<t;o++){var n=e[o];if(n.hasAttribute&&(n.hasAttribute("dialog-dismiss")||n.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(n.hasAttribute("dialog-confirm")),this.close(),i.stopPropagation();break}}}},Polymer.PaperDialogBehavior=[Polymer.IronOverlayBehavior,Polymer.PaperDialogBehaviorImpl]}();</script><dom-module id="paper-dialog-shared-styles" assetpath="../bower_components/paper-dialog-behavior/"><template><style>:host{display:block;margin:24px 40px;background:var(--paper-dialog-background-color, var(--primary-background-color));color:var(--paper-dialog-color, var(--primary-text-color));@apply --paper-font-body1;@apply --shadow-elevation-16dp;@apply --paper-dialog;}:host > ::slotted(*){margin-top:20px;padding:0 24px;}:host > ::slotted(.no-padding){padding:0;}:host > ::slotted(h2){position:relative;margin:0;@apply --paper-font-title;@apply --paper-dialog-title;}:host > ::slotted(*:first-child){margin-top:24px;}:host > ::slotted(*:last-child){margin-bottom:24px;}:host > ::slotted(.buttons){position:relative;padding:8px 8px 8px 24px;margin:0;color:var(--paper-dialog-button-color, var(--primary-color));@apply --layout-horizontal;@apply --layout-end-justified;}</style></template></dom-module><dom-module id="paper-dialog" assetpath="../bower_components/paper-dialog/"><template><style include="paper-dialog-shared-styles"></style><slot></slot></template></dom-module><script>!function(){"use strict";Polymer({is:"paper-dialog",behaviors:[Polymer.PaperDialogBehavior,Polymer.NeonAnimationRunnerBehavior],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}();</script><dom-module id="paper-dialog-scrollable" assetpath="../bower_components/paper-dialog-scrollable/"><template><style>:host{display:block;@apply --layout-relative;}:host(.is-scrolled:not(:first-child))::before{content:'';position:absolute;top:0;left:0;right:0;height:1px;background:var(--divider-color);}:host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after{content:'';position:absolute;bottom:0;left:0;right:0;height:1px;background:var(--divider-color);}.scrollable{padding:0 24px;@apply --layout-scroll;@apply --paper-dialog-scrollable;}.fit{@apply --layout-fit;}</style><div id="scrollable" class="scrollable" on-scroll="updateScrollState"><slot></slot></div></template></dom-module><script>Polymer({is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(Polymer.PaperDialogBehaviorImpl)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});</script><dom-module id="more-info-alarm_control_panel" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><div class="layout horizontal"><paper-input label="code" value="{{enteredCode}}" pattern="[[codeFormat]]" type="password" hidden$="[[!codeInputVisible]]" disabled="[[!codeInputEnabled]]"></paper-input></div><div class="layout horizontal"><paper-button on-tap="handleDisarmTap" hidden$="[[!disarmButtonVisible]]" disabled="[[!codeValid]]">Disarm</paper-button><paper-button on-tap="handleHomeTap" hidden$="[[!armHomeButtonVisible]]" disabled="[[!codeValid]]">Arm Home</paper-button><paper-button on-tap="handleAwayTap" hidden$="[[!armAwayButtonVisible]]" disabled="[[!codeValid]]">Arm Away</paper-button></div></template></dom-module><script>Polymer({is:"more-info-alarm_control_panel",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""},disarmButtonVisible:{type:Boolean,value:!1},armHomeButtonVisible:{type:Boolean,value:!1},armAwayButtonVisible:{type:Boolean,value:!1},codeInputVisible:{type:Boolean,value:!1},codeInputEnabled:{type:Boolean,value:!1},codeFormat:{type:String,value:""},codeValid:{type:Boolean,computed:"validateCode(enteredCode, codeFormat)"}},validateCode:function(e,t){var a=new RegExp(t);return null===t||a.test(e)},stateObjChanged:function(e,t){e&&(this.codeFormat=e.attributes.code_format,this.codeInputVisible=null!==this.codeFormat,this.codeInputEnabled="armed_home"===e.state||"armed_away"===e.state||"disarmed"===e.state||"pending"===e.state||"triggered"===e.state,this.disarmButtonVisible="armed_home"===e.state||"armed_away"===e.state||"pending"===e.state||"triggered"===e.state,this.armHomeButtonVisible="disarmed"===e.state,this.armAwayButtonVisible="disarmed"===e.state),t&&this.async(function(){this.fire("iron-resize")}.bind(this),500)},handleDisarmTap:function(){this.callService("alarm_disarm",{code:this.enteredCode})},handleHomeTap:function(){this.callService("alarm_arm_home",{code:this.enteredCode})},handleAwayTap:function(){this.callService("alarm_arm_away",{code:this.enteredCode})},callService:function(e,t){var a=t||{};a.entity_id=this.stateObj.entity_id,this.hass.callService("alarm_control_panel",e,a).then(function(){this.enteredCode=""}.bind(this))}});</script><dom-module id="more-info-automation" assetpath="more-infos/"><template><style>paper-button{color:var(--primary-color);font-weight:500;top:3px;height:37px;}</style><p>Last triggered:<ha-relative-time datetime="[[stateObj.attributes.last_triggered]]"></ha-relative-time></p><paper-button on-tap="handleTriggerTapped">TRIGGER</paper-button></template></dom-module><script>Polymer({is:"more-info-automation",properties:{hass:{type:Object},stateObj:{type:Object}},handleTriggerTapped:function(){this.hass.callService("automation","trigger",{entity_id:this.stateObj.entity_id})}});</script><dom-module id="more-info-camera" assetpath="more-infos/"><template><style>:host{max-width:640px;}.camera-image{width:100%;}</style><img class="camera-image" src="[[computeCameraImageUrl(hass, stateObj, isVisible)]]" on-load="imageLoaded" alt="[[computeStateName(stateObj)]]"></template></dom-module><script>Polymer({is:"more-info-camera",properties:{hass:{type:Object},stateObj:{type:Object},isVisible:{type:Boolean,value:!0}},imageLoaded:function(){this.fire("iron-resize")},computeStateName:function(e){return window.hassUtil.computeStateName(e)},computeCameraImageUrl:function(e,t,a){return e.demo?"/demo/webcam.jpg":t&&a?"/api/camera_proxy_stream/"+t.entity_id+"?token="+t.attributes.access_token:"data:image/gif;base64,R0lGODlhAQABAAAAACw="}});</script><dom-module id="ha-climate-control" assetpath="components/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{@apply (--layout-flex);@apply (--layout-horizontal);@apply (--layout-justified);}.target-temperature{@apply (--layout-self-center);font-size:200%;}.control-buttons{font-size:200%;text-align:right;}paper-icon-button{height:48px;width:48px;}</style><div class="target-temperature">[[value]] [[units]]</div><div class="control-buttons"><div><paper-icon-button icon="mdi:chevron-up" on-tap="incrementValue"></paper-icon-button></div><div><paper-icon-button icon="mdi:chevron-down" on-tap="decrementValue"></paper-icon-button></div></div></template><script>Polymer({is:"ha-climate-control",properties:{value:{type:Number,observer:"valueChanged"},units:{type:String},min:{type:Number},max:{type:Number},step:{type:Number,value:1}},incrementValue:function(){var e=this.value+this.step;this.last_changed=Date.now(),e<=this.max?this.value=e:this.value=this.max},decrementValue:function(){var e=this.value-this.step;this.last_changed=Date.now(),e>=this.min?this.value=e:this.value=this.min},valueChanged:function(){this.last_changed&&window.setTimeout(function(e){Date.now()-e.last_changed>=2e3&&(e.fire("change"),e.last_changed=null)},2010,this)}});</script></dom-module><dom-module id="more-info-climate" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>:host{color:var(--primary-text-color);--paper-input-container-input:{text-transform:capitalize;};}.container-away_mode,
.container-aux_heat,
.container-temperature,
.container-humidity,
.container-operation_list,
.container-fan_list,
.container-swing_list{display:none;}.has-away_mode .container-away_mode,
.has-aux_heat .container-aux_heat,
.has-temperature .container-temperature,
.has-humidity .container-humidity,
.has-operation_list .container-operation_list,
.has-fan_list .container-fan_list,
.has-swing_list .container-swing_list{display:block;}.container-operation_list iron-icon,
.container-fan_list iron-icon,
.container-swing_list iron-icon{margin:22px 16px 0 0;}paper-dropdown-menu{width:100%;}paper-item{cursor:pointer;}paper-slider{width:100%;}.auto paper-slider{--paper-slider-active-color:var(--paper-orange-400);--paper-slider-secondary-color:var(--paper-blue-400);}.heat paper-slider{--paper-slider-active-color:var(--paper-orange-400);--paper-slider-secondary-color:var(--paper-green-400);}.cool paper-slider{--paper-slider-active-color:var(--paper-green-400);--paper-slider-secondary-color:var(--paper-blue-400);}.humidity{--paper-slider-active-color:var(--paper-blue-400);--paper-slider-secondary-color:var(--paper-blue-400);}.single-row{padding:8px 0;}.capitalize{text-transform:capitalize;}</style><div class$="[[computeClassNames(stateObj)]]"><div class="container-temperature"><div class$="single-row, [[stateObj.attributes.operation_mode]]"><div hidden$="[[computeTargetTempHidden(stateObj)]]">Target Temperature</div><ha-climate-control value="[[stateObj.attributes.temperature]]" units="[[stateObj.attributes.unit_of_measurement]]" step="[[computeTemperatureStepSize(stateObj)]]" min="[[stateObj.attributes.min_temp]]" max="[[stateObj.attributes.max_temp]]" on-change="targetTemperatureChanged"></ha-climate-control></div></div><div class="container-humidity"><div class="single-row"><div>Target Humidity</div><paper-slider class="humidity" min="[[stateObj.attributes.min_humidity]]" max="[[stateObj.attributes.max_humidity]]" secondary-progress="[[stateObj.attributes.max_humidity]]" step="1" pin="" value="[[stateObj.attributes.humidity]]" on-change="targetHumiditySliderChanged"></paper-slider></div></div><div class="container-operation_list"><div class="controls"><paper-dropdown-menu label-float="" label="Operation"><paper-listbox slot="dropdown-content" selected="{{operationIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.operation_list]]"><paper-item class="capitalize">[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div></div><div class="container-fan_list"><paper-dropdown-menu label-float="" label="Fan Mode"><paper-listbox slot="dropdown-content" selected="{{fanIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.fan_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div><div class="container-swing_list"><paper-dropdown-menu label-float="" label="Swing Mode"><paper-listbox slot="dropdown-content" selected="{{swingIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.swing_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div><div class="container-away_mode"><div class="center horizontal layout single-row"><div class="flex">Away Mode</div><paper-toggle-button checked="[[awayToggleChecked]]" on-change="awayToggleChanged"></paper-toggle-button></div></div><div class="container-aux_heat"><div class="center horizontal layout single-row"><div class="flex">Aux Heat</div><paper-toggle-button checked="[[auxToggleChecked]]" on-change="auxToggleChanged"></paper-toggle-button></div></div></div></template></dom-module><script>Polymer({is:"more-info-climate",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},operationIndex:{type:Number,value:-1,observer:"handleOperationmodeChanged"},fanIndex:{type:Number,value:-1,observer:"handleFanmodeChanged"},swingIndex:{type:Number,value:-1,observer:"handleSwingmodeChanged"},awayToggleChecked:{type:Boolean},auxToggleChecked:{type:Boolean}},stateObjChanged:function(t,e){this.awayToggleChecked="on"===t.attributes.away_mode,this.auxToggleChecked="on"===t.attributes.aux_heat,t.attributes.fan_list?this.fanIndex=t.attributes.fan_list.indexOf(t.attributes.fan_mode):this.fanIndex=-1,t.attributes.operation_list?this.operationIndex=t.attributes.operation_list.indexOf(t.attributes.operation_mode):this.operationIndex=-1,t.attributes.swing_list?this.swingIndex=t.attributes.swing_list.indexOf(t.attributes.swing_mode):this.swingIndex=-1,e&&this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeTemperatureStepSize:function(t){return t.attributes.target_temp_step?t.attributes.target_temp_step:-1!==t.attributes.unit_of_measurement.indexOf("F")?1:.5},computeTargetTempHidden:function(t){return!t.attributes.temperature&&!t.attributes.target_temp_low&&!t.attributes.target_temp_high},computeHideTempRangeSlider:function(t){return!t.attributes.target_temp_low&&!t.attributes.target_temp_high},computeHideTempSlider:function(t){return!t.attributes.temperature},computeClassNames:function(t){return"more-info-climate "+window.hassUtil.attributeClassNames(t,["away_mode","aux_heat","temperature","humidity","operation_list","fan_list","swing_list"])},targetTemperatureChanged:function(t){var e=t.target.value;e!==this.stateObj.attributes.temperature&&this.callServiceHelper("set_temperature",{temperature:e})},targetTemperatureRangeSliderChanged:function(t){var e=t.currentTarget.valueMin,a=t.currentTarget.valueMax;e===this.stateObj.attributes.target_temp_low&&a===this.stateObj.attributes.target_temp_high||this.callServiceHelper("set_temperature",{target_temp_low:e,target_temp_high:a})},targetHumiditySliderChanged:function(t){var e=t.target.value;e!==this.stateObj.attributes.humidity&&this.callServiceHelper("set_humidity",{humidity:e})},awayToggleChanged:function(t){var e="on"===this.stateObj.attributes.away_mode,a=t.target.checked;e!==a&&this.callServiceHelper("set_away_mode",{away_mode:a})},auxToggleChanged:function(t){var e="on"===this.stateObj.attributes.aux_heat,a=t.target.checked;e!==a&&this.callServiceHelper("set_aux_heat",{aux_heat:a})},handleFanmodeChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.fan_list[t])!==this.stateObj.attributes.fan_mode&&this.callServiceHelper("set_fan_mode",{fan_mode:e})},handleOperationmodeChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.operation_list[t])!==this.stateObj.attributes.operation_mode&&this.callServiceHelper("set_operation_mode",{operation_mode:e})},handleSwingmodeChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.swing_list[t])!==this.stateObj.attributes.swing_mode&&this.callServiceHelper("set_swing_mode",{swing_mode:e})},callServiceHelper:function(t,e){e.entity_id=this.stateObj.entity_id,this.hass.callService("climate",t,e).then(function(){this.stateObjChanged(this.stateObj)}.bind(this))}});</script><dom-module id="more-info-configurator" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>p{margin:8px 0;}p > img{max-width:100%;}p.center{text-align:center;}p.error{color:#C62828;}p.submit{text-align:center;height:41px;}paper-spinner{width:14px;height:14px;margin-right:20px;}[hidden]{display:none;}</style><div class="layout vertical"><template is="dom-if" if="[[isConfigurable]]"><p hidden$="[[!stateObj.attributes.description]]">[[stateObj.attributes.description]]</p><p hidden$="[[!stateObj.attributes.link_url]]"><a href="[[stateObj.attributes.link_url]]" target="_blank">[[stateObj.attributes.link_name]]</a></p><p></p><p class="error" hidden$="[[!stateObj.attributes.errors]]">[[stateObj.attributes.errors]]</p><p class="center" hidden$="[[!stateObj.attributes.description_image]]"><img src="[[stateObj.attributes.description_image]]"></p><template is="dom-repeat" items="[[stateObj.attributes.fields]]"><paper-input label="[[item.name]]" name="[[item.id]]" type="[[item.type]]" on-change="fieldChanged"></paper-input></template><p class="submit" hidden$="[[!stateObj.attributes.submit_caption]]"><paper-button raised="" disabled="[[isConfiguring]]" on-tap="submitClicked"><paper-spinner active="[[isConfiguring]]" hidden="[[!isConfiguring]]" alt="Configuring"></paper-spinner>[[stateObj.attributes.submit_caption]]</paper-button></p></template></div></template></dom-module><script>Polymer({is:"more-info-configurator",properties:{stateObj:{type:Object},action:{type:String,value:"display"},isConfigurable:{type:Boolean,computed:"computeIsConfigurable(stateObj)"},isConfiguring:{type:Boolean,value:!1},fieldInput:{type:Object,value:function(){return{}}}},computeIsConfigurable:function(i){return"configure"===i.state},fieldChanged:function(i){var t=i.target;this.fieldInput[t.name]=t.value},submitClicked:function(){var i={configure_id:this.stateObj.attributes.configure_id,fields:this.fieldInput};this.isConfiguring=!0,this.hass.callService("configurator","configure",i).then(function(){this.isConfiguring=!1}.bind(this),function(){this.isConfiguring=!1}.bind(this))}});</script><dom-module id="more-info-cover" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.current_position, .tilt{max-height:0px;overflow:hidden;}.has-current_position .current_position,
.has-set_tilt_position .tilt,
.has-current_tilt_position .tilt{max-height:90px;}[invisible]{visibility:hidden !important;}</style><div class$="[[computeClassNames(stateObj)]]"><div class="current_position"><div>Position</div><paper-slider min="0" max="100" value="{{coverPositionSliderValue}}" step="1" pin="" disabled="[[!entityObj.supportsSetPosition]]" on-change="coverPositionSliderChanged"></paper-slider></div><div class="tilt"><div>Tilt position</div><div><ha-cover-tilt-controls hidden$="[[entityObj.isTiltOnly]]" hass="[[hass]]" state-obj="[[stateObj]]"></ha-cover-tilt-controls></div><paper-slider min="0" max="100" value="{{coverTiltPositionSliderValue}}" step="1" pin="" disabled="[[!entityObj.supportsSetTiltPosition]]" on-change="coverTiltPositionSliderChanged"></paper-slider></div></div></template></dom-module><script>Polymer({is:"more-info-cover",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},entityObj:{type:Object,computed:"computeEntityObj(hass, stateObj)"},coverPositionSliderValue:{type:Number},coverTiltPositionSliderValue:{type:Number}},computeEntityObj:function(t,e){return new window.CoverEntity(t,e)},stateObjChanged:function(t){this.coverPositionSliderValue=t.attributes.current_position,this.coverTiltPositionSliderValue=t.attributes.current_tilt_position},featureClassNames:{128:"has-set_tilt_position"},computeClassNames:function(t){return[window.hassUtil.attributeClassNames(t,["current_position","current_tilt_position"]),window.hassUtil.featureClassNames(t,this.featureClassNames)].join(" ")},coverPositionSliderChanged:function(t){this.entityObj.setCoverPosition(t.target.value)},coverTiltPositionSliderChanged:function(t){this.entityObj.setCoverTiltPosition(t.target.value)}});</script><script>window.hassAttributeUtil=window.hassAttributeUtil||{},window.hassAttributeUtil.DOMAIN_DEVICE_CLASS={binary_sensor:["connectivity","light","moisture","motion","occupancy","opening","sound","vibration","gas","power","safety","smoke","cold","heat","moving"],cover:["garage"]},window.hassAttributeUtil.UNKNOWN_TYPE="json",window.hassAttributeUtil.ADD_TYPE="key-value",window.hassAttributeUtil.TYPE_TO_TAG={string:"ha-customize-string",json:"ha-customize-string",icon:"ha-customize-icon",boolean:"ha-customize-boolean",array:"ha-customize-array","key-value":"ha-customize-key-value"},window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES=window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES||{entity_picture:void 0,friendly_name:{type:"string",description:"Name"},icon:{type:"icon"},emulated_hue:{type:"boolean",domains:["emulated_hue"]},emulated_hue_name:{type:"string",domains:["emulated_hue"]},haaska_hidden:void 0,haaska_name:void 0,homebridge_hidden:{type:"boolean"},homebridge_name:{type:"string"},supported_features:void 0,attribution:void 0,custom_ui_state_card:{type:"string"},device_class:{type:"array",options:window.hassAttributeUtil.DOMAIN_DEVICE_CLASS,description:"Device class",domains:["binary_sensor","cover"]},hidden:{type:"boolean",description:"Hide from UI"},assumed_state:{type:"boolean",domains:["switch","light","cover","climate","fan","group"]},initial_state:{type:"string",domains:["automation"]},unit_of_measurement:{type:"string"}};</script><dom-module id="ha-attributes" assetpath="components/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.data-entry .value{max-width:200px;}.attribution{color:var(--secondary-text-color);text-align:right;}</style><div class="layout vertical"><template is="dom-repeat" items="[[computeDisplayAttributes(stateObj, filtersArray)]]" as="attribute"><div class="data-entry layout justified horizontal"><div class="key">[[formatAttribute(attribute)]]</div><div class="value">[[formatAttributeValue(stateObj, attribute)]]</div></div></template><div class="attribution" hidden$="[[!computeAttribution(stateObj)]]">[[computeAttribution(stateObj)]]</div></div></template></dom-module><script>!function(){"use strict";Polymer({is:"ha-attributes",properties:{stateObj:{type:Object},extraFilters:{type:String,value:""},filtersArray:{type:Array,computed:"computeFiltersArray(extraFilters)"}},computeFiltersArray:function(t){return Object.keys(window.hassAttributeUtil.LOGIC_STATE_ATTRIBUTES)+(t?t.split(","):[])},computeDisplayAttributes:function(t,r){return t?Object.keys(t.attributes).filter(function(t){return-1===r.indexOf(t)}):[]},formatAttribute:function(t){return t.replace(/_/g," ")},formatAttributeValue:function(t,r){var e=t.attributes[r];return Array.isArray(e)?e.join(", "):e instanceof Object?JSON.stringify(e,null,2):e},computeAttribution:function(t){return t.attributes.attribution}})}();</script><dom-module id="more-info-default" assetpath="more-infos/"><template><ha-attributes state-obj="[[stateObj]]"></ha-attributes></template></dom-module><script>Polymer({is:"more-info-default",properties:{stateObj:{type:Object}}});</script><dom-module id="more-info-fan" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.container-speed_list,
.container-direction,
.container-oscillating{display:none;}.has-speed_list .container-speed_list,
.has-direction .container-direction,
.has-oscillating .container-oscillating{display:block;}paper-item{cursor:pointer;}</style><div class$="[[computeClassNames(stateObj)]]"><div class="container-speed_list"><paper-dropdown-menu label-float="" label="Speed"><paper-listbox slot="dropdown-content" selected="{{speedIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.speed_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div><div class="container-oscillating"><div class="center horizontal layout single-row"><div class="flex">Oscillate</div><paper-toggle-button checked="[[oscillationToggleChecked]]" on-change="oscillationToggleChanged"></paper-toggle-button></div></div><div class="container-direction"><div class="direction"><div>Direction</div><paper-icon-button icon="mdi:rotate-left" on-tap="onDirectionLeft" title="Left" disabled="[[computeIsRotatingLeft(stateObj)]]"></paper-icon-button><paper-icon-button icon="mdi:rotate-right" on-tap="onDirectionRight" title="Right" disabled="[[computeIsRotatingRight(stateObj)]]"></paper-icon-button></div></div></div></template></dom-module><script>Polymer({is:"more-info-fan",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},speedIndex:{type:Number,value:-1,observer:"speedChanged"},oscillationToggleChecked:{type:Boolean}},stateObjChanged:function(t,e){this.oscillationToggleChecked=t.attributes.oscillating,t.attributes.speed_list?this.speedIndex=t.attributes.speed_list.indexOf(t.attributes.speed):this.speedIndex=-1,e&&this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeClassNames:function(t){return"more-info-fan "+window.hassUtil.attributeClassNames(t,["oscillating","speed_list","direction"])},speedChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.speed_list[t])!==this.stateObj.attributes.speed&&this.hass.callService("fan","turn_on",{entity_id:this.stateObj.entity_id,speed:e})},oscillationToggleChanged:function(t){var e=this.stateObj.attributes.oscillating,i=t.target.checked;e!==i&&this.hass.callService("fan","oscillate",{entity_id:this.stateObj.entity_id,oscillating:i})},onDirectionLeft:function(){this.hass.callService("fan","set_direction",{entity_id:this.stateObj.entity_id,direction:"left"})},onDirectionRight:function(){this.hass.callService("fan","set_direction",{entity_id:this.stateObj.entity_id,direction:"right"})},computeIsRotatingLeft:function(t){return"left"===t.attributes.direction},computeIsRotatingRight:function(t){return"right"===t.attributes.direction}});</script><dom-module id="more-info-history_graph" assetpath="more-infos/"><template><style>:host{display:block;margin-bottom:6px;}</style><ha-history_graph-card hass="[[hass]]" state-obj="[[stateObj]]" in-dialog=""><ha-attributes state-obj="[[stateObj]]"></ha-attributes></ha-history_graph-card></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),MoreInfoHistoryGraph=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,null,[{key:"is",get:function(){return"more-info-history_graph"}},{key:"properties",get:function(){return{hass:Object,stateObj:Object}}}]),t}();customElements.define(MoreInfoHistoryGraph.is,MoreInfoHistoryGraph);</script><dom-module id="more-info-group" assetpath="more-infos/"><template><style>.child-card{margin-bottom:8px;}.child-card:last-child{margin-bottom:0;}</style><div id="groupedControlDetails"></div><template is="dom-repeat" items="[[states]]" as="state"><div class="child-card"><state-card-content state-obj="[[state]]" hass="[[hass]]"></state-card-content></div></template></template></dom-module><script>Polymer({is:"more-info-group",properties:{hass:{type:Object},stateObj:{type:Object},states:{type:Array,computed:"computeStates(stateObj, hass)"}},observers:["statesChanged(stateObj, states)"],computeStates:function(t,e){for(var s=[],a=t.attributes.entity_id,i=0;i<a.length;i++){var o=e.states[a[i]];o&&s.push(o)}return s},statesChanged:function(t,e){var s,a,i,o,r=!1;if(e&&e.length>0){s=e[0],r=Object.assign({},s,{entity_id:t.entity_id,attributes:Object.assign({},s.attributes)});var n=window.hassUtil.computeDomain(r);for(a=0;a<e.length;a++)if(i=e[a],n!==window.hassUtil.computeDomain(i)){r=!1;break}}r?window.hassUtil.dynamicContentUpdater(this.$.groupedControlDetails,"MORE-INFO-"+window.hassUtil.stateMoreInfoType(r).toUpperCase(),{stateObj:r,hass:this.hass}):(o=Polymer.dom(this.$.groupedControlDetails)).lastChild&&o.removeChild(o.lastChild)}});</script><dom-module id="ha-labeled-slider" assetpath="components/"><template><style>:host{display:block;padding-bottom:16px;}.title{margin-bottom:16px;opacity:var(--dark-primary-opacity);}iron-icon{float:left;margin-top:4px;opacity:var(--dark-secondary-opacity);}.slider-container{margin-left:24px;}paper-slider{background-image:var(--ha-slider-background);}</style><div class="title">[[caption]]</div><iron-icon icon="[[icon]]"></iron-icon><div class="slider-container"><paper-slider min="[[min]]" max="[[max]]" value="{{value}}"></paper-slider></div></template></dom-module><script>Polymer({is:"ha-labeled-slider",properties:{caption:{type:String},icon:{type:String},min:{type:Number},max:{type:Number},value:{type:Number,notify:!0}}});</script><dom-module id="ha-color-picker" assetpath="components/"><template><style>canvas{cursor:crosshair;}</style><canvas width="[[width]]" height="[[height]]" id="canvas"></canvas></template></dom-module><script>Polymer({is:"ha-color-picker",properties:{color:{type:Object},width:{type:Number},height:{type:Number}},listeners:{mousedown:"onMouseDown",mouseup:"onMouseUp",touchstart:"onTouchStart",touchend:"onTouchEnd"},onMouseDown:function(t){this.onMouseMove(t),this.addEventListener("mousemove",this.onMouseMove)},onMouseUp:function(){this.removeEventListener("mousemove",this.onMouseMove)},onTouchStart:function(t){this.onTouchMove(t),this.addEventListener("touchmove",this.onTouchMove)},onTouchEnd:function(){this.removeEventListener("touchmove",this.onTouchMove)},onTouchMove:function(t){this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t.touches[0]),this.async(function(){this.mouseMoveIsThrottled=!0}.bind(this),100))},onMouseMove:function(t){this.mouseMoveIsThrottled&&(this.mouseMoveIsThrottled=!1,this.processColorSelect(t),this.async(function(){this.mouseMoveIsThrottled=!0}.bind(this),100))},processColorSelect:function(t){var o=this.canvas.getBoundingClientRect();t.clientX<o.left||t.clientX>=o.left+o.width||t.clientY<o.top||t.clientY>=o.top+o.height||this.onColorSelect(t.clientX-o.left,t.clientY-o.top)},onColorSelect:function(t,o){var e=this.context.getImageData(t,o,1,1).data;this.setColor({r:e[0],g:e[1],b:e[2]})},setColor:function(t){this.color=t,this.fire("colorselected",{rgb:this.color})},ready:function(){this.setColor=this.setColor.bind(this),this.mouseMoveIsThrottled=!0,this.canvas=this.$.canvas,this.context=this.canvas.getContext("2d"),this.drawGradient()},drawGradient:function(){var t,o,e,s,i;this.width&&this.height||(t=getComputedStyle(this)),o=this.width||parseInt(t.width,10),e=this.height||parseInt(t.height,10),(s=this.context.createLinearGradient(0,0,o,0)).addColorStop(0,"rgb(255,0,0)"),s.addColorStop(.16,"rgb(255,0,255)"),s.addColorStop(.32,"rgb(0,0,255)"),s.addColorStop(.48,"rgb(0,255,255)"),s.addColorStop(.64,"rgb(0,255,0)"),s.addColorStop(.8,"rgb(255,255,0)"),s.addColorStop(1,"rgb(255,0,0)"),this.context.fillStyle=s,this.context.fillRect(0,0,o,e),(i=this.context.createLinearGradient(0,0,0,e)).addColorStop(0,"rgba(255,255,255,1)"),i.addColorStop(.5,"rgba(255,255,255,0)"),i.addColorStop(.5,"rgba(0,0,0,0)"),i.addColorStop(1,"rgba(0,0,0,1)"),this.context.fillStyle=i,this.context.fillRect(0,0,o,e)}});</script><dom-module id="more-info-light" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex"></style><style>.effect_list{padding-bottom:16px;}.effect_list, .brightness, .color_temp, .white_value{max-height:0px;overflow:hidden;transition:max-height .5s ease-in;}.color_temp{--ha-slider-background:-webkit-linear-gradient(right, rgb(255, 160, 0) 0%, white 50%, rgb(166, 209, 255) 100%);}ha-color-picker{display:block;width:250px;max-height:0px;overflow:hidden;transition:max-height .2s ease-in;}.has-effect_list .effect_list,
.has-brightness .brightness,
.has-color_temp .color_temp,
.has-white_value .white_value{max-height:84px;}.has-rgb_color ha-color-picker{max-height:200px;}paper-item{cursor:pointer;}</style><div class$="[[computeClassNames(stateObj)]]"><div class="effect_list"><paper-dropdown-menu label-float="" label="Effect"><paper-listbox slot="dropdown-content" selected="{{effectIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.effect_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div><div class="brightness"><ha-labeled-slider caption="Brightness" icon="mdi:brightness-5" max="255" value="{{brightnessSliderValue}}" on-change="brightnessSliderChanged"></ha-labeled-slider></div><div class="color_temp"><ha-labeled-slider caption="Color Temperature" icon="mdi:thermometer" min="[[stateObj.attributes.min_mireds]]" max="[[stateObj.attributes.max_mireds]]" value="{{ctSliderValue}}" on-change="ctSliderChanged"></ha-labeled-slider></div><div class="white_value"><ha-labeled-slider caption="White Value" icon="mdi:file-word-box" max="255" value="{{wvSliderValue}}" on-change="wvSliderChanged"></ha-labeled-slider></div><ha-color-picker on-colorselected="colorPicked" height="200" width="250"></ha-color-picker><ha-attributes state-obj="[[stateObj]]" extra-filters="brightness,color_temp,white_value,effect_list,effect,rgb_color,xy_color,min_mireds,max_mireds"></ha-attributes></div></template></dom-module><script>Polymer({is:"more-info-light",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},effectIndex:{type:Number,value:-1,observer:"effectChanged"},brightnessSliderValue:{type:Number,value:0},ctSliderValue:{type:Number,value:0},wvSliderValue:{type:Number,value:0}},stateObjChanged:function(t,e){t&&"on"===t.state?(this.brightnessSliderValue=t.attributes.brightness,this.ctSliderValue=t.attributes.color_temp,this.wvSliderValue=t.attributes.white_value,t.attributes.effect_list?this.effectIndex=t.attributes.effect_list.indexOf(t.attributes.effect):this.effectIndex=-1):this.brightnessSliderValue=0,e&&this.async(function(){this.fire("iron-resize")}.bind(this),500)},featureClassNames:{1:"has-brightness"},computeClassNames:function(t){var e=[window.hassUtil.attributeClassNames(t,["color_temp","white_value","effect_list"]),window.hassUtil.featureClassNames(t,this.featureClassNames)];return t.attributes.supported_features&&0!=(16&t.attributes.supported_features)&&t.attributes.rgb_color&&e.push("has-rgb_color"),e.join(" ")},effectChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.effect_list[t])!==this.stateObj.attributes.effect&&this.hass.callService("light","turn_on",{entity_id:this.stateObj.entity_id,effect:e})},brightnessSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||(0===e?this.hass.callService("light","turn_off",{entity_id:this.stateObj.entity_id}):this.hass.callService("light","turn_on",{entity_id:this.stateObj.entity_id,brightness:e}))},ctSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||this.hass.callService("light","turn_on",{entity_id:this.stateObj.entity_id,color_temp:e})},wvSliderChanged:function(t){var e=parseInt(t.target.value,10);isNaN(e)||this.hass.callService("light","turn_on",{entity_id:this.stateObj.entity_id,white_value:e})},serviceChangeColor:function(t,e,i){t.callService("light","turn_on",{entity_id:e,rgb_color:[i.r,i.g,i.b]})},colorPicked:function(t){this.skipColorPicked?this.colorChanged=!0:(this.color=t.detail.rgb,this.serviceChangeColor(this.hass,this.stateObj.entity_id,this.color),this.colorChanged=!1,this.skipColorPicked=!0,this.colorDebounce=setTimeout(function(){this.colorChanged&&this.serviceChangeColor(this.hass,this.stateObj.entity_id,this.color),this.skipColorPicked=!1}.bind(this),500))}});</script><dom-module id="more-info-lock" assetpath="more-infos/"><template><style>paper-input{display:inline-block;}</style><div hidden$="[[!stateObj.attributes.code_format]]"><paper-input label="code" value="{{enteredCode}}" pattern="[[stateObj.attributes.code_format]]" type="password"></paper-input><paper-button on-tap="handleUnlockTap" hidden$="[[!isLocked]]">Unlock</paper-button><paper-button on-tap="handleLockTap" hidden$="[[isLocked]]">Lock</paper-button></div><ha-attributes state-obj="[[stateObj]]" extra-filters="code_format"></ha-attributes></template></dom-module><script>Polymer({is:"more-info-lock",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},enteredCode:{type:String,value:""}},handleUnlockTap:function(){this.callService("unlock",{code:this.enteredCode})},handleLockTap:function(){this.callService("lock",{code:this.enteredCode})},stateObjChanged:function(e){e&&(this.isLocked="locked"===e.state)},callService:function(e,t){var c=t||{};c.entity_id=this.stateObj.entity_id,this.hass.callService("lock",e,c)}});</script><dom-module id="more-info-media_player" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>.media-state{text-transform:capitalize;}paper-icon-button[highlight]{color:var(--accent-color);}.volume{margin-bottom:8px;max-height:0px;overflow:hidden;transition:max-height .5s ease-in;}.has-volume_level .volume{max-height:40px;}iron-icon.source-input{padding:7px;margin-top:15px;}paper-dropdown-menu.source-input{margin-left:10px;}[hidden]{display:none !important;}paper-item{cursor:pointer;}</style><div class$="[[computeClassNames(stateObj)]]"><div class="layout horizontal"><div class="flex"><paper-icon-button icon="mdi:power" highlight$="[[isOff]]" on-tap="handleTogglePower" hidden$="[[computeHidePowerButton(isOff, supportsTurnOn, supportsTurnOff)]]"></paper-icon-button></div><div><template is="dom-if" if="[[computeShowPlaybackControls(isOff, hasMediaControl)]]"><paper-icon-button icon="mdi:skip-previous" on-tap="handlePrevious" hidden$="[[!supportsPreviousTrack]]"></paper-icon-button><paper-icon-button icon="[[computePlaybackControlIcon(stateObj)]]" on-tap="handlePlaybackControl" hidden$="[[!computePlaybackControlIcon(stateObj)]]" highlight=""></paper-icon-button><paper-icon-button icon="mdi:skip-next" on-tap="handleNext" hidden$="[[!supportsNextTrack]]"></paper-icon-button></template></div></div><div class="volume_buttons center horizontal layout" hidden$="[[computeHideVolumeButtons(isOff, supportsVolumeButtons)]]"><paper-icon-button on-tap="handleVolumeTap" icon="mdi:volume-off"></paper-icon-button><paper-icon-button id="volumeDown" disabled$="[[isMuted]]" on-mousedown="handleVolumeDown" on-touchstart="handleVolumeDown" icon="mdi:volume-medium"></paper-icon-button><paper-icon-button id="volumeUp" disabled$="[[isMuted]]" on-mousedown="handleVolumeUp" on-touchstart="handleVolumeUp" icon="mdi:volume-high"></paper-icon-button></div><div class="volume center horizontal layout" hidden$="[[!supportsVolumeSet]]"><paper-icon-button on-tap="handleVolumeTap" hidden$="[[supportsVolumeButtons]]" icon="[[computeMuteVolumeIcon(isMuted)]]"></paper-icon-button><paper-slider disabled$="[[isMuted]]" min="0" max="100" value="[[volumeSliderValue]]" on-change="volumeSliderChanged" class="flex"></paper-slider></div><div class="controls layout horizontal justified" hidden$="[[computeHideSelectSource(isOff, supportsSelectSource)]]"><iron-icon class="source-input" icon="mdi:login-variant"></iron-icon><paper-dropdown-menu class="flex source-input" label-float="" label="Source"><paper-listbox slot="dropdown-content" selected="{{sourceIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.source_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu></div><div hidden$="[[computeHideTTS(ttsLoaded, supportsPlayMedia)]]" class="layout horizontal end"><paper-input id="ttsInput" label="Text to speak" class="flex" value="{{ttsMessage}}" on-keydown="ttsCheckForEnter"></paper-input><paper-icon-button icon="mdi:send" on-tap="sendTTS"></paper-icon-button></div></div></template></dom-module><script>Polymer({is:"more-info-media_player",properties:{ttsLoaded:{type:Boolean,computed:"computeTTSLoaded(hass)"},hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"},isOff:{type:Boolean,value:!1},isPlaying:{type:Boolean,value:!1},isMuted:{type:Boolean,value:!1},source:{type:String,value:""},sourceIndex:{type:Number,value:0,observer:"handleSourceChanged"},volumeSliderValue:{type:Number,value:0},ttsMessage:{type:String,value:""},supportsPause:{type:Boolean,value:!1},supportsVolumeSet:{type:Boolean,value:!1},supportsVolumeMute:{type:Boolean,value:!1},supportsPreviousTrack:{type:Boolean,value:!1},supportsNextTrack:{type:Boolean,value:!1},supportsTurnOn:{type:Boolean,value:!1},supportsTurnOff:{type:Boolean,value:!1},supportsPlayMedia:{type:Boolean,value:!1},supportsVolumeButtons:{type:Boolean,value:!1},supportsSelectSource:{type:Boolean,value:!1},supportsPlay:{type:Boolean,value:!1},hasMediaControl:{type:Boolean,value:!1}},HAS_MEDIA_STATES:["playing","paused","unknown"],stateObjChanged:function(e,t){e&&(this.isOff="off"===e.state,this.isPlaying="playing"===e.state,this.hasMediaControl=-1!==this.HAS_MEDIA_STATES.indexOf(e.state),this.volumeSliderValue=100*e.attributes.volume_level,this.isMuted=e.attributes.is_volume_muted,this.source=e.attributes.source,this.supportsPause=0!=(1&e.attributes.supported_features),this.supportsVolumeSet=0!=(4&e.attributes.supported_features),this.supportsVolumeMute=0!=(8&e.attributes.supported_features),this.supportsPreviousTrack=0!=(16&e.attributes.supported_features),this.supportsNextTrack=0!=(32&e.attributes.supported_features),this.supportsTurnOn=0!=(128&e.attributes.supported_features),this.supportsTurnOff=0!=(256&e.attributes.supported_features),this.supportsPlayMedia=0!=(512&e.attributes.supported_features),this.supportsVolumeButtons=0!=(1024&e.attributes.supported_features),this.supportsSelectSource=0!=(2048&e.attributes.supported_features),this.supportsPlay=0!=(16384&e.attributes.supported_features),void 0!==e.attributes.source_list&&(this.sourceIndex=e.attributes.source_list.indexOf(this.source))),t&&this.async(function(){this.fire("iron-resize")}.bind(this),500)},computeClassNames:function(e){return window.hassUtil.attributeClassNames(e,["volume_level"])},computeIsOff:function(e){return"off"===e.state},computeMuteVolumeIcon:function(e){return e?"mdi:volume-off":"mdi:volume-high"},computeHideVolumeButtons:function(e,t){return!t||e},computeShowPlaybackControls:function(e,t){return!e&&t},computePlaybackControlIcon:function(){return this.isPlaying?this.supportsPause?"mdi:pause":"mdi:stop":this.supportsPlay?"mdi:play":null},computeHidePowerButton:function(e,t,s){return e?!t:!s},computeHideSelectSource:function(e,t){return e||!t},computeSelectedSource:function(e){return e.attributes.source_list.indexOf(e.attributes.source)},computeHideTTS:function(e,t){return!e||!t},computeTTSLoaded:function(e){return window.hassUtil.isComponentLoaded(e,"tts")},handleTogglePower:function(){this.callService(this.isOff?"turn_on":"turn_off")},handlePrevious:function(){this.callService("media_previous_track")},handlePlaybackControl:function(){this.callService("media_play_pause")},handleNext:function(){this.callService("media_next_track")},handleSourceChanged:function(e,t){var s;!this.stateObj||void 0===this.stateObj.attributes.source_list||e<0||e>=this.stateObj.attributes.source_list.length||void 0===t||(s=this.stateObj.attributes.source_list[e])!==this.stateObj.attributes.source&&this.callService("select_source",{source:s})},handleVolumeTap:function(){this.supportsVolumeMute&&this.callService("volume_mute",{is_volume_muted:!this.isMuted})},handleVolumeUp:function(){var e=this.$.volumeUp;this.handleVolumeWorker("volume_up",e,!0)},handleVolumeDown:function(){var e=this.$.volumeDown;this.handleVolumeWorker("volume_down",e,!0)},handleVolumeWorker:function(e,t,s){(s||void 0!==t&&t.pointerDown)&&(this.callService(e),this.async(function(){this.handleVolumeWorker(e,t,!1)}.bind(this),500))},volumeSliderChanged:function(e){var t=parseFloat(e.target.value),s=t>0?t/100:0;this.callService("volume_set",{volume_level:s})},ttsCheckForEnter:function(e){13===e.keyCode&&this.sendTTS()},sendTTS:function(){var e,t,s=this.hass.config.services.tts,u=Object.keys(s).sort();for(t=0;t<u.length;t++)if(-1!==u[t].indexOf("_say")){e=u[t];break}e&&(this.hass.callService("tts",e,{entity_id:this.stateObj.entity_id,message:this.ttsMessage}),this.ttsMessage="",this.$.ttsInput.focus())},callService:function(e,t){var s=t||{};s.entity_id=this.stateObj.entity_id,this.hass.callService("media_player",e,s)}});</script><dom-module id="more-info-script" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><div class="layout vertical"><div class="data-entry layout justified horizontal"><div class="key">Last Action</div><div class="value">[[stateObj.attributes.last_action]]</div></div></div></template></dom-module><script>Polymer({is:"more-info-script",properties:{stateObj:{type:Object}}});</script><dom-module id="more-info-sun" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><template is="dom-repeat" items="[[computeOrder(risingDate, settingDate)]]"><div class="data-entry layout justified horizontal"><div class="key"><span>[[itemCaption(item)]]</span><ha-relative-time datetime-obj="[[itemDate(item)]]"></ha-relative-time></div><div class="value">[[itemValue(item)]]</div></div></template><div class="data-entry layout justified horizontal"><div class="key">Elevation</div><div class="value">[[stateObj.attributes.elevation]]</div></div></template></dom-module><script>Polymer({is:"more-info-sun",properties:{stateObj:{type:Object},risingDate:{type:Object,computed:"computeRising(stateObj)"},settingDate:{type:Object,computed:"computeSetting(stateObj)"}},computeRising:function(t){return new Date(t.attributes.next_rising)},computeSetting:function(t){return new Date(t.attributes.next_setting)},computeOrder:function(t,e){return t>e?["set","ris"]:["ris","set"]},itemCaption:function(t){return"ris"===t?"Rising ":"Setting "},itemDate:function(t){return"ris"===t?this.risingDate:this.settingDate},itemValue:function(t){return window.hassUtil.formatTime(this.itemDate(t))}});</script><dom-module id="more-info-updater" assetpath="more-infos/"><template><style>.link{color:#03A9F4;}</style><div><a class="link" href="https://home-assistant.io/getting-started/updating/" target="_blank">Update Instructions</a></div></template></dom-module><script>Polymer({is:"more-info-updater",properties:{stateObj:{type:Object}},computeReleaseNotes:function(t){return t.attributes.release_notes||"https://home-assistant.io/getting-started/updating/"}});</script><dom-module id="more-info-vacuum" assetpath="more-infos/"><template><style is="custom-style" include="iron-flex iron-flex-alignment"></style><style>:host{@apply (--paper-font-body1);line-height:1.5;}.status-subtitle{color:var(--secondary-text-color);}paper-item{cursor:pointer;}</style><div class="horizontal justified layout"><div hidden$="[[!supportsStatus(stateObj)]]"><span class="status-subtitle">Status: </span><span><strong>[[stateObj.attributes.status]]</strong></span></div><div hidden$="[[!supportsBattery(stateObj)]]"><span><iron-icon icon="[[stateObj.attributes.battery_icon]]"></iron-icon>[[stateObj.attributes.battery_level]] %</span></div></div><div hidden$="[[!supportsCommandBar(stateObj)]]"><p></p><div class="status-subtitle">Vacuum cleaner commands:</div><div class="horizontal justified layout"><div hidden$="[[!supportsPause(stateObj)]]"><paper-icon-button icon="mdi:play-pause" on-tap="onPlayPause" title="Start/Pause"></paper-icon-button></div><div hidden$="[[!supportsStop(stateObj)]]"><paper-icon-button icon="mdi:stop" on-tap="onStop" title="Stop"></paper-icon-button></div><div hidden$="[[!supportsCleanSpot(stateObj)]]"><paper-icon-button icon="mdi:broom" on-tap="onCleanSpot" title="Clean spot"></paper-icon-button></div><div hidden$="[[!supportsLocate(stateObj)]]"><paper-icon-button icon="mdi:map-marker" on-tap="onLocate" title="Locate"></paper-icon-button></div><div hidden$="[[!supportsReturnHome(stateObj)]]"><paper-icon-button icon="mdi:home-map-marker" on-tap="onReturnHome" title="Return home"></paper-icon-button></div></div></div><div hidden$="[[!supportsFanSpeed(stateObj)]]"><div class="horizontal justified layout"><paper-dropdown-menu label-float="" label="Fan speed"><paper-listbox slot="dropdown-content" selected="{{fanSpeedIndex}}"><template is="dom-repeat" items="[[stateObj.attributes.fan_speed_list]]"><paper-item>[[item]]</paper-item></template></paper-listbox></paper-dropdown-menu><div style="justify-content: center; align-self: center; padding-top: 1.3em"><span><iron-icon icon="mdi:fan"></iron-icon>[[stateObj.attributes.fan_speed]]</span></div></div><p></p></div><ha-attributes state-obj="[[stateObj]]" extra-filters="fan_speed,fan_speed_list,status,battery_level,battery_icon"></ha-attributes></template></dom-module><script>Polymer({is:"more-info-vacuum",properties:{hass:{type:Object},inDialog:{type:Boolean,value:!1},stateObj:{type:Object},fanSpeedIndex:{type:Number,value:-1,observer:"fanSpeedChanged"}},supportsPause:function(t){return 0!=(4&t.attributes.supported_features)},supportsStop:function(t){return 0!=(8&t.attributes.supported_features)},supportsReturnHome:function(t){return 0!=(16&t.attributes.supported_features)},supportsFanSpeed:function(t){return 0!=(32&t.attributes.supported_features)},supportsBattery:function(t){return 0!=(64&t.attributes.supported_features)},supportsStatus:function(t){return 0!=(128&t.attributes.supported_features)},supportsLocate:function(t){return 0!=(512&t.attributes.supported_features)},supportsCleanSpot:function(t){return 0!=(1024&t.attributes.supported_features)},supportsCommandBar:function(t){return 0!=(4&t.attributes.supported_features)|0!=(8&t.attributes.supported_features)|0!=(16&t.attributes.supported_features)|0!=(512&t.attributes.supported_features)|0!=(1024&t.attributes.supported_features)},fanSpeedChanged:function(t){var e;""!==t&&-1!==t&&(e=this.stateObj.attributes.fan_speed_list[t])!==this.stateObj.attributes.fan_speed&&this.hass.callService("vacuum","set_fan_speed",{entity_id:this.stateObj.entity_id,fan_speed:e})},onStop:function(){this.hass.callService("vacuum","stop",{entity_id:this.stateObj.entity_id})},onPlayPause:function(){this.hass.callService("vacuum","start_pause",{entity_id:this.stateObj.entity_id})},onLocate:function(){this.hass.callService("vacuum","locate",{entity_id:this.stateObj.entity_id})},onCleanSpot:function(){this.hass.callService("vacuum","clean_spot",{entity_id:this.stateObj.entity_id})},onReturnHome:function(){this.hass.callService("vacuum","return_to_base",{entity_id:this.stateObj.entity_id})}});</script><script>Polymer({is:"more-info-content",properties:{hass:{type:Object},stateObj:{type:Object,observer:"stateObjChanged"}},created:function(){this.style.display="block"},stateObjChanged:function(t){var s;t?window.hassUtil.dynamicContentUpdater(this,"MORE-INFO-"+window.hassUtil.stateMoreInfoType(t).toUpperCase(),{hass:this.hass,stateObj:t,isVisible:!0}):(s=Polymer.dom(this)).lastChild&&(s.lastChild.isVisible=!1)}});</script><dom-module id="more-info-dialog" assetpath="dialogs/"><template><style>paper-dialog{font-size:14px;width:365px;border-radius:2px;}paper-dialog[data-domain=camera]{width:auto;}paper-dialog[data-domain=history_graph]{width:90%;}paper-dialog[data-domain=history_graph] h2{display:none;}state-history-charts{position:relative;z-index:1;max-width:365px;}state-card-content{margin-bottom:24px;font-size:14px;}@media all and (max-width: 450px), all and (max-height: 500px){paper-dialog{margin:0;width:100%;max-height:calc(100% - 64px);position:fixed !important;bottom:0px;left:0px;right:0px;overflow:scroll;border-bottom-left-radius:0px;border-bottom-right-radius:0px;}paper-dialog[data-domain=history_graph]{width:100%;}}dom-if{display:none;}</style><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}" data-domain$="[[computeDomain(stateObj)]]"><h2><state-card-content state-obj="[[stateObj]]" hass="[[hass]]" in-dialog=""></state-card-content></h2><template is="dom-if" if="[[showHistoryComponent]]" restamp=""><div><ha-state-history-data hass="[[hass]]" filter-type="recent-entity" entity-id="[[stateObj.entity_id]]" data="{{stateHistory}}" is-loading="{{stateHistoryLoading}}" cache-config="[[computeCacheConfig(stateObj)]]"></ha-state-history-data><state-history-charts history-data="[[stateHistory]]" is-loading-data="[[isLoadingHistoryData]]" up-to-now=""></state-history-charts></div></template><paper-dialog-scrollable id="scrollable"><more-info-content state-obj="[[stateObj]]" hass="[[hass]]"></more-info-content></paper-dialog-scrollable></paper-dialog></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),_get=function e(t,o,n){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,o);if(void 0===i){var r=Object.getPrototypeOf(t);return null===r?void 0:e(r,o,n)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(n)},MoreInfoDialog=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(t,[{key:"connectedCallback",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this.$.scrollable.dialogElement=this.$.dialog}},{key:"computeDomain",value:function(e){return e?window.hassUtil.computeDomain(e):""}},{key:"computeStateObj",value:function(e){return e.states[e.moreInfoEntityId]||null}},{key:"computeCacheConfig",value:function(e){return{refresh:60,cacheKey:"more_info."+e.entity_id,hoursToShow:24}}},{key:"computeIsLoadingHistoryData",value:function(e,t){return!e||t}},{key:"computeHasHistoryComponent",value:function(e){return window.hassUtil.isComponentLoaded(e,"history")}},{key:"computeShowHistoryComponent",value:function(e,t){return this.hasHistoryComponent&&t&&-1===window.hassUtil.DOMAINS_WITH_NO_HISTORY.indexOf(window.hassUtil.computeDomain(t))}},{key:"stateObjChanged",value:function(e){var t=this;e?window.setTimeout(function(){t.dialogOpen=!0},10):this.dialogOpen=!1}},{key:"dialogOpenChanged",value:function(e){var t=this;e?window.setTimeout(function(){t.delayedDialogOpen=!0},100):!e&&this.stateObj&&(this.fire("hass-more-info",{entityId:null}),this.delayedDialogOpen=!1)}}],[{key:"is",get:function(){return"more-info-dialog"}},{key:"properties",get:function(){return{hass:Object,stateObj:{type:Object,computed:"computeStateObj(hass)",observer:"stateObjChanged"},stateHistory:Object,stateHistoryLoading:Boolean,isLoadingHistoryData:{type:Boolean,computed:"computeIsLoadingHistoryData(delayedDialogOpen, stateHistoryLoading)"},hasHistoryComponent:{type:Boolean,computed:"computeHasHistoryComponent(hass)"},showHistoryComponent:{type:Boolean,value:!1,computed:"computeShowHistoryComponent(hasHistoryComponent, stateObj)"},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},delayedDialogOpen:{type:Boolean,value:!1}}}}]),t}();customElements.define(MoreInfoDialog.is,MoreInfoDialog);</script><dom-module id="ha-voice-command-dialog" assetpath="dialogs/"><template><style>iron-icon{margin-right:8px;}.content{width:450px;min-height:80px;font-size:18px;}.messages{max-height:50vh;overflow:auto;}.messages::after{content:"";clear:both;display:block;}.message{clear:both;margin:8px 0;padding:8px;border-radius:15px;}.message.user{margin-left:24px;float:right;text-align:right;border-bottom-right-radius:0px;background-color:var(--light-primary-color);color:var(--primary-text-color);}.message.hass{margin-right:24px;float:left;border-bottom-left-radius:0px;background-color:var(--primary-color);color:var(--text-primary-color);}.message.error{background-color:var(--google-red-500);color:var(--text-primary-color);}.icon{text-align:center;}.icon paper-icon-button{height:52px;width:52px;}.interimTranscript{color:darkgrey;}[hidden]{display:none;}paper-dialog{border-radius:2px;}@media all and (max-width: 450px){paper-dialog{margin:0;width:100%;max-height:calc(100% - 64px);position:fixed !important;bottom:0px;left:0px;right:0px;overflow:scroll;border-bottom-left-radius:0px;border-bottom-right-radius:0px;}.content{width:auto;}.messages{max-height:68vh;}}</style><paper-dialog id="dialog" with-backdrop="" opened="{{dialogOpen}}"><div class="content"><div class="messages" id="messages"><template is="dom-repeat" items="[[_conversation]]" as="message"><div class$="[[_computeMessageClasses(message)]]">[[message.text]]</div></template></div><template is="dom-if" if="[[results]]"><div class="messages"><div class="message user"><span>{{results.final}}</span> <span class="interimTranscript">[[results.interim]]</span></div></div></template><div class="icon" hidden$="[[results]]"><paper-icon-button icon="mdi:text-to-speech" on-tap="startListening"></paper-icon-button></div></div></paper-dialog></template></dom-module><script>Polymer({is:"ha-voice-command-dialog",properties:{hass:{type:Object},dialogOpen:{type:Boolean,value:!1,observer:"dialogOpenChanged"},results:{type:Object,value:null,observer:"_scrollMessagesBottom"},_conversation:{type:Array,value:function(){return[{who:"hass",text:"How can I help?"}]},observer:"_scrollMessagesBottom"}},initRecognition:function(){this.recognition=new webkitSpeechRecognition,this.recognition.onstart=function(){this.results={final:"",interim:""}}.bind(this),this.recognition.onerror=function(){this.recognition.abort();var s=this.results.final||this.results.interim;this.results=null,""===s&&(s="<Home Assistant did not hear anything>"),this.push("_conversation",{who:"user",text:s,error:!0})}.bind(this),this.recognition.onend=function(){if(null!=this.results){var s=this.results.final||this.results.interim;this.results=null,this.push("_conversation",{who:"user",text:s}),this.hass.callApi("post","conversation/process",{text:s}).then(function(s){this.push("_conversation",{who:"hass",text:s.speech.plain.speech})}.bind(this),function(){this.set(["_conversation",this._conversation.length-1,"error"],!0)}.bind(this))}}.bind(this),this.recognition.onresult=function(s){for(var t=this.results,i="",e="",n=s.resultIndex;n<s.results.length;n++)s.results[n].isFinal?i+=s.results[n][0].transcript:e+=s.results[n][0].transcript;this.results={interim:e,final:t.final+i}}.bind(this)},startListening:function(){this.recognition||this.initRecognition(),this.results={interim:"",final:""},this.recognition.start()},_scrollMessagesBottom:function(){this.async(function(){this.$.messages.scrollTop=this.$.messages.scrollHeight,0!==this.$.messages.scrollTop&&this.$.dialog.fire("iron-resize")}.bind(this),10)},dialogOpenChanged:function(s){s?this.startListening():!s&&this.results&&this.recognition.abort()},_computeMessageClasses:function(s){return"message "+s.who+(s.error?" error":"")}});</script><script>Polymer({is:"ha-url-sync",properties:{hass:{type:Object,observer:"hassChanged"}},hassChanged:function(t,e){this.ignoreNextHassChange?this.ignoreNextHassChange=!1:e&&e.moreInfoEntityId!==t.moreInfoEntityId&&(t.moreInfoEntityId?history.pushState(null,null,window.location.pathname):(this.ignoreNextPopstate=!0,history.back()))},popstateChangeListener:function(t){this.ignoreNextPopstate?this.ignoreNextPopstate=!1:this.hass.moreInfoEntityId&&(this.ignoreNextHassChange=!0,this.fire("hass-more-info",{entityId:null}))},attached:function(){this.ignoreNextPopstate=!1,this.ignoreNextHassChange=!1,this.popstateChangeListener=this.popstateChangeListener.bind(this),window.addEventListener("popstate",this.popstateChangeListener)},detached:function(){window.removeEventListener("popstate",this.popstateChangeListener)}});</script><dom-module id="paper-icon-item" assetpath="../bower_components/paper-item/"><template><style include="paper-item-shared-styles"></style><style>:host{@apply --layout-horizontal;@apply --layout-center;@apply --paper-font-subhead;@apply --paper-item;@apply --paper-icon-item;}.content-icon{@apply --layout-horizontal;@apply --layout-center;width:var(--paper-item-icon-width, 56px);@apply --paper-item-icon;}</style><div id="contentIcon" class="content-icon"><slot name="item-icon"></slot></div><slot></slot></template><script>Polymer({is:"paper-icon-item",behaviors:[Polymer.PaperItemBehavior]});</script></dom-module><dom-module id="ha-push-notifications-toggle" assetpath="components/"><template><paper-toggle-button hidden$="[[!pushSupported]]" disabled="[[loading]]" on-change="handlePushChange" checked="[[pushActive]]"></paper-toggle-button></template></dom-module><script>Polymer({is:"ha-push-notifications-toggle",properties:{hass:{type:Object,value:null},pushSupported:{type:Boolean,readOnly:!0,notify:!0,value:"PushManager"in window&&("https:"===document.location.protocol||"localhost"===document.location.hostname||"127.0.0.1"===document.location.hostname)},pushActive:{type:Boolean,value:"Notification"in window&&"granted"===Notification.permission},loading:{type:Boolean,value:!0}},attached:function(){if(this.pushSupported){var i=this;navigator.serviceWorker.ready.then(function(t){t.pushManager.getSubscription().then(function(t){i.loading=!1,i.pushActive=!!t})},function(){i._setPushSupported(!1)})}},handlePushChange:function(i){i.target.checked?this.subscribePushNotifications():this.unsubscribePushNotifications()},subscribePushNotifications:function(){var i=this;navigator.serviceWorker.ready.then(function(i){return i.pushManager.subscribe({userVisibleOnly:!0})}).then(function(t){var e;return e=navigator.userAgent.toLowerCase().indexOf("firefox")>-1?"firefox":"chrome",i.hass.callApi("POST","notify.html5",{subscription:t,browser:e}).then(function(){i.pushActive=!0})},function(t){var e;e=t.message&&-1!==t.message.indexOf("gcm_sender_id")?"Please setup the notify.html5 platform.":"Notification registration failed.",console.error(t),i.fire("hass-notification",{message:e}),i.pushActive=!1})},unsubscribePushNotifications:function(){var i=this;navigator.serviceWorker.ready.then(function(i){return i.pushManager.getSubscription()}).then(function(t){return t?i.hass.callApi("DELETE","notify.html5",{subscription:t}).then(function(){t.unsubscribe()}):Promise.resolve()}).then(function(){i.pushActive=!1}).catch(function(t){console.error("Error in unsub push",t),i.fire("hass-notification",{message:"Failed unsubscribing for push notifications."})})}});</script><dom-module id="ha-sidebar" assetpath="components/"><template><style include="iron-flex iron-flex-alignment iron-positioning">:host{--sidebar-text:{color:var(--primary-text-color);font-weight:500;font-size:14px;};display:block;overflow:auto;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;border-right:1px solid var(--divider-color);background:var(--paper-listbox-background-color,var(--primary-background-color));}app-toolbar{font-weight:400;color:var(--primary-text-color);border-bottom:1px solid var(--divider-color);background-color:var(--primary-background-color);}paper-listbox{padding-bottom:0;}paper-icon-item{--paper-icon-item:{cursor:pointer;};--paper-item-icon:{color:#000;opacity:var(--dark-secondary-opacity);};--paper-item-selected:{color:var(--primary-color);background-color:var(--paper-grey-200);opacity:1;};}paper-icon-item.iron-selected{--paper-item-icon:{color:var(--primary-color);opacity:1;};}paper-icon-item .item-text{@apply (--sidebar-text);}paper-icon-item.iron-selected .item-text{opacity:1;}paper-icon-item.logout{margin-top:16px;}.divider{height:1px;background-color:#000;margin:4px 0;opacity:var(--dark-divider-opacity);}.setting{@apply (--sidebar-text);}.subheader{@apply (--sidebar-text);padding:16px;}.dev-tools{padding:0 8px;opacity:var(--dark-secondary-opacity);}dom-if{display:none;}</style><app-toolbar><div main-title="">Home Assistant</div><paper-icon-button icon="mdi:chevron-left" hidden$="[[narrow]]" on-tap="toggleMenu"></paper-icon-button></app-toolbar><paper-listbox attr-for-selected="data-panel" selected="[[route.panel]]"><paper-icon-item on-tap="menuClicked" data-panel="states"><iron-icon slot="item-icon" icon="mdi:apps"></iron-icon><span class="item-text">States</span></paper-icon-item><template is="dom-repeat" items="[[panels]]"><paper-icon-item on-tap="menuClicked" data-panel$="[[item.url_path]]"><iron-icon slot="item-icon" icon="[[item.icon]]"></iron-icon><span class="item-text">[[item.title]]</span></paper-icon-item></template><paper-icon-item on-tap="menuClicked" data-panel="logout" class="logout"><iron-icon slot="item-icon" icon="mdi:exit-to-app"></iron-icon><span class="item-text">Log Out</span></paper-icon-item></paper-listbox><div><template is="dom-if" if="[[pushSupported]]"><div class="divider"></div><paper-item class="horizontal layout justified"><div class="setting">Push Notifications</div><ha-push-notifications-toggle hass="[[hass]]" push-supported="{{pushSupported}}"></ha-push-notifications-toggle></paper-item></template><div class="divider"></div><div class="subheader">Developer Tools</div><div class="dev-tools layout horizontal justified"><paper-icon-button icon="mdi:remote" data-panel="dev-service" alt="Services" title="Services" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:code-tags" data-panel="dev-state" alt="States" title="States" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:radio-tower" data-panel="dev-event" alt="Events" title="Events" on-tap="menuClicked"></paper-icon-button><paper-icon-button icon="mdi:file-xml" data-panel="dev-template" alt="Templates" title="Templates" on-tap="menuClicked"></paper-icon-button><template is="dom-if" if="[[_mqttLoaded(hass)]]"><paper-icon-button icon="mdi:altimeter" data-panel="dev-mqtt" alt="MQTT" title="MQTT" on-tap="menuClicked"></paper-icon-button></template><paper-icon-button icon="mdi:information-outline" data-panel="dev-info" alt="Info" title="Info" on-tap="menuClicked"></paper-icon-button></div></div></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),HaSidebar=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(t,[{key:"_mqttLoaded",value:function(e){return-1!==e.config.core.components.indexOf("mqtt")}},{key:"computePanels",value:function(e){var t=e.config.panels,n={map:1,logbook:2,history:3},o=[];return Object.keys(t).forEach(function(e){t[e].title&&o.push(t[e])}),o.sort(function(e,t){var o=e.component_name in n,r=t.component_name in n;return o&&r?n[e.component_name]-n[t.component_name]:o?-1:r?1:e.title<t.title?-1:e.title>t.title?1:0}),o}},{key:"menuClicked",value:function(e){for(var t=e.target,n=5,o=t.getAttribute("data-panel");n&&!o;)o=(t=t.parentElement).getAttribute("data-panel"),n--;n&&this.selectPanel(o)}},{key:"toggleMenu",value:function(){this.fire("hass-close-menu")}},{key:"selectPanel",value:function(e){if("logout"!==e){var t="/"+e;t!==document.location.pathname&&(history.pushState(null,null,t),this.fire("location-changed"))}else this.handleLogOut()}},{key:"handleLogOut",value:function(){this.fire("hass-logout")}}],[{key:"is",get:function(){return"ha-sidebar"}},{key:"properties",get:function(){return{hass:{type:Object},menuShown:{type:Boolean},menuSelected:{type:String},narrow:Boolean,route:Object,panels:{type:Array,computed:"computePanels(hass)"},pushSupported:{type:Boolean,value:!0}}}}]),t}();customElements.define(HaSidebar.is,HaSidebar);</script><dom-module id="home-assistant-main" assetpath="layouts/"><template><style>:host{color:var(--primary-text-color);}</style><more-info-dialog hass="[[hass]]"></more-info-dialog><ha-url-sync hass="[[hass]]"></ha-url-sync><app-location route="{{route}}"></app-location><app-route route="{{route}}" pattern="/:panel" data="{{routeData}}" tail="{{routeTail}}"></app-route><app-route route="{{route}}" pattern="/states" tail="{{statesRouteTail}}"></app-route><ha-voice-command-dialog hass="[[hass]]" id="voiceDialog"></ha-voice-command-dialog><iron-media-query query="(max-width: 870px)" query-matches="{{narrow}}"></iron-media-query><paper-drawer-panel id="drawer" force-narrow="[[computeForceNarrow(narrow, dockedSidebar)]]" responsive-width="0" disable-swipe="[[_computeDisableSwipe(routeData)]]" disable-edge-swipe="[[_computeDisableSwipe(routeData)]]"><ha-sidebar slot="drawer" narrow="[[narrow]]" hass="[[hass]]" route="[[routeData]]"></ha-sidebar><iron-pages slot="main" attr-for-selected="id" fallback-selection="panel-resolver" selected="[[_computeSelected(routeData)]]" selected-attribute="panel-visible"><partial-cards id="states" narrow="[[narrow]]" hass="[[hass]]" show-menu="[[dockedSidebar]]" route="[[statesRouteTail]]" show-tabs=""></partial-cards><partial-panel-resolver id="panel-resolver" narrow="[[narrow]]" hass="[[hass]]" route="[[route]]" show-menu="[[dockedSidebar]]"></partial-panel-resolver></iron-pages></paper-drawer-panel></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;if(void 0!==i)return i.call(r)};!function(){var e=["kiosk","map"],t=function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,window.hassMixins.EventsMixin(Polymer.Element)),_createClass(n,[{key:"ready",value:function(){var e=this;_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("hass-open-menu",function(){return e.handleOpenMenu()}),this.addEventListener("hass-close-menu",function(){return e.handleCloseMenu()}),this.addEventListener("hass-start-voice",function(t){return e.handleStartVoice(t)})}},{key:"_routeChanged",value:function(){this.narrow&&this.$.drawer.closeDrawer()}},{key:"handleStartVoice",value:function(e){e.stopPropagation(),this.$.voiceDialog.dialogOpen=!0}},{key:"handleOpenMenu",value:function(){this.narrow?this.$.drawer.openDrawer():this.fire("hass-dock-sidebar",{dock:!0})}},{key:"handleCloseMenu",value:function(){this.$.drawer.closeDrawer(),this.dockedSidebar&&this.fire("hass-dock-sidebar",{dock:!1})}},{key:"attached",value:function(){window.removeInitMsg(),"/"===document.location.pathname&&history.replaceState(null,null,"/states")}},{key:"computeForceNarrow",value:function(e,t){return e||!t}},{key:"computeDockedSidebar",value:function(e){return e.dockedSidebar}},{key:"_computeSelected",value:function(e){return e.panel||"states"}},{key:"_computeDisableSwipe",value:function(t){return-1!==e.indexOf(t.panel)}}],[{key:"is",get:function(){return"home-assistant-main"}},{key:"properties",get:function(){return{hass:Object,narrow:Boolean,route:{type:Object,observer:"_routeChanged"},routeData:Object,routeTail:Object,statesRouteTail:Object,dockedSidebar:{type:Boolean,computed:"computeDockedSidebar(hass)"}}}}]),n}();customElements.define(t.is,t)}();</script><custom-style><style is="custom-style">body{font-size:14px;--paper-grey-50:#fafafa;--paper-grey-200:#eeeeee;--paper-item-icon-color:#44739e;--paper-item-icon-active-color:#FDD835;--dark-primary-color:#0288D1;--primary-color:#03A9F4;--light-primary-color:#B3E5FC;--text-primary-color:#ffffff;--accent-color:#FF9800;--primary-background-color:var(--paper-grey-50);--secondary-background-color:#E5E5E5;--primary-text-color:#212121;--secondary-text-color:#727272;--disabled-text-color:#bdbdbd;--divider-color:rgba(0, 0, 0, .12);--table-row-background-color:transparant;--table-row-alternative-background-color:#eee;--paper-toggle-button-checked-ink-color:#039be5;--paper-toggle-button-checked-button-color:#039be5;--paper-toggle-button-checked-bar-color:#039be5;--paper-slider-knob-color:var(--primary-color);--paper-slider-knob-start-color:var(--primary-color);--paper-slider-pin-color:var(--primary-color);--paper-slider-active-color:var(--primary-color);--paper-slider-secondary-color:var(--light-primary-color);--paper-slider-container-color:var(--divider-color);--paper-card-background-color:#FFF;--paper-listbox-background-color:#FFF;--label-badge-background-color:white;--label-badge-text-color:rgb(76, 76, 76);--label-badge-red:#DF4C1E;--label-badge-blue:#039be5;--label-badge-green:#0DA035;--label-badge-yellow:#f4b400;--label-badge-grey:var(--paper-grey-500);--google-red-500:#db4437;--google-blue-500:#4285f4;--google-green-500:#0f9d58;--google-yellow-500:#f4b400;--paper-green-400:#66bb6a;--paper-blue-400:#42a5f5;--paper-orange-400:#ffa726;--dark-divider-opacity:0.12;--dark-disabled-opacity:0.38;--dark-secondary-opacity:0.54;--dark-primary-opacity:0.87;--light-divider-opacity:0.12;--light-disabled-opacity:0.3;--light-secondary-opacity:0.7;--light-primary-opacity:1.0;}</style></custom-style><dom-module id="ha-style" assetpath="resources/"><template><style>:host{@apply (--paper-font-body1);}app-header-layout{background-color:var(--primary-background-color);}app-header, app-toolbar{background-color:var(--primary-color);font-weight:400;color:white;}app-toolbar ha-menu-button + [main-title],
app-toolbar paper-icon-button + [main-title]{margin-left:24px;}h1{@apply (--paper-font-title);}button.link{background:none;color:inherit;border:none;padding:0;font:inherit;text-align:left;text-decoration:underline;cursor:pointer;}.card-actions paper-button:not([disabled]),
.card-actions ha-progress-button:not([disabled]),
.card-actions ha-call-api-button:not([disabled]),
.card-actions ha-call-service-button:not([disabled]){color:var(--primary-color);font-weight:500;}.card-actions paper-button.warning:not([disabled]),
.card-actions ha-call-api-button.warning:not([disabled]),
.card-actions ha-call-service-button.warning:not([disabled]){color:var(--google-red-500);}</style></template></dom-module><dom-module id="paper-toast" assetpath="../bower_components/paper-toast/"><template><style>:host{display:block;position:fixed;background-color:var(--paper-toast-background-color, #323232);color:var(--paper-toast-color, #f1f1f1);min-height:48px;min-width:288px;padding:16px 24px;box-sizing:border-box;box-shadow:0 2px 5px 0 rgba(0, 0, 0, 0.26);border-radius:2px;margin:12px;font-size:14px;cursor:default;-webkit-transition:-webkit-transform 0.3s, opacity 0.3s;transition:transform 0.3s, opacity 0.3s;opacity:0;-webkit-transform:translateY(100px);transform:translateY(100px);@apply --paper-font-common-base;}:host(.capsule){border-radius:24px;}:host(.fit-bottom){width:100%;min-width:0;border-radius:0;margin:0;}:host(.paper-toast-open){opacity:1;-webkit-transform:translateY(0px);transform:translateY(0px);}</style><span id="label">{{text}}</span><slot></slot></template><script>!function(){"use strict";var e=null;Polymer({is:"paper-toast",behaviors:[Polymer.IronOverlayBehavior],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Polymer.Base._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,Polymer.IronA11yAnnouncer.requestAvailability()},show:function(e){"string"==typeof e&&(e={text:e});for(var t in e)0===t.indexOf("_")?Polymer.Base._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Polymer.Base._warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(e){e&&e.target===this&&"opacity"===e.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(e&&e!==this&&e.close(),e=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):e===this&&(e=null),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(e){this.positionTarget=e}})}();</script></dom-module><dom-module id="notification-manager" assetpath="managers/"><template><style>paper-toast{z-index:1;}</style><paper-toast id="toast" text="[[_text]]" no-cancel-on-outside-click="[[_cancelOnOutsideClick]]"></paper-toast><paper-toast id="connToast" duration="0" text="Connection lost. Reconnecting…" opened="[[!isStreaming]]"></paper-toast></template></dom-module><script>Polymer({is:"notification-manager",properties:{hass:{type:Object},isStreaming:{type:Boolean,computed:"computeIsStreaming(hass)"},_cancelOnOutsideClick:{type:Boolean,value:!1},_text:{type:String,readOnly:!0},toastClass:{type:String,value:""}},computeIsStreaming:function(t){return!t||t.connected},created:function(){this.handleWindowChange=this.handleWindowChange.bind(this),this._mediaq=window.matchMedia("(max-width: 599px)"),this._mediaq.addListener(this.handleWindowChange)},attached:function(){this.handleWindowChange(this._mediaq)},detached:function(){this._mediaq.removeListener(this.handleWindowChange)},handleWindowChange:function(t){this.$.toast.classList.toggle("fit-bottom",t.matches),this.$.connToast.classList.toggle("fit-bottom",t.matches)},showNotification:function(t){this._set_text(t),this.$.toast.show()}});</script></div><dom-module id="home-assistant"><template><ha-pref-storage hass="[[hass]]" id="storage"></ha-pref-storage><notification-manager id="notifications" hass="[[hass]]"></notification-manager><template is="dom-if" if="[[showMain]]" restamp=""><home-assistant-main on-hass-more-info="handleMoreInfo" on-hass-dock-sidebar="handleDockSidebar" on-hass-notification="handleNotification" on-hass-logout="handleLogout" hass="[[hass]]"></home-assistant-main></template><template is="dom-if" if="[[!showMain]]" restamp=""><login-form hass="[[hass]]" connection-promise="{{connectionPromise}}" show-loading="[[computeShowLoading(connectionPromise, hass, iconsLoaded)]]"></login-form></template></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),_get=function e(t,n,o){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,o)}if("value"in i)return i.value;var a=i.get;if(void 0!==a)return a.call(o)};window.removeInitMsg=function(){var e=document.getElementById("ha-init-skeleton");e&&e.parentElement.removeChild(e)};var HomeAssistant=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"ready",value:function(){var e=this;_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.addEventListener("settheme",function(t){return e.setTheme(t)}),this.loadIcons()}},{key:"computeShowMain",value:function(e,t){return e&&e.states&&e.config&&t}},{key:"computeShowLoading",value:function(e,t,n){return null!=e||t&&(!t.states||!t.config||!n)}},{key:"loadIcons",value:function(){var e=this,t=function(){e.iconsLoaded=!0};Polymer.importHref("/static/mdi-"+this.icons+".html",t,function(){return Polymer.importHref("/static/mdi.html",t,t)},!0)}},{key:"connectionChanged",value:function(e,t){var n=this;if(t&&(this.unsubConnection(),this.unsubConnection=null),e){var o=this.$.notifications;this.hass=Object.assign({connection:e,connected:!0,states:null,config:null,themes:null,dockedSidebar:!1,moreInfoEntityId:null,callService:function(t,i,s){return e.callService(t,i,s||{}).then(function(){var e,a;s.entity_id&&n.hass.states&&n.hass.states[s.entity_id]&&(a=window.hassUtil.computeStateName(n.hass.states[s.entity_id])),e="turn_on"===i&&s.entity_id?"Turned on "+(a||s.entity_id)+".":"turn_off"===i&&s.entity_id?"Turned off "+(a||s.entity_id)+".":"Service "+t+"/"+i+" called.",o.showNotification(e)},function(){return o.showNotification("Failed to call service "+t+"/"+i),Promise.reject()})},callApi:function(t,n,o){var i=window.location.protocol+"//"+window.location.host,s=e.options.authToken?e.options:{};return window.hassCallApi(i,s,t,n,o)}},this.$.storage.getStoredState());var i=function(){n._updateHass({connected:!0})};e.addEventListener("ready",i);var s=function(){n._updateHass({connected:!1})};e.addEventListener("disconnected",s);var a;window.HAWS.subscribeEntities(e,function(e){n._updateHass({states:e})}).then(function(e){a=e});var r;window.HAWS.subscribeConfig(e,function(e){n._updateHass({config:e})}).then(function(e){r=e});var c;this.hass.callApi("get","themes").then(function(e){n._updateHass({themes:e}),window.hassUtil.applyThemesOnElement(n,e,n.hass.selectedTheme,!0)}),e.subscribeEvents(function(e){n._updateHass({themes:e.data}),window.hassUtil.applyThemesOnElement(n,e.data,n.hass.selectedTheme,!0)},"themes_updated").then(function(e){c=e}),this.unsubConnection=function(){e.removeEventListener("ready",i),e.removeEventListener("disconnected",s),a(),r(),c()}}else this.hass=null}},{key:"handleConnectionPromise",value:function(e){var t=this;e&&e.then(function(e){t.connection=e},function(){t.connectionPromise=null})}},{key:"handleMoreInfo",value:function(e){e.stopPropagation(),this._updateHass({moreInfoEntityId:e.detail.entityId})}},{key:"handleDockSidebar",value:function(e){e.stopPropagation(),this._updateHass({dockedSidebar:e.detail.dock}),this.$.storage.storeState()}},{key:"handleNotification",value:function(e){this.$.notifications.showNotification(e.detail.message)}},{key:"handleLogout",value:function(){delete localStorage.authToken;var e=this.connection;this.connectionPromise=null;try{this.connection=null}catch(e){}e.close()}},{key:"setTheme",value:function(e){this._updateHass({selectedTheme:e.detail}),window.hassUtil.applyThemesOnElement(this,this.hass.themes,this.hass.selectedTheme,!0),this.$.storage.storeState()}},{key:"_updateHass",value:function(e){this.hass=Object.assign({},this.hass,e)}}],[{key:"is",get:function(){return"home-assistant"}},{key:"properties",get:function(){return{connectionPromise:{type:Object,value:window.hassConnection||null,observer:"handleConnectionPromise"},connection:{type:Object,value:null,observer:"connectionChanged"},hass:{type:Object,value:null},icons:{type:String},iconsLoaded:{type:Boolean,value:!1},showMain:{type:Boolean,computed:"computeShowMain(hass, iconsLoaded)"}}}}]),t}();customElements.define(HomeAssistant.is,HomeAssistant);</script><dom-module id="hass-error-screen" assetpath="layouts/"><template><style include="iron-flex ha-style">.placeholder{height:100%;}.layout{height:calc(100% - 64px);}paper-button{font-weight:bold;color:var(--primary-color);}</style><div class="placeholder"><app-toolbar><div main-title="">[[title]]</div></app-toolbar><div class="layout vertical center-center"><h3>[[error]]</h3><paper-button on-tap="backTapped">go back</paper-button></div></div></template></dom-module><script>Polymer({is:"hass-error-screen",properties:{title:{type:String,value:"Home Assistant"},error:{type:String,value:"Oops! It looks like something went wrong."}},backTapped:function(){history.back()}});</script><dom-module id="ha-progress-button" assetpath="components/buttons/"><template><style>.container{position:relative;display:inline-block;}paper-button{transition:all 1s;}.success paper-button{color:white;background-color:var(--google-green-500);transition:none;}.error paper-button{color:white;background-color:var(--google-red-500);transition:none;}paper-button[disabled]{color:#c8c8c8;}.progress{@apply (--layout);@apply (--layout-center-center);position:absolute;top:0;left:0;right:0;bottom:0;}</style><div class="container" id="container"><paper-button id="button" disabled="[[computeDisabled(disabled, progress)]]" on-tap="buttonTapped"><slot></slot></paper-button><template is="dom-if" if="[[progress]]"><div class="progress"><paper-spinner active=""></paper-spinner></div></template></div></template></dom-module><script>Polymer({is:"ha-progress-button",properties:{hass:{type:Object},progress:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1}},tempClass:function(s){var t=this.$.container.classList;t.add(s),this.async(function(){t.remove(s)},1e3)},listeners:{tap:"buttonTapped"},buttonTapped:function(s){this.progress&&s.stopPropagation()},actionSuccess:function(){this.tempClass("success")},actionError:function(){this.tempClass("error")},computeDisabled:function(s,t){return s||t}});</script><dom-module id="ha-call-service-button" assetpath="components/buttons/"><template><ha-progress-button id="progress" progress="[[progress]]" on-tap="buttonTapped"><slot></slot></ha-progress-button></template></dom-module><script>Polymer({is:"ha-call-service-button",properties:{hass:{type:Object},progress:{type:Boolean,value:!1},domain:{type:String},service:{type:String},serviceData:{type:Object,value:{}}},buttonTapped:function(){this.progress=!0;var e=this,s={domain:this.domain,service:this.service,serviceData:this.serviceData};this.hass.callService(this.domain,this.service,this.serviceData).then(function(){e.progress=!1,e.$.progress.actionSuccess(),s.success=!0},function(){e.progress=!1,e.$.progress.actionError(),s.success=!1}).then(function(){e.fire("hass-service-called",s)})}});</script><dom-module id="paper-dropdown-menu-light" assetpath="../bower_components/paper-dropdown-menu/"><template><style include="paper-dropdown-menu-shared-styles">:host(:focus){outline:none;}:host{width:200px;}[slot="dropdown-trigger"]{box-sizing:border-box;position:relative;width:100%;padding:16px 0 8px 0;}:host([disabled]) [slot="dropdown-trigger"]{pointer-events:none;opacity:var(--paper-dropdown-menu-disabled-opacity, 0.33);}:host([no-label-float]) [slot="dropdown-trigger"]{padding-top:8px;}#input{@apply --paper-font-subhead;@apply --paper-font-common-nowrap;line-height:1.5;border-bottom:1px solid var(--paper-dropdown-menu-color, var(--secondary-text-color));color:var(--paper-dropdown-menu-color, var(--primary-text-color));width:100%;box-sizing:border-box;padding:12px 20px 0 0;outline:none;@apply --paper-dropdown-menu-input;}:host(:dir(rtl)) #input,
:host-context([dir="rtl"]) #input{padding-right:0px;padding-left:20px;}:host([disabled]) #input{border-bottom:1px dashed var(--paper-dropdown-menu-color, var(--secondary-text-color));}:host([invalid]) #input{border-bottom:2px solid var(--paper-dropdown-error-color, var(--error-color));}:host([no-label-float]) #input{padding-top:0;}label{@apply --paper-font-subhead;@apply --paper-font-common-nowrap;display:block;position:absolute;bottom:0;left:0;right:0;top:28px;box-sizing:border-box;width:100%;padding-right:20px;text-align:left;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--paper-dropdown-menu-color, var(--secondary-text-color));@apply --paper-dropdown-menu-label;}:host(:dir(rtl)) label,
:host-context([dir="rtl"]) label{padding-right:0px;padding-left:20px;}:host([no-label-float]) label{top:8px;transition-duration:0s;}label.label-is-floating{font-size:12px;top:8px;}label.label-is-hidden{visibility:hidden;}:host([focused]) label.label-is-floating{color:var(--paper-dropdown-menu-focus-color, var(--primary-color));}:host([invalid]) label.label-is-floating{color:var(--paper-dropdown-error-color, var(--error-color));}label:after{background-color:var(--paper-dropdown-menu-focus-color, var(--primary-color));bottom:7px;content:'';height:2px;left:45%;position:absolute;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);visibility:hidden;width:8px;z-index:10;}:host([invalid]) label:after{background-color:var(--paper-dropdown-error-color, var(--error-color));}:host([no-label-float]) label:after{bottom:7px;}:host([focused]:not([disabled])) label:after{left:0;visibility:visible;width:100%;}iron-icon{position:absolute;right:0px;bottom:8px;@apply --paper-font-subhead;color:var(--disabled-text-color);@apply --paper-dropdown-menu-icon;}:host(:dir(rtl)) iron-icon,
:host-context([dir="rtl"]) iron-icon{left:0;right:auto;}:host([no-label-float]) iron-icon{margin-top:0px;}.error{display:inline-block;visibility:hidden;color:var(--paper-dropdown-error-color, var(--error-color));@apply --paper-font-caption;position:absolute;left:0;right:0;bottom:-12px;}:host([invalid]) .error{visibility:visible;}</style><span role="button"></span><paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate="" allow-outside-scroll="[[allowOutsideScroll]]"><div class="dropdown-trigger" slot="dropdown-trigger"><label class$="[[_computeLabelClass(noLabelFloat,alwaysFloatLabel,hasContent)]]">[[label]]</label><div id="input" tabindex="-1">&nbsp;</div><iron-icon icon="paper-dropdown-menu:arrow-drop-down"></iron-icon><span class="error">[[errorMessage]]</span></div><slot id="content" name="dropdown-content" slot="dropdown-content"></slot></paper-menu-button></template><script>!function(){"use strict";Polymer({is:"paper-dropdown-menu-light",behaviors:[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0,readOnly:!0,observer:"_valueChanged"},label:{type:String},placeholder:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},hasContent:{type:Boolean,readOnly:!0}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},hostAttributes:{tabindex:0,role:"combobox","aria-autocomplete":"none","aria-haspopup":"true"},observers:["_selectedItemChanged(selectedItem)"],attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=Polymer.dom(this.$.content).getDistributedNodes(),t=0,n=e.length;t<n;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){Polymer.Gestures.findOriginalTarget(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";t=e?e.label||e.getAttribute("label")||e.textContent.trim():"",this._setValue(t),this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e){return e?-4:8},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)},_computeLabelClass:function(e,t,n){var o="";return!0===e?n?"label-is-hidden":"":((n||!0===t)&&(o+=" label-is-floating"),o)},_valueChanged:function(){this.$.input&&this.$.input.textContent!==this.value&&(this.$.input.textContent=this.value),this._setHasContent(!!this.value)}})}();</script></dom-module><dom-module id="paper-item-body" assetpath="../bower_components/paper-item/"><template><style>:host{overflow:hidden;@apply --layout-vertical;@apply --layout-center-justified;@apply --layout-flex;}:host([two-line]){min-height:var(--paper-item-body-two-line-min-height, 72px);}:host([three-line]){min-height:var(--paper-item-body-three-line-min-height, 88px);}:host > ::slotted(*){overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}:host > ::slotted([secondary]){@apply --paper-font-body1;color:var(--paper-item-body-secondary-color, var(--secondary-text-color));@apply --paper-item-body-secondary;}</style><slot></slot></template><script>Polymer({is:"paper-item-body"});</script></dom-module><dom-module id="iron-autogrow-textarea" assetpath="../bower_components/iron-autogrow-textarea/"><template><style>:host{display:inline-block;position:relative;width:400px;border:1px solid;padding:2px;-moz-appearance:textarea;-webkit-appearance:textarea;overflow:hidden;}.mirror-text{visibility:hidden;word-wrap:break-word;@apply --iron-autogrow-textarea;}.fit{@apply --layout-fit;}textarea{position:relative;outline:none;border:none;resize:none;background:inherit;color:inherit;width:100%;height:100%;font-size:inherit;font-family:inherit;line-height:inherit;text-align:inherit;@apply --iron-autogrow-textarea;}textarea::-webkit-input-placeholder{@apply --iron-autogrow-textarea-placeholder;}textarea:-moz-placeholder{@apply --iron-autogrow-textarea-placeholder;}textarea::-moz-placeholder{@apply --iron-autogrow-textarea-placeholder;}textarea:-ms-input-placeholder{@apply --iron-autogrow-textarea-placeholder;}</style><div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div><div class="textarea-container fit"><textarea id="textarea" name$="[[name]]" aria-label$="[[label]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea></div></template></dom-module><script>Polymer({is:"iron-autogrow-textarea",behaviors:[Polymer.IronValidatableBehavior,Polymer.IronControlState],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&""===this.value?e=!1:this.hasValidator()&&(e=Polymer.IronValidatableBehavior.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;t&&(t.value!==e&&(t.value=e||0===e?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror())},_onInput:function(e){var t=Polymer.dom(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],t=this.maxRows>0&&e.length>this.maxRows?e.slice(0,this.maxRows):e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+"&#160;"},_valueForMirror:function(){var e=this.textarea;if(e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split("\n"):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});</script><dom-module id="paper-textarea" assetpath="../bower_components/paper-input/"><template><style>:host{display:block;}:host([hidden]){display:none !important;}label{pointer-events:none;}</style><paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]"><label hidden$="[[!label]]" aria-hidden="true" for="input" slot="label">[[label]]</label><iron-autogrow-textarea id="input" class="paper-input-input" slot="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea><template is="dom-if" if="[[errorMessage]]"><paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error></template><template is="dom-if" if="[[charCounter]]"><paper-input-char-counter slot="add-on"></paper-input-char-counter></template></paper-input-container></template></dom-module><script>Polymer({is:"paper-textarea",behaviors:[Polymer.PaperInputBehavior,Polymer.IronFormElementBehavior],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},_ariaLabelledByChanged:function(e){this.$.input.textarea.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this.$.input.textarea.setAttribute("aria-describedby",e)},get _focusableElement(){return this.$.input.textarea}});</script><script>!function(){"use strict";var t=/\.splices$/,e=/\.length$/,i=/\.?#?([0-9]+)$/;Polymer.AppStorageBehavior={properties:{data:{type:Object,notify:!0,value:function(){return this.zeroValue}},sequentialTransactions:{type:Boolean,value:!1},log:{type:Boolean,value:!1}},observers:["__dataChanged(data.*)"],created:function(){this.__initialized=!1,this.__syncingToMemory=!1,this.__initializingStoredValue=null,this.__transactionQueueAdvances=Promise.resolve()},ready:function(){this._initializeStoredValue()},get isNew(){return!0},get transactionsComplete(){return this.__transactionQueueAdvances},get zeroValue(){},saveValue:function(t){return Promise.resolve()},reset:function(){},destroy:function(){return this.data=this.zeroValue,this.saveValue()},initializeStoredValue:function(){return this.isNew?Promise.resolve():this._getStoredValue("data").then(function(t){if(this._log("Got stored value!",t,this.data),null==t)return this._setStoredValue("data",this.data||this.zeroValue);this.syncToMemory(function(){this.set("data",t)})}.bind(this))},getStoredValue:function(t){return Promise.resolve()},setStoredValue:function(t,e){return Promise.resolve(e)},memoryPathToStoragePath:function(t){return t},storagePathToMemoryPath:function(t){return t},syncToMemory:function(t){this.__syncingToMemory||(this._group("Sync to memory."),this.__syncingToMemory=!0,t.call(this),this.__syncingToMemory=!1,this._groupEnd("Sync to memory."))},valueIsEmpty:function(t){return Array.isArray(t)?0===t.length:Object.prototype.isPrototypeOf(t)?0===Object.keys(t).length:null==t},_getStoredValue:function(t){return this.getStoredValue(this.memoryPathToStoragePath(t))},_setStoredValue:function(t,e){return this.setStoredValue(this.memoryPathToStoragePath(t),e)},_enqueueTransaction:function(t){if(this.sequentialTransactions)t=t.bind(this);else{var e=t.call(this);t=function(){return e}}return this.__transactionQueueAdvances=this.__transactionQueueAdvances.then(t).catch(function(t){this._error("Error performing queued transaction.",t)}.bind(this))},_log:function(){this.log&&console.log.apply(console,arguments)},_error:function(){this.log&&console.error.apply(console,arguments)},_group:function(){this.log&&console.group.apply(console,arguments)},_groupEnd:function(){this.log&&console.groupEnd.apply(console,arguments)},_initializeStoredValue:function(){if(!this.__initializingStoredValue){this._group("Initializing stored value.");var t=this.__initializingStoredValue=this.initializeStoredValue().then(function(){this.__initialized=!0,this.__initializingStoredValue=null,this._groupEnd("Initializing stored value.")}.bind(this));return this._enqueueTransaction(function(){return t})}},__dataChanged:function(t){if(!this.isNew&&!this.__syncingToMemory&&this.__initialized&&!this.__pathCanBeIgnored(t.path)){var e=this.__normalizeMemoryPath(t.path),i=t.value,n=i&&i.indexSplices;this._enqueueTransaction(function(){return this._log("Setting",e+":",n||i),n&&this.__pathIsSplices(e)&&(e=this.__parentPath(e),i=this.get(e)),this._setStoredValue(e,i)})}},__normalizeMemoryPath:function(t){for(var e=t.split("."),i=[],n=[],r=[],o=0;o<e.length;++o)n.push(e[o]),/^#/.test(e[o])?r.push(this.get(i).indexOf(this.get(n))):r.push(e[o]),i.push(e[o]);return r.join(".")},__parentPath:function(t){var e=t.split(".");return e.slice(0,e.length-1).join(".")},__pathCanBeIgnored:function(t){return e.test(t)&&Array.isArray(this.get(this.__parentPath(t)))},__pathIsSplices:function(e){return t.test(e)&&Array.isArray(this.get(this.__parentPath(e)))},__pathRefersToArray:function(i){return(t.test(i)||e.test(i))&&Array.isArray(this.get(this.__parentPath(i)))},__pathTailToIndex:function(t){var e=t.split(".").pop();return window.parseInt(e.replace(i,"$1"),10)}}}();</script><dom-module id="app-localstorage-document" assetpath="../bower_components/app-storage/app-localstorage/"><script>"use strict";Polymer({is:"app-localstorage-document",behaviors:[Polymer.AppStorageBehavior],properties:{key:{type:String,notify:!0},sessionOnly:{type:Boolean,value:!1},storage:{type:Object,computed:"__computeStorage(sessionOnly)"}},observers:["__storageSourceChanged(storage, key)"],attached:function(){this.listen(window,"storage","__onStorage"),this.listen(window.top,"app-local-storage-changed","__onAppLocalStorageChanged")},detached:function(){this.unlisten(window,"storage","__onStorage"),this.unlisten(window.top,"app-local-storage-changed","__onAppLocalStorageChanged")},get isNew(){return!this.key},saveValue:function(e){try{this.__setStorageValue(e,this.data)}catch(e){return Promise.reject(e)}return this.key=e,Promise.resolve()},reset:function(){this.key=null,this.data=this.zeroValue},destroy:function(){try{this.storage.removeItem(this.key),this.reset()}catch(e){return Promise.reject(e)}return Promise.resolve()},getStoredValue:function(e){var t;if(null!=this.key)try{t=null!=(t=this.__parseValueFromStorage())?this.get(e,{data:t}):void 0}catch(e){return Promise.reject(e)}return Promise.resolve(t)},setStoredValue:function(e,t){if(null!=this.key){try{this.__setStorageValue(this.key,this.data)}catch(e){return Promise.reject(e)}this.fire("app-local-storage-changed",this,{node:window.top})}return Promise.resolve(t)},__computeStorage:function(e){return e?window.sessionStorage:window.localStorage},__storageSourceChanged:function(e,t){this._initializeStoredValue()},__onStorage:function(e){e.key===this.key&&e.storageArea===this.storage&&this.syncToMemory(function(){this.set("data",this.__parseValueFromStorage())})},__onAppLocalStorageChanged:function(e){e.detail!==this&&e.detail.key===this.key&&e.detail.storage===this.storage&&this.syncToMemory(function(){this.set("data",e.detail.data)})},__parseValueFromStorage:function(){try{return JSON.parse(this.storage.getItem(this.key))}catch(e){console.error("Failed to parse value from storage for",this.key)}},__setStorageValue:function(e,t){this.storage.setItem(this.key,JSON.stringify(this.data))}});</script></dom-module><script>window.vaadin=window.vaadin||{},vaadin.elements=vaadin.elements||{},vaadin.elements.combobox=vaadin.elements.combobox||{},vaadin.elements.combobox.DropdownBehavior={properties:{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0}},open:function(){this.disabled||this.readonly||(this.opened=!0)},close:function(){this.opened=!1},detached:function(){this.close()},_openedChanged:function(e,t){void 0!==t&&(this.opened?this._open():this._close())},_open:function(){this.$.overlay._moveTo(document.body),this._addOutsideClickListener(),this.$.overlay.touchDevice||this.inputElement.focused||this.inputElement.focus(),this.fire("vaadin-dropdown-opened")},_close:function(){this.$.overlay._moveTo(this.root),this._removeOutsideClickListener(),this.fire("vaadin-dropdown-closed")},_outsideClickListener:function(e){var t=Polymer.dom(e).path;t.indexOf(this)<0&&t.indexOf(this.$.overlay)<0&&(this.opened=!1)},_addOutsideClickListener:function(){this.$.overlay.touchDevice?(Polymer.Gestures.add(document,"tap",null),document.addEventListener("tap",this._outsideClickListener.bind(this),!0)):document.addEventListener("click",this._outsideClickListener.bind(this),!0)},_removeOutsideClickListener:function(){this.$.overlay.touchDevice?(Polymer.Gestures.remove(document,"tap",null),document.removeEventListener("tap",this._outsideClickListener.bind(this),!0)):document.removeEventListener("click",this._outsideClickListener.bind(this),!0)}};</script><script>window.vaadin=window.vaadin||{},vaadin.elements=vaadin.elements||{},vaadin.elements.combobox=vaadin.elements.combobox||{},vaadin.elements.combobox.ComboBoxBehaviorImpl={properties:{items:{type:Array},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array},value:{type:String,observer:"_valueChanged",notify:!!Polymer.Element},_lastCommittedValue:String,hasValue:{type:Boolean,value:!1,readOnly:!0,reflectToAttribute:!0},loading:{type:Boolean,value:!1},_focusedIndex:{type:Number,value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},inputElement:{type:HTMLElement,readOnly:!0},_toggleElement:Object,_clearElement:Object,_inputElementValue:String,_closeOnBlurIsPrevented:Boolean,_templatized:Boolean,_itemTemplate:Boolean,_previousDocumentPointerEvents:String},observers:["_filterChanged(filter, itemValuePath, itemLabelPath)","_itemsChanged(items.*, itemValuePath, itemLabelPath)","_filteredItemsChanged(filteredItems.*, itemValuePath, itemLabelPath)","_loadingChanged(loading)","_selectedItemChanged(selectedItem)"],listeners:{"vaadin-dropdown-opened":"_onOpened","vaadin-dropdown-closed":"_onClosed",keydown:"_onKeyDown",tap:"_onTap"},ready:function(){void 0===this.value&&(this.value=""),this._lastCommittedValue=this.value,Polymer.IronA11yAnnouncer.requestAvailability(),this.$.overlay.addEventListener("selection-changed",this._overlaySelectedItemChanged.bind(this))},_onBlur:function(){this._closeOnBlurIsPrevented||this.close()},_onOverlayDown:function(e){this.$.overlay.touchDevice&&e.target!==this.$.overlay.$.scroller&&(this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1)},_onTap:function(e){this._closeOnBlurIsPrevented=!0;var t=Polymer.dom(e).path;-1!==t.indexOf(this._clearElement)?this._clear():-1!==t.indexOf(this._toggleElement)?this._toggle():-1!==t.indexOf(this.inputElement)&&this._openAsync(),this._closeOnBlurIsPrevented=!1},_onKeyDown:function(e){this._isEventKey(e,"down")?(this._closeOnBlurIsPrevented=!0,this._onArrowDown(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"up")?(this._closeOnBlurIsPrevented=!0,this._onArrowUp(),this._closeOnBlurIsPrevented=!1,e.preventDefault()):this._isEventKey(e,"enter")?this._onEnter(e):this._isEventKey(e,"esc")&&this._onEscape()},_isEventKey:function(e,t){return Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,t)},_getItemLabel:function(e){return this.$.overlay.getItemLabel(e)},_getItemValue:function(e){var t=e?this.get(this.itemValuePath,e):void 0;return void 0===t&&(t=e?e.toString():""),t},_onArrowDown:function(){this.opened?this.$.overlay._items&&(this._focusedIndex=Math.min(this.$.overlay._items.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel()):this.open()},_onArrowUp:function(){this.opened?(this._focusedIndex>-1?this._focusedIndex=Math.max(0,this._focusedIndex-1):this.$.overlay._items&&(this._focusedIndex=this.$.overlay._items.length-1),this._prefillFocusedItemLabel()):this.open()},_prefillFocusedItemLabel:function(){this._focusedIndex>-1&&(this._inputElementValue="",this.async(function(){this._inputElementValue=this._getItemLabel(this.$.overlay._focusedItem),this._setSelectionRange()},1))},_setSelectionRange:function(){this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(0,this._inputElementValue.length)},_onEnter:function(e){this.opened&&(this.allowCustomValue||""===this._inputElementValue||this._focusedIndex>-1)&&(this.close(),e.preventDefault())},_onEscape:function(){this.opened&&(this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel())},_openAsync:function(){this.async(this.open)},_toggle:function(){this.opened?this.close():this.open()},_clear:function(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this.opened?this.close():this._detectAndDispatchChange()},cancel:function(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this.close()},_onOpened:function(){Polymer.flush&&Polymer.flush(),this.$.overlay.hidden=!this._hasItems(this.$.overlay._items)&&!this.loading,this.$.overlay.ensureItemsRendered(),this.$.overlay.updateViewportBoundaries(),this.$.overlay.async(this.$.overlay.adjustScrollPosition),this.$.overlay.async(this.$.overlay.notifyResize,1),this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none",this._lastCommittedValue=this.value},_onClosed:function(){if(this._focusedIndex>-1){var e=this.$.overlay._items[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue)this._clear();else if(this.allowCustomValue){if(!this.fire("custom-value-set",this._inputElementValue,{cancelable:!0}).defaultPrevented){var t=this._inputElementValue;this.selectedItem=null,this.value=t}}else this._inputElementValue=this._getItemLabel(this.selectedItem);this._detectAndDispatchChange(),this._clearSelectionRange(),this.filter="",document.body.style.pointerEvents=this._previousDocumentPointerEvents},_inputValueChanged:function(e){-1!==Polymer.dom(e).path.indexOf(this.inputElement)&&(this._inputElementValue=this.inputElement.value,this._filterFromInput())},_filterFromInput:function(e){this.filter===this._inputElementValue?this._filterChanged(this.filter,this.itemValuePath,this.itemLabelPath):(this._userDefinedFilter=!0,this.filter=this._inputElementValue,this._userDefinedFilter=!1),this.opened||this.open()},_clearSelectionRange:function(){if((document.activeElement===this.inputElement||document.activeElement===this)&&this.inputElement.setSelectionRange){var e=this._inputElementValue?this._inputElementValue.length:0;this.inputElement.setSelectionRange(e,e)}},_filterChanged:function(e,t,i){void 0!==e&&void 0!==t&&void 0!==i&&this.items&&(this.filteredItems=this._filterItems(this.items,e))},_loadingChanged:function(e){e&&(this._focusedIndex=-1)},_revertInputValue:function(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()},_revertInputValueToValue:function(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem)},_selectedItemChanged:function(e){if(this.filteredItems){if(null===e||void 0===e)this.allowCustomValue||(this.value=""),this._setHasValue(""!==this.value),this._inputElementValue=this.value;else{var t=this._getItemValue(e);this.value!==t&&(this.value=t),this._setHasValue(!0),this._inputElementValue=this._getItemLabel(e),this.inputElement&&(this.inputElement.value=this._inputElementValue)}this.$.overlay._selectedItem=e,this._focusedIndex=this.filteredItems.indexOf(e)}},_valueChanged:function(e){if(this._isValidValue(e)){if(this._getItemValue(this.selectedItem)!==e){var t=this._indexOfValue(e,this.filteredItems);this.selectedItem=t>=0?this.filteredItems[t]:null}else var i=this.selectedItem;!i&&this.allowCustomValue&&(this._inputElementValue=e),this._setHasValue(""!==this.value)}else this.selectedItem=null;this._lastCommittedValue=void 0},_detectAndDispatchChange:function(){this.value!==this._lastCommittedValue&&(this.fire("change",void 0,{bubbles:!0}),this._lastCommittedValue=this.value)},_itemsChanged:function(e,t,i){if(void 0!==e&&void 0!==t&&void 0!==i&&("items"===e.path||"items.splices"===e.path)){this.filteredItems=this.items?this.items.slice(0):this.items;var n=this._indexOfValue(this.value,this.items);this._focusedIndex=n;var s=n>-1&&this.items[n];s&&(this.selectedItem=s)}},_filteredItemsChanged:function(e,t,i){void 0!==e&&void 0!==t&&void 0!==i&&("filteredItems"!==e.path&&"filteredItems.splices"!==e.path||(this._setOverlayItems(this.filteredItems),this._focusedIndex=this.opened||this._userDefinedFilter?this.$.overlay.indexOfLabel(this.filter):this._indexOfValue(this.value,this.filteredItems),this.async(function(){this.$.overlay.notifyResize()},1)))},_filterItems:function(e,t){return e?e.filter(function(e){return t=t?t.toString().toLowerCase():"",this._getItemLabel(e).toString().toLowerCase().indexOf(t)>-1}.bind(this)):e},_setOverlayItems:function(e){this.$.overlay.notifyPath("_items",void 0),this.$.overlay.set("_items",e),this.$.overlay.hidden=!this._hasItems(e),this.$.overlay.notifyResize()},_hasItems:function(e){return e&&e.length},_indexOfValue:function(e,t){if(t&&this._isValidValue(e))for(var i=0;i<t.length;i++)if(this._getItemValue(t[i])===e)return i;return-1},_isValidValue:function(e){return void 0!==e&&null!==e},_overlaySelectedItemChanged:function(e){this.selectedItem!==e.detail.item&&(this.selectedItem=e.detail.item),this.opened&&this.close(),e.stopPropagation()},_getValidity:function(){if(this._bindableInput.validate)return this._bindableInput.validate()},get _instanceProps(){return{item:!0,index:!0,selected:!0,focused:!0}},_ensureTemplatized:function(){this._templatized||(this._templatized=!0,this._itemTemplate=Polymer.dom(this).querySelector("template"),this._itemTemplate&&this.templatize(this._itemTemplate))},created:function(){this._parentModel=!0},_forwardHostPropV2:function(e,t){this._forwardParentProp(e,t),this._forwardParentPath(e,t)},_forwardParentProp:function(e,t){var i=this.$.overlay.$.selector.querySelectorAll("vaadin-combo-box-item");Array.prototype.forEach.call(i,function(i){i._itemTemplateInstance&&i._itemTemplateInstance.set(e,t)})},_forwardParentPath:function(e,t){var i=this.$.overlay.$.selector.querySelectorAll("vaadin-combo-box-item");Array.prototype.forEach.call(i,function(i){i._itemTemplateInstance&&i._itemTemplateInstance.notifyPath(e,t,!0)})},_preventInputBlur:function(){this._toggleElement&&this.listen(this._toggleElement,"down","_preventDefault"),this._clearElement&&this.listen(this._clearElement,"down","_preventDefault")},_restoreInputBlur:function(){this._toggleElement&&this.unlisten(this._toggleElement,"down","_preventDefault"),this._clearElement&&this.unlisten(this._clearElement,"down","_preventDefault")},_preventDefault:function(e){e.preventDefault()},_stopPropagation:function(e){e.stopPropagation()}},vaadin.elements.combobox.ComboBoxBehavior=[Polymer.IronFormElementBehavior,Polymer.Templatizer,vaadin.elements.combobox.DropdownBehavior,vaadin.elements.combobox.ComboBoxBehaviorImpl];</script><dom-module id="iron-list" assetpath="../bower_components/iron-list/"><template><style>:host{display:block;}@media only screen and (-webkit-max-device-pixel-ratio: 1){:host{will-change:transform;}}#items{@apply --iron-list-items-container;position:relative;}:host(:not([grid])) #items > ::slotted(*){width:100%;}#items > ::slotted(*){box-sizing:border-box;margin:0;position:absolute;top:0;will-change:transform;}</style><array-selector id="selector" items="{{items}}" selected="{{selectedItems}}" selected-item="{{selectedItem}}"></array-selector><div id="items"><slot></slot></div></template></dom-module><script>!function(){var t=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),i=t&&t[1]>=8,e=null!=Polymer.flush,s=e?Polymer.Async.animationFrame:0,h=e?Polymer.Async.idlePeriod:1,l=e?Polymer.Async.microTask:2;Polymer.OptionalMutableDataBehavior||(Polymer.OptionalMutableDataBehavior={}),Polymer({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:[Polymer.Templatizer,Polymer.IronResizableBehavior,Polymer.IronScrollTargetBehavior,Polymer.OptionalMutableDataBehavior],_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,_collection: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 Polymer.dom(Polymer.dom(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var t=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,t-this._physicalCount)},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this.grid&&(t-=t%this._itemsPerRow),this._virtualStartVal=t},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this.grid&&(t-=t%this._itemsPerRow),this._physicalStartVal=t},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(t){this._physicalCountVal=t},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 t=this._firstVisibleIndexVal;if(null==t){var i=this._physicalTop+this._scrollOffset;t=this._iterateItems(function(t,e){return(i+=this._getPhysicalSizeIncrement(t))>this._scrollPosition?this.grid?e-e%this._itemsPerRow:e:this.grid&&this._virtualCount-1===e?e-e%this._itemsPerRow:void 0})||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){var t=this._lastVisibleIndexVal;if(null==t){if(this.grid)t=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var i=this._physicalTop+this._scrollOffset;this._iterateItems(function(e,s){i<this._scrollBottom&&(t=s),i+=this._getPhysicalSizeIncrement(e)})}this._lastVisibleIndexVal=t}return t},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,s),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(t){this.style.webkitOverflowScrolling=t===this?"touch":"",this.style.overflowY=t===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,s)},updateViewportBoundaries:function(){var t=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),i=t-this._scrollPosition,e=i>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(i)>this._physicalSize&&this._physicalSize>0){i-=this._scrollOffset;var s=Math.round(i/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+s,this._physicalStart=this._physicalStart+s,this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._update()}else if(this._physicalCount>0){var h=this._getReusables(e);e?(this._physicalTop=h.physicalTop,this._virtualStart=this._virtualStart+h.indexes.length,this._physicalStart=this._physicalStart+h.indexes.length):(this._virtualStart=this._virtualStart-h.indexes.length,this._physicalStart=this._physicalStart-h.indexes.length),this._update(h.indexes,e?null:h.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),l)}},_getReusables:function(t){var i,e,s,h=[],l=this._hiddenContentSize*this._ratio,o=this._virtualStart,r=this._virtualEnd,n=this._physicalCount,a=this._physicalTop+this._scrollOffset,c=this._physicalBottom+this._scrollOffset,_=this._scrollTop,u=this._scrollBottom;for(t?(i=this._physicalStart,this._physicalEnd,e=_-a):(i=this._physicalEnd,this._physicalStart,e=c-u);;){if(s=this._getPhysicalSizeIncrement(i),e-=s,h.length>=n||e<=l)break;if(t){if(r+h.length+1>=this._virtualCount)break;if(a+s>=_-this._scrollOffset)break;h.push(i),a+=s,i=(i+1)%n}else{if(o-h.length<=0)break;if(a+this._physicalSize-s<=u)break;h.push(i),a-=s,i=0===i?n-1:i-1}}return{indexes:h,physicalTop:a-this._scrollOffset}},_update:function(t,i){if(!(t&&0===t.length||0===this._physicalCount)){if(this._manageFocus(),this._assignModels(t),this._updateMetrics(t),i)for(;i.length;){var e=i.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(t){this._ensureTemplatized();var i,e,s=new Array(t);for(i=0;i<t;i++)e=this.stamp(null),s[i]=e.root.querySelector("*"),this._itemsParent.appendChild(e.root);return s},_isClientFull:function(){return 0!=this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(t){var i=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart);if(i=this._convertIndexToCompleteRow(i),this.grid){var e=i%this._itemsPerRow;e&&i-e<=this._physicalCount&&(i+=this._itemsPerRow),i-=e}var s=i-this._physicalCount,o=Math.round(.5*this._physicalCount);if(!(s<0)){if(s>0){var r=window.performance.now();[].push.apply(this._physicalItems,this._createPool(s)),[].push.apply(this._physicalSizes,new Array(s)),this._physicalCount=this._physicalCount+s,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+s),this._update(),this._templateCost=(window.performance.now()-r)/s,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)),h):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,o),l))}},_render:function(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){var t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart=this._virtualStart+t.indexes.length,this._physicalStart=this._physicalStart+t.indexes.length,this._update(t.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 t={};t.__key__=!0,t[this.as]=!0,t[this.indexAs]=!0,t[this.selectedAs]=!0,t.tabIndex=!0,this._instanceProps=t,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(t,i){void 0!==i&&(this.notifyResize(),Polymer.flush?Polymer.flush():Polymer.dom.flush(),t&&this._updateGridMetrics())},_itemsChanged:function(t){if("items"===t.path)this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._collection=this.items&&Polymer.Collection?Polymer.Collection.get(this.items):null,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,s);else if("items.splices"===t.path){this._adjustVirtualIndex(t.value.indexSplices),this._virtualCount=this.items?this.items.length:0;var i=t.value.indexSplices.some(function(t){return this._isIndexRendered(t.index)},this);this._isClientFull()&&!i||this._debounce("_render",this._render,s)}else"items.length"!==t.path&&this._forwardItemPath(t.path,t.value)},_forwardItemPath:function(t,i){var s=(t=t.slice(6)).indexOf(".")+1;0===s&&(s=t.length);var h,l,o=e?parseInt(t.substring(0,s),10):parseInt(t.substring(1,s),10),r=this._offscreenFocusedItem,n=this._isIndexRendered(o);n?(l=this._getPhysicalIndex(o),h=this.modelForElement(this._physicalItems[l])):r&&(h=this.modelForElement(r)),h&&h[this.indexAs]===o&&(t=t.substring(s),t=this.as+(t?"."+t:""),e?h._setPendingPropertyOrPath(t,i,!1,!0):h.notifyPath(t,i,!0),h._flushProperties&&h._flushProperties(!0),n&&(this._updateMetrics([l]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(t){t.forEach(function(t){if(t.removed.forEach(this._removeItem,this),t.index<this._virtualStart){var i=Math.max(t.addedCount-t.removed.length,t.index-this._virtualStart);this._virtualStart=this._virtualStart+i,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+i)}},this)},_removeItem:function(t){this.$.selector.deselect(t),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===t&&(this._removeFocusedItem(),document.activeElement&&document.activeElement.blur&&document.activeElement.blur())},_iterateItems:function(t,i){var e,s,h,l;if(2===arguments.length&&i){for(l=0;l<i.length;l++)if(e=i[l],s=this._computeVidx(e),null!=(h=t.call(this,e,s)))return h}else{for(e=this._physicalStart,s=this._virtualStart;e<this._physicalCount;e++,s++)if(null!=(h=t.call(this,e,s)))return h;for(e=0;e<this._physicalStart;e++,s++)if(null!=(h=t.call(this,e,s)))return h}},_computeVidx:function(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_assignModels:function(t){this._iterateItems(function(t,i){var e=this._physicalItems[t],s=this.items&&this.items[i];if(null!=s){var h=this.modelForElement(e);h.__key__=this._collection?this._collection.getKey(s):null,this._forwardProperty(h,this.as,s),this._forwardProperty(h,this.selectedAs,this.$.selector.isSelected(s)),this._forwardProperty(h,this.indexAs,i),this._forwardProperty(h,"tabIndex",this._focusedVirtualIndex===i?0:-1),this._physicalIndexForKey[h.__key__]=t,h._flushProperties&&h._flushProperties(!0),e.removeAttribute("hidden")}else e.setAttribute("hidden","")},t)},_updateMetrics:function(t){Polymer.flush?Polymer.flush():Polymer.dom.flush();var i=0,e=0,s=this._physicalAverageCount,h=this._physicalAverage;this._iterateItems(function(t,s){e+=this._physicalSizes[t]||0,this._physicalSizes[t]=this._physicalItems[t].offsetHeight,i+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0},t),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(e=1===this._itemsPerRow?e:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+i-e,this._itemsPerRow=1),this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((h*s+i)/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 t=this._physicalTop;if(this.grid){var i=this._itemsPerRow*this._itemWidth,e=(this._viewportWidth-i)/2;this._iterateItems(function(i,s){var h=s%this._itemsPerRow,l=Math.floor(h*this._itemWidth+e);this._isRTL&&(l*=-1),this.translate3d(l+"px",t+"px",0,this._physicalItems[i]),this._shouldRenderNextRow(s)&&(t+=this._rowHeight)})}else this._iterateItems(function(i,e){this.translate3d(0,t+"px",0,this._physicalItems[i]),t+=this._physicalSizes[i]})},_getPhysicalSizeIncrement:function(t){return this.grid?this._computeVidx(t)%this._itemsPerRow!=this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[t]},_shouldRenderNextRow:function(t){return t%this._itemsPerRow==this._itemsPerRow-1},_adjustScrollPosition:function(){var t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop=this._physicalTop-t;var e=this._scrollTop;!i&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition:function(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(t){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((t=(t=(t=t||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(t){return this.scrollToIndex(this.items.indexOf(t))},scrollToIndex:function(t){if(!("number"!=typeof t||t<0||t>this.items.length-1)&&(Polymer.flush?Polymer.flush():Polymer.dom.flush(),0!==this._physicalCount)){t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=this.grid?t-2*this._itemsPerRow:t-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var i=this._physicalStart,e=this._virtualStart,s=0,h=this._hiddenContentSize;e<t&&s<=h;)s+=this._getPhysicalSizeIncrement(i),i=(i+1)%this._physicalCount,e++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),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;Math.abs(this._viewportHeight-this._scrollTargetHeight);this.updateViewportBoundaries(),this._isVisible?(this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},s)},selectItem:function(t){return this.selectIndex(this.items.indexOf(t))},selectIndex:function(t){if(!(t<0||t>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(t)){var i=this.modelForElement(this._physicalItems[this._getPhysicalIndex(t)]);i&&(i[this.selectedAs]=!0),this.updateSizeForIndex(t)}this.$.selector.selectIndex?this.$.selector.selectIndex(t):this.$.selector.select(this.items[t])}},deselectItem:function(t){return this.deselectIndex(this.items.indexOf(t))},deselectIndex:function(t){t<0||t>=this._virtualCount||(this._isIndexRendered(t)&&(this.modelForElement(this._physicalItems[this._getPhysicalIndex(t)])[this.selectedAs]=!1,this.updateSizeForIndex(t)),this.$.selector.deselectIndex?this.$.selector.deselectIndex(t):this.$.selector.deselect(this.items[t]))},toggleSelectionForItem:function(t){return this.toggleSelectionForIndex(this.items.indexOf(t))},toggleSelectionForIndex:function(t){(this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(t):this.$.selector.isSelected(this.items[t]))?this.deselectIndex(t):this.selectIndex(t)},clearSelection:function(){this._iterateItems(function(t,i){this.modelForElement(this._physicalItems[t])[this.selectedAs]=!1}),this.$.selector.clearSelection()},_selectionEnabledChanged:function(t){(t?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")},_selectionHandler:function(t){var i=this.modelForElement(t.target);if(i){var e,s,h=Polymer.dom(t).path[0],l=this._itemsParent.node.domHost,o=Polymer.dom(l?l.root:document).activeElement,r=this._physicalItems[this._getPhysicalIndex(i[this.indexAs])];"input"!==h.localName&&"button"!==h.localName&&"select"!==h.localName&&(e=i.tabIndex,i.tabIndex=-100,s=o?o.tabIndex:-1,i.tabIndex=e,o&&r!==o&&r.contains(o)&&-100!==s||this.toggleSelectionForItem(i[this.as]))}},_multiSelectionChanged:function(t){this.clearSelection(),this.$.selector.multi=t},updateSizeForItem:function(t){return this.updateSizeForIndex(this.items.indexOf(t))},updateSizeForIndex:function(t){return this._isIndexRendered(t)?(this._updateMetrics([this._getPhysicalIndex(t)]),this._positionItems(),null):null},_manageFocus:function(){var t=this._focusedVirtualIndex;t>=0&&t<this._virtualCount?this._isIndexRendered(t)?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(t){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(t/this._itemsPerRow)*this._itemsPerRow:t},_isIndexRendered:function(t){return t>=this._virtualStart&&t<=this._virtualEnd},_isIndexVisible:function(t){return t>=this.firstVisibleIndex&&t<=this.lastVisibleIndex},_getPhysicalIndex:function(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},focusItem:function(t){this._focusPhysicalItem(t)},_focusPhysicalItem:function(t){if(!(t<0||t>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(t)||this.scrollToIndex(t);var i,e=this._physicalItems[this._getPhysicalIndex(t)],s=this.modelForElement(e);s.tabIndex=-100,-100===e.tabIndex&&(i=e),i||(i=Polymer.dom(e).querySelector('[tabindex="-100"]')),s.tabIndex=0,this._focusedVirtualIndex=t,i&&i.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 t=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var i=this.stamp(null);this._focusBackfillItem=i.root.querySelector("*"),this._itemsParent.appendChild(i.root)}this._offscreenFocusedItem=this._physicalItems[t],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[t]=this._focusBackfillItem,this._focusedPhysicalIndex=t,this.translate3d(0,"-10000px",0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(this._offscreenFocusedItem&&!(this._focusedVirtualIndex<0)){this._assignModels();var t=this._focusedPhysicalIndex,i=this._physicalItems[t];if(i){var e=this.modelForElement(i),s=this.modelForElement(this._offscreenFocusedItem);e[this.as]===s[this.as]?(this._focusBackfillItem=i,e.tabIndex=-1,this._physicalItems[t]=this._offscreenFocusedItem,this.translate3d(0,"-10000px",0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(t){var i=this.modelForElement(t.target),e=this.modelForElement(this._focusedItem),s=null!==this._offscreenFocusedItem,h=this._focusedVirtualIndex;i&&(e===i?this._isIndexVisible(h)||this.scrollToIndex(h):(this._restoreFocusedItem(),e&&(e.tabIndex=-1),i.tabIndex=0,h=i[this.indexAs],this._focusedVirtualIndex=h,this._focusedPhysicalIndex=this._getPhysicalIndex(h),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],s&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(t){switch(t.keyCode){case 40:t.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._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._selectionHandler(t)}},_clamp:function(t,i,e){return Math.min(e,Math.max(i,t))},_debounce:function(t,i,s){e?(this._debouncers=this._debouncers||{},this._debouncers[t]=Polymer.Debouncer.debounce(this._debouncers[t],s,i.bind(this)),Polymer.enqueueDebouncer(this._debouncers[t])):Polymer.dom.addDebouncer(this.debounce(t,i))},_forwardProperty:function(t,i,s){e?t._setPendingProperty(i,s):t[i]=s},_forwardHostPropV2:function(t,i){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(e){e&&this.modelForElement(e).forwardHostProp(t,i)},this)},_notifyInstancePropV2:function(t,i,e){if(Polymer.Path.matches(this.as,i)){var s=t[this.indexAs];i==this.as&&(this.items[s]=e),this.notifyPath(Polymer.Path.translate(this.as,"items."+s,i),e)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(t,i,e){0===i.indexOf(this.as+".")&&this.notifyPath("items."+t.__key__+"."+i.slice(this.as.length+1),e)},_forwardParentPath:function(t,i){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(e){e&&this.modelForElement(e).notifyPath(t,i,!0)},this)},_forwardParentProp:function(t,i){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(e){e&&(this.modelForElement(e)[t]=i)},this)}})}();</script><script>window.vaadin=window.vaadin||{},vaadin.elements=vaadin.elements||{},vaadin.elements.combobox=vaadin.elements.combobox||{},vaadin.elements.combobox.OverlayBehaviorImpl={properties:{positionTarget:{type:Object},verticalOffset:{type:Number,value:0},_alignedAbove:{type:Boolean,value:!1}},listeners:{"iron-resize":"_setPosition"},created:function(){this._boundSetPosition=this._setPosition.bind(this)},_unwrapIfNeeded:function(t){return Polymer.Settings.hasShadow&&!Polymer.Settings.nativeShadow?window.unwrap(t):t},_processPendingMutationObserversFor:function(t){window.CustomElements&&!Polymer.Settings.useNativeCustomElements&&CustomElements.takeRecords(t)},_moveTo:function(t){var e=this.parentNode;Polymer.dom(t).appendChild(this),e&&(this._processPendingMutationObserversFor(e),e.host&&!Polymer.Element&&Polymer.StyleTransformer.dom(this,e.host.is,this._scopeCssViaAttr,!0)),this._processPendingMutationObserversFor(this),t.host&&!Polymer.Element&&Polymer.StyleTransformer.dom(this,t.host.is,this._scopeCssViaAttr),t===document.body?(this.style.position=this._isPositionFixed(this.positionTarget)?"fixed":"absolute",window.addEventListener("scroll",this._boundSetPosition,!0),this._setPosition()):window.removeEventListener("scroll",this._boundSetPosition,!0)},_verticalOffset:function(t,e){return this._alignedAbove?-t.height:e.height+this.verticalOffset},_isPositionFixed:function(t){var e=this._getOffsetParent(t);return"fixed"===window.getComputedStyle(this._unwrapIfNeeded(t)).position||e&&this._isPositionFixed(e)},_getOffsetParent:function(t){if(t.assignedSlot)return t.assignedSlot.parentElement;if(t.parentElement)return t.offsetParent;var e=Polymer.dom(t).parentNode;return e&&11===e.nodeType&&e.host?e.host:void 0},_maxHeight:function(t){var e=Math.min(window.innerHeight,document.body.scrollHeight-document.body.scrollTop);return this._alignedAbove?Math.max(t.top-8+Math.min(document.body.scrollTop,0),116)+"px":Math.max(e-t.bottom-8,116)+"px"},_setPosition:function(t){if(t&&t.target){var e=t.target===document?document.body:t.target,i=this._unwrapIfNeeded(this.parentElement);if(!e.contains(this)&&!e.contains(this.positionTarget)||i!==document.body)return}var o=this.positionTarget.getBoundingClientRect();this._alignedAbove=this._shouldAlignAbove(),this.style.maxHeight=this._maxHeight(o),this.$.selector.style.maxHeight=this._maxHeight(o);var n=this.getBoundingClientRect();this._translateX=o.left-n.left+(this._translateX||0),this._translateY=o.top-n.top+(this._translateY||0)+this._verticalOffset(n,o);var s=window.devicePixelRatio||1;this._translateX=Math.round(this._translateX*s)/s,this._translateY=Math.round(this._translateY*s)/s,this.translate3d(this._translateX+"px",this._translateY+"px","0"),this.style.width=this.positionTarget.clientWidth+"px",this.updateViewportBoundaries()},_shouldAlignAbove:function(){return(window.innerHeight-this.positionTarget.getBoundingClientRect().bottom-Math.min(document.body.scrollTop,0))/window.innerHeight<.3}},vaadin.elements.combobox.OverlayBehavior=[Polymer.IronResizableBehavior,vaadin.elements.combobox.OverlayBehaviorImpl];</script><dom-module id="vaadin-combo-box-item" assetpath="../bower_components/vaadin-combo-box/"><template><style>:host{display:block;}</style><span id="content">[[label]]</span></template></dom-module><script>Polymer({is:"vaadin-combo-box-item",properties:{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},_itemTemplateInstance:Object},observers:['_updateTemplateInstanceVariable("index", index, _itemTemplateInstance)','_updateTemplateInstanceVariable("item", item, _itemTemplateInstance)','_updateTemplateInstanceVariable("selected", selected, _itemTemplateInstance)','_updateTemplateInstanceVariable("focused", focused, _itemTemplateInstance)'],attached:function(){if(!this._itemTemplateInstance){var e=this.domHost.dataHost||this.domHost.__dataHost;e._ensureTemplatized(),e._itemTemplate&&(this._itemTemplateInstance=e.stamp({}),Polymer.dom(this.root).removeChild(this.$.content),Polymer.dom(this.root).appendChild(this._itemTemplateInstance.root))}},_updateTemplateInstanceVariable:function(e,t,a){void 0!==e&&void 0!==t&&void 0!==a&&(a[e]=t)}});</script><dom-module id="vaadin-spinner" assetpath="../bower_components/vaadin-combo-box/"><template><style>@keyframes vaadin-spin-360{100%{transform:rotate(1turn);}}:host{display:block;box-sizing:border-box;border:2px solid var(--primary-color, #03A9F4);border-radius:50%;border-right-color:transparent;border-top-color:transparent;content:"";height:24px;left:50%;margin-left:-12px;margin-top:-12px;position:absolute;top:50%;width:24px;pointer-events:none;opacity:0;}:host([active]){opacity:1;animation:vaadin-spin-360 400ms linear infinite;}</style></template><script>Polymer({is:"vaadin-spinner",properties:{active:{type:Boolean,reflectToAttribute:!0}}});</script></dom-module><dom-module id="vaadin-combo-box-overlay" assetpath="../bower_components/vaadin-combo-box/"><template><style>:host{position:absolute;@apply --shadow-elevation-2dp;background:#fff;border-radius:0 0 2px 2px;top:0;left:0;pointer-events:auto;z-index:200;overflow:hidden;}#scroller{overflow:auto;max-height:var(--vaadin-combo-box-overlay-max-height, 65vh);transform:translate3d(0, 0, 0);-webkit-overflow-scrolling:touch;}#selector{--iron-list-items-container:{border-top:8px solid transparent;border-bottom:8px solid transparent;};}#selector vaadin-combo-box-item{cursor:pointer;padding:13px 16px;color:var(--primary-text-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}:host([opened][loading]){display:block !important;height:58px;}#selector:not([touch-device]) vaadin-combo-box-item:hover,
#selector vaadin-combo-box-item[focused]{background:#eee;}#selector vaadin-combo-box-item[selected]{color:var(--primary-color);}#selector vaadin-combo-box-item[hidden]{display:none;}</style><vaadin-spinner active="[[loading]]"></vaadin-spinner><div id="scroller" scroller="[[_getScroller()]]" on-tap="_stopPropagation" on-touchstart="_onTouchStart" on-touchend="_preventDefault" on-scroll="_onScroll" hidden$="[[loading]]"><iron-list id="selector" touch-device$="[[touchDevice]]" role="listbox" items="[[_items]]" scroll-target="[[_getScroller()]]"><template><vaadin-combo-box-item on-tap="_onTap" index="[[index]]" item="[[item]]" label="[[getItemLabel(item)]]" selected="[[_isItemSelected(item, _selectedItem)]]" role$="[[_getAriaRole(index)]]" aria-selected$="[[_getAriaSelected(_focusedIndex,index)]]" focused="[[_isItemFocused(_focusedIndex,index)]]"></vaadin-combo-box-item></template></iron-list></div></template></dom-module><script>Polymer({is:"vaadin-combo-box-overlay",behaviors:[vaadin.elements.combobox.OverlayBehavior],properties:{touchDevice:{type:Boolean,reflectToAttribute:!0,value:function(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}},loading:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"notifyResize"},_selectedItem:{type:Object},_items:{type:Object},_focusedIndex:{type:Number,notify:!0,value:-1,observer:"_focusedIndexChanged"},_focusedItem:{type:String,computed:"_getFocusedItem(_focusedIndex)"},_itemLabelPath:{type:String,value:"label"},_itemValuePath:{type:String,value:"value"},_notTapping:Boolean,_ignoreTaps:Boolean},ready:function(){this._patchWheelOverScrolling(),void 0!==this.$.selector._scroller&&(this.$.selector._scroller=this._getScroller()),this._patchIronListStamping(),/Trident/.test(navigator.userAgent)&&this.$.scroller.setAttribute("unselectable","on")},_patchIronListStamping:function(){var t=this.$.selector.stamp;this.$.selector.stamp=function(e){return null===e&&(e={}),t.call(this,e)}},_getFocusedItem:function(t){if(t>=0)return this._items[t]},_isItemSelected:function(t,e){return t===e},_onTap:function(t){this._notTapping||this._ignoreTaps||this.fire("selection-changed",{item:t.model.item})},_onTouchStart:function(){this._notTapping=!1,this.async(function(){this._notTapping=!0},300)},_onScroll:function(){this._ignoreTaps=!0,this.debounce("restore-taps",function(){this._ignoreTaps=!1},300)},indexOfLabel:function(t){if(this._items&&t)for(var e=0;e<this._items.length;e++)if(this.getItemLabel(this._items[e]).toString().toLowerCase()===t.toString().toLowerCase())return e;return-1},getItemLabel:function(t){var e=t?this.get(this._itemLabelPath,t):void 0;return void 0===e&&(e=t?t.toString():""),e},_isItemFocused:function(t,e){return t==e},_getAriaSelected:function(t,e){return this._isItemFocused(t,e).toString()},_getAriaRole:function(t){return void 0!==t&&"option"},_focusedIndexChanged:function(t){t>=0&&this._scrollIntoView(t)},_scrollIntoView:function(t){var e=this._visibleItemsCount();if(void 0!==e){var i=t;t>this.$.selector.lastVisibleIndex-1?i=t-e+1:t>this.$.selector.firstVisibleIndex&&(i=this.$.selector.firstVisibleIndex),this.$.selector.scrollToIndex(Math.max(0,i));var o=this.$.selector._getPhysicalIndex(t),n=this.$.selector._physicalItems[o];if(n){var s=n.getBoundingClientRect(),r=this.$.scroller.getBoundingClientRect(),l=s.bottom-r.bottom+this._viewportTotalPaddingBottom;l>0&&(this.$.scroller.scrollTop+=l)}}},ensureItemsRendered:function(){this.$.selector._render()},adjustScrollPosition:function(){this._items&&this._scrollIntoView(this._focusedIndex)},_getScroller:function(){return this.$.scroller},_patchWheelOverScrolling:function(){var t=this.$.selector;t.addEventListener("wheel",function(e){var i=t._scroller||t.scrollTarget,o=0===i.scrollTop,n=i.scrollHeight-i.scrollTop-i.clientHeight<=1;o&&e.deltaY<0?e.preventDefault():n&&e.deltaY>0&&e.preventDefault()})},updateViewportBoundaries:function(){this._cachedViewportTotalPaddingBottom=void 0,this.$.selector.updateViewportBoundaries()},get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){var t=window.getComputedStyle(this._unwrapIfNeeded(this.$.selector.$.items));this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map(function(t){return parseInt(t,10)}).reduce(function(t,e){return t+e})}return this._cachedViewportTotalPaddingBottom},_visibleItemsCount:function(){return this.$.selector.flushDebouncer("_debounceTemplate"),this.$.selector.scrollToIndex(this.$.selector.firstVisibleIndex),this.updateViewportBoundaries(),this.$.selector.lastVisibleIndex-this.$.selector.firstVisibleIndex+1},_selectItem:function(t){t="number"==typeof t?this._items[t]:t,this.$.selector.selectedItem!==t&&this.$.selector.selectItem(t)},_preventDefault:function(t){t.cancelable&&t.preventDefault()},_stopPropagation:function(t){t.stopPropagation()}});</script><dom-module id="vaadin-combo-box-shared-styles" assetpath="../bower_components/vaadin-combo-box/"><template><style>:host([opened]){pointer-events:auto;}.rotate-on-open,
:host ::slotted(.rotate-on-open){transition:all 0.2s !important;}:host ::slotted(paper-input-container) .rotate-on-open{transition:all 0.2s !important;}:host([opened]) .rotate-on-open,
:host([opened]) ::slotted(.rotate-on-open){-webkit-transform:rotate(180deg);transform:rotate(180deg);}:host([opened]) ::slotted(paper-input-container) .rotate-on-open{-webkit-transform:rotate(180deg);transform:rotate(180deg);}paper-icon-button.small,
:host ::slotted(paper-icon-button.small){padding:6px !important;}:host ::slotted(paper-input-container) paper-icon-button.small{padding:6px !important;}:host(:not([has-value])) ::slotted([slot="clear-button"]),
:host([readonly]) ::slotted([slot="clear-button"]),
:host([disabled]) ::slotted([slot="clear-button"]),
:host([readonly]) ::slotted([slot="toggle-button"]),
:host([disabled]) ::slotted([slot="toggle-button"]),
:host(:not([has-value])) .clear-button,
:host([readonly]) .clear-button,
:host([disabled]) .clear-button,
:host([readonly]) .toggle-button,
:host([disabled]) .toggle-button{display:none;}:host(:not([has-value])) ::slotted(paper-input-container) [slot="clear-button"],
:host([readonly]) ::slotted(paper-input-container) [slot="clear-button"],
:host([readonly]) ::slotted(paper-input-container) [slot="toggle-button"],
:host([disabled]) ::slotted(paper-input-container) [slot="clear-button"],
:host([disabled]) ::slotted(paper-input-container) [slot="toggle-button"]{display:none;}</style></template><script>Polymer({is:"vaadin-combo-box-shared-styles"});</script></dom-module><iron-iconset-svg size="24" name="vaadin-combo-box"><svg><defs><g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g><g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g></defs></svg></iron-iconset-svg><dom-module id="vaadin-combo-box" assetpath="../bower_components/vaadin-combo-box/"><template><style include="vaadin-combo-box-shared-styles">:host{display:block;padding:8px 0;}:host > #overlay{display:none;}paper-input-container{position:relative;padding:0;}paper-icon-button.clear-button,
paper-icon-button.toggle-button,
:host ::slotted(paper-icon-button[slot="toggle-button"]),
:host ::slotted(paper-icon-button[slot="clear-button"]){line-height:18px !important;width:32px;height:32px;padding:4px;text-align:center;color:rgba(0, 0, 0, .38);cursor:pointer;margin-top:-1px;--paper-icon-button-ink-color:rgba(0, 0, 0, .54);}:host ::slotted(paper-input-container) paper-icon-button[slot="toggle-button"],
:host ::slotted(paper-input-container) paper-icon-button[slot="clear-button"]{line-height:18px !important;width:32px;height:32px;padding:4px;text-align:center;color:rgba(0, 0, 0, .38);cursor:pointer;margin-top:-1px;--paper-icon-button-ink-color:rgba(0, 0, 0, .54);}paper-input-container paper-icon-button:hover,
paper-input-container ::slotted(paper-icon-button:hover),
:host([opened]) paper-input-container paper-icon-button,
:host([opened]) paper-input-container ::slotted(paper-icon-button){color:rgba(0, 0, 0, .54);}:host ::slotted(paper-input-container) paper-icon-button:hover,
:host([opened]) ::slotted(paper-input-container) paper-icon-button{color:rgba(0, 0, 0, .54);}:host([opened]) paper-input-container ::slotted(paper-icon-button:hover),
:host([opened]) paper-input-container paper-icon-button:hover{color:rgba(0, 0, 0, .86);}:host([opened]) ::slotted(paper-input-container) paper-icon-button:hover{color:rgba(0, 0, 0, .86);}:host([opened]) paper-input-container{z-index:20;}:host [slot=suffix]{display:flex;}input::-ms-clear{display:none;}input{position:relative;outline:none;box-shadow:none;padding:0;width:100%;max-width:100%;background:transparent;border:none;color:var(--paper-input-container-input-color, var(--primary-text-color));-webkit-appearance:none;text-align:inherit;vertical-align:bottom;min-width:0;@apply --paper-font-subhead;@apply --paper-input-container-input;}</style><paper-input-container id="inputContainer" disabled$="[[disabled]]" no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" invalid="[[invalid]]"><label id="label" slot="label" on-down="_preventDefault" hidden$="[[!label]]" aria-hidden="true" on-tap="_openAsync" for="input">[[label]]</label><slot name="prefix" slot="prefix"></slot><iron-input slot="input" id="ironinput" bind-value="{{_inputElementValue}}" allowed-pattern="[[allowedPattern]]" prevent-invalid-input="[[preventInvalidInput]]" invalid="{{invalid}}" on-change="_stopPropagation" label="[[label]]"><input id="input" type="text" role="combobox" autocomplete="off" autocapitalize="none" aria-label$="[[label]]" aria-expanded$="[[_getAriaExpanded(opened)]]" aria-autocomplete="list" disabled$="[[disabled]]" pattern$="[[pattern]]" required$="[[required]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" size$="[[size]]" on-input="_inputValueChanged" on-blur="_onBlur" on-change="_stopPropagation" key-event-target=""></iron-input><slot name="suffix" slot="suffix"></slot><div slot="suffix" suffix=""><span><slot name="clear-button"><paper-icon-button id="clearIcon" tabindex="-1" aria-label="Clear" icon="vaadin-combo-box:clear" class="clear-button small"></paper-icon-button></slot></span><span><slot name="toggle-button"><paper-icon-button id="toggleIcon" tabindex="-1" icon="vaadin-combo-box:arrow-drop-down" aria-label="Toggle" aria-expanded$="[[_getAriaExpanded(opened)]]" class="toggle-button rotate-on-open"></paper-icon-button></slot></span></div><template is="dom-if" if="[[errorMessage]]"><paper-input-error>[[errorMessage]]</paper-input-error></template></paper-input-container><vaadin-combo-box-overlay id="overlay" opened$="[[opened]]" position-target="[[_getPositionTarget()]]" _focused-index="[[_focusedIndex]]" _item-label-path="[[itemLabelPath]]" on-down="_onOverlayDown" loading="[[loading]]" on-mousedown="_preventDefault" vertical-offset="2"></vaadin-combo-box-overlay></template></dom-module><script>Polymer({is:"vaadin-combo-box",behaviors:[Polymer.IronValidatableBehavior,vaadin.elements.combobox.ComboBoxBehavior],properties:{label:{type:String,reflectToAttribute:!0},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},disabled:{type:Boolean,value:!1},preventInvalidInput:{type:Boolean},allowedPattern:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},autofocus:{type:Boolean},inputmode:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},focused:{type:Boolean,value:!1,readOnly:!0,reflectToAttribute:!0,notify:!0}},attributeChanged:function(e,t){/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root&&Array.prototype.forEach.call(this.root.querySelectorAll("*"),function(e){e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""})},ready:function(){this.$.inputContainer.addEventListener("focused-changed",this._onInputContainerFocusedChanged.bind(this)),this._setInputElement(this.$.input),this._bindableInput=this.$.ironinput},attached:function(){this._toggleElement=Polymer.dom(this).querySelector("[slot=toggle-button]")||this.$.toggleIcon,this._clearElement=Polymer.dom(this).querySelector("[slot=clear-button]")||this.$.clearIcon,this._preventInputBlur()},detached:function(){this._restoreInputBlur()},_computeAlwaysFloatLabel:function(e,t){return t||e},_getPositionTarget:function(){return this.$.inputContainer},_getAriaExpanded:function(e){return e.toString()},focus:function(){this.inputElement.focus()},blur:function(){this.inputElement.blur()},_onInputContainerFocusedChanged:function(e){this._setFocused(e.detail.value)}});</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var l=o.get;if(void 0!==l)return l.call(r)};if(Polymer&&0!==Polymer.version.indexOf("2."))throw new Error("Unexpected Polymer version "+Polymer.version+" is used, expected v2.0.0 or later.");window.Vaadin=window.Vaadin||{},Vaadin.ThemableMixin=function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,e),_createClass(n,null,[{key:"includeStyle",value:function(e){var t=document.createElement("style");t.setAttribute("include",e),this._memoizedThemableMixinTemplate.content.appendChild(t)}},{key:"template",get:function(){var e=this,t=Polymer.DomModule.prototype.modules;if(_get(n.__proto__||Object.getPrototypeOf(n),"template",this)&&!this.hasOwnProperty("_memoizedThemableMixinTemplate")){this._memoizedThemableMixinTemplate=_get(n.__proto__||Object.getPrototypeOf(n),"template",this).cloneNode(!0);var r=!1,o=this.is+"-default-theme";Object.keys(t).forEach(function(n){if(n!==o){var i=t[n].getAttribute("theme-for");i&&i.split(" ").forEach(function(t){new RegExp("^"+t.split("*").join(".*")+"$").test(e.is)&&(r=!0,e.includeStyle(n))})}}),!r&&t[o]&&this.includeStyle(o)}return this._memoizedThemableMixinTemplate}}]),n}()};</script><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _get=function e(t,n,o){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,n,o)}if("value"in i)return i.value;var r=i.get;if(void 0!==r)return r.call(o)},_createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();window.Vaadin=window.Vaadin||{},Vaadin.TabIndexMixin=function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,e),_createClass(n,null,[{key:"properties",get:function(){var e={tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}};return window.ShadyDOM&&(e.tabIndex=e.tabindex),e}}]),n}()},Vaadin.ControlStateMixin=function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,Vaadin.TabIndexMixin(e)),_createClass(n,[{key:"ready",value:function(){var e=this;this.addEventListener("focusin",function(t){t.composedPath()[0]===e?e._focus(t):-1===t.composedPath().indexOf(e.focusElement)||e.disabled||e._setFocused(!0)}),this.addEventListener("focusout",function(t){return e._setFocused(!1)}),_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this.addEventListener("keydown",function(t){t.shiftKey&&9===t.keyCode&&(e._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(e),e._setFocused(!1),setTimeout(function(){return e._isShiftTabbing=!1},0))}),!this.autofocus||this.focused||this.disabled||window.requestAnimationFrame(function(){e._focus(),e._setFocused(!0),e.setAttribute("focus-ring","")}),this._boundKeydownListener=this._bodyKeydownListener.bind(this),this._boundKeyupListener=this._bodyKeyupListener.bind(this)}},{key:"connectedCallback",value:function(){_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"connectedCallback",this).call(this),document.body.addEventListener("keydown",this._boundKeydownListener,!0),document.body.addEventListener("keyup",this._boundKeyupListener,!0)}},{key:"disconnectedCallback",value:function(){_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"disconnectedCallback",this).call(this),document.body.removeEventListener("keydown",this._boundKeydownListener,!0),document.body.removeEventListener("keyup",this._boundKeyupListener,!0)}},{key:"_focusedChanged",value:function(e){this.focused&&this._tabPressed?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}},{key:"_bodyKeydownListener",value:function(e){this._tabPressed=9===e.keyCode}},{key:"_bodyKeyupListener",value:function(){this._tabPressed=!1}},{key:"_focus",value:function(e){this._isShiftTabbing||(this.focusElement.focus(),this._setFocused(!0))}},{key:"focus",value:function(){this.disabled||(this.focusElement.focus(),this._setFocused(!0))}},{key:"blur",value:function(){this.focusElement.blur(),this._setFocused(!1)}},{key:"_disabledChanged",value:function(e){this.focusElement.disabled=e,e?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(void 0!==this._previousTabIndex&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}},{key:"_tabindexChanged",value:function(e){void 0!==e&&(this.focusElement.tabIndex=e),this.disabled&&this.tabindex&&(-1!==this.tabindex&&(this._previousTabIndex=this.tabindex),this.tabindex=e=void 0),window.ShadyDOM&&this.setProperties({tabIndex:e,tabindex:e})}},{key:"focusElement",get:function(){return window.console.warn("Please implement the 'focusElement' property in <"+this.localName+">"),this}}],[{key:"properties",get:function(){return{autofocus:{type:Boolean},focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,observer:"_focusedChanged",reflectToAttribute:!0},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:Boolean}}}]),n}()};</script><script>function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var _createClass=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),_get=function t(e,n,r){null===e&&(e=Function.prototype);var o=Object.getOwnPropertyDescriptor(e,n);if(void 0===o){var i=Object.getPrototypeOf(e);return null===i?void 0:t(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)};window.Vaadin=window.Vaadin||{},Vaadin.FormElementMixin=function(t){return function(e){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,t),_createClass(n,[{key:"connectedCallback",value:function(){_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"connectedCallback",this).call(this),this.dispatchEvent(new CustomEvent("iron-form-element-register"),{bubbles:!0})}},{key:"disconnectedCallback",value:function(){if(_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"disconnectedCallback",this).call(this),this._parentForm){var t=new CustomEvent("iron-form-element-unregister");t.detail={target:this},this.dispatchEvent(t,{bubbles:!0})}}}],[{key:"properties",get:function(){return{_parentForm:{type:Object}}}}]),n}()};</script><dom-module id="vaadin-text-field-default-theme" theme-for="vaadin-text-field" assetpath="../bower_components/vaadin-text-field/"><template><style>[part="label"]{font-size:0.875em;font-weight:600;margin-bottom:0.25em;}[part="input-field"]{border:1px solid rgba(0, 0, 0, 0.3);background-color:#fff;padding:0.25em;}:host([focused]) [part="input-field"]{box-shadow:0 0 2px 2px Highlight;}:host([invalid]) [part="input-field"]{border-color:red;}:host([disabled]){opacity:0.5;}[part="value"]{border:0;background:transparent;padding:0;margin:0;font:inherit;outline:none;box-shadow:none;}[part="error-message"]{font-size:0.875em;margin-top:0.25em;color:red;}</style></template></dom-module><dom-module id="vaadin-text-field" assetpath="../bower_components/vaadin-text-field/"><template><style>:host{display:inline-block;width:175px;outline:none;}.container{display:flex;flex-direction:column;position:relative;}[part="label"]:empty{display:none;}[part="input-field"]{display:flex;align-items:center;}[part="value"]{width:100%;box-sizing:border-box;flex:1;min-width:0;}[part="value"]::-ms-clear{display:none;}</style><div class="container"><label part="label" on-click="focus" id="[[_labelId]]">[[label]]</label><div part="input-field"><slot name="prefix"></slot><input id="input" part="value" autocomplete$="[[autocomplete]]" autocorrect$="[[autocorrect]]" autofocus$="[[autofocus]]" disabled$="[[disabled]]" list="[[list]]" maxlength$="[[maxlength]]" minlength$="[[minlength]]" pattern="[[pattern]]" placeholder="[[placeholder]]" readonly$="[[readonly]]" aria-readonly$="[[readonly]]" required$="[[required]]" aria-required$="[[required]]" value="{{value::input}}" title="[[title]]" on-blur="validate" on-input="_onInput" aria-describedby$="[[_getActiveErrorId(invalid, errorMessage, _errorId)]]" aria-labelledby$="[[_getActiveLabelId(label, _labelId)]]" aria-invalid$="[[invalid]]"><slot name="suffix"></slot></div><div id="[[_errorId]]" aria-live="assertive" part="error-message" hidden$="[[!_getActiveErrorId(invalid, errorMessage, _errorId)]]">[[errorMessage]]</div></div></template><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),_get=function e(t,i,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,i,n)}if("value"in r)return r.value;var a=r.get;if(void 0!==a)return a.call(n)};if(!Polymer.Element)throw new Error("Unexpected Polymer version "+Polymer.version+" is used, expected v2.0.0 or later.");!function(){var e=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Vaadin.ControlStateMixin(Vaadin.FormElementMixin(Vaadin.ThemableMixin(Polymer.Element)))),_createClass(t,[{key:"_onInput",value:function(e){if(this.preventInvalidInput){var t=this.$.input;t.value.length>0&&!this.checkValidity()&&(t.value=this.value||"")}}},{key:"_valueChanged",value:function(e,t){""===e&&void 0===t||(this.invalid&&this.validate(),this._setHasValue(""!==e))}},{key:"validate",value:function(){return!(this.invalid=!this.checkValidity())}},{key:"_getActiveErrorId",value:function(e,t,i){return t&&e?i:void 0}},{key:"_getActiveLabelId",value:function(e,t){return e?t:void 0}},{key:"checkValidity",value:function(){return this.$.input.checkValidity()}},{key:"ready",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),window.ShadyCSS&&window.ShadyCSS.nativeCss||this.updateStyles();var e=t._uniqueId=1+t._uniqueId||0;this._errorId=this.is+"-error-"+e,this._labelId=this.is+"-label-"+e}},{key:"attributeChangedCallback",value:function(e,i,n){if(_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"attributeChangedCallback",this).call(this,e,i,n),window.ShadyCSS&&window.ShadyCSS.nativeCss||!/^(focused|focus-ring|invalid|disabled|placeholder|has-value)$/.test(e)||this.updateStyles(),/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&this.root){this.root.querySelectorAll("*").forEach(function(e){e.style["-webkit-backface-visibility"]="visible",e.style["-webkit-backface-visibility"]=""})}}},{key:"focusElement",get:function(){return this.$.input}}],[{key:"is",get:function(){return"vaadin-text-field"}},{key:"properties",get:function(){return{autocomplete:{type:String},autocorrect:{type:String},errorMessage:{type:String,value:""},label:{type:String,value:""},list:{type:String},maxlength:{type:Number},minlength:{type:Number},name:{type:String},pattern:{type:String},placeholder:{type:String},readonly:{type:Boolean},required:{type:Boolean},title:{type:String},value:{type:String,value:"",observer:"_valueChanged",notify:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},hasValue:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},preventInvalidInput:{type:Boolean},_labelId:{type:String},_errorId:{type:String}}}}]),t}();customElements.define(e.is,e),window.Vaadin=window.Vaadin||{},Vaadin.TextFieldElement=e}();</script></dom-module><dom-module id="vaadin-button-default-theme" assetpath="../bower_components/vaadin-button/"><template><style></style></template></dom-module><dom-module id="vaadin-button" assetpath="../bower_components/vaadin-button/"><template><style>:host{display:inline-block;position:relative;outline:none;}[part="button"]{width:100%;height:100%;margin:0;overflow:visible;}</style><button id="button" type="button" part="button"><slot></slot></button></template><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var u=o.get;if(void 0!==u)return u.call(r)};if(!Polymer.Element)throw new Error("Unexpected Polymer version "+Polymer.version+" is used, expected v2.0.0 or later.");var ButtonElement=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Vaadin.ControlStateMixin(Vaadin.ThemableMixin(Polymer.GestureEventListeners(Polymer.Element)))),_createClass(t,[{key:"ready",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.setAttribute("role","button"),this.$.button.setAttribute("role","presentation"),this._addActiveListeners()}},{key:"_addActiveListeners",value:function(){var e=this;Polymer.Gestures.addListener(this,"down",function(){return!e.disabled&&e.setAttribute("active","")}),Polymer.Gestures.addListener(this,"up",function(){return e.removeAttribute("active")}),this.addEventListener("keydown",function(t){return!e.disabled&&[13,32].indexOf(t.keyCode)>=0&&e.setAttribute("active","")}),this.addEventListener("keyup",function(){return e.removeAttribute("active")})}},{key:"focusElement",get:function(){return this.$.button}}],[{key:"is",get:function(){return"vaadin-button"}}]),t}();customElements.define(ButtonElement.is,ButtonElement),window.Vaadin=window.Vaadin||{},Vaadin.ButtonElement=ButtonElement;</script></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();window.Vaadin=window.Vaadin||{},Vaadin.DatePickerHelper=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"_getISOWeekNumber",value:function(e){var t=e.getDay();0===t&&(t=7);var n=4-t,a=new Date(e.getTime()+24*n*3600*1e3),r=new Date(0,0);r.setFullYear(a.getFullYear());var u=a.getTime()-r.getTime(),l=Math.round(u/864e5);return Math.floor(l/7+1)}},{key:"_dateEquals",value:function(e,t){return e instanceof Date&&t instanceof Date&&e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}},{key:"_dateAllowed",value:function(e,t,n){return(!t||e>=t)&&(!n||e<=n)}},{key:"_getClosestDate",value:function(e,t){return t.filter(function(e){return void 0!==e}).reduce(function(t,n){return n?t?Math.abs(e.getTime()-n.getTime())<Math.abs(t.getTime()-e.getTime())?n:t:n:t})}}]),e}();</script><style>@font-face{font-family:'vaadin-date-picker-icons';src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAYoAAsAAAAABdwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFqWNtYXAAAAFoAAAAVAAAAFQXVtKKZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAUAAAAFAAtWm1WhlYWQAAAMEAAAANgAAADYNRs5taGhlYQAAAzwAAAAkAAAAJAdCA8lobXR4AAADYAAAACAAAAAgFW4CxGxvY2EAAAOAAAAAEgAAABIBEgDCbWF4cAAAA5QAAAAgAAAAIAAMACNuYW1lAAADtAAAAlIAAAJSbLEfa3Bvc3QAAAYIAAAAIAAAACAAAwAAAAMDfAGQAAUAAAKZAswAAACPApkCzAAAAesAMwEJAAAAAAAAAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAQAAA6QMDwP/AAEADwABAAAAAAQAAAAAAAAAAAAAAIAAAAAAAAwAAAAMAAAAcAAEAAwAAABwAAwABAAAAHAAEADgAAAAKAAgAAgACAAEAIOkD//3//wAAAAAAIOkA//3//wAB/+MXBAADAAEAAAAAAAAAAAAAAAEAAf//AA8AAQAAAAAAAAAAAAIAADc5AQAAAAABAAAAAAAAAAAAAgAANzkBAAAAAAEAAAAAAAAAAAACAAA3OQEAAAAAAQFvAKsCqwKrAAUAAAEHFwcXAQGrPMPDPAEAAqs8xMQ8AQAAAQDVAIADKwLVAAsAAAEnBycHFwcXNxc3JwMrPO/vPO/vPO/vPO8CmTzu7jzu7zzv7zzvAAMAgAArA4ADgAADABwAIAAAASMVMwMVITUjFSMiBhURFBYzITI2NRE0JisBNSMTIREhAtXV1Sr+qlUrIzIyIwJWIzIyIytVgP2qAlYBq9YCq1VVVTIk/asjMjIjAlUkMlX9AAHVAAAAAQAAAAADbgNuABMAAAEUDgIjIi4CNTQ+AjMyHgIDbkV3oFtboHdFRXegW1ugd0UBt1ugd0VFd6BbW6B3RUV3oAAAAAABAAAAAQAAvCcusV8PPPUACwQAAAAAANVURPgAAAAA1VRE+AAAAAADgAOAAAAACAACAAAAAAAAAAEAAAPA/8AAAAQAAAAAAAOAAAEAAAAAAAAAAAAAAAAAAAAIBAAAAAAAAAAAAAAAAgAAAAQAAW8EAADVBAAAgANuAAAAAAAAAAoAFAAeADAASgB+AKAAAAABAAAACAAhAAMAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAADgCuAAEAAAAAAAEAGAAAAAEAAAAAAAIABwD5AAEAAAAAAAMAGABpAAEAAAAAAAQAGAEOAAEAAAAAAAUACwBIAAEAAAAAAAYAGACxAAEAAAAAAAoAGgFWAAMAAQQJAAEAMAAYAAMAAQQJAAIADgEAAAMAAQQJAAMAMACBAAMAAQQJAAQAMAEmAAMAAQQJAAUAFgBTAAMAAQQJAAYAMADJAAMAAQQJAAoANAFwdmFhZGluLWRhdGUtcGlja2VyLWljb25zAHYAYQBhAGQAaQBuAC0AZABhAHQAZQAtAHAAaQBjAGsAZQByAC0AaQBjAG8AbgBzVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwdmFhZGluLWRhdGUtcGlja2VyLWljb25zAHYAYQBhAGQAaQBuAC0AZABhAHQAZQAtAHAAaQBjAGsAZQByAC0AaQBjAG8AbgBzdmFhZGluLWRhdGUtcGlja2VyLWljb25zAHYAYQBhAGQAaQBuAC0AZABhAHQAZQAtAHAAaQBjAGsAZQByAC0AaQBjAG8AbgBzUmVndWxhcgBSAGUAZwB1AGwAYQBydmFhZGluLWRhdGUtcGlja2VyLWljb25zAHYAYQBhAGQAaQBuAC0AZABhAHQAZQAtAHAAaQBjAGsAZQByAC0AaQBjAG8AbgBzRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==") format('woff');font-weight:normal;font-style:normal;}</style><dom-module id="vaadin-date-picker-default-theme" theme-for="vaadin-date-picker vaadin-date-picker-light" assetpath="../bower_components/vaadin-date-picker/"><template><style>[part="clear-button"],
[part="toggle-button"]{cursor:pointer;display:flex;align-items:center;justify-content:center;}</style></template></dom-module><dom-module id="vaadin-date-picker-overlay-default-theme" theme-for="vaadin-date-picker-overlay" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.3);}[part="overlay-header"]{background:#eee;padding:1em;position:relative;}[part="clear-button"],
[part="toggle-button"]{height:1.4em;width:1.4em;font-size:1.4em;margin-left:0.6em;cursor:pointer;display:flex;align-items:center;justify-content:center;}[part="years-toggle-button"]{background:#eee;align-items:center;}[part="years-toggle-button"]::before{font-size:1.4em;line-height:1em;}[part="years"]{background:#ddd;cursor:pointer;}[part="years"]::before{border-left-color:#fff;z-index:1;}[part="toolbar"]{padding:1em;background:#eee;}[part="year-number"],
[part="year-separator"]{display:flex;align-items:center;justify-content:center;height:50%;transform:translateY(-50%);}[part="year-separator"]::after{font-family:'vaadin-date-picker-icons';content:"\e903";font-size:4px;}</style></template></dom-module><dom-module id="vaadin-month-calendar-default-theme" theme-for="vaadin-month-calendar" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}[part="weekday"]:empty,
[part="week-numbers"]{width:2em;}[part="month-header"],
[part="weekday"],
[part="week-number"],
[part="date"]{text-align:center;cursor:default;box-sizing:border-box;padding:0.5em 0;display:flex;justify-content:center;align-items:center;}[part="month-header"],
[part="date"][selected]{font-weight:600;}[part="weekday"],
[part="week-number"]{opacity:0.5;}[part="week-number"],
[part="date"]{height:2.5em;}[part="date"]:not(:empty){cursor:pointer;}[part="date"][focused]{background:#eee;}:host([focused]) [part="date"][focused]{background:#ddd;}[part="date"][disabled]{opacity:0.3;cursor:default;}</style></template></dom-module><dom-module id="vaadin-month-calendar" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{display:block;}[part="weekdays"],
#days{display:flex;flex-wrap:wrap;flex-grow:1;}#days-container,
#weekdays-container{display:flex;}[part="week-numbers"]{display:flex;flex-direction:column;justify-content:space-between;flex-shrink:0;}[part="week-numbers"][hidden],
[part="weekday"][hidden]{display:none;}[part="weekday"],
[part="date"]{width:14.285714286%;}[part="weekday"]:empty,
[part="week-numbers"]{width:12.5%;flex-shrink:0;}</style><div part="month-header" role="heading">[[_getTitle(month, i18n.monthNames)]]</div><div id="monthGrid" on-tap="_handleTap" on-touchend="_preventDefault" on-touchstart="_onMonthGridTouchStart"><div id="weekdays-container"><div hidden="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]" part="weekday"></div><div part="weekdays"><template is="dom-repeat" items="[[_getWeekDayNames(i18n.weekdays, i18n.weekdaysShort, showWeekNumbers, i18n.firstDayOfWeek)]]"><div part="weekday" role="heading" aria-label$="[[item.weekDay]]">[[item.weekDayShort]]</div></template></div></div><div id="days-container"><div part="week-numbers" hidden="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"><template is="dom-repeat" items="[[_getWeekNumbers(_days)]]"><div part="week-number" role="heading" aria-label$="[[i18n.week]] [[item]]">[[item]]</div></template></div><div id="days"><template is="dom-repeat" items="[[_days]]"><div part="date" today$="[[_isToday(item)]]" selected$="[[_dateEquals(item, selectedDate)]]" focused$="[[_dateEquals(item, focusedDate)]]" date="[[item]]" disabled$="[[!_dateAllowed(item, minDate, maxDate)]]" role$="[[_getRole(item)]]" aria-label$="[[_getAriaLabel(item)]]" aria-disabled$="[[_getAriaDisabled(item, minDate, maxDate)]]">[[_getDate(item)]]</div></template></div></div></div></template><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),MonthCalendarElement=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Vaadin.ThemableMixin(Polymer.GestureEventListeners(Polymer.Element))),_createClass(t,[{key:"_dateEquals",value:function(e,t){return Vaadin.DatePickerHelper._dateEquals(e,t)}},{key:"_dateAllowed",value:function(e,t,n){return Vaadin.DatePickerHelper._dateAllowed(e,t,n)}},{key:"_isDisabled",value:function(e,t,n){var a=new Date(0,0);a.setFullYear(e.getFullYear()),a.setMonth(e.getMonth()),a.setDate(1);var r=new Date(0,0);return r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()+1),r.setDate(-1),!this._dateAllowed(a,t,n)&&!this._dateAllowed(r,t,n)}},{key:"_getTitle",value:function(e,t){if(void 0!==e&&void 0!==t)return this.i18n.formatTitle(t[e.getMonth()],e.getFullYear())}},{key:"_onMonthGridTouchStart",value:function(){var e=this;this._notTapping=!1,setTimeout(function(){return e._notTapping=!0},300)}},{key:"_dateAdd",value:function(e,t){e.setDate(e.getDate()+t)}},{key:"_applyFirstDayOfWeek",value:function(e,t){if(void 0!==e&&void 0!==t)return e.slice(t).concat(e.slice(0,t))}},{key:"_getWeekDayNames",value:function(e,t,n,a){if(void 0!==e&&void 0!==t&&void 0!==n&&void 0!==a)return e=this._applyFirstDayOfWeek(e,a),t=this._applyFirstDayOfWeek(t,a),e=e.map(function(e,n){return{weekDay:e,weekDayShort:t[n]}})}},{key:"_getDate",value:function(e){return e?e.getDate():""}},{key:"_showWeekNumbersChanged",value:function(e,t){e&&1===t?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}},{key:"_showWeekSeparator",value:function(e,t){return e&&1===t}},{key:"_isToday",value:function(e){return this._dateEquals(new Date,e)}},{key:"_getDays",value:function(e,t){if(void 0!==e&&void 0!==t){var n=new Date(0,0);for(n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()),n.setDate(1);n.getDay()!==t;)this._dateAdd(n,-1);for(var a=[],r=n.getMonth(),i=e.getMonth();n.getMonth()===i||n.getMonth()===r;)a.push(n.getMonth()===i?new Date(n.getTime()):null),this._dateAdd(n,1);return a}}},{key:"_getWeekNumber",value:function(e,t){if(void 0!==e&&void 0!==t)return e||(e=t.reduce(function(e,t){return!e&&t?t:e})),Vaadin.DatePickerHelper._getISOWeekNumber(e)}},{key:"_getWeekNumbers",value:function(e){var t=this;return e.map(function(n){return t._getWeekNumber(n,e)}).filter(function(e,t,n){return n.indexOf(e)===t})}},{key:"_handleTap",value:function(e){this.ignoreTaps||this._notTapping||!e.target.date||e.target.hasAttribute("disabled")||(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{bubbles:!0,composed:!0})))}},{key:"_preventDefault",value:function(e){e.preventDefault()}},{key:"_getRole",value:function(e){return e?"button":"presentational"}},{key:"_getAriaLabel",value:function(e){if(!e)return"";var t=this._getDate(e)+" "+this.i18n.monthNames[e.getMonth()]+" "+e.getFullYear()+", "+this.i18n.weekdays[e.getDay()];return this._isToday(e)&&(t+=", "+this.i18n.today),t}},{key:"_getAriaDisabled",value:function(e,t,n){if(void 0!==e&&void 0!==t&&void 0!==n)return this._dateAllowed(e,t,n)?"false":"true"}}],[{key:"is",get:function(){return"vaadin-month-calendar"}},{key:"properties",get:function(){return{month:{type:Date,value:new Date},selectedDate:{type:Date,notify:!0},focusedDate:Date,showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Date,value:null},maxDate:{type:Date,value:null},_days:{type:Array,computed:"_getDays(month, i18n.firstDayOfWeek, minDate, maxDate)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}},{key:"observers",get:function(){return["_showWeekNumbersChanged(showWeekNumbers, i18n.firstDayOfWeek)"]}}]),t}();customElements.define(MonthCalendarElement.is,MonthCalendarElement),window.Vaadin=window.Vaadin||{},Vaadin.MonthCalendarElement=MonthCalendarElement;</script></dom-module><dom-module id="vaadin-infinite-scroller" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{display:block;overflow:hidden;height:500px;}#scroller{position:relative;height:100%;overflow:auto;outline:none;margin-right:-40px;-webkit-overflow-scrolling:touch;-ms-overflow-style:none;overflow-x:hidden;}#scroller.notouchscroll{-webkit-overflow-scrolling:auto;}#scroller::-webkit-scrollbar{display:none;}.buffer{position:absolute;width:var(--vaadin-infinite-scroller-buffer-width, 100%);box-sizing:border-box;padding-right:40px;top:var(--vaadin-infinite-scroller-buffer-offset, 0);animation:fadein 0.2s;}@keyframes fadein{from{opacity:0;}to{opacity:1;}}</style><div id="scroller" on-scroll="_scroll"><div class="buffer"></div><div class="buffer"></div><div id="fullHeight"></div></div></template></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),_get=function e(t,i,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,i);if(void 0===r){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,i,n)}if("value"in r)return r.value;var o=r.get;if(void 0!==o)return o.call(n)},InfiniteScrollerElement=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Polymer.Element),_createClass(t,[{key:"ready",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this._buffers=Array.prototype.slice.call(this.root.querySelectorAll(".buffer")),this.$.fullHeight.style.height=2*this._initialScroll+"px";var e=this.querySelector("template");this._TemplateClass=Polymer.Templatize.templatize(e,this,{forwardHostProp:function(e,t){"index"!==e&&this._buffers.forEach(function(i){[].forEach.call(i.children,function(i){i._itemWrapper.instance[e]=t})})}}),navigator.userAgent.toLowerCase().indexOf("firefox")>-1&&(this.$.scroller.tabIndex=-1)}},{key:"_activated",value:function(e){e&&!this._initialized&&(this._createPool(),this._initialized=!0)}},{key:"_finishInit",value:function(){var e=this;this._initDone||(this._buffers.forEach(function(t){[].forEach.call(t.children,function(t){return e._ensureStampedInstance(t._itemWrapper)})},this),this._buffers[0].translateY||this._reset(),this._initDone=!0)}},{key:"_translateBuffer",value:function(e){var t=e?1:0;this._buffers[t].translateY=this._buffers[t?0:1].translateY+this._bufferHeight*(t?-1:1),this._buffers[t].style.transform="translate3d(0, "+this._buffers[t].translateY+"px, 0)",this._buffers[t].updated=!1,this._buffers.reverse()}},{key:"_scroll",value:function(){var e=this;if(!this._scrollDisabled){var t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());var i=this.root.querySelector(".buffer").offsetTop,n=t>this._buffers[1].translateY+this.itemHeight+i,r=t<this._buffers[0].translateY+this.itemHeight+i;(n||r)&&(this._translateBuffer(r),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=Polymer.Debouncer.debounce(this._debouncerScrollFinish,Polymer.Async.timeOut.after(200),function(){var t=e.$.scroller.getBoundingClientRect();e._isVisible(e._buffers[0],t)||e._isVisible(e._buffers[1],t)||(e.position=e.position)})}}},{key:"_reset",value:function(){var e=this;this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(function(e){e.style.transform="translate3d(0, "+e.translateY+"px, 0)"}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=Polymer.Debouncer.debounce(this._debouncerUpdateClones,Polymer.Async.timeOut.after(200),function(){e._buffers[0].updated=e._buffers[1].updated=!1,e._updateClones()}),this._scrollDisabled=!1}},{key:"_createPool",value:function(){var e=this,t=this.getBoundingClientRect();this._buffers.forEach(function(i){for(var n=0;n<e.bufferSize;n++)!function(){var n=document.createElement("div");n.style.height=e.itemHeight+"px",n.instance={};var r="vaadin-infinite-scroller-item-content-"+(Vaadin.InfiniteScrollerElement._contentIndex=Vaadin.InfiniteScrollerElement._contentIndex+1||0),s=document.createElement("slot");s.setAttribute("name",r),s._itemWrapper=n,i.appendChild(s),n.setAttribute("slot",r),e.appendChild(n),Polymer.dom.flush(),setTimeout(function(){e._isVisible(n,t)&&e._ensureStampedInstance(n)},1)}()},this),setTimeout(function(){Polymer.RenderStatus.afterNextRender(e,e._finishInit.bind(e))},1)}},{key:"_ensureStampedInstance",value:function(e){if(!e.firstElementChild){var t=e.instance;e.instance=new this._TemplateClass({}),e.appendChild(e.instance.root),Object.keys(t).forEach(function(i){e.instance.set(i,t[i])})}}},{key:"_updateClones",value:function(e){var t=this;this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;var i=e?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(function(n,r){if(!n.updated){var s=t._firstIndex+t.bufferSize*r;[].forEach.call(n.children,function(n,r){var o=n._itemWrapper;e&&!t._isVisible(o,i)||(o.instance.index=s+r)}),n.updated=!0}},this)}},{key:"_isVisible",value:function(e,t){var i=e.getBoundingClientRect();return i.bottom>t.top&&i.top<t.bottom}},{key:"position",set:function(e){var t=this;this._preventScrollEvent=!0,e>this._firstIndex&&e<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(e-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~e,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=e%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(function(){t.$.scroller.classList.remove("notouchscroll")},10))},get:function(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}},{key:"itemHeight",get:function(){if(!this._itemHeightVal){var e=window.ShadyCSS?window.ShadyCSS.getComputedStyleValue(this,"--vaadin-infinite-scroller-item-height"):getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height");this._itemHeightVal=parseInt(e)}return this._itemHeightVal}},{key:"_bufferHeight",get:function(){return this.itemHeight*this.bufferSize}}],[{key:"is",get:function(){return"vaadin-infinite-scroller"}},{key:"properties",get:function(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}}]),t}();customElements.define(InfiniteScrollerElement.is,InfiniteScrollerElement),window.Vaadin=window.Vaadin||{},Vaadin.InfiniteScrollerElement=InfiniteScrollerElement;</script><dom-module id="vaadin-date-picker-overlay" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{display:flex;flex-direction:column;height:100%;width:100%;outline:none;background:#fff;}[part="overlay-header"]{display:flex;flex-shrink:0;flex-wrap:nowrap;align-items:center;}:host(:not([fullscreen])) [part="overlay-header"]{display:none;}[part="label"]{flex-grow:1;}[part="clear-button"],
[part="toggle-button"],
[part="years-toggle-button"]::before{font-family:'vaadin-date-picker-icons';}[part="clear-button"]:not([showclear]){display:none;}[part="clear-button"]::before{content:"\e901";}[part="toggle-button"]::before{content:"\e902";}[part="years-toggle-button"]{display:flex;}[part="years-toggle-button"][desktop]{display:none;}[part="years-toggle-button"]::before{content:"\e900";}:host(:not([years-visible])) [part="years-toggle-button"]::before{transform:rotate(180deg);}#scrollers{display:flex;height:100%;width:100%;position:relative;overflow:hidden;}[part="months"],
[part="years"]{height:100%;}[part="months"]{--vaadin-infinite-scroller-item-height:270px;position:absolute;top:0;left:0;right:0;bottom:0;}#scrollers[desktop] [part="months"]{right:50px;transform:none !important;}[part="years"]{--vaadin-infinite-scroller-item-height:80px;width:50px;position:absolute;right:0;transform:translateX(100%);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;--vaadin-infinite-scroller-buffer-offset:50%;}#scrollers[desktop] [part="years"]{position:absolute;transform:none !important;}[part="years"]::before{content:'';display:block;background:transparent;width:0;height:0;position:absolute;left:0;top:50%;transform:translateY(-50%);border-width:6px;border-style:solid;border-color:transparent;border-left-color:#000;}:host(.animate) [part="months"],
:host(.animate) [part="years"]{transition:all 200ms;}[part="toolbar"]{display:flex;justify-content:space-between;z-index:2;flex-shrink:0;}[part~="overlay-header"]:not([desktop]){padding-bottom:40px;}[part~="years-toggle-button"]{position:absolute;top:auto;right:8px;bottom:0;z-index:1;padding:8px;}#announcer{display:inline-block;position:fixed;clip:rect(0, 0, 0, 0);clip-path:inset(100%);}</style><div id="announcer" role="alert" aria-live="polite">[[i18n.calendar]]</div><div part="overlay-header" on-touchend="_preventDefault" desktop$="[[_desktopMode]]" aria-hidden="true"><div part="label">[[_formatDisplayed(selectedDate, i18n.formatDate, label)]]</div><div part="clear-button" on-tap="_clear" showclear$="[[_showClear(selectedDate)]]"></div><div part="toggle-button" on-tap="_cancel"></div><div part="years-toggle-button" desktop$="[[_desktopMode]]" on-tap="_toggleYearScroller" aria-hidden="true">[[_yearAfterXMonths(_visibleMonthIndex)]]</div></div><div id="scrollers" desktop$="[[_desktopMode]]" on-track="_track"><vaadin-infinite-scroller id="monthScroller" on-custom-scroll="_onMonthScroll" on-touchstart="_onMonthScrollTouchStart" buffer-size="6" active="[[initialPosition]]" part="months"><template><vaadin-month-calendar i18n="[[i18n]]" month="[[_dateAfterXMonths(index)]]" selected-date="{{selectedDate}}" focused-date="[[focusedDate]]" ignore-taps="[[_ignoreTaps]]" show-week-numbers="[[showWeekNumbers]]" min-date="[[minDate]]" max-date="[[maxDate]]" focused$="[[_focused]]" part="month"></vaadin-month-calendar></template></vaadin-infinite-scroller><vaadin-infinite-scroller id="yearScroller" on-tap="_onYearTap" on-custom-scroll="_onYearScroll" on-touchstart="_onYearScrollTouchStart" buffer-size="25" active="[[initialPosition]]" part="years"><template><div part="year-number" role="button" current$="[[_isCurrentYear(index)]]" selected$="[[_isSelectedYear(index, selectedDate)]]">[[_yearAfterXYears(index)]]</div><div part="year-separator" aria-hidden="true"></div></template></vaadin-infinite-scroller></div><div on-touchend="_preventDefault" role="toolbar" part="toolbar"><vaadin-button id="todayButton" part="today-button" disabled="[[!_isTodayAllowed(minDate, maxDate)]]" on-tap="_onTodayTap">[[i18n.today]]</vaadin-button><vaadin-button id="cancelButton" part="cancel-button" on-tap="_cancel">[[i18n.cancel]]</vaadin-button></div><iron-media-query query="(min-width: 375px)" query-matches="{{_desktopMode}}"></iron-media-query></template><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var i=0;i<t.length;i++){var o=t[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,i,o){return i&&e(t.prototype,i),o&&e(t,o),t}}(),_get=function e(t,i,o){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,i);if(void 0===a){var s=Object.getPrototypeOf(t);return null===s?void 0:e(s,i,o)}if("value"in a)return a.value;var n=a.get;if(void 0!==n)return n.call(o)},DatePickerOverlayElement=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Vaadin.ThemableMixin(Polymer.GestureEventListeners(Polymer.Element))),_createClass(t,[{key:"ready",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),this.setAttribute("tabindex",0),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("tap",this._stopPropagation.bind(this)),this.addEventListener("focus",this._onOverlayFocus.bind(this)),this.addEventListener("blur",this._onOverlayBlur.bind(this))}},{key:"connectedCallback",value:function(){_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"connectedCallback",this).call(this),this._translateX=this._yearScrollerWidth,this._toggleAnimateClass(!0),Polymer.Gestures.setTouchAction(this.$.scrollers,"pan-y"),Polymer.IronA11yAnnouncer.requestAvailability()}},{key:"announceFocusedDate",value:function(){var e=this._currentlyFocusedDate(),t=[];Vaadin.DatePickerHelper._dateEquals(e,new Date)&&t.push(this.i18n.today),t=t.concat([this.i18n.weekdays[e.getDay()],e.getDate(),this.i18n.monthNames[e.getMonth()],e.getFullYear()]),this.showWeekNumbers&&1===this.i18n.firstDayOfWeek&&(t.push(this.i18n.week),t.push(Vaadin.DatePickerHelper._getISOWeekNumber(e))),this.dispatchEvent(new CustomEvent("iron-announce",{bubbles:!0,composed:!0,detail:{text:t.join(" ")}}))}},{key:"focusCancel",value:function(){this.$.cancelButton.focus()}},{key:"scrollToDate",value:function(e,t){this._scrollToPosition(this._differenceInMonths(e,this._originDate),t)}},{key:"_focusedDateChanged",value:function(e){this.revealDate(e)}},{key:"_isCurrentYear",value:function(e){return 0===e}},{key:"_isSelectedYear",value:function(e,t){if(t)return t.getFullYear()===this._originDate.getFullYear()+e}},{key:"revealDate",value:function(e){if(e){var t=this._differenceInMonths(e,this._originDate),i=this.$.monthScroller.position>t,o=this.$.monthScroller.clientHeight/this.$.monthScroller.itemHeight,a=this.$.monthScroller.position+o-1<t;i?this._scrollToPosition(t,!0):a&&this._scrollToPosition(t-o+1,!0)}}},{key:"_onOverlayFocus",value:function(){this._focused=!0}},{key:"_onOverlayBlur",value:function(){this._focused=!1}},{key:"_initialPositionChanged",value:function(e){this.scrollToDate(e)}},{key:"_repositionYearScroller",value:function(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+this._originDate.getMonth())/12}},{key:"_repositionMonthScroller",value:function(){this.$.monthScroller.position=12*this.$.yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this.$.monthScroller.position)}},{key:"_onMonthScroll",value:function(){this._repositionYearScroller(),this._doIgnoreTaps()}},{key:"_onYearScroll",value:function(){this._repositionMonthScroller(),this._doIgnoreTaps()}},{key:"_onYearScrollTouchStart",value:function(){var e=this;this._notTapping=!1,setTimeout(function(){return e._notTapping=!0},300),this._repositionMonthScroller()}},{key:"_onMonthScrollTouchStart",value:function(){this._repositionYearScroller()}},{key:"_doIgnoreTaps",value:function(){var e=this;this._ignoreTaps=!0,this._debouncer=Polymer.Debouncer.debounce(this._debouncer,Polymer.Async.timeOut.after(300),function(){return e._ignoreTaps=!1})}},{key:"_formatDisplayed",value:function(e,t,i){return e?t(e):i}},{key:"_onTodayTap",value:function(){var e=new Date;this.$.monthScroller.position===this._differenceInMonths(e,this._originDate)?(this.selectedDate=e,this._close()):this._scrollToCurrentMonth()}},{key:"_scrollToCurrentMonth",value:function(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}},{key:"_showClear",value:function(e){return!!e}},{key:"_onYearTap",value:function(e){if(!this._ignoreTaps&&!this._notTapping){var t=(e.detail.y-(this.$.yearScroller.getBoundingClientRect().top+this.$.yearScroller.clientHeight/2))/this.$.yearScroller.itemHeight;this._scrollToPosition(this.$.monthScroller.position+12*t,!0)}}},{key:"_scrollToPosition",value:function(e,t){var i=this;if(void 0===this._targetPosition){if(!t)return this.$.monthScroller.position=e,this._targetPosition=void 0,void this._repositionYearScroller();this._targetPosition=e;var o=function(e,t,i,o){return(e/=o/2)<1?i/2*e*e+t:(e--,-i/2*(e*(e-2)-1)+t)},a=t?300:0,s=0,n=this.$.monthScroller.position;window.requestAnimationFrame(function e(t){var r=t-(s=s||t);if(r<a){var l=o(r,n,i._targetPosition-n,a);i.$.monthScroller.position=l,window.requestAnimationFrame(e)}else i.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:i._targetPosition,oldPosition:n}})),i.$.monthScroller.position=i._targetPosition,i._targetPosition=void 0;setTimeout(i._repositionYearScroller.bind(i),1)})}else this._targetPosition=e}},{key:"_limit",value:function(e,t){return Math.min(t.max,Math.max(t.min,e))}},{key:"_handleTrack",value:function(e){if(!(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)){Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);var t=this._translateX+e.detail.ddx;this._translateX=this._limit(t,{min:0,max:this._yearScrollerWidth})}}},{key:"_track",value:function(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}},{key:"_toggleAnimateClass",value:function(e){e?this.classList.add("animate"):this.classList.remove("animate")}},{key:"_toggleYearScroller",value:function(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}},{key:"_openYearScroller",value:function(){this._translateX=0,this.setAttribute("years-visible","")}},{key:"_closeYearScroller",value:function(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}},{key:"_isYearScrollerVisible",value:function(){return this._translateX<this._yearScrollerWidth/2}},{key:"_translateXChanged",value:function(e){this._desktopMode||(this.$.monthScroller.style.transform="translateX("+(e-this._yearScrollerWidth)+"px)",this.$.yearScroller.style.transform="translateX("+e+"px)")}},{key:"_yearAfterXYears",value:function(e){var t=new Date(this._originDate);return t.setFullYear(parseInt(e)+this._originDate.getFullYear()),t.getFullYear()}},{key:"_yearAfterXMonths",value:function(e){return this._dateAfterXMonths(e).getFullYear()}},{key:"_dateAfterXMonths",value:function(e){var t=new Date(this._originDate);return t.setDate(1),t.setMonth(parseInt(e)+this._originDate.getMonth()),t}},{key:"_differenceInMonths",value:function(e,t){return 12*(e.getFullYear()-t.getFullYear())-t.getMonth()+e.getMonth()}},{key:"_differenceInYears",value:function(e,t){return this._differenceInMonths(e,t)/12}},{key:"_clear",value:function(){this.selectedDate="",this._close()}},{key:"_close",value:function(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}},{key:"_cancel",value:function(){this.focusedDate=this.selectedDate,this._close()}},{key:"_preventDefault",value:function(e){e.preventDefault()}},{key:"_eventKey",value:function(e){for(var t=["down","up","right","left","enter","space","home","end","pageup","pagedown","tab"],i=0;i<t.length;i++){var o=t[i];if(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,o))return o}}},{key:"_onKeydown",value:function(e){var t=this,i=this._currentlyFocusedDate(),o=e.composedPath().indexOf(this.$.todayButton)>=0,a=e.composedPath().indexOf(this.$.cancelButton)>=0,s=!o&&!a,n=this._eventKey(e);if("tab"===n){e.stopPropagation();var r=this.hasAttribute("fullscreen"),l=e.shiftKey;r?e.preventDefault():l&&s||!l&&a?(e.preventDefault(),this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))):l&&o?(this._focused=!0,setTimeout(function(){return t.revealDate(t.focusedDate)},1)):this._focused=!1}else if(n)switch(e.preventDefault(),e.stopPropagation(),n){case"down":this._moveFocusByDays(7),this.focus();break;case"up":this._moveFocusByDays(-7),this.focus();break;case"right":s&&this._moveFocusByDays(1);break;case"left":s&&this._moveFocusByDays(-1);break;case"enter":s||a?this._close():o&&this._onTodayTap();break;case"space":if(a)this._close();else if(o)this._onTodayTap();else{var h=this.focusedDate;Vaadin.DatePickerHelper._dateEquals(h,this.selectedDate)?(this.selectedDate="",this.focusedDate=h):this.selectedDate=h}break;case"home":this._moveFocusInsideMonth(i,"minDate");break;case"end":this._moveFocusInsideMonth(i,"maxDate");break;case"pagedown":this._moveFocusByMonths(e.shiftKey?12:1);break;case"pageup":this._moveFocusByMonths(e.shiftKey?-12:-1)}}},{key:"_currentlyFocusedDate",value:function(){return this.focusedDate||this.selectedDate||this.initialPosition||new Date}},{key:"_moveFocusByDays",value:function(e){var t=this._currentlyFocusedDate(),i=new Date(0,0);i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(t.getDate()+e),this._dateAllowed(i,this.minDate,this.maxDate)?(this.focusedDate=i,this._focusedMonthDate=this.focusedDate.getDate()):this._dateAllowed(t,this.minDate,this.maxDate)?e>0?(this.focusedDate=this.maxDate,this._focusedMonthDate=this.maxDate.getDate()):(this.focusedDate=this.minDate,this._focusedMonthDate=this.minDate.getDate()):(this.focusedDate=Vaadin.DatePickerHelper._getClosestDate(t,[this.minDate,this.maxDate]),this._focusedMonthDate=this.focusedDate.getDate())}},{key:"_moveFocusByMonths",value:function(e){var t=this._currentlyFocusedDate(),i=new Date(0,0);i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()+e);var o=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=t.getDate())),i.getMonth()!==o&&i.setDate(0),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusedDate=i:this._dateAllowed(t,this.minDate,this.maxDate)?e>0?(this.focusedDate=this.maxDate,this._focusedMonthDate=this.maxDate.getDate()):(this.focusedDate=this.minDate,this._focusedMonthDate=this.minDate.getDate()):(this.focusedDate=Vaadin.DatePickerHelper._getClosestDate(t,[this.minDate,this.maxDate]),this._focusedMonthDate=this.focusedDate.getDate())}},{key:"_moveFocusInsideMonth",value:function(e,t){var i=new Date(0,0);i.setFullYear(e.getFullYear()),"minDate"===t?(i.setMonth(e.getMonth()),i.setDate(1)):(i.setMonth(e.getMonth()+1),i.setDate(0)),this._dateAllowed(i,this.minDate,this.maxDate)?(this.focusedDate=i,this._focusedMonthDate=this.focusedDate.getDate()):this._dateAllowed(e,this.minDate,this.maxDate)?(this.focusedDate=this[t],this._focusedMonthDate=this[t].getDate()):(this.focusedDate=Vaadin.DatePickerHelper._getClosestDate(e,[this.minDate,this.maxDate]),this._focusedMonthDate=this.focusedDate.getDate())}},{key:"_dateAllowed",value:function(e,t,i){return(!t||e>=t)&&(!i||e<=i)}},{key:"_isTodayAllowed",value:function(e,t){var i=new Date,o=new Date(0,0);return o.setFullYear(i.getFullYear()),o.setMonth(i.getMonth()),o.setDate(i.getDate()),this._dateAllowed(o,e,t)}},{key:"_stopPropagation",value:function(e){e.stopPropagation()}}],[{key:"is",get:function(){return"vaadin-date-picker-overlay"}},{key:"properties",get:function(){return{selectedDate:{type:Date,notify:!0},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,_focused:Boolean,label:String}}}]),t}();customElements.define(DatePickerOverlayElement.is,DatePickerOverlayElement),window.Vaadin=window.Vaadin||{},Vaadin.DatePickerOverlayElement=DatePickerOverlayElement;</script></dom-module><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(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)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),_get=function e(t,n,i){null===t&&(t=Function.prototype);var a=Object.getOwnPropertyDescriptor(t,n);if(void 0===a){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,i)}if("value"in a)return a.value;var s=a.get;if(void 0!==s)return s.call(i)};window.Vaadin=window.Vaadin||{},Vaadin.DatePickerMixin=function(e){return function(t){function n(){return _classCallCheck(this,n),_possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return _inherits(n,Polymer.mixinBehaviors([Polymer.IronA11yKeysBehavior,Polymer.IronResizableBehavior],e)),_createClass(n,[{key:"ready",value:function(){_get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"ready",this).call(this),this._boundOnScroll=this._onScroll.bind(this),this.addEventListener("tap",this.open.bind(this)),this.addEventListener("touchend",this._preventDefault.bind(this)),this.addEventListener("keydown",this._onKeydown.bind(this)),this.addEventListener("close",this._close.bind(this)),this.addEventListener("date-tap",this._close.bind(this)),this.addEventListener("focus-input",this._focusAndSelect.bind(this)),this.addEventListener("input",this._onUserInput.bind(this))}},{key:"open",value:function(){this.disabled||this.readonly||(this.$.dropdown.open(),this._updateAlignmentAndPosition())}},{key:"_close",value:function(e){e&&e.stopPropagation(),this._focus(),this.close()}},{key:"close",value:function(){this.$.dropdown.close()}},{key:"_parseDate",value:function(e){var t=/^(\d{4}|[-+]\d{6})-(\d{2})-(\d{2})$/.exec(e);if(t){var n=new Date(0,0);return n.setFullYear(parseInt(t[1],10)),n.setMonth(parseInt(t[2],10)-1),n.setDate(parseInt(t[3],10)),n}}},{key:"_isNoInput",value:function(){return!this._inputElement||this._fullscreen||!this.i18n.parseDate||this._ios}},{key:"_formatISO",value:function(e){return e instanceof Date?new Date(e.getTime()-6e4*e.getTimezoneOffset()).toISOString().split("T")[0]:""}},{key:"_selectedDateChanged",value:function(e,t){void 0!==e&&void 0!==t&&(this.value=this._formatISO(e),this._focusedDate=e,this._inputValue=e?t(e):"")}},{key:"_focusedDateChanged",value:function(e,t){void 0!==e&&void 0!==t&&(this._ignoreFocusedDateChange||this._noInput||(this._inputValue=e?t(e):""))}},{key:"_hasValue",value:function(e){return!!e}},{key:"_handleDateChange",value:function(e,t,n){if(t){var i=this._parseDate(t);i?Vaadin.DatePickerHelper._dateEquals(this[e],i)||(this[e]=i):this.value=n}else this[e]=""}},{key:"_valueChanged",value:function(e,t){this._handleDateChange("_selectedDate",e,t)}},{key:"_minChanged",value:function(e,t){this._handleDateChange("_minDate",e,t)}},{key:"_maxChanged",value:function(e,t){this._handleDateChange("_maxDate",e,t)}},{key:"_updateAlignmentAndPosition",value:function(){var e=Math.max(document.documentElement.clientWidth,window.innerWidth||0);this.$.dropdown.positionTarget=this._fullscreen?document.documentElement:this;var t=Math.max(document.documentElement.clientHeight,window.innerHeight||0),n=this.getBoundingClientRect().top>t/2,i=this.getBoundingClientRect().left+this.clientWidth/2>e/2;this.$.dropdown.verticalAlign=n?"bottom":"top",this.$.dropdown.horizontalAlign=this._fullscreen?null:i?"right":"left",this._fullscreen?(this.$.dropdown.style.marginTop=0,this.$.dropdown.style.marginBottom=0):(this.$.dropdown.style.marginTop=(n?10:this.clientHeight+2)+"px",this.$.dropdown.style.marginBottom=(n?this.clientHeight:10)+"px"),this.$.overlay._repositionYearScroller()}},{key:"_fullscreenChanged",value:function(){this.$.dropdown.opened&&this._updateAlignmentAndPosition()}},{key:"_onOverlayOpened",value:function(){var e=this._parseDate(this.initialPosition),t=this._selectedDate||this.$.overlay.initialPosition||e||new Date;e||Vaadin.DatePickerHelper._dateAllowed(t,this._minDate,this._maxDate)?this.$.overlay.initialPosition=t:this.$.overlay.initialPosition=Vaadin.DatePickerHelper._getClosestDate(t,[this._minDate,this._maxDate]),this.$.overlay.scrollToDate(this.$.overlay.focusedDate||this.$.overlay.initialPosition),this._ignoreFocusedDateChange=!0,this.$.overlay.focusedDate=this.$.overlay.focusedDate||this.$.overlay.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this.listen(this,"iron-resize","_updateAlignmentAndPosition"),""===document.createElement("div").style.webkitOverflowScrolling&&(this._touchPrevented=this._preventWebkitOverflowScrollingTouch(this.parentElement)),this._focusOverlayOnOpen?(this.$.overlay.focus(),this._focusOverlayOnOpen=!1):this._focus(),this.updateStyles(),this._documentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none",this._ignoreAnnounce=!1}},{key:"_preventWebkitOverflowScrollingTouch",value:function(e){for(var t=[];e;){if("touch"===window.getComputedStyle(e).webkitOverflowScrolling){var n=e.style.webkitOverflowScrolling;e.style.webkitOverflowScrolling="auto",t.push({element:e,oldInlineValue:n})}e=e.parentElement}return t}},{key:"_onOverlayClosed",value:function(){if(this._ignoreAnnounce=!0,window.removeEventListener("scroll",this._boundOnScroll,!0),this.unlisten(this,"iron-resize","_updateAlignmentAndPosition"),this._touchPrevented&&(this._touchPrevented.forEach(function(e){return e.element.style.webkitOverflowScrolling=e.oldInlineValue}),this._touchPrevented=[]),this.updateStyles(),document.body.style.pointerEvents=this._documentPointerEvents,this._ignoreFocusedDateChange=!0,this.i18n.parseDate){var e=this._inputValue||"",t=this.i18n.parseDate(e);this._isValidDate(t)?this._selectedDate=t:(this._selectedDate=null,this._inputValue=e)}else this._focusedDate&&(this._selectedDate=this._focusedDate);this._ignoreFocusedDateChange=!1,this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.validate()}},{key:"detached",value:function(){this._onOverlayClosed()}},{key:"validate",value:function(e){return e=void 0!==e?e:this._inputValue,!(this.invalid=!this.checkValidity(e))}},{key:"checkValidity",value:function(e){var t=!e||this._selectedDate&&e===this.i18n.formatDate(this._selectedDate),n=!this._selectedDate||Vaadin.DatePickerHelper._dateAllowed(this._selectedDate,this._minDate,this._maxDate),i=!0;return this._inputElement&&(this._inputElement.checkValidity?i=this._inputElement.checkValidity(e):this._inputElement.validate&&(i=this._inputElement.validate(e))),t&&n&&i}},{key:"_onScroll",value:function(e){e.target!==window&&this.$.overlay.contains(e.target)||this._updateAlignmentAndPosition()}},{key:"_preventCancelOnComponentAccess",value:function(e){var t=e.detail;/tap|mousedown|touchstart/.test(e.detail.type)&&t.composedPath().indexOf(this)>-1&&e.preventDefault()}},{key:"_focus",value:function(){this._noInput?this.$.overlay.focus():this._inputElement.focus()}},{key:"_focusAndSelect",value:function(){this._focus(),this._setSelectionRange(0,this._inputValue.length)}},{key:"_setSelectionRange",value:function(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}},{key:"_preventDefault",value:function(e){e.preventDefault()}},{key:"_eventKey",value:function(e){for(var t=["down","up","enter","esc","tab"],n=0;n<t.length;n++){var i=t[n];if(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(e,i))return i}}},{key:"_isValidDate",value:function(e){return e&&!isNaN(e.getTime())}},{key:"_onKeydown",value:function(e){switch(this._noInput&&-1===[9].indexOf(e.keyCode)&&e.preventDefault(),this._eventKey(e)){case"down":case"up":e.preventDefault(),this.opened?(this.$.overlay.focus(),this.$.overlay._onKeydown(e)):(this._focusOverlayOnOpen=!0,this.open());break;case"enter":this.$.overlay.focusedDate&&(this._selectedDate=this.$.overlay.focusedDate),this.close();break;case"esc":this._focusedDate=this._selectedDate,this._close();break;case"tab":this.opened&&(e.preventDefault(),this._setSelectionRange(0,0),e.shiftKey?this.$.overlay.focusCancel():(this.$.overlay.focus(),this.$.overlay.revealDate(this._focusedDate)))}}},{key:"_validateInput",value:function(e,t,n){e&&(t||n)&&(this.invalid=!Vaadin.DatePickerHelper._dateAllowed(e,t,n))}},{key:"_onUserInput",value:function(e){this._userInputValueChanged(),this.opened||(this.open(),this._ios&&(this._debouncerRefit=Polymer.Debouncer.debounce(this._debouncerRefit,Polymer.Async.timeOut.after(500),this.$.dropdown.refit)))}},{key:"_userInputValueChanged",value:function(e){if(this.opened&&this._inputValue){var t=this.i18n.parseDate&&this.i18n.parseDate(this._inputValue);this._isValidDate(t)&&(this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}}},{key:"_announceFocusedDate",value:function(e,t,n){t&&!n&&this.$.overlay.announceFocusedDate()}},{key:"_inputElement",get:function(){return this._input()}},{key:"_nativeInput",get:function(){if(this._inputElement)return this._inputElement.focusElement?this._inputElement.focusElement:this._inputElement.inputElement?this._inputElement.inputElement:window.unwrap?window.unwrap(this._inputElement):this._inputElement}}],[{key:"properties",get:function(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,observer:"_valueChanged",notify:!0,value:""},required:{type:Boolean,value:!1},name:{type:String},hasValue:{type:Boolean,computed:"_hasValue(value)",reflectToAttribute:!0},initialPosition:String,label:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0},showWeekNumbers:{type:Boolean},_fullscreen:{value:!1,observer:"_fullscreenChanged"},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},_touchPrevented:Array,i18n:{type:Object,value:function(){return{monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,week:"Week",calendar:"Calendar",clear:"Clear",today:"Today",cancel:"Cancel",formatDate:function(e){var t=e.getFullYear(),n=t.toString();return n.length<3&&t>=0&&(n=(t<10?"000":"00")+t),e.getMonth()+1+"/"+e.getDate()+"/"+n},parseDate:function(e){var t,n=e.split("/"),i=new Date,a=i.getMonth(),o=i.getFullYear();if(3===n.length?(o=parseInt(n[2]),n[2].length<3&&o>=0&&(o+=o<50?2e3:1900),a=parseInt(n[0])-1,t=parseInt(n[1])):2===n.length?(a=parseInt(n[0])-1,t=parseInt(n[1])):1===n.length&&(t=parseInt(n[0])),void 0!==t){var s=new Date(0,0);return s.setFullYear(o),s.setMonth(a),s.setDate(t),s}},formatTitle:function(e,t){return e+" "+t}}}},min:{type:String,observer:"_minChanged"},max:{type:String,observer:"_maxChanged"},_minDate:{type:Date,value:""},_maxDate:{type:Date,value:""},_noInput:{type:Boolean,computed:"_isNoInput(_fullscreen, i18n, i18n.*, _ios)"},_ios:{type:Boolean,value:navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/)},_ignoreAnnounce:{value:!0},_focusOverlayOnOpen:Boolean,_documentPointerEvents:String}}},{key:"observers",get:function(){return["_validateInput(_selectedDate, _minDate, _maxDate)","_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)","_announceFocusedDate(_focusedDate, opened, _ignoreAnnounce)"]}}]),n}()};</script><dom-module id="vaadin-date-picker" assetpath="../bower_components/vaadin-date-picker/"><template><style>:host{display:inline-block;}:host([opened]){pointer-events:auto;}[part="text-field"]{min-width:100%;max-width:100%;}[part="overlay"]{height:100vh;width:420px;}[part="clear-button"],
[part="toggle-button"]{font-family:'vaadin-date-picker-icons';}[part="clear-button"]::before{content:"\e901";}[part="toggle-button"]::before{content:"\e902";}:host([disabled]) [part="clear-button"],
:host([disabled]) [part="toggle-button"],
:host([readonly]) [part="clear-button"],
:host([readonly]) [part="toggle-button"],
:host(:not([has-value])) [part="clear-button"]{display:none;}</style><vaadin-text-field id="input" role="application" autocomplete="off" on-focus="_focus" value="{{_userInputValue}}" invalid="[[invalid]]" label="[[label]]" name="[[name]]" placeholder="[[placeholder]]" required="[[required]]" disabled="[[disabled]]" readonly="[[readonly]]" error-message="[[errorMessage]]" aria-label$="[[label]]" part="text-field"><slot name="prefix" slot="prefix"></slot><div part="clear-button" slot="suffix" on-tap="_clear" role="button" aria-label$="[[i18n.clear]]"></div><div part="toggle-button" slot="suffix" on-tap="_toggle" role="button" aria-label$="[[i18n.calendar]]" aria-expanded$="[[_getAriaExpanded(opened)]]"></div></vaadin-text-field><iron-dropdown id="dropdown" fullscreen$="[[_fullscreen]]" allow-outside-scroll="" on-iron-overlay-opened="_onOverlayOpened" on-iron-overlay-closed="_onOverlayClosed" on-iron-overlay-canceled="_preventCancelOnComponentAccess" opened="{{opened}}" no-auto-focus=""><vaadin-date-picker-overlay id="overlay" i18n="[[i18n]]" fullscreen$="[[_fullscreen]]" label="[[label]]" selected-date="{{_selectedDate}}" slot="dropdown-content" focused-date="{{_focusedDate}}" show-week-numbers="[[showWeekNumbers]]" min-date="[[_minDate]]" max-date="[[_maxDate]]" role="dialog" part="overlay"></vaadin-date-picker-overlay></iron-dropdown><iron-media-query query="[[_fullscreenMediaQuery]]" query-matches="{{_fullscreen}}"></iron-media-query></template><script>function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var _createClass=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),_get=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;if(void 0!==a)return a.call(r)};if(!Polymer.Element)throw new Error("Unexpected Polymer version "+Polymer.version+" is used, expected v2.0.0 or later.");var DatePickerElement=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,Vaadin.ThemableMixin(Vaadin.DatePickerMixin(Polymer.GestureEventListeners(Polymer.Element)))),_createClass(t,[{key:"ready",value:function(){var e=this;_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"ready",this).call(this),Polymer.RenderStatus.afterNextRender(this,function(){return e._inputElement.validate=function(){}})}},{key:"_clear",value:function(e){e.stopPropagation(),this.value="",this.close()}},{key:"_toggle",value:function(e){e.stopPropagation(),this[this.$.dropdown.opened?"close":"open"]()}},{key:"_input",value:function(){return this.$.input}},{key:"_getAriaExpanded",value:function(e){return Boolean(e).toString()}},{key:"_inputValue",set:function(e){this._inputElement.value=e},get:function(){return this._inputElement.value}}],[{key:"is",get:function(){return"vaadin-date-picker"}},{key:"properties",get:function(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},errorMessage:String,placeholder:String,readonly:{type:Boolean,value:!1,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},_userInputValue:String}}},{key:"observers",get:function(){return["_userInputValueChanged(_userInputValue)"]}}]),t}();customElements.define(DatePickerElement.is,DatePickerElement),window.Vaadin=window.Vaadin||{},Vaadin.DatePickerElement=DatePickerElement;</script></dom-module></body></html>