/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
const t="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,e=(t,e,a=null)=>{for(;e!==a;){const a=e.nextSibling;t.removeChild(e),e=a}},a=`{{lit-${String(Math.random()).slice(2)}}}`,o=`\x3c!--${a}--\x3e`,n=new RegExp(`${a}|${o}`);class r{constructor(t,e){this.parts=[],this.element=e;const o=[],r=[],s=document.createTreeWalker(e.content,133,null,!1);let u=0,p=-1,d=0;const{strings:h,values:{length:m}}=t;for(;d<m;){const t=s.nextNode();if(null!==t){if(p++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:a}=e;let o=0;for(let t=0;t<a;t++)i(e[t].name,"$lit$")&&o++;for(;o-- >0;){const e=h[d],a=c.exec(e)[2],o=a.toLowerCase()+"$lit$",r=t.getAttribute(o);t.removeAttribute(o);const i=r.split(n);this.parts.push({type:"attribute",index:p,name:a,strings:i}),d+=i.length-1}}"TEMPLATE"===t.tagName&&(r.push(t),s.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(a)>=0){const a=t.parentNode,r=e.split(n),s=r.length-1;for(let e=0;e<s;e++){let o,n=r[e];if(""===n)o=l();else{const t=c.exec(n);null!==t&&i(t[2],"$lit$")&&(n=n.slice(0,t.index)+t[1]+t[2].slice(0,-"$lit$".length)+t[3]),o=document.createTextNode(n)}a.insertBefore(o,t),this.parts.push({type:"node",index:++p})}""===r[s]?(a.insertBefore(l(),t),o.push(t)):t.data=r[s],d+=s}}else if(8===t.nodeType)if(t.data===a){const e=t.parentNode;null!==t.previousSibling&&p!==u||(p++,e.insertBefore(l(),t)),u=p,this.parts.push({type:"node",index:p}),null===t.nextSibling?t.data="":(o.push(t),p--),d++}else{let e=-1;for(;-1!==(e=t.data.indexOf(a,e+1));)this.parts.push({type:"node",index:-1}),d++}}else s.currentNode=r.pop()}for(const t of o)t.parentNode.removeChild(t)}}const i=(t,e)=>{const a=t.length-e.length;return a>=0&&t.slice(a)===e},s=t=>-1!==t.index,l=()=>document.createComment(""),c=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function u(t,e){const{element:{content:a},parts:o}=t,n=document.createTreeWalker(a,133,null,!1);let r=d(o),i=o[r],s=-1,l=0;const c=[];let u=null;for(;n.nextNode();){s++;const t=n.currentNode;for(t.previousSibling===u&&(u=null),e.has(t)&&(c.push(t),null===u&&(u=t)),null!==u&&l++;void 0!==i&&i.index===s;)i.index=null!==u?-1:i.index-l,r=d(o,r),i=o[r]}c.forEach(t=>t.parentNode.removeChild(t))}const p=t=>{let e=11===t.nodeType?0:1;const a=document.createTreeWalker(t,133,null,!1);for(;a.nextNode();)e++;return e},d=(t,e=-1)=>{for(let a=e+1;a<t.length;a++){const e=t[a];if(s(e))return a}return-1};
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
const h=new WeakMap,m=t=>"function"==typeof t&&h.has(t),f={},g={};
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
class _{constructor(t,e,a){this.__parts=[],this.template=t,this.processor=e,this.options=a}update(t){let e=0;for(const a of this.__parts)void 0!==a&&a.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),a=[],o=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let r,i=0,l=0,c=n.nextNode();for(;i<o.length;)if(r=o[i],s(r)){for(;l<r.index;)l++,"TEMPLATE"===c.nodeName&&(a.push(c),n.currentNode=c.content),null===(c=n.nextNode())&&(n.currentNode=a.pop(),c=n.nextNode());if("node"===r.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(c.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(c,r.name,r.strings,this.options));i++}else this.__parts.push(void 0),i++;return t&&(document.adoptNode(e),customElements.upgrade(e)),e}}
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */const v=` ${a} `;class b{constructor(t,e,a,o){this.strings=t,this.values=e,this.type=a,this.processor=o}getHTML(){const t=this.strings.length-1;let e="",n=!1;for(let r=0;r<t;r++){const t=this.strings[r],i=t.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===t.indexOf("--\x3e",i+1);const s=c.exec(t);e+=null===s?t+(n?v:o):t.substr(0,s.index)+s[1]+s[2]+"$lit$"+s[3]+a}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");return t.innerHTML=this.getHTML(),t}}
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */const y=t=>null===t||!("object"==typeof t||"function"==typeof t),S=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class w{constructor(t,e,a){this.dirty=!0,this.element=t,this.name=e,this.strings=a,this.parts=[];for(let t=0;t<a.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new k(this)}_getValue(){const t=this.strings,e=t.length-1;let a="";for(let o=0;o<e;o++){a+=t[o];const e=this.parts[o];if(void 0!==e){const t=e.value;if(y(t)||!S(t))a+="string"==typeof t?t:String(t);else for(const e of t)a+="string"==typeof e?e:String(e)}}return a+=t[e],a}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class k{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===f||y(t)&&t===this.value||(this.value=t,m(t)||(this.committer.dirty=!0))}commit(){for(;m(this.value);){const t=this.value;this.value=f,t(this)}this.value!==f&&this.committer.commit()}}class V{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(l()),this.endNode=t.appendChild(l())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=l()),t.__insert(this.endNode=l())}insertAfterPart(t){t.__insert(this.startNode=l()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;m(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=f,t(this)}const t=this.__pendingValue;t!==f&&(y(t)?t!==this.value&&this.__commitText(t):t instanceof b?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):S(t)?this.__commitIterable(t):t===g?(this.value=g,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,a="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=a:this.__commitNode(document.createTextNode(a)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof _&&this.value.template===e)this.value.update(t.values);else{const a=new _(e,t.processor,this.options),o=a._clone();a.update(t.values),this.__commitNode(o),this.value=a}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let a,o=0;for(const n of t)a=e[o],void 0===a&&(a=new V(this.options),e.push(a),0===o?a.appendIntoPart(this):a.insertAfterPart(e[o-1])),a.setValue(n),a.commit(),o++;o<e.length&&(e.length=o,this.clear(a&&a.endNode))}clear(t=this.startNode){e(this.startNode.parentNode,t.nextSibling,this.endNode)}}class N{constructor(t,e,a){if(this.value=void 0,this.__pendingValue=void 0,2!==a.length||""!==a[0]||""!==a[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=a}setValue(t){this.__pendingValue=t}commit(){for(;m(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=f,t(this)}if(this.__pendingValue===f)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=f}}class z extends w{constructor(t,e,a){super(t,e,a),this.single=2===a.length&&""===a[0]&&""===a[1]}_createPart(){return new E(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class E extends k{}let x=!1;(()=>{try{const t={get capture(){return x=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class j{constructor(t,e,a){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=a,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;m(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=f,t(this)}if(this.__pendingValue===f)return;const t=this.__pendingValue,e=this.value,a=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),o=null!=t&&(null==e||a);a&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),o&&(this.__options=W(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=f}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const W=t=>t&&(x?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */;function M(t){let e=C.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},C.set(t.type,e));let o=e.stringsArray.get(t.strings);if(void 0!==o)return o;const n=t.strings.join(a);return o=e.keyString.get(n),void 0===o&&(o=new r(t,t.getTemplateElement()),e.keyString.set(n,o)),e.stringsArray.set(t.strings,o),o}const C=new Map,P=new WeakMap;
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */const q=new
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
class{handleAttributeExpressions(t,e,a,o){const n=e[0];if("."===n){return new z(t,e.slice(1),a).parts}return"@"===n?[new j(t,e.slice(1),o.eventContext)]:"?"===n?[new N(t,e.slice(1),a)]:new w(t,e,a).parts}handleTextExpression(t){return new V(t)}};
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const K=(t,...e)=>new b(t,e,"html",q)
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */,I=(t,e)=>`${t}--${e}`;let U=!0;void 0===window.ShadyCSS?U=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),U=!1);const O=t=>e=>{const o=I(e.type,t);let n=C.get(o);void 0===n&&(n={stringsArray:new WeakMap,keyString:new Map},C.set(o,n));let i=n.stringsArray.get(e.strings);if(void 0!==i)return i;const s=e.strings.join(a);if(i=n.keyString.get(s),void 0===i){const a=e.getTemplateElement();U&&window.ShadyCSS.prepareTemplateDom(a,t),i=new r(e,a),n.keyString.set(s,i)}return n.stringsArray.set(e.strings,i),i},Z=["html","svg"],T=new Set,A=(t,e,a)=>{T.add(t);const o=a?a.element:document.createElement("template"),n=e.querySelectorAll("style"),{length:r}=n;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(o,t);const i=document.createElement("style");for(let t=0;t<r;t++){const e=n[t];e.parentNode.removeChild(e),i.textContent+=e.textContent}(t=>{Z.forEach(e=>{const a=C.get(I(e,t));void 0!==a&&a.keyString.forEach(t=>{const{element:{content:e}}=t,a=new Set;Array.from(e.querySelectorAll("style")).forEach(t=>{a.add(t)}),u(t,a)})})})(t);const s=o.content;a?function(t,e,a=null){const{element:{content:o},parts:n}=t;if(null==a)return void o.appendChild(e);const r=document.createTreeWalker(o,133,null,!1);let i=d(n),s=0,l=-1;for(;r.nextNode();){for(l++,r.currentNode===a&&(s=p(e),a.parentNode.insertBefore(e,a));-1!==i&&n[i].index===l;){if(s>0){for(;-1!==i;)n[i].index+=s,i=d(n,i);return}i=d(n,i)}}}(a,i,s.firstChild):s.insertBefore(i,s.firstChild),window.ShadyCSS.prepareTemplateStyles(o,t);const l=s.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(a){s.insertBefore(i,s.firstChild);const t=new Set;t.add(i),u(a,t)}};window.JSCompiler_renameProperty=(t,e)=>t;const R={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},J=(t,e)=>e!==t&&(e==e||t==t),G={attribute:!0,type:String,converter:R,reflect:!1,hasChanged:J};class Y extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach((e,a)=>{const o=this._attributeNameForProperty(a,e);void 0!==o&&(this._attributeToPropertyMap.set(o,a),t.push(o))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach((t,e)=>this._classProperties.set(e,t))}}static createProperty(t,e=G){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const a="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,a,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}static getPropertyDescriptor(t,e,a){return{get(){return this[e]},set(a){const o=this[t];this[e]=a,this._requestUpdate(t,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||G}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const a of e)this.createProperty(a,t[a])}}static _attributeNameForProperty(t,e){const a=e.attribute;return!1===a?void 0:"string"==typeof a?a:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,a=J){return a(t,e)}static _propertyValueFromAttribute(t,e){const a=e.type,o=e.converter||R,n="function"==typeof o?o:o.fromAttribute;return n?n(t,a):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const a=e.type,o=e.converter;return(o&&o.toAttribute||R.toAttribute)(t,a)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,e)=>this[e]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,a){e!==a&&this._attributeToProperty(t,a)}_propertyToAttribute(t,e,a=G){const o=this.constructor,n=o._attributeNameForProperty(t,a);if(void 0!==n){const t=o._propertyValueToAttribute(e,a);if(void 0===t)return;this._updateState=8|this._updateState,null==t?this.removeAttribute(n):this.setAttribute(n,t),this._updateState=-9&this._updateState}}_attributeToProperty(t,e){if(8&this._updateState)return;const a=this.constructor,o=a._attributeToPropertyMap.get(t);if(void 0!==o){const t=a.getPropertyOptions(o);this._updateState=16|this._updateState,this[o]=a._propertyValueFromAttribute(e,t),this._updateState=-17&this._updateState}}_requestUpdate(t,e){let a=!0;if(void 0!==t){const o=this.constructor,n=o.getPropertyOptions(t);o._valueHasChanged(this[t],e,n.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==n.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,n))):a=!1}!this._hasRequestedUpdate&&a&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this._requestUpdate(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((t,e)=>this._propertyToAttribute(e,this[e],t)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}Y.finalized=!0;
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
const X="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,D=Symbol();class L{constructor(t,e){if(e!==D)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(X?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const F=(t,...e)=>{const a=e.reduce((e,a,o)=>e+(t=>{if(t instanceof L)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n            take care to ensure page security.`)})(a)+t[o+1],t[0]);return new L(a,D)};
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const Q={};class H extends Y{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(void 0===t)this._styles=[];else if(Array.isArray(t)){const e=(t,a)=>t.reduceRight((t,a)=>Array.isArray(a)?e(a,t):(t.add(a),t),a),a=e(t,new Set),o=[];a.forEach(t=>o.unshift(t)),this._styles=o}else this._styles=[t]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?X?this.renderRoot.adoptedStyleSheets=t.map(t=>t.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(t=>t.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==Q&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)}))}render(){return Q}}H.finalized=!0,H.render=(t,a,o)=>{if(!o||"object"!=typeof o||!o.scopeName)throw new Error("The `scopeName` option is required.");const n=o.scopeName,r=P.has(a),i=U&&11===a.nodeType&&!!a.host,s=i&&!T.has(n),l=s?document.createDocumentFragment():a;if(((t,a,o)=>{let n=P.get(a);void 0===n&&(e(a,a.firstChild),P.set(a,n=new V(Object.assign({templateFactory:M},o))),n.appendInto(a)),n.setValue(t),n.commit()})(t,l,Object.assign({templateFactory:O(n)},o)),s){const t=P.get(l);P.delete(l);const o=t.value instanceof _?t.value.template:void 0;A(n,l,o),e(a,a.firstChild),a.appendChild(l),P.set(a,t)}!r&&i&&window.ShadyCSS.styleElement(a.host)};var B=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,$="[^\\s]+",tt=/\[([^]*?)\]/gm;function et(t,e){for(var a=[],o=0,n=t.length;o<n;o++)a.push(t[o].substr(0,e));return a}var at=function(t){return function(e,a){var o=a[t].map((function(t){return t.toLowerCase()})).indexOf(e.toLowerCase());return o>-1?o:null}};function ot(t){for(var e=[],a=1;a<arguments.length;a++)e[a-1]=arguments[a];for(var o=0,n=e;o<n.length;o++){var r=n[o];for(var i in r)t[i]=r[i]}return t}var nt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],rt=["January","February","March","April","May","June","July","August","September","October","November","December"],it=et(rt,3),st={dayNamesShort:et(nt,3),dayNames:nt,monthNamesShort:it,monthNames:rt,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!=10?1:0)*t%10]}},lt=ot({},st),ct=function(t,e){for(void 0===e&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},ut={D:function(t){return String(t.getDate())},DD:function(t){return ct(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return ct(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return ct(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return ct(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return ct(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return ct(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return ct(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return ct(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return ct(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return ct(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return ct(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+ct(100*Math.floor(Math.abs(e)/60)+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return(e>0?"-":"+")+ct(Math.floor(Math.abs(e)/60),2)+":"+ct(Math.abs(e)%60,2)}},pt=function(t){return+t-1},dt=[null,"[1-9]\\d?"],ht=[null,$],mt=["isPm",$,function(t,e){var a=t.toLowerCase();return a===e.amPm[0]?0:a===e.amPm[1]?1:null}],ft=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var a=60*+e[1]+parseInt(e[2],10);return"+"===e[0]?a:-a}return 0}],gt=(at("monthNamesShort"),at("monthNames"),{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",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"});var _t=function(t,e,a){if(void 0===e&&(e=gt.default),void 0===a&&(a={}),"number"==typeof t&&(t=new Date(t)),"[object Date]"!==Object.prototype.toString.call(t)||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");var o=[];e=(e=gt[e]||e).replace(tt,(function(t,e){return o.push(e),"@@@"}));var n=ot(ot({},lt),a);return(e=e.replace(B,(function(e){return ut[e](t,n)}))).replace(/@@@/g,(function(){return o.shift()}))},vt=(function(){try{(new Date).toLocaleDateString("i")}catch(t){return"RangeError"===t.name}}(),function(){try{(new Date).toLocaleString("i")}catch(t){return"RangeError"===t.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(t){return"RangeError"===t.name}}(),function(t,e,a,o){o=o||{},a=null==a?{}:a;var n=new Event(e,{bubbles:void 0===o.bubbles||o.bubbles,cancelable:Boolean(o.cancelable),composed:void 0===o.composed||o.composed});return n.detail=a,t.dispatchEvent(n),n});var bt="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},yt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,St=/^\w*$/,wt=/^\./,kt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vt=/\\(\\)?/g,Nt=/^\[object .+?Constructor\]$/,zt="object"==typeof bt&&bt&&bt.Object===Object&&bt,Et="object"==typeof self&&self&&self.Object===Object&&self,xt=zt||Et||Function("return this")();var jt,Wt=Array.prototype,Mt=Function.prototype,Ct=Object.prototype,Pt=xt["__core-js_shared__"],qt=(jt=/[^.]+$/.exec(Pt&&Pt.keys&&Pt.keys.IE_PROTO||""))?"Symbol(src)_1."+jt:"",Kt=Mt.toString,It=Ct.hasOwnProperty,Ut=Ct.toString,Ot=RegExp("^"+Kt.call(It).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Zt=xt.Symbol,Tt=Wt.splice,At=Bt(xt,"Map"),Rt=Bt(Object,"create"),Jt=Zt?Zt.prototype:void 0,Gt=Jt?Jt.toString:void 0;function Yt(t){var e=-1,a=t?t.length:0;for(this.clear();++e<a;){var o=t[e];this.set(o[0],o[1])}}function Xt(t){var e=-1,a=t?t.length:0;for(this.clear();++e<a;){var o=t[e];this.set(o[0],o[1])}}function Dt(t){var e=-1,a=t?t.length:0;for(this.clear();++e<a;){var o=t[e];this.set(o[0],o[1])}}function Lt(t,e){for(var a,o,n=t.length;n--;)if((a=t[n][0])===(o=e)||a!=a&&o!=o)return n;return-1}function Ft(t,e){for(var a,o=0,n=(e=function(t,e){if(ae(t))return!1;var a=typeof t;if("number"==a||"symbol"==a||"boolean"==a||null==t||ne(t))return!0;return St.test(t)||!yt.test(t)||null!=e&&t in Object(e)}(e,t)?[e]:ae(a=e)?a:$t(a)).length;null!=t&&o<n;)t=t[te(e[o++])];return o&&o==n?t:void 0}function Qt(t){return!(!oe(t)||(e=t,qt&&qt in e))&&(function(t){var e=oe(t)?Ut.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?Ot:Nt).test(function(t){if(null!=t){try{return Kt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function Ht(t,e){var a,o,n=t.__data__;return("string"==(o=typeof(a=e))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==a:null===a)?n["string"==typeof e?"string":"hash"]:n.map}function Bt(t,e){var a=function(t,e){return null==t?void 0:t[e]}(t,e);return Qt(a)?a:void 0}Yt.prototype.clear=function(){this.__data__=Rt?Rt(null):{}},Yt.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},Yt.prototype.get=function(t){var e=this.__data__;if(Rt){var a=e[t];return"__lodash_hash_undefined__"===a?void 0:a}return It.call(e,t)?e[t]:void 0},Yt.prototype.has=function(t){var e=this.__data__;return Rt?void 0!==e[t]:It.call(e,t)},Yt.prototype.set=function(t,e){return this.__data__[t]=Rt&&void 0===e?"__lodash_hash_undefined__":e,this},Xt.prototype.clear=function(){this.__data__=[]},Xt.prototype.delete=function(t){var e=this.__data__,a=Lt(e,t);return!(a<0)&&(a==e.length-1?e.pop():Tt.call(e,a,1),!0)},Xt.prototype.get=function(t){var e=this.__data__,a=Lt(e,t);return a<0?void 0:e[a][1]},Xt.prototype.has=function(t){return Lt(this.__data__,t)>-1},Xt.prototype.set=function(t,e){var a=this.__data__,o=Lt(a,t);return o<0?a.push([t,e]):a[o][1]=e,this},Dt.prototype.clear=function(){this.__data__={hash:new Yt,map:new(At||Xt),string:new Yt}},Dt.prototype.delete=function(t){return Ht(this,t).delete(t)},Dt.prototype.get=function(t){return Ht(this,t).get(t)},Dt.prototype.has=function(t){return Ht(this,t).has(t)},Dt.prototype.set=function(t,e){return Ht(this,t).set(t,e),this};var $t=ee((function(t){var e;t=null==(e=t)?"":function(t){if("string"==typeof t)return t;if(ne(t))return Gt?Gt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(e);var a=[];return wt.test(t)&&a.push(""),t.replace(kt,(function(t,e,o,n){a.push(o?n.replace(Vt,"$1"):e||t)})),a}));function te(t){if("string"==typeof t||ne(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ee(t,e){if("function"!=typeof t||e&&"function"!=typeof e)throw new TypeError("Expected a function");var a=function(){var o=arguments,n=e?e.apply(this,o):o[0],r=a.cache;if(r.has(n))return r.get(n);var i=t.apply(this,o);return a.cache=r.set(n,i),i};return a.cache=new(ee.Cache||Dt),a}ee.Cache=Dt;var ae=Array.isArray;function oe(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function ne(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==Ut.call(t)}var re=function(t,e,a){var o=null==t?void 0:Ft(t,e);return void 0===o?a:o},ie={cleaning:"Cleaning",paused:"Paused",idle:"Idle",charging:"Charging","returning home":"Returning home",docked:"Docked"},se={gentle:"Gentle",silent:"Silent",standard:"Standard",medium:"Medium",turbo:"Turbo"},le={name:"Vacuum Card",description:"Vacuum card allows you to control your robot vacuum.",start:"Clean",continue:"Continue",pause:"Pause",stop:"Stop",return_to_base:"Dock",locate:"Locate vacuum",not_available:"Vacuum is not available"},ce={missing_entity:"Specifying entity is required!"},ue={entity:"Entity (Required)",map:"Map Camera (Optional)",image:"Image (Optional)",compact_view:"Compact View",compact_view_aria_label_on:"Toggle compact view on",compact_view_aria_label_off:"Toggle compact view off",show_name:"Show Name",show_name_aria_label_on:"Toggle display name on",show_name_aria_label_off:"Toggle display name off",show_status:"Show Status",show_status_aria_label_on:"Toggle display status on",show_status_aria_label_off:"Toggle display status off",show_toolbar:"Show Toolbar",show_toolbar_aria_label_on:"Toggle display toolbar on",show_toolbar_aria_label_off:"Toggle display toolbar off",code_only_note:"Note: Setting actions and stats options are available exclusively using Code Editor."},pe={status:ie,source:se,common:le,error:ce,editor:ue},de={cleaning:"Прибирає",paused:"Пауза",idle:"Очікує",charging:"Заряджається","returning home":"Повертається","segment cleaning":"Зоноване прибирання"},he={gentle:"Делікатний",silent:"Тихий",standard:"Стандартний",medium:"Середній",turbo:"Турбо"},me={name:"Пилосос",description:'Картка "пилосос" дозволяє керувати роботом-пилососом.',start:"Clean",continue:"Продовжити",pause:"Пауза",stop:"Стоп",return_to_base:"На базу",locate:"Знайти",not_available:"Пилосос недоступний"},fe={missing_entity:"Об’єкт є обов’язковим полем!"},ge={entity:"Об’єкт (Required)",map:"Камера для карти (Додатково)",image:"Зображення (Додатково)",compact_view:"Компактний перегляд",compact_view_aria_label_on:"Увімкнути компактний перегляд",compact_view_aria_label_off:"Вимкнути компактний перегляд",show_name:"Показувати ім’я?",show_name_aria_label_on:"Показати ім’я",show_name_aria_label_off:"Приховати ім’я",show_status:"Показувати статус?",show_status_aria_label_on:"Показати статус",show_status_aria_label_off:"Приховати статус",show_toolbar:"Показувати панель дій?",show_toolbar_aria_label_on:"Показати панель дій",show_toolbar_aria_label_off:"Приховати панель дій",code_only_note:"Увага: Опції actions та stats доступні виключно через редактор коду."},_e={status:de,source:he,common:me,error:fe,editor:ge},ve={cleaning:"Aan het schoonmaken",paused:"Gepauzeerd",idle:"Inactief",charging:"Aan het opladen","returning home":"Keert terug naar dock"},be={name:"Stofzuiger kaart",description:"Stofzuiger kaart maakt het makkelijk om je robotstofzuiger te bedienen.",start:"Start",continue:"Doorgaan",pause:"Pauze",stop:"Stop",return_to_base:"Terugkeren",locate:"Zoek stofzuiger"},ye={missing_entity:"Het specificeren van een entiteit is verplicht!"},Se={entity:"Entiteit (Verplicht)",map:"Kaart Camera (Optioneel)",image:"Afbeelding (Optioneel)",compact_view:"Compacte weergave",compact_view_aria_label_on:"Zet compacte weergave aan",compact_view_aria_label_off:"Zet compacte weergave uit",show_name:"Naam laten zien?",show_name_aria_label_on:"Zet weergavenaam aan",show_name_aria_label_off:"Zet weergavenaam uit",show_toolbar:"Werkbalk laten zien?",show_toolbar_aria_label_on:"Zet werkbalk aan",show_toolbar_aria_label_off:"Zet werkbalk uit",code_only_note:"Notitie: Instel acties en status opties zijn alleen beschikbaar in de Code Editor"},we={status:ve,common:be,error:ye,editor:Se},ke={cleaning:"Reinigen",paused:"Pausiert",idle:"Untätig",charging:"Aufladen","returning home":"Rückkehr zu Dockingstation","segment cleaning":"Zimmerreinigung",docked:"Angedockt"},Ve={name:"Vacuum Card",description:"Vacuum card ermöglicht es Ihnen, Ihr Staubsaugerroboter zu steuern.",start:"Reinigen",continue:"Weiter",pause:"Pause",stop:"Stop",return_to_base:"Dock",locate:"Staubsauger lokalisieren"},Ne={missing_entity:"Angabe der Entität ist erforderlich!"},ze={entity:"Entität (Erforderlich)",map:"Map Camera (Optional)",image:"Bild (Optional)",compact_view:"kompakte Ansicht",compact_view_aria_label_on:"Schalte kompakte Ansicht ein",compact_view_aria_label_off:"Schalte kompakte Ansicht aus",show_name:"Zeige Namen",show_name_aria_label_on:"Schalte 'Zeige Namen' ein",show_name_aria_label_off:"Schalte 'Zeige Namen' aus",show_toolbar:"Zeige Toolbar",show_toolbar_aria_label_on:"Schalte 'Zeige Toolbar' ein",show_toolbar_aria_label_off:"Schalte 'Zeige Toolbar' aus",code_only_note:"Hinweis: Das Festlegen von Aktionen und Statistikoptionen ist ausschließlich mit dem Code-Editor möglich."},Ee={status:ke,common:Ve,error:Ne,editor:ze},xe={cleaning:"Nettoyage",paused:"En pause",idle:"Inactif",charging:"En charge","returning home":"Retour à la base"},je={gentle:"Doux",silent:"Silencieux",standard:"Standard",medium:"Moyen",turbo:"Turbo"},We={name:"Vacuum Carte",description:"Vacuum carte vous permet de contrôler votre robot aspirateur.",start:"Nettoyer",continue:"Continuer",pause:"Pause",stop:"Stop",return_to_base:"Retour base",locate:"Localiser aspirateur",not_available:"L'aspirateur n'est pas disponible"},Me={missing_entity:"La spécification de l'entité est requise !"},Ce={entity:"Entité (obligatoire)",map:"Caméra de carte (facultatif)",image:"Image (facultatif)",compact_view:"Vue compacte",compact_view_aria_label_on:"Activer la vue compacte",compact_view_aria_label_off:"Désactiver la vue compacte",show_name:"Afficher le nom",show_name_aria_label_on:"Activer affichage du nom",show_name_aria_label_off:"Désactiver affichage du nom",show_status:"Afficher l'état",show_status_aria_label_on:"Activer l'affichage de l'état",show_status_aria_label_off:"Désactiver l'affichage de l'état",show_toolbar:"Afficher la barre d'outils",show_toolbar_aria_label_on:"Activer l'affichage de la barre d'outils",show_toolbar_aria_label_off:"Désactiver l'affichage de la barre d'outils",code_only_note:"Remarque: Les options de réglage des actions et statistiques sont disponibles exclusivement en utilisant l'éditeur de code."},Pe={status:xe,source:je,common:We,error:Me,editor:Ce},qe={cleaning:"Sprzątanie",paused:"Wstrzymany",idle:"Bezczynny",charging:"Ładowanie","returning home":"Powrót do bazy"},Ke={name:"Vacuum Card",description:"Vacuum card pozwala zdalnie kontrolować odkurzacz.",start:"Sprzątaj",continue:"Kontyntynuj",pause:"Wstrzymaj",stop:"Zatrzymaj",return_to_base:"Powrót",locate:"Zlokalizuj odkurzacz"},Ie={missing_entity:"Ustawienie encji jest wymagane!"},Ue={entity:"Encja (wymagane)",map:"Kamera (opcjonalne)",image:"Obrazek (opcjonalne)",compact_view:"Widok kompaktowy",compact_view_aria_label_on:"Włącz widok kompaktowy",compact_view_aria_label_off:"Wyłącz widok kompaktowy",show_name:"Pokaż nazwę",show_name_aria_label_on:"Włącz widok nazwy",show_name_aria_label_off:"Wyłącz widok nazwy",show_toolbar:"Pasek narzędzi",show_toolbar_aria_label_on:"Włącz pasek narzędzi",show_toolbar_aria_label_off:"Wyłącz pasek narzędzi",code_only_note:"Uwaga: Ustawianie opcji i informacji statystyk jest dostępne tylko poprzez edytor kodu YAML."},Oe={status:qe,common:Ke,error:Ie,editor:Ue},Ze={cleaning:"In pulizia",paused:"In pausa",idle:"Inattivo",charging:"In carica","returning home":"In rientro alla base"},Te={name:"Vacuum Card",description:"Vacuum card consente di controllare il tuo aspirapolvere.",start:"Pulisci",continue:"Continua",pause:"Pausa",stop:"Stop",return_to_base:"Base",locate:"Trova aspirapolvere"},Ae={missing_entity:"È necessario specificare l'entità!"},Re={entity:"Entità (Richiesto)",map:"Mappa (Opzionale)",image:"Immagine (Opzionale)",compact_view:"Vista compatta",compact_view_aria_label_on:"Attiva vista compatta",compact_view_aria_label_off:"Disattiva vista compatta",show_name:"Mostra Nome",show_name_aria_label_on:"Attiva nome",show_name_aria_label_off:"Disattiva nome",show_toolbar:"Mostra barra degli strumenti",show_toolbar_aria_label_on:"Attiva barra degli strumenti",show_toolbar_aria_label_off:"Disattiva barra degli strumenti",code_only_note:"NB: La configurazione di azioni e statistiche sono disponibili soltanto nell'editor di codice."},Je={status:Ze,common:Te,error:Ae,editor:Re},Ge={cleaning:"Убирает",paused:"Пауза",idle:"Ожидает",charging:"Заряжается","returning home":"Возвращается","segment cleaning":"Уборка зоны/комнаты"},Ye={gentle:"Деликатный",silent:"Тихий",standard:"Стандартный",medium:"Средний",turbo:"Турбо"},Xe={name:"Пылесос",description:'Карта "пылесос" позволяет управлять роботом-пылесосом.',start:"Запуск",continue:"Продолжить",pause:"Пауза",stop:"Остановить",return_to_base:"На базу",locate:"Найти",not_available:"Пылесос недоступен"},De={missing_entity:"Объект является обязательным полем!"},Le={entity:"Объект (Обязательное)",map:"Камера для карты (Опциональное)",image:"Изображение (Опциональное)",compact_view:"Компактный просмотр",compact_view_aria_label_on:"Включить компактный просмотр",compact_view_aria_label_off:"Выключить компактный просмотр",show_name:"Показать название?",show_name_aria_label_on:"Показать название",show_name_aria_label_off:"Скрыть название",show_status:"Показать статус?",show_status_aria_label_on:"Показать статус",show_status_aria_label_off:"Скрыть статус",show_toolbar:"Показать панель действий?",show_toolbar_aria_label_on:"Показать панель действий",show_toolbar_aria_label_off:"Скрыть панель действий",code_only_note:"Внимание: Опции actions и stats доступны исключительно через редактор кода."},Fe={status:Ge,source:Ye,common:Xe,error:De,editor:Le},Qe={cleaning:"Limpiando",paused:"En pausa",idle:"Inactivo",charging:"Cargando","returning home":"Volviendo a la base",docked:"En la base","segment cleaning":"Limpiando zona"},He={gentle:"Delicado",silent:"Silencioso",standard:"Estándar",medium:"Medio",turbo:"Turbo"},Be={name:"Vacuum Card",description:"Vacuum card te permite controlar tu robot aspirador.",start:"Comenzar",continue:"Continuar",pause:"Pausar",stop:"Detener",return_to_base:"Volver a la base",locate:"Localizar",not_available:"Vacuum no está disponible"},$e={missing_entity:"¡Se requiere especificar una entidad!"},ta={entity:"Entidad (Requerido)",map:"Map Camera (Opcional)",image:"Imagen (Opcional)",compact_view:"Vista compacta",compact_view_aria_label_on:"Activar vista compacta",compact_view_aria_label_off:"Desactivar vista compacta",show_name:"Nombre a mostrar",show_name_aria_label_on:"Mostrar nombre",show_name_aria_label_off:"Ocultar nombre",show_status:"Mostrar estado",show_status_aria_label_on:"Activar estado de la pantalla",show_status_aria_label_off:"Desactivar estado de la pantalla",show_toolbar:"Mostrar barra de herramientas",show_toolbar_aria_label_on:"Activar la barra de herramientas",show_toolbar_aria_label_off:"Desactivar la barra de herramientas",code_only_note:"Nota: La configuración de las acciones y estadísticas está únicamente disponible a través del Editor de Código."},ea={status:Qe,source:He,common:Be,error:$e,editor:ta},aa={cleaning:"Vysává se",paused:"Pozastaveno",idle:"Nečinný",charging:"Nabíjí se","returning home":"Vrací se domů"},oa={gentle:"Mírný",silent:"Tichý",standard:"Standardní",medium:"Střední",turbo:"Turbo"},na={name:"Karta vysavače",description:"Karta vysavače vám dovolí ovládat svůj vysavač.",start:"Začni vysávat",continue:"Pokračuj",pause:"Pozastav",stop:"Zastav",return_to_base:"Vrať se domů",locate:"Lokalizuj",not_available:"Vysavač není dostupný"},ra={missing_entity:"Je vyžadováno specifikování entity!"},ia={entity:"Entita (Povinný)",map:"Mapa (Nepovinný)",image:"Fotka (Nepovinný)",compact_view:"Kompaktní zobrazení",compact_view_aria_label_on:"Zapni kompaktní zobrazení",compact_view_aria_label_off:"Vypni kompaktní zobrazení",show_name:"Zobraz název",show_name_aria_label_on:"Zapni zobrazení názvu",show_name_aria_label_off:"Vypni zobrazení názvu",show_status:"Zobraz status",show_status_aria_label_on:"Zapni zobrazení statusu",show_status_aria_label_off:"Vypni zobrazení statusu",show_toolbar:"Zobraz lištu",show_toolbar_aria_label_on:"Zapni zobrazení lišty",show_toolbar_aria_label_off:"Vypni zobrazení lišty",code_only_note:"Poznámka: Nastavení akcí a infa je dostupné pouze v editoru kódu."},sa={status:aa,source:oa,common:na,error:ra,editor:ia},la={cleaning:"Tisztítás",paused:"Szünet",idle:"Tétlen",charging:"Töltés","returning home":"Hazatérés"},ca={gentle:"Gyengéd",silent:"Csendes",standard:"Alap",medium:"Közepes",turbo:"Turbo"},ua={name:"Porszívó Kártya",description:"Ez a kártya lehetővé teszi, hogy robot porszívódat irányítsd.",start:"Tisztítás",continue:"Folytatás",pause:"Szünet",stop:"Megszakítás",return_to_base:"Hazatérés",locate:"Porszívó megkeresése",not_available:"A porszívó nem elérhető"},pa={missing_entity:"Entitás megadása kötelező!"},da={entity:"Entitás (Kötelező)",map:"Térkép kamera (Opcionális)",image:"Kép (Opcionális)",compact_view:"Kompakt nézet",compact_view_aria_label_on:"Kompakt nézet bekapcsolása",compact_view_aria_label_off:"Kompakt nézet kikapcsolása",show_name:"Név megjelenítése",show_name_aria_label_on:"Név megjelenítése",show_name_aria_label_off:"Név elrejtése",show_status:"Állapot megjelenítése",show_status_aria_label_on:"Állapot megjelenítése",show_status_aria_label_off:"Állapot elrejtése",show_toolbar:"Eszköztár megjelenítése",show_toolbar_aria_label_on:"Eszköztár megjelenítése",show_toolbar_aria_label_off:"Eszköztár elrejtése",code_only_note:"Megjegyzés: Parancsok és statisztikák beállítása csak a kódszerkesztőben elérhetőek."},ha={status:la,source:ca,common:ua,error:pa,editor:da},ma={cleaning:"מנקה",paused:"מושהה",idle:"סרק",charging:"בטעינה","returning home":"בחזרה הביתה"},fa={gentle:"עדין",silent:"שקט",standard:"רגיל",medium:"בינוני",turbo:"טורבו"},ga={name:"כרטיס שואב",description:"כרטיס שואב מאפשר לך שליטה על שואב האבק שלך.",start:"נקה",continue:"המשך",pause:"השהה",stop:"עצור",return_to_base:"הגינה",locate:"אתר שואב",not_available:"השואב אינו זמין"},_a={missing_entity:"יש צורך לציין ישות!"},va={entity:"ישות (נדרש)",map:"מצלמת מפה (אפשרי)",image:"תמונה (אפשרי)",compact_view:"תצוגה קומפקטית",compact_view_aria_label_on:"החלף תצוגה קומפקטית",compact_view_aria_label_off:"כבה את התצוגה הקומפקטית",show_name:"שם תצוגה",show_name_aria_label_on:"הפעל את שם התצוגה למצב מופעל",show_name_aria_label_off:"כבה את שם התצוגה",show_status:"הצג סטטוס",show_status_aria_label_on:"הפעל את מצב התצוגה למצב פעיל",show_status_aria_label_off:"כבה את מצב התצוגה",show_toolbar:"הצג סרגל כלים",show_toolbar_aria_label_on:"הפעל את סרגל הכלים לתצוגה",show_toolbar_aria_label_off:"כבה את סרגל הכלים לתצוגה",code_only_note:"הערה: הגדרת פעולות ואפשרויות סטטיסטיקה זמינות אך ורק באמצעות עורך הקוד."},ba={status:ma,source:fa,common:ga,error:_a,editor:va},ya={cleaning:"Städar",paused:"Pausad",idle:"Inaktiv",charging:"Laddar","returning home":"Återvänder hem"},Sa={gentle:"Extra försiktig",silent:"Eco - tyst",standard:"Standard",medium:"Medium",turbo:"Turbo"},wa={name:"Dammsugarkort",description:"Dammsugarkort låter dig att kontrollera din robotdammsugare.",start:"Städa",continue:"Fortsätt",pause:"Paus",stop:"Stopp",return_to_base:"Docka",locate:"Lokalisera dammsugare",not_available:"Dammsugare är inte tillgänglig"},ka={missing_entity:"Specificera entitet är obligatoriskt!"},Va={entity:"Entitet (Obligatoriskt)",map:"Kartkamera (Valfritt)",image:"Bild (Valfritt)",compact_view:"Kompakt vy",compact_view_aria_label_on:"Aktivera kompakt vy",compact_view_aria_label_off:"Inaktivera kompakt vy",show_name:"Visa namn",show_name_aria_label_on:"Aktivera namn",show_name_aria_label_off:"Inaktivera namn",show_status:"Visa status",show_status_aria_label_on:"Aktivera status",show_status_aria_label_off:"Inaktivera status",show_toolbar:"Visa verktygsvält",show_toolbar_aria_label_on:"Aktivera verktygsfält",show_toolbar_aria_label_off:"Inaktivera verktygsfält",code_only_note:"Obs! Inställningar för händelser och statistikalternativ är enbart tillgängliga med kodredigeraren."},Na={status:ya,source:Sa,common:wa,error:ka,editor:Va},za={cleaning:"Rengjøring",paused:"Pauset",idle:"Tomgang",charging:"Lader","returning home":"Returnerer hjem"},Ea={gentle:"Skånsom",silent:"Stille",standard:"Standard",medium:"Medium",turbo:"Turbo"},xa={name:"Støvsuger kort",description:"Støvsugerkortet lar deg kontrollere robotstøvsugeren din",start:"Rengjør",continue:"fortsett",pause:"Pause",stop:"Stop",return_to_base:"Dock",locate:"Lokaliser støvsuger",not_available:"Støvsugeren er ikke tilgjengelig"},ja={missing_entity:"Spesifiserende enhet kreves!"},Wa={entity:"Enhet (påkrevd)",map:"Kartkamera (valgfritt)",image:"Bilde (Valgfritt)",compact_view:"Kompakt visning",compact_view_aria_label_on:"Slå på kompakt visning",compact_view_aria_label_off:"Slå av kompakt visningf",show_name:"Vis navn",show_name_aria_label_on:"Slå visningsnavnet på",show_name_aria_label_off:"Slå visningsnavnet av",show_status:"Vis Status",show_status_aria_label_on:"Slå skjermstatus på",show_status_aria_label_off:"Slå skjermstatus av",show_toolbar:"Vis verktøylinjen",show_toolbar_aria_label_on:"Slå skjermverktøylinjen på",show_toolbar_aria_label_off:"Slå skjermverktøylinjen av",code_only_note:"Merk: Innstillingshandlinger og statistikkalternativer er eksklusivt tilgjengelige ved hjelp av Code Editor."},Ma={status:za,source:Ea,common:xa,error:ja,editor:Wa},Ca={cleaning:"Støvsuger",paused:"Pauset",idle:"Inaktiv",charging:"Lader","returning home":"Returnerer til dock"},Pa={gentle:"Mild",silent:"Stille",standard:"Standard",medium:"Medium",turbo:"Turbo"},qa={name:"Vacuum Card",description:"Vacuum card lader dig kontrollere din robotstøvsuger.",start:"Start",continue:"Fortsæt",pause:"Pause",stop:"Stop",return_to_base:"Gå til dock",locate:"Find støvsuger",not_available:"Støvsuger er ikke tilgængelig"},Ka={missing_entity:"En enhed skal specificeres!"},Ia={entity:"Enhed (Påkrævet)",map:"Map Camera (Valgfrit)",image:"Billede (Valgfrit)",compact_view:"Kompakt visning",compact_view_aria_label_on:"Slå kompakt visning til",compact_view_aria_label_off:"Slå kompakt visning fra",show_name:"Vis navn",show_name_aria_label_on:"Slå visning af navn til",show_name_aria_label_off:"Slå visning af navn fra",show_status:"Vis Status",show_status_aria_label_on:"Slå visning af status til",show_status_aria_label_off:"Slå visning af status fra",show_toolbar:"Vis værktøjslinje",show_toolbar_aria_label_on:"Slå visning af værktøjslinje til",show_toolbar_aria_label_off:"Slå visning af værktøjslinje fra",code_only_note:"Bemærk: Indstilling af actions og statistik er udelukkende muligt via Code Editor."},Ua={status:Ca,source:Pa,common:qa,error:Ka,editor:Ia},Oa={cleaning:"청소중",paused:"일시정지",idle:"대기중",charging:"충전중","returning home":"복귀중"},Za={gentle:"물걸레",silent:"저소음",standard:"밸런스",medium:"터보",turbo:"최강"},Ta={name:"청소기 카드",description:"청소기 카드는 로봇 청소기를 제어합니다.",start:"청소 시작",continue:"청소 재개",pause:"일시정지",stop:"정지",return_to_base:"복귀",locate:"청소기 위치",not_available:"청소기 사용 불가"},Aa={missing_entity:"구성요소를 선택해주세요."},Ra={entity:"구성요소 (필수 요소)",map:"지도 (선택 사항)",image:"이미지 (선택 사항)",compact_view:"간단히 보기",compact_view_aria_label_on:"간단히 보기 켜기",compact_view_aria_label_off:"간단히 보기 끄기",show_name:"이름 표시",show_name_aria_label_on:"이름 표시 켜기",show_name_aria_label_off:"이름 표시 끄기",show_status:"상태 표시",show_status_aria_label_on:"상태 표시 켜기",show_status_aria_label_off:"상태 표시 끄기",show_toolbar:"툴바 표시",show_toolbar_aria_label_on:"툴바 표시 켜기",show_toolbar_aria_label_off:"툴바 표시 끄기",code_only_note:"동작과 상태 설정은 코드 에디터에서 수정할 수 있습니다."},Ja={status:Oa,source:Za,common:Ta,error:Aa,editor:Ra},Ga={Cleaning:"Siivoaa",Paused:"Pysäytetty",Idle:"Toimeton",Charging:"Latauksessa","Returning home":"Palaa kotiin"},Ya={Gentle:"Hellävarainen",Silent:"Hiljainen",Standard:"Normaali",Medium:"Keskitaso",Turbo:"Turbo"},Xa={name:"Pölynimurikortti",description:"Pölynimurikortti sallii robotti imurin ohjauksen.",start:"Siivoa",continue:"Jatka",pause:"Tauko",stop:"Pysähdy",return_to_base:"Latausasemaan",locate:"Paikanna imuri",not_available:"Imuri ei saatavilla"},Da={missing_entity:"Entiteetti puuttuu!"},La={entity:"Entiteetti (Vaaditaan)",map:"Kartan kamera (Valinnainen)",image:"Kuva (Valinnainen)",compact_view:"Kompakti näkymä",compact_view_aria_label_on:"Kompakti näkymä päälle",compact_view_aria_label_off:"Kompakti näkymä pois",show_name:"Näytä Nimi",show_name_aria_label_on:"Näyttönimi päälle",show_name_aria_label_off:"Näyttönimi pois",show_status:"Näytä Tila",show_status_aria_label_on:"Tilanäyttö päälle",show_status_aria_label_off:"Tilanäyttö pois",show_toolbar:"Näytä työkalurivi",show_toolbar_aria_label_on:"Työkalurivi päälle",show_toolbar_aria_label_off:"Työkalurivi pois",code_only_note:"Huom: Toimintojen ja tilastojen optiot ovat saatavilla ainoastaan koodieditorissa"},Fa={status:Ga,source:Ya,common:Xa,error:Da,editor:La},Qa={cleaning:"Netejant",paused:"En pausa",idle:"Inactiu",charging:"Carregant","returning home":"Tornant a la base",docked:"A la base"},Ha={gentle:"Delicat",silent:"Silenciós",standard:"Estàndard",medium:"Mitjà",turbo:"Turbo"},Ba={name:"Vacuum Card",description:"Vacuum card us permet controlar el robot aspirador.",start:"Neteja",continue:"Continua",pause:"Pausa",stop:"Atura",return_to_base:"Torna a la base",locate:"Localitza",not_available:"No disponible"},$a={missing_entity:"Cal especificar una entitat."},to={entity:"Entitat (Requerit)",map:"Càmera de mapa (Opcional)",image:"Imatge (Opcional)",compact_view:"Visualització compacta",compact_view_aria_label_on:"Activar visualització compacta",compact_view_aria_label_off:"Desactivar visualització compacta",show_name:"Mostrar nom",show_name_aria_label_on:"Mostra nom",show_name_aria_label_off:"Amaga nom",show_status:"Mostrar estat",show_status_aria_label_on:"Mostra estat",show_status_aria_label_off:"Amaga estat",show_toolbar:"Mostrar barra d'eines",show_toolbar_aria_label_on:"Mostra barra d'eines",show_toolbar_aria_label_off:"Amaga barra d'eines",code_only_note:"Nota: Configuració de les accions i estadístiques només disponible des de l'Editor de Codi."},eo={status:Qa,source:Ha,common:Ba,error:$a,editor:to},ao={en:Object.freeze({__proto__:null,status:ie,source:se,common:le,error:ce,editor:ue,default:pe}),uk:Object.freeze({__proto__:null,status:de,source:he,common:me,error:fe,editor:ge,default:_e}),nl:Object.freeze({__proto__:null,status:ve,common:be,error:ye,editor:Se,default:we}),de:Object.freeze({__proto__:null,status:ke,common:Ve,error:Ne,editor:ze,default:Ee}),fr:Object.freeze({__proto__:null,status:xe,source:je,common:We,error:Me,editor:Ce,default:Pe}),pl:Object.freeze({__proto__:null,status:qe,common:Ke,error:Ie,editor:Ue,default:Oe}),it:Object.freeze({__proto__:null,status:Ze,common:Te,error:Ae,editor:Re,default:Je}),ru:Object.freeze({__proto__:null,status:Ge,source:Ye,common:Xe,error:De,editor:Le,default:Fe}),es:Object.freeze({__proto__:null,status:Qe,source:He,common:Be,error:$e,editor:ta,default:ea}),cs:Object.freeze({__proto__:null,status:aa,source:oa,common:na,error:ra,editor:ia,default:sa}),hu:Object.freeze({__proto__:null,status:la,source:ca,common:ua,error:pa,editor:da,default:ha}),he:Object.freeze({__proto__:null,status:ma,source:fa,common:ga,error:_a,editor:va,default:ba}),sv:Object.freeze({__proto__:null,status:ya,source:Sa,common:wa,error:ka,editor:Va,default:Na}),nb:Object.freeze({__proto__:null,status:za,source:Ea,common:xa,error:ja,editor:Wa,default:Ma}),da:Object.freeze({__proto__:null,status:Ca,source:Pa,common:qa,error:Ka,editor:Ia,default:Ua}),ko:Object.freeze({__proto__:null,status:Oa,source:Za,common:Ta,error:Aa,editor:Ra,default:Ja}),fi:Object.freeze({__proto__:null,status:Ga,source:Ya,common:Xa,error:Da,editor:La,default:Fa}),ca:Object.freeze({__proto__:null,status:Qa,source:Ha,common:Ba,error:$a,editor:to,default:eo})};function oo(t,e,a){const[o,n]=t.toLowerCase().split(".");let r;try{r=JSON.parse(localStorage.getItem("selectedLanguage"))}catch(t){r=localStorage.getItem("selectedLanguage")}const i=(r||navigator.language.split("-")[0]||"en").replace(/['"]+/g,"").replace("-","_");let s;try{s=ao[i][o][n]}catch(t){s=ao.en[o][n]}if(void 0===s&&(s=ao.en[o][n]),void 0!==s)return""!==e&&""!==a&&(s=s.replace(e,a)),s}customElements.define("vacuum-card-editor",class extends H{static get properties(){return{hass:Object,_config:Object,_toggle:Boolean}}setConfig(t){this._config=t,this._config.entity||(this._config.entity=this.getEntitiesByType("vacuum")[0]||"",vt(this,"config-changed",{config:this._config}))}get _entity(){return this._config&&this._config.entity||""}get _map(){return this._config&&this._config.map||""}get _image(){return this._config&&this._config.image||""}get _show_name(){return this._config?this._config.show_name||!0:""}get _show_status(){return this._config?this._config.show_status||!0:""}get _show_toolbar(){return this._config&&this._config.show_toolbar||!0}get _compact_view(){return this._config&&this._config.compact_view||!1}getEntitiesByType(t){return Object.keys(this.hass.states).filter(e=>e.substr(0,e.indexOf("."))===t)}render(){if(!this.hass)return K``;const t=this.getEntitiesByType("vacuum"),e=this.getEntitiesByType("camera");return K`
      <div class="card-config">
        <paper-dropdown-menu
          label="${oo("editor.entity")}"
          @value-changed=${this._valueChanged}
          .configValue=${"entity"}
        >
          <paper-listbox
            slot="dropdown-content"
            .selected=${t.indexOf(this._entity)}
          >
            ${t.map(t=>K` <paper-item>${t}</paper-item> `)}
          </paper-listbox>
        </paper-dropdown-menu>

        <paper-dropdown-menu
          label="${oo("editor.entity")}"
          @value-changed=${this._valueChanged}
          .configValue=${"map"}
        >
          <paper-listbox
            slot="dropdown-content"
            .selected=${e.indexOf(this._map)}
          >
            ${e.map(t=>K` <paper-item>${t}</paper-item> `)}
          </paper-listbox>
        </paper-dropdown-menu>

        <paper-input
          label="${oo("editor.image")}"
          .value=${this._image}
          .configValue=${"image"}
          @value-changed=${this._valueChanged}
        ></paper-input>

        <p class="option">
          <ha-switch
            aria-label=${oo(this._compact_view?"editor.compact_view_aria_label_off":"editor.compact_view_aria_label_on")}
            .checked=${!1!==this._compact_view}
            .configValue=${"compact_view"}
            @change=${this._valueChanged}
          >
          </ha-switch>
          ${oo("editor.compact_view")}
        </p>

        <p class="option">
          <ha-switch
            aria-label=${oo(this._show_name?"editor.show_name_aria_label_off":"editor.show_name_aria_label_on")}
            .checked=${!1!==this._show_name}
            .configValue=${"show_name"}
            @change=${this._valueChanged}
          >
          </ha-switch>
          ${oo("editor.show_name")}
        </p>

        <p class="option">
          <ha-switch
            aria-label=${oo(this._show_status?"editor.show_status_aria_label_off":"editor.show_status_aria_label_on")}
            .checked=${!1!==this._show_status}
            .configValue=${"show_status"}
            @change=${this._valueChanged}
          >
          </ha-switch>
          ${oo("editor.show_status")}
        </p>

        <p class="option">
          <ha-switch
            aria-label=${oo(this._show_name?"editor.show_toolbar_aria_label_off":"editor.show_toolbar_aria_label_on")}
            .checked=${!1!==this._show_toolbar}
            .configValue=${"show_toolbar"}
            @change=${this._valueChanged}
          >
          </ha-switch>
          ${oo("editor.show_toolbar")}
        </p>

        <strong>
          ${oo("editor.code_only_note")}
        </strong>
      </div>
    `}_valueChanged(t){if(!this._config||!this.hass)return;const e=t.target;this["_"+e.configValue]!==e.value&&(e.configValue&&(""===e.value?delete this._config[e.configValue]:this._config={...this._config,[e.configValue]:void 0!==e.checked?e.checked:e.value}),vt(this,"config-changed",{config:this._config}))}static get styles(){return F`
      .card-config paper-dropdown-menu {
        width: 100%;
      }

      .option {
        display: flex;
        align-items: center;
      }

      .option ha-switch {
        margin-right: 10px;
      }
    `}});var no=F`
  :host {
    display: flex;
    flex: 1;
    flex-direction: column;
  }

  ha-card {
    flex-direction: column;
    flex: 1;
    position: relative;
    padding: 0px;
    border-radius: 4px;
    overflow: hidden;
  }

  .preview {
    background: var(--primary-color);
    cursor: pointer;
    overflow: hidden;
    position: relative;
    text-align: center;
  }

  .preview.not-available {
    filter: grayscale(1);
  }

  .map {
    max-width: 95%;
    image-rendering: crisp-edges;
  }

  @keyframes cleaning {
    0% {
      transform: rotate(0) translate(0);
    }
    5% {
      transform: rotate(0) translate(0, -10px);
    }
    10% {
      transform: rotate(0) translate(0, 5px);
    }
    15% {
      transform: rotate(0) translate(0);
    }
    /* Turn left */
    20% {
      transform: rotate(30deg) translate(0);
    }
    25% {
      transform: rotate(30deg) translate(0, -10px);
    }
    30% {
      transform: rotate(30deg) translate(0, 5px);
    }
    35% {
      transform: rotate(30deg) translate(0);
    }
    40% {
      transform: rotate(0) translate(0);
    }
    /* Turn right */
    45% {
      transform: rotate(-30deg) translate(0);
    }
    50% {
      transform: rotate(-30deg) translate(0, -10px);
    }
    55% {
      transform: rotate(-30deg) translate(0, 5px);
    }
    60% {
      transform: rotate(-30deg) translate(0);
    }
    70% {
      transform: rotate(0deg) translate(0);
    }
    /* Staying still */
    100% {
      transform: rotate(0deg);
    }
  }

  @keyframes returning {
    0% {
      transform: rotate(0);
    }
    25% {
      transform: rotate(10deg);
    }
    50% {
      transform: rotate(0);
    }
    75% {
      transform: rotate(-10deg);
    }
    100% {
      transform: rotate(0);
    }
  }

  .vacuum {
    display: block;
    max-width: 90%;
    max-height: 200px;
    image-rendering: crisp-edges;
    margin: 30px auto 20px auto;
  }

  .vacuum.cleaning,
  .vacuum.on {
    animation: cleaning 5s linear infinite;
  }

  .vacuum.returning {
    animation: returning 2s linear infinite;
  }

  .vacuum.paused {
    opacity: 100%;
  }

  .vacuum.docked {
    opacity: 50%;
  }

  .fill-gap {
    flex-grow: 1;
  }

  .header {
    height: 40px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary-color);
  }

  .battery {
    text-align: right;
    font-weight: bold;
    padding: 8px;
  }

  .source {
    text-align: center;
  }

  .status {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .status-text {
    color: var(--text-primary-color);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    margin-left: calc(20px + 9px); /* size + margin of spinner */
  }

  .status ha-circular-progress {
    --mdc-theme-primary: var(
      --card-background-color
    ); /* hack to override the color */
    min-width: 24px;
    width: 24px;
    height: 24px;
    margin-left: 9px;
  }

  .vacuum-name {
    text-align: center;
    font-weight: bold;
    color: var(--text-primary-color);
    font-size: 16px;
  }

  .not-available {
    text-align: center;
    color: var(--text-primary-color);
    font-size: 16px;
  }

  .metadata {
    margin: 10px auto;
  }

  .stats {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    color: var(--text-primary-color);
  }

  .stats-block {
    margin: 10px 0px;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    flex-grow: 1;
  }

  .stats-block:last-child {
    border: 0px;
  }

  .stats-value {
    font-size: 20px;
    font-weight: bold;
  }

  ha-icon {
    color: #fff;
  }

  .toolbar {
    background: var(--lovelace-background, var(--primary-background-color));
    min-height: 30px;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
  }

  .toolbar ha-icon-button {
    color: var(--primary-color);
    flex-direction: column;
    width: 44px;
    height: 44px;
    --mdc-icon-button-size: 44px;
    margin: 5px 0;
  }

  .toolbar ha-icon-button:first-child {
    margin-left: 5px;
  }

  .toolbar ha-icon-button:last-child {
    margin-right: 5px;
  }

  .toolbar paper-button {
    color: var(--primary-color);
    flex-direction: column;
    margin-right: 10px;
    padding: 15px 10px;
    cursor: pointer;
  }

  .toolbar ha-icon-button:active,
  .toolbar paper-button:active {
    opacity: 0.4;
    background: rgba(0, 0, 0, 0.1);
  }

  .toolbar paper-button {
    color: var(--primary-color);
    flex-direction: row;
  }

  .toolbar ha-icon {
    color: var(--primary-color);
    padding-right: 15px;
  }
`;const ro="data:image/png;base64,[encoded data, 37120 characters]";customElements.get("ha-icon-button")||customElements.define("ha-icon-button",class extends(customElements.get("paper-icon-button")){});customElements.define("vacuum-card",class extends H{static get properties(){return{hass:Object,config:Object,mapUrl:String,requestInProgress:Boolean}}static get styles(){return no}static async getConfigElement(){return document.createElement("vacuum-card-editor")}static getStubConfig(t,e){const[a]=e.filter(t=>"vacuum"===t.substr(0,t.indexOf(".")));return{entity:a||"",image:"default"}}get entity(){return this.hass.states[this.config.entity]}get map(){return this.hass?this.hass.states[this.config.map]:null}get image(){return"default"===this.config.image?ro:this.config.image||ro}get showName(){return void 0===this.config.show_name||this.config.show_name}get showStatus(){return void 0===this.config.show_status||this.config.show_status}get showToolbar(){return void 0===this.config.show_toolbar||this.config.show_toolbar}get compactView(){return void 0!==this.config.compact_view&&this.config.compact_view}setConfig(t){if(!t.entity)throw new Error(oo("error.missing_entity"));this.config=t}getCardSize(){return 2}shouldUpdate(t){return function(t,e,a){if(e.has("config")||a)return!0;if(t.config.entity){var o=e.get("hass");return!o||o.states[t.config.entity]!==t.hass.states[t.config.entity]}return!1}(this,t)}updated(t){t.get("hass")&&t.get("hass").states[this.config.entity].state!==this.hass.states[this.config.entity].state&&(this.requestInProgress=!1)}updateCameraImage(){this.hass.callWS({type:"camera_thumbnail",entity_id:this.config.map}).then(t=>{const{content_type:e,content:a}=t;this.mapUrl=`data:${e};base64, ${a}`,this.requestUpdate()})}connectedCallback(){super.connectedCallback(),!this.compactView&&this.map&&(this.updateCameraImage(),this.thumbUpdater=setInterval(()=>this.updateCameraImage(),1e3*(this.config.map_refresh||5)))}disconnectedCallback(){super.disconnectedCallback(),this.map&&(clearInterval(this.thumbUpdater),this.map_image=null)}handleMore(){vt(this,"hass-more-info",{entityId:this.entity.entity_id},{bubbles:!0,composed:!0})}handleSpeed(t){const e=t.target.getAttribute("value");this.callService("set_fan_speed",!1,{fan_speed:e})}callService(t,e=!0,a={}){this.hass.callService("vacuum",t,{entity_id:this.config.entity,...a}),e&&(this.requestInProgress=!0,this.requestUpdate())}getAttributes(t){const{status:e,state:a,fan_speed:o,fan_speed_list:n,battery_level:r,battery_icon:i,friendly_name:s}=t.attributes;return{status:e||a||t.state,fan_speed:o,fan_speed_list:n,battery_level:r,battery_icon:i,friendly_name:s}}renderSource(){const{fan_speed:t,fan_speed_list:e}=this.getAttributes(this.entity);if(!e)return K``;const a=e.indexOf(t);return K`
      <paper-menu-button
        slot="dropdown-trigger"
        .horizontalAlign=${"right"}
        .verticalAlign=${"top"}
        .verticalOffset=${40}
        .noAnimations=${!0}
        @click="${t=>t.stopPropagation()}"
      >
        <paper-button slot="dropdown-trigger">
          <ha-icon icon="mdi:fan"></ha-icon>
          <span show=${!0}>
            ${oo("source."+t)||t}
          </span>
        </paper-button>
        <paper-listbox
          slot="dropdown-content"
          selected=${a}
          @click="${t=>this.handleSpeed(t)}"
        >
          ${e.map(t=>K`<paper-item value=${t}
                >${oo("source."+t)||t}</paper-item
              >`)}
        </paper-listbox>
      </paper-menu-button>
    `}renderMapOrImage(t){return this.compactView?K``:this.map?K` <img class="map" src="${this.mapUrl}" /> `:this.image?K` <img class="vacuum ${t}" src="${this.image}" /> `:K``}renderStats(t){const{stats:e={}}=this.config;return(e[t]||e.default||[]).map(({entity_id:t,attribute:e,unit:a,subtitle:o})=>{if(!t&&!e)return K``;const n=t?this.hass.states[t].state:re(this.entity.attributes,e);return K`
        <div class="stats-block">
          <span class="stats-value">${n}</span>
          ${a}
          <div class="stats-subtitle">${o}</div>
        </div>
      `})}renderName(){const{friendly_name:t}=this.getAttributes(this.entity);return this.showName?K`
      <div class="vacuum-name">
        ${t}
      </div>
    `:K``}renderStatus(){const{status:t}=this.getAttributes(this.entity),e=oo("status."+t)||t;return this.showStatus?K`
      <div class="status">
        <span class="status-text" alt=${e}>
          ${e}
        </span>
        <ha-circular-progress
          .active=${this.requestInProgress}
          size="small"
        ></ha-circular-progress>
      </div>
    `:K``}renderToolbar(t){if(!this.showToolbar)return K``;switch(t){case"on":case"cleaning":return K`
          <div class="toolbar">
            <paper-button @click="${()=>this.callService("pause")}">
              <ha-icon icon="hass:pause"></ha-icon>
              ${oo("common.pause")}
            </paper-button>
            <paper-button @click="${()=>this.callService("stop")}">
              <ha-icon icon="hass:stop"></ha-icon>
              ${oo("common.stop")}
            </paper-button>
            <paper-button @click="${()=>this.callService("return_to_base")}">
              <ha-icon icon="hass:home-map-marker"></ha-icon>
              ${oo("common.return_to_base")}
            </paper-button>
          </div>
        `;case"paused":return K`
          <div class="toolbar">
            <paper-button @click="${()=>this.callService("start")}">
              <ha-icon icon="hass:play"></ha-icon>
              ${oo("common.continue")}
            </paper-button>
            <paper-button @click="${()=>this.callService("return_to_base")}">
              <ha-icon icon="hass:home-map-marker"></ha-icon>
              ${oo("common.return_to_base")}
            </paper-button>
          </div>
        `;case"returning":return K`
          <div class="toolbar">
            <paper-button @click="${()=>this.callService("start")}">
              <ha-icon icon="hass:play"></ha-icon>
              ${oo("common.continue")}
            </paper-button>
            <paper-button @click="${()=>this.callService("pause")}">
              <ha-icon icon="hass:pause"></ha-icon>
              ${oo("common.pause")}
            </paper-button>
          </div>
        `;case"docked":case"idle":default:{const{actions:e=[]}=this.config,a=e.map(({name:t,service:e,icon:a,service_data:o})=>K`<ha-icon-button
            icon="${a}"
            title="${t}"
            @click="${()=>{const[t,a]=e.split(".");this.hass.callService(t,a,o)}}"
          ></ha-icon-button>`),o=K`
          <ha-icon-button
            icon="hass:home-map-marker"
            title="${oo("common.return_to_base")}"
            @click="${()=>this.callService("return_to_base")}"
          >
          </ha-icon-button>
        `;return K`
          <div class="toolbar">
            <ha-icon-button
              icon="hass:play"
              title="${oo("common.start")}"
              @click="${()=>this.callService("start")}"
            >
            </ha-icon-button>

            <ha-icon-button
              icon="mdi:map-marker"
              title="${oo("common.locate")}"
              @click="${()=>this.callService("locate",!1)}"
            >
            </ha-icon-button>

            ${"idle"===t?o:""}
            <div class="fill-gap"></div>
            ${a}
          </div>
        `}}}render(){if(!this.entity)return K`
        <ha-card>
          <div class="preview not-available">
            <div class="metadata">
              <div class="not-available">
                ${oo("common.not_available")}
              </div>
            <div>
          </div>
        </ha-card>
      `;const{state:t}=this.entity,{battery_level:e,battery_icon:a}=this.getAttributes(this.entity);return K`
      <ha-card>
        <div
          class="preview"
          @click="${()=>this.handleMore()}"
          ?more-info="true"
        >
          <div class="header">
            <div class="source">
              ${this.renderSource()}
            </div>
            <div class="battery">
              ${e}% <ha-icon icon="${a}"></ha-icon>
            </div>
          </div>

          ${this.renderMapOrImage(t)}

          <div class="metadata">
            ${this.renderName()} ${this.renderStatus()}
          </div>

          <div class="stats">
            ${this.renderStats(t)}
          </div>
        </div>

        ${this.renderToolbar(t)}
      </ha-card>
    `}}),window.customCards=window.customCards||[],window.customCards.push({preview:!0,type:"vacuum-card",name:oo("common.name"),description:oo("common.description")});
