/*! For license information please see chunk.ea3124c0ff216652145d.js.LICENSE */
(self.webpackJsonp=self.webpackJsonp||[]).push([[91],{113:function(e,t,i){"use strict";i(5);var a=i(94),n=i(61),o=i(6),s=i(1),r=i(4);Object(o.a)({_template:r.a`
    <style>
      :host {
        display: inline-block;
      }
    </style>
    <slot id="content"></slot>
`,is:"iron-input",behaviors:[n.a],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){a.a.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=Object(s.a)(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(Object(s.a)(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.inputElement.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.inputElement.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=n.a.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}})},118:function(e,t,i){"use strict";i.d(t,"a",function(){return o});var a=i(9),n=i(18);const o=Object(a.a)(e=>(class extends e{fire(e,t,i){return i=i||{},Object(n.a)(i.node||this,e,t,i)}}))},119:function(e,t,i){"use strict";i.d(t,"a",function(){return o});i(5);var a=i(55),n=i(35);const o=[a.a,n.a,{hostAttributes:{role:"option",tabindex:"0"}}]},143:function(e,t,i){"use strict";i(5),i(45),i(144);var a=i(6),n=i(4),o=i(119);Object(a.a)({_template:n.a`
    <style include="paper-item-shared-styles">
      :host {
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-subhead;

        @apply --paper-item;
      }
    </style>
    <slot></slot>
`,is:"paper-item",behaviors:[o.a]})},144:function(e,t,i){"use strict";i(45),i(68),i(42),i(54);const a=document.createElement("template");a.setAttribute("style","display: none;"),a.innerHTML="<dom-module id=\"paper-item-shared-styles\">\n  <template>\n    <style>\n      :host, .paper-item {\n        display: block;\n        position: relative;\n        min-height: var(--paper-item-min-height, 48px);\n        padding: 0px 16px;\n      }\n\n      .paper-item {\n        @apply --paper-font-subhead;\n        border:none;\n        outline: none;\n        background: white;\n        width: 100%;\n        text-align: left;\n      }\n\n      :host([hidden]), .paper-item[hidden] {\n        display: none !important;\n      }\n\n      :host(.iron-selected), .paper-item.iron-selected {\n        font-weight: var(--paper-item-selected-weight, bold);\n\n        @apply --paper-item-selected;\n      }\n\n      :host([disabled]), .paper-item[disabled] {\n        color: var(--paper-item-disabled-color, var(--disabled-text-color));\n\n        @apply --paper-item-disabled;\n      }\n\n      :host(:focus), .paper-item:focus {\n        position: relative;\n        outline: 0;\n\n        @apply --paper-item-focused;\n      }\n\n      :host(:focus):before, .paper-item:focus:before {\n        @apply --layout-fit;\n\n        background: currentColor;\n        content: '';\n        opacity: var(--dark-divider-opacity);\n        pointer-events: none;\n\n        @apply --paper-item-focused-before;\n      }\n    </style>\n  </template>\n</dom-module>",document.head.appendChild(a.content)},175:function(e,t,i){"use strict";var a=i(9);t.a=Object(a.a)(e=>(class extends e{static get properties(){return{hass:Object,localize:{type:Function,computed:"__computeLocalize(hass.localize)"}}}__computeLocalize(e){return e}}))},176:function(e,t,i){"use strict";i.d(t,"a",function(){return n});var a=i(190);const n=e=>void 0===e.attributes.friendly_name?Object(a.a)(e.entity_id).replace(/_/g," "):e.attributes.friendly_name||""},177:function(e,t,i){"use strict";var a=i(3),n=i(0);class o extends n.a{static get styles(){return n.c`
      :host {
        background: var(
          --ha-card-background,
          var(--paper-card-background-color, white)
        );
        border-radius: var(--ha-card-border-radius, 2px);
        box-shadow: var(
          --ha-card-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)
        );
        color: var(--primary-text-color);
        display: block;
        transition: all 0.3s ease-out;
        position: relative;
      }

      .card-header,
      :host ::slotted(.card-header) {
        color: var(--ha-card-header-color, --primary-text-color);
        font-family: var(--ha-card-header-font-family, inherit);
        font-size: var(--ha-card-header-font-size, 24px);
        letter-spacing: -0.012em;
        line-height: 32px;
        padding: 24px 16px 16px;
        display: block;
      }

      :host ::slotted(.card-content:not(:first-child)),
      slot:not(:first-child)::slotted(.card-content) {
        padding-top: 0px;
        margin-top: -8px;
      }

      :host ::slotted(.card-content) {
        padding: 16px;
      }

      :host ::slotted(.card-actions) {
        border-top: 1px solid #e8e8e8;
        padding: 5px 16px;
      }
    `}render(){return n.f`
      ${this.header?n.f`
            <div class="card-header">${this.header}</div>
          `:n.f``}
      <slot></slot>
    `}}Object(a.c)([Object(n.g)()],o.prototype,"header",void 0),customElements.define("ha-card",o)},178:function(e,t,i){"use strict";i.d(t,"a",function(){return o});var a=i(120);const n={alert:"hass:alert",alexa:"hass:amazon-alexa",automation:"hass:playlist-play",calendar:"hass:calendar",camera:"hass:video",climate:"hass:thermostat",configurator:"hass:settings",conversation:"hass:text-to-speech",device_tracker:"hass:account",fan:"hass:fan",google_assistant:"hass:google-assistant",group:"hass:google-circles-communities",history_graph:"hass:chart-line",homeassistant:"hass:home-assistant",homekit:"hass:home-automation",image_processing:"hass:image-filter-frames",input_boolean:"hass:drawing",input_datetime:"hass:calendar-clock",input_number:"hass:ray-vertex",input_select:"hass:format-list-bulleted",input_text:"hass:textbox",light:"hass:lightbulb",mailbox:"hass:mailbox",notify:"hass:comment-alert",persistent_notification:"hass:bell",person:"hass:account",plant:"hass:flower",proximity:"hass:apple-safari",remote:"hass:remote",scene:"hass:google-pages",script:"hass:file-document",sensor:"hass:eye",simple_alarm:"hass:bell",sun:"hass:white-balance-sunny",switch:"hass:flash",timer:"hass:timer",updater:"hass:cloud-upload",vacuum:"hass:robot-vacuum",water_heater:"hass:thermometer",weather:"hass:weather-cloudy",weblink:"hass:open-in-new",zone:"hass:map-marker"},o=(e,t)=>{if(e in n)return n[e];switch(e){case"alarm_control_panel":switch(t){case"armed_home":return"hass:bell-plus";case"armed_night":return"hass:bell-sleep";case"disarmed":return"hass:bell-outline";case"triggered":return"hass:bell-ring";default:return"hass:bell"}case"binary_sensor":return t&&"off"===t?"hass:radiobox-blank":"hass:checkbox-marked-circle";case"cover":return"closed"===t?"hass:window-closed":"hass:window-open";case"lock":return t&&"unlocked"===t?"hass:lock-open":"hass:lock";case"media_player":return t&&"off"!==t&&"idle"!==t?"hass:cast-connected":"hass:cast";case"zwave":switch(t){case"dead":return"hass:emoticon-dead";case"sleeping":return"hass:sleep";case"initializing":return"hass:timer-sand";default:return"hass:z-wave"}default:return console.warn("Unable to find icon for domain "+e+" ("+t+")"),a.a}}},179:function(e,t,i){"use strict";i.d(t,"a",function(){return o});i(109);const a=customElements.get("iron-icon");let n=!1;class o extends a{listen(e,t,a){super.listen(e,t,a),n||"mdi"!==this._iconsetName||(n=!0,i.e(75).then(i.bind(null,219)))}}customElements.define("ha-icon",o)},180:function(e,t,i){"use strict";i(5),i(45),i(42),i(54);var a=i(6),n=i(4);Object(a.a)({_template:n.a`
    <style>
      :host {
        overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
        @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>
`,is:"paper-item-body"})},181:function(e,t,i){"use strict";i.d(t,"a",function(){return n});var a=i(121);const n=e=>Object(a.a)(e.entity_id)},182:function(e,t,i){"use strict";i(5);const a=i(4).a`
/* Most common used flex styles*/
<dom-module id="iron-flex">
  <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>
/* Basic flexbox reverse styles */
<dom-module id="iron-flex-reverse">
  <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>
/* Flexbox alignment */
<dom-module id="iron-flex-alignment">
  <template>
    <style>
      /**
       * Alignment in cross axis.
       */
      .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;
      }

      /**
       * Alignment in main axis.
       */
      .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 alignment.
       */
      .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;
      }

      /**
       * multi-line alignment in main axis.
       */
      .layout.start-aligned {
        -ms-flex-line-pack: start;  /* IE10 */
        -ms-align-content: flex-start;
        -webkit-align-content: flex-start;
        align-content: flex-start;
      }

      .layout.end-aligned {
        -ms-flex-line-pack: end;  /* IE10 */
        -ms-align-content: flex-end;
        -webkit-align-content: flex-end;
        align-content: flex-end;
      }

      .layout.center-aligned {
        -ms-flex-line-pack: center;  /* IE10 */
        -ms-align-content: center;
        -webkit-align-content: center;
        align-content: center;
      }

      .layout.between-aligned {
        -ms-flex-line-pack: justify;  /* IE10 */
        -ms-align-content: space-between;
        -webkit-align-content: space-between;
        align-content: space-between;
      }

      .layout.around-aligned {
        -ms-flex-line-pack: distribute;  /* IE10 */
        -ms-align-content: space-around;
        -webkit-align-content: space-around;
        align-content: space-around;
      }
    </style>
  </template>
</dom-module>
/* Non-flexbox positioning helper styles */
<dom-module id="iron-flex-factors">
  <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">
  <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 position */
      .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>
`;a.setAttribute("style","display: none;"),document.head.appendChild(a.content)},184:function(e,t,i){"use strict";i(5),i(45),i(54),i(144);var a=i(6),n=i(4),o=i(119);Object(a.a)({_template:n.a`
    <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>
`,is:"paper-icon-item",behaviors:[o.a]})},185:function(e,t,i){"use strict";var a=i(3),n=i(0),o=(i(179),i(181)),s=i(194);class r extends n.a{render(){const e=this.stateObj;return e?n.f`
      <ha-icon
        id="icon"
        data-domain=${Object(o.a)(e)}
        data-state=${e.state}
        .icon=${this.overrideIcon||Object(s.a)(e)}
      ></ha-icon>
    `:n.f``}updated(e){if(!e.has("stateObj")||!this.stateObj)return;const t=this.stateObj,i={color:"",filter:""},a={backgroundImage:""};if(t)if(t.attributes.entity_picture&&!this.overrideIcon||this.overrideImage){let e=this.overrideImage||t.attributes.entity_picture;this.hass&&(e=this.hass.hassUrl(e)),a.backgroundImage=`url(${e})`,i.display="none"}else{if(t.attributes.hs_color){const e=t.attributes.hs_color[0],a=t.attributes.hs_color[1];a>10&&(i.color=`hsl(${e}, 100%, ${100-a/2}%)`)}if(t.attributes.brightness){const e=t.attributes.brightness;if("number"!=typeof e){const i=`Type error: state-badge expected number, but type of ${t.entity_id}.attributes.brightness is ${typeof e} (${e})`;console.warn(i)}i.filter=`brightness(${(e+245)/5}%)`}}Object.assign(this._icon.style,i),Object.assign(this.style,a)}static get styles(){return n.c`
      :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;
        vertical-align: middle;
      }

      ha-icon {
        transition: color 0.3s ease-in-out, filter 0.3s ease-in-out;
      }

      /* Color the icon if light or sun is on */
      ha-icon[data-domain="light"][data-state="on"],
      ha-icon[data-domain="switch"][data-state="on"],
      ha-icon[data-domain="binary_sensor"][data-state="on"],
      ha-icon[data-domain="fan"][data-state="on"],
      ha-icon[data-domain="sun"][data-state="above_horizon"] {
        color: var(--paper-item-icon-active-color, #fdd835);
      }

      /* Color the icon if unavailable */
      ha-icon[data-state="unavailable"] {
        color: var(--state-icon-unavailable-color);
      }
    `}}Object(a.c)([Object(n.g)()],r.prototype,"stateObj",void 0),Object(a.c)([Object(n.g)()],r.prototype,"overrideIcon",void 0),Object(a.c)([Object(n.g)()],r.prototype,"overrideImage",void 0),Object(a.c)([Object(n.h)("ha-icon")],r.prototype,"_icon",void 0),customElements.define("state-badge",r)},190:function(e,t,i){"use strict";i.d(t,"a",function(){return a});const a=e=>e.substr(e.indexOf(".")+1)},194:function(e,t,i){"use strict";var a=i(120);var n=i(121),o=i(178);const s={humidity:"hass:water-percent",illuminance:"hass:brightness-5",temperature:"hass:thermometer",pressure:"hass:gauge",power:"hass:flash",signal_strength:"hass:wifi"};i.d(t,"a",function(){return c});const r={binary_sensor:e=>{const t=e.state&&"off"===e.state;switch(e.attributes.device_class){case"battery":return t?"hass:battery":"hass:battery-outline";case"cold":return t?"hass:thermometer":"hass:snowflake";case"connectivity":return t?"hass:server-network-off":"hass:server-network";case"door":return t?"hass:door-closed":"hass:door-open";case"garage_door":return t?"hass:garage":"hass:garage-open";case"gas":case"power":case"problem":case"safety":case"smoke":return t?"hass:shield-check":"hass:alert";case"heat":return t?"hass:thermometer":"hass:fire";case"light":return t?"hass:brightness-5":"hass:brightness-7";case"lock":return t?"hass:lock":"hass:lock-open";case"moisture":return t?"hass:water-off":"hass:water";case"motion":return t?"hass:walk":"hass:run";case"occupancy":return t?"hass:home-outline":"hass:home";case"opening":return t?"hass:square":"hass:square-outline";case"plug":return t?"hass:power-plug-off":"hass:power-plug";case"presence":return t?"hass:home-outline":"hass:home";case"sound":return t?"hass:music-note-off":"hass:music-note";case"vibration":return t?"hass:crop-portrait":"hass:vibrate";case"window":return t?"hass:window-closed":"hass:window-open";default:return t?"hass:radiobox-blank":"hass:checkbox-marked-circle"}},cover:e=>{const t="closed"!==e.state;switch(e.attributes.device_class){case"garage":return t?"hass:garage-open":"hass:garage";case"door":return t?"hass:door-open":"hass:door-closed";case"shutter":return t?"hass:window-shutter-open":"hass:window-shutter";case"blind":return t?"hass:blinds-open":"hass:blinds";case"window":return t?"hass:window-open":"hass:window-closed";default:return Object(o.a)("cover",e.state)}},sensor:e=>{const t=e.attributes.device_class;if(t&&t in s)return s[t];if("battery"===t){const t=Number(e.state);if(isNaN(t))return"hass:battery-unknown";const i=10*Math.round(t/10);return i>=100?"hass:battery":i<=0?"hass:battery-alert":`hass:battery-${i}`}const i=e.attributes.unit_of_measurement;return i===a.j||i===a.k?"hass:thermometer":Object(o.a)("sensor")},input_datetime:e=>e.attributes.has_date?e.attributes.has_time?Object(o.a)("input_datetime"):"hass:calendar":"hass:clock"},c=e=>{if(!e)return a.a;if(e.attributes.icon)return e.attributes.icon;const t=Object(n.a)(e.entity_id);return t in r?r[t](e):Object(o.a)(t,e.state)}},197:function(e,t,i){"use strict";i.d(t,"a",function(){return a});const a=(e,t,i=!1)=>{let a;return function(...n){const o=this,s=i&&!a;clearTimeout(a),a=setTimeout(()=>{a=null,i||e.apply(o,n)},t),s&&e.apply(o,n)}}},198:function(e,t,i){"use strict";var a=i(4),n=i(30);i(95);customElements.define("ha-config-section",class extends n.a{static get template(){return a.a`
      <style include="iron-flex ha-style">
        .content {
          padding: 28px 20px 0;
          max-width: 1040px;
          margin: 0 auto;
        }

        .header {
          @apply --paper-font-display1;
          opacity: var(--dark-primary-opacity);
        }

        .together {
          margin-top: 32px;
        }

        .intro {
          @apply --paper-font-subhead;
          width: 100%;
          max-width: 400px;
          margin-right: 40px;
          opacity: var(--dark-primary-opacity);
        }

        .panel {
          margin-top: -24px;
        }

        .panel ::slotted(*) {
          margin-top: 24px;
          display: block;
        }

        .narrow.content {
          max-width: 640px;
        }
        .narrow .together {
          margin-top: 20px;
        }
        .narrow .header {
          @apply --paper-font-headline;
        }
        .narrow .intro {
          font-size: 14px;
          padding-bottom: 20px;
          margin-right: 0;
          max-width: 500px;
        }
      </style>
      <div class$="[[computeContentClasses(isWide)]]">
        <div class="header"><slot name="header"></slot></div>
        <div class$="[[computeClasses(isWide)]]">
          <div class="intro"><slot name="introduction"></slot></div>
          <div class="panel flex-auto"><slot></slot></div>
        </div>
      </div>
    `}static get properties(){return{hass:{type:Object},narrow:{type:Boolean},isWide:{type:Boolean,value:!1}}}computeContentClasses(e){return e?"content ":"content narrow"}computeClasses(e){return"together layout "+(e?"horizontal":"vertical narrow")}})},202:function(e,t,i){"use strict";i.d(t,"b",function(){return a}),i.d(t,"a",function(){return n});const a=(e,t)=>e<t?-1:e>t?1:0,n=(e,t)=>a(e.toLowerCase(),t.toLowerCase())},227:function(e,t,i){"use strict";i.d(t,"b",function(){return o}),i.d(t,"a",function(){return c});var a=i(13),n=i(197);const o=(e,t,i)=>e.callWS(Object.assign({type:"config/device_registry/update",device_id:t},i)),s=e=>e.sendMessagePromise({type:"config/device_registry/list"}),r=(e,t)=>e.subscribeEvents(Object(n.a)(()=>s(e).then(e=>t.setState(e,!0)),500,!0),"device_registry_updated"),c=(e,t)=>Object(a.d)("_dr",s,r,e,t)},233:function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"d",function(){return r}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return p});var a=i(13),n=i(202),o=i(197);const s=(e,t)=>e.callWS(Object.assign({type:"config/area_registry/create"},t)),r=(e,t,i)=>e.callWS(Object.assign({type:"config/area_registry/update",area_id:t},i)),c=(e,t)=>e.callWS({type:"config/area_registry/delete",area_id:t}),l=e=>e.sendMessagePromise({type:"config/area_registry/list"}).then(e=>e.sort((e,t)=>Object(n.b)(e.name,t.name))),d=(e,t)=>e.subscribeEvents(Object(o.a)(()=>l(e).then(e=>t.setState(e,!0)),500,!0),"area_registry_updated"),p=(e,t)=>Object(a.d)("_areaRegistry",l,d,e,t)},238:function(e,t,i){"use strict";var a=i(3),n=i(14),o=i(74);i(247);const s=customElements.get("mwc-fab");let r=class extends s{render(){const e={"mdc-fab--mini":this.mini,"mdc-fab--exited":this.exited,"mdc-fab--extended":this.extended},t=""!==this.label&&this.extended;return n.g`
      <button
        .ripple="${Object(o.a)()}"
        class="mdc-fab ${Object(n.d)(e)}"
        ?disabled="${this.disabled}"
        aria-label="${this.label||this.icon}"
      >
        ${t&&this.showIconAtEnd?this.label:""}
        ${this.icon?n.g`
              <ha-icon .icon=${this.icon}></ha-icon>
            `:""}
        ${t&&!this.showIconAtEnd?this.label:""}
      </button>
    `}};r=Object(a.c)([Object(n.f)("ha-fab")],r)},242:function(e,t,i){"use strict";i(5);var a=i(6);Object(a.a)({is:"app-route",properties:{route:{type:Object,notify:!0},pattern:{type:String},data:{type:Object,value:function(){return{}},notify:!0},autoActivate:{type:Boolean,value:!1},_queryParamsUpdating:{type:Boolean,value:!1},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},_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(e){if(e&&this.tail){if(this.tail.__queryParams!==e&&this.set("tail.__queryParams",e),!this.active||this._queryParamsUpdating)return;var t={},i=!1;for(var a in e)t[a]=e[a],!i&&this.queryParams&&e[a]===this.queryParams[a]||(i=!0);for(var a in this.queryParams)if(i||!(a in e)){i=!0;break}if(!i)return;this._queryParamsUpdating=!0,this.set("queryParams",t),this._queryParamsUpdating=!1}},__tailQueryParamsChanged:function(e){e&&this.route&&this.route.__queryParams!=e&&this.set("route.__queryParams",e)},__queryParamsChanged:function(e){this.active&&!this._queryParamsUpdating&&this.set("route.__"+e.path,e.value)},__resetProperties:function(){this._setActive(!1),this._matched=null},__tryToMatch:function(){if(this.route){var e=this.route.path,t=this.pattern;if(this.autoActivate&&""===e&&(e="/"),t)if(e){for(var i=e.split("/"),a=t.split("/"),n=[],o={},s=0;s<a.length;s++){var r=a[s];if(!r&&""!==r)break;var c=i.shift();if(!c&&""!==c)return void this.__resetProperties();if(n.push(c),":"==r.charAt(0))o[r.slice(1)]=c;else if(r!==c)return void this.__resetProperties()}this._matched=n.join("/");var l={};this.active||(l.active=!0);var d=this.route.prefix+this._matched,p=i.join("/");for(var h in i.length>0&&(p="/"+p),this.tail&&this.tail.prefix===d&&this.tail.path===p||(l.tail={prefix:d,path:p,__queryParams:this.route.__queryParams}),l.data=o,this._dataInUrl={},o)this._dataInUrl[h]=o[h];this.setProperties?this.setProperties(l,!0):this.__setMulti(l)}else this.__resetProperties()}},__tailPathChanged:function(e){if(this.active){var t=e,i=this._matched;t&&("/"!==t.charAt(0)&&(t="/"+t),i+=t),this.set("route.path",i)}},__updatePathOnDataChange:function(){if(this.route&&this.active){var e=this.__getLink({});e!==this.__getLink(this._dataInUrl)&&this.set("route.path",e)}},__getLink:function(e){var t={tail:null};for(var i in this.data)t[i]=this.data[i];for(var i in e)t[i]=e[i];var a=this.pattern.split("/").map(function(e){return":"==e[0]&&(e=t[e.slice(1)]),e},this);return t.tail&&t.tail.path&&(a.length>0&&"/"===t.tail.path.charAt(0)?a.push(t.tail.path.slice(1)):a.push(t.tail.path)),a.join("/")},__setMulti:function(e){for(var t in e)this._propertySetter(t,e[t]);void 0!==e.data&&(this._pathEffector("data",this.data),this._notifyChange("data")),void 0!==e.active&&(this._pathEffector("active",this.active),this._notifyChange("active")),void 0!==e.tail&&(this._pathEffector("tail",this.tail),this._notifyChange("tail"))}})},247:function(e,t,i){"use strict";var a=i(3),n=i(14),o=i(74);class s extends n.b{constructor(){super(...arguments),this.mini=!1,this.exited=!1,this.disabled=!1,this.extended=!1,this.showIconAtEnd=!1,this.icon="",this.label=""}createRenderRoot(){return this.attachShadow({mode:"open",delegatesFocus:!0})}render(){const e={"mdc-fab--mini":this.mini,"mdc-fab--exited":this.exited,"mdc-fab--extended":this.extended},t=""!==this.label&&this.extended;return n.g`
      <button
          .ripple="${Object(o.a)()}"
          class="mdc-fab ${Object(n.d)(e)}"
          ?disabled="${this.disabled}"
          aria-label="${this.label||this.icon}">
        ${t&&this.showIconAtEnd?this.label:""}
        ${this.icon?n.g`
          <span class="material-icons mdc-fab__icon">${this.icon}</span>`:""}
        ${t&&!this.showIconAtEnd?this.label:""}
      </button>`}}Object(a.c)([Object(n.i)({type:Boolean})],s.prototype,"mini",void 0),Object(a.c)([Object(n.i)({type:Boolean})],s.prototype,"exited",void 0),Object(a.c)([Object(n.i)({type:Boolean})],s.prototype,"disabled",void 0),Object(a.c)([Object(n.i)({type:Boolean})],s.prototype,"extended",void 0),Object(a.c)([Object(n.i)({type:Boolean})],s.prototype,"showIconAtEnd",void 0),Object(a.c)([Object(n.i)()],s.prototype,"icon",void 0),Object(a.c)([Object(n.i)()],s.prototype,"label",void 0);const r=n.e`.material-icons{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}.mdc-fab{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2),0px 6px 10px 0px rgba(0, 0, 0, 0.14),0px 1px 18px 0px rgba(0,0,0,.12);display:inline-flex;position:relative;align-items:center;justify-content:center;box-sizing:border-box;width:56px;height:56px;padding:0;border:none;fill:currentColor;text-decoration:none;cursor:pointer;user-select:none;-moz-appearance:none;-webkit-appearance:none;overflow:hidden;transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1),opacity 15ms linear 30ms,transform 270ms 0ms cubic-bezier(0, 0, 0.2, 1);background-color:#018786;color:#fff;color:var(--mdc-theme-on-secondary, #fff)}.mdc-fab:not(.mdc-fab--extended){border-radius:50%}.mdc-fab::-moz-focus-inner{padding:0;border:0}.mdc-fab:hover,.mdc-fab:focus{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12)}.mdc-fab:active{box-shadow:0px 7px 8px -4px rgba(0, 0, 0, 0.2),0px 12px 17px 2px rgba(0, 0, 0, 0.14),0px 5px 22px 4px rgba(0,0,0,.12)}.mdc-fab:active,.mdc-fab:focus{outline:none}.mdc-fab:hover{cursor:pointer}.mdc-fab>svg{width:100%}@supports not (-ms-ime-align: auto){.mdc-fab{background-color:var(--mdc-theme-secondary, #018786)}}.mdc-fab .mdc-fab__icon{width:24px;height:24px;font-size:24px}.mdc-fab--mini{width:40px;height:40px}.mdc-fab--extended{font-family:Roboto, sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-size:.875rem;line-height:2.25rem;font-weight:500;letter-spacing:.0892857143em;text-decoration:none;text-transform:uppercase;border-radius:24px;padding:0 20px;width:auto;max-width:100%;height:48px}.mdc-fab--extended .mdc-fab__icon{margin-left:-8px;margin-right:12px}[dir=rtl] .mdc-fab--extended .mdc-fab__icon,.mdc-fab--extended .mdc-fab__icon[dir=rtl]{margin-left:12px;margin-right:-8px}.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon{margin-left:12px;margin-right:-8px}[dir=rtl] .mdc-fab--extended .mdc-fab__label+.mdc-fab__icon,.mdc-fab--extended .mdc-fab__label+.mdc-fab__icon[dir=rtl]{margin-left:-8px;margin-right:12px}.mdc-fab__label{justify-content:flex-start;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.mdc-fab__icon{transition:transform 180ms 90ms cubic-bezier(0, 0, 0.2, 1);fill:currentColor;will-change:transform}.mdc-fab .mdc-fab__icon{display:inline-flex;align-items:center;justify-content:center}.mdc-fab--exited{transform:scale(0);opacity:0;transition:opacity 15ms linear 150ms,transform 180ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-fab--exited .mdc-fab__icon{transform:scale(0);transition:transform 135ms 0ms cubic-bezier(0.4, 0, 1, 1)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-ripple-surface--test-edge-var-bug{--mdc-ripple-surface-test-edge-var: 1px solid #000;visibility:hidden}.mdc-ripple-surface--test-edge-var-bug::before{border:var(--mdc-ripple-surface-test-edge-var)}.mdc-fab{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-fab::before,.mdc-fab::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-fab::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1}.mdc-fab.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-fab.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-fab.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-fab.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-fab.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-fab::before,.mdc-fab::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-fab.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-fab::before,.mdc-fab::after{background-color:#fff}@supports not (-ms-ime-align: auto){.mdc-fab::before,.mdc-fab::after{background-color:var(--mdc-theme-on-secondary, #fff)}}.mdc-fab:hover::before{opacity:.08}.mdc-fab:not(.mdc-ripple-upgraded):focus::before,.mdc-fab.mdc-ripple-upgraded--background-focused::before{transition-duration:75ms;opacity:.24}.mdc-fab:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-fab:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24}.mdc-fab.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: 0.24}:host{outline:none}`;let c=class extends s{};c.styles=r,c=Object(a.c)([Object(n.f)("mwc-fab")],c)},249:function(e,t,i){"use strict";i(109);var a=i(179);customElements.define("ha-icon-next",class extends a.a{connectedCallback(){super.connectedCallback(),setTimeout(()=>{this.icon="ltr"===window.getComputedStyle(this).direction?"hass:chevron-right":"hass:chevron-left"},100)}})},261:function(e,t,i){"use strict";i(5);var a=i(6),n=i(1),o=i(4);Object(a.a)({_template:o.a`
    <style>
      :host {
        display: block;
        position: absolute;
        outline: none;
        z-index: 1002;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: default;
      }

      #tooltip {
        display: block;
        outline: none;
        @apply --paper-font-common-base;
        font-size: 10px;
        line-height: 1;
        background-color: var(--paper-tooltip-background, #616161);
        color: var(--paper-tooltip-text-color, white);
        padding: 8px;
        border-radius: 2px;
        @apply --paper-tooltip;
      }

      @keyframes keyFrameScaleUp {
        0% {
          transform: scale(0.0);
        }
        100% {
          transform: scale(1.0);
        }
      }

      @keyframes keyFrameScaleDown {
        0% {
          transform: scale(1.0);
        }
        100% {
          transform: scale(0.0);
        }
      }

      @keyframes keyFrameFadeInOpacity {
        0% {
          opacity: 0;
        }
        100% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameFadeOutOpacity {
        0% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        100% {
          opacity: 0;
        }
      }

      @keyframes keyFrameSlideDownIn {
        0% {
          transform: translateY(-2000px);
          opacity: 0;
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameSlideDownOut {
        0% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(-2000px);
          opacity: 0;
        }
      }

      .fade-in-animation {
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameFadeInOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .fade-out-animation {
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 0ms);
        animation-name: keyFrameFadeOutOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-up-animation {
        transform: scale(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameScaleUp;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-down-animation {
        transform: scale(1);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameScaleDown;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation {
        transform: translateY(-2000px);
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownIn;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation-out {
        transform: translateY(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownOut;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .cancel-animation {
        animation-delay: -30s !important;
      }

      /* Thanks IE 10. */

      .hidden {
        display: none !important;
      }
    </style>

    <div id="tooltip" class="hidden">
      <slot></slot>
    </div>
`,is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object,value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}},_showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var e=Object(n.a)(this).parentNode,t=Object(n.a)(this).getOwnerRoot();return this.for?Object(n.a)(t).querySelector("#"+this.for):e.nodeType==Node.DOCUMENT_FRAGMENT_NODE?t.host:e},attached:function(){this._findTarget()},detached:function(){this.manualMode||this._removeListeners()},playAnimation:function(e){"entry"===e?this.show():"exit"===e&&this.hide()},cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")},show:function(){if(!this._showing){if(""===Object(n.a)(this).textContent.trim()){for(var e=!0,t=Object(n.a)(this).getEffectiveChildNodes(),i=0;i<t.length;i++)if(""!==t[i].textContent.trim()){e=!1;break}if(e)return}this._showing=!0,this.$.tooltip.classList.remove("hidden"),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.updatePosition(),this._animationPlaying=!0,this.$.tooltip.classList.add(this._getAnimationType("entry"))}},hide:function(){if(this._showing){if(this._animationPlaying)return this._showing=!1,void this._cancelAnimation();this._onAnimationFinish(),this._showing=!1,this._animationPlaying=!0}},updatePosition:function(){if(this._target&&this.offsetParent){var e=this.offset;14!=this.marginTop&&14==this.offset&&(e=this.marginTop);var t,i,a=this.offsetParent.getBoundingClientRect(),n=this._target.getBoundingClientRect(),o=this.getBoundingClientRect(),s=(n.width-o.width)/2,r=(n.height-o.height)/2,c=n.left-a.left,l=n.top-a.top;switch(this.position){case"top":t=c+s,i=l-o.height-e;break;case"bottom":t=c+s,i=l+n.height+e;break;case"left":t=c-o.width-e,i=l+r;break;case"right":t=c+n.width+e,i=l+r}this.fitToVisibleBounds?(a.left+t+o.width>window.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,t)+"px",this.style.right="auto"),a.top+i+o.height>window.innerHeight?(this.style.bottom=a.height-l+e+"px",this.style.top="auto"):(this.style.top=Math.max(-a.top,i)+"px",this.style.bottom="auto")):(this.style.left=t+"px",this.style.top=i+"px")}},_addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide")),this.listen(this.$.tooltip,"animationend","_onAnimationEnd"),this.listen(this,"mouseenter","hide")},_findTarget:function(){this.manualMode||this._removeListeners(),this._target=this.target,this.manualMode||this._addListeners()},_delayChange:function(e){500!==e&&this.updateStyles({"--paper-tooltip-delay-in":e+"ms"})},_manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()},_cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add("hidden")},_onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))},_onAnimationEnd:function(){this._animationPlaying=!1,this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))},_getAnimationType:function(e){if("entry"===e&&""!==this.animationEntry)return this.animationEntry;if("exit"===e&&""!==this.animationExit)return this.animationExit;if(this.animationConfig[e]&&"string"==typeof this.animationConfig[e][0].name){if(this.animationConfig[e][0].timing&&this.animationConfig[e][0].timing.delay&&0!==this.animationConfig[e][0].timing.delay){var t=this.animationConfig[e][0].timing.delay;"entry"===e?this.updateStyles({"--paper-tooltip-delay-in":t+"ms"}):"exit"===e&&this.updateStyles({"--paper-tooltip-delay-out":t+"ms"})}return this.animationConfig[e][0].name}},_removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide")),this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd"),this.unlisten(this,"mouseenter","hide")}})},267:function(e,t,i){"use strict";i.d(t,"a",function(){return s}),i.d(t,"d",function(){return r}),i.d(t,"b",function(){return c}),i.d(t,"c",function(){return p});var a=i(13),n=i(176),o=i(197);const s=(e,t)=>{if(t.name)return t.name;const i=e.states[t.entity_id];return i?Object(n.a)(i):null},r=(e,t,i)=>e.callWS(Object.assign({type:"config/entity_registry/update",entity_id:t},i)),c=(e,t)=>e.callWS({type:"config/entity_registry/remove",entity_id:t}),l=e=>e.sendMessagePromise({type:"config/entity_registry/list"}),d=(e,t)=>e.subscribeEvents(Object(o.a)(()=>l(e).then(e=>t.setState(e,!0)),500,!0),"entity_registry_updated"),p=(e,t)=>Object(a.d)("_entityRegistry",l,d,e,t)},315:function(e,t,i){"use strict";i.d(t,"b",function(){return a}),i.d(t,"a",function(){return n}),i.d(t,"c",function(){return o}),i.d(t,"d",function(){return s});const a=e=>e.callApi("GET","config/config_entries/entry"),n=(e,t)=>e.callApi("DELETE",`config/config_entries/entry/${t}`),o=(e,t)=>e.callWS({type:"config_entries/system_options/list",entry_id:t}),s=(e,t,i)=>e.callWS(Object.assign({type:"config_entries/system_options/update",entry_id:t},i))},324:function(e,t,i){"use strict";i.d(t,"a",function(){return o}),i.d(t,"c",function(){return s}),i.d(t,"f",function(){return r}),i.d(t,"b",function(){return c}),i.d(t,"d",function(){return l}),i.d(t,"e",function(){return h}),i.d(t,"h",function(){return u}),i.d(t,"g",function(){return f});var a=i(197),n=i(13);const o=(e,t)=>e.callApi("POST","config/config_entries/flow",{handler:t}),s=(e,t)=>e.callApi("GET",`config/config_entries/flow/${t}`),r=(e,t,i)=>e.callApi("POST",`config/config_entries/flow/${t}`,i),c=(e,t)=>e.callApi("DELETE",`config/config_entries/flow/${t}`),l=e=>e.callApi("GET","config/config_entries/flow_handlers"),d=e=>e.sendMessagePromise({type:"config_entries/flow/progress"}),p=(e,t)=>e.subscribeEvents(Object(a.a)(()=>d(e).then(e=>t.setState(e,!0)),500,!0),"config_entry_discovered"),h=e=>Object(n.h)(e,"_configFlowProgress",d,p),u=(e,t)=>h(e.connection).subscribe(t),f=(e,t)=>{const i=t.context.title_placeholders||{},a=Object.keys(i);if(0===a.length)return e(`component.${t.handler}.config.title`);const n=[];return a.forEach(e=>{n.push(e),n.push(i[e])}),e(`component.${t.handler}.config.flow_title`,...n)}},399:function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o});var a=i(18);const n=()=>Promise.all([i.e(1),i.e(3),i.e(6),i.e(9),i.e(31)]).then(i.bind(null,506)),o=(e,t,i)=>{Object(a.a)(e,"show-dialog",{dialogTag:"dialog-data-entry-flow",dialogImport:n,dialogParams:Object.assign(Object.assign({},t),{flowConfig:i})})}},441:function(e,t,i){"use strict";i.d(t,"a",function(){return c}),i.d(t,"b",function(){return l});var a=i(324),n=i(0),o=i(58),s=i(399),r=i(202);const c=s.a,l=(e,t)=>Object(s.b)(e,t,{loadDevicesAndAreas:!0,getFlowHandlers:e=>Object(a.d)(e).then(t=>t.sort((t,i)=>Object(r.a)(e.localize(`component.${t}.config.title`),e.localize(`component.${i}.config.title`)))),createFlow:a.a,fetchFlow:a.c,handleFlowStep:a.f,deleteFlow:a.b,renderAbortDescription(e,t){const i=Object(o.b)(e.localize,`component.${t.handler}.config.abort.${t.reason}`,t.description_placeholders);return i?n.f`
            <ha-markdown allowsvg .content=${i}></ha-markdown>
          `:""},renderShowFormStepHeader:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.title`),renderShowFormStepDescription(e,t){const i=Object(o.b)(e.localize,`component.${t.handler}.config.step.${t.step_id}.description`,t.description_placeholders);return i?n.f`
            <ha-markdown allowsvg .content=${i}></ha-markdown>
          `:""},renderShowFormStepFieldLabel:(e,t,i)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.data.${i.name}`),renderShowFormStepFieldError:(e,t,i)=>e.localize(`component.${t.handler}.config.error.${i}`),renderExternalStepHeader:(e,t)=>e.localize(`component.${t.handler}.config.step.${t.step_id}.title`),renderExternalStepDescription(e,t){const i=Object(o.b)(e.localize,`component.${t.handler}.config.${t.step_id}.description`,t.description_placeholders);return n.f`
        <p>
          ${e.localize("ui.panel.config.integrations.config_flow.external_step.description")}
        </p>
        ${i?n.f`
              <ha-markdown allowsvg .content=${i}></ha-markdown>
            `:""}
      `},renderCreateEntryDescription(e,t){const i=Object(o.b)(e.localize,`component.${t.handler}.config.create_entry.${t.description||"default"}`,t.description_placeholders);return n.f`
        ${i?n.f`
              <ha-markdown allowsvg .content=${i}></ha-markdown>
            `:""}
        <p>Created config for ${t.title}.</p>
      `}})},448:function(e,t,i){"use strict";var a=i(4),n=i(30),o=(i(179),i(194));customElements.define("ha-state-icon",class extends n.a{static get template(){return a.a`
      <ha-icon icon="[[computeIcon(stateObj)]]"></ha-icon>
    `}static get properties(){return{stateObj:{type:Object}}}computeIcon(e){return Object(o.a)(e)}})},450:function(e,t,i){"use strict";i.d(t,"a",function(){return n}),i.d(t,"b",function(){return o});var a=i(18);const n=()=>Promise.all([i.e(1),i.e(3),i.e(6),i.e(29)]).then(i.bind(null,503)),o=(e,t)=>{Object(a.a)(e,"show-dialog",{dialogTag:"dialog-device-registry-detail",dialogImport:n,dialogParams:t})}},736:function(e,t,i){"use strict";i.r(t);var a=i(3),n=(i(242),i(0)),o=(i(182),i(261),i(85),i(109),i(143),i(180),i(177),i(249),i(238),i(448),i(152),i(95),i(179),i(97)),s=(i(198),i(176)),r=i(441),c=i(324),l=i(18);let d=class extends n.a{connectedCallback(){super.connectedCallback(),Object(r.a)()}render(){return n.f`
      <hass-subpage
        header=${this.hass.localize("ui.panel.config.integrations.caption")}
      >
        ${this.configEntriesInProgress.length?n.f`
              <ha-config-section>
                <span slot="header"
                  >${this.hass.localize("ui.panel.config.integrations.discovered")}</span
                >
                <ha-card>
                  ${this.configEntriesInProgress.map(e=>n.f`
                      <div class="config-entry-row">
                        <paper-item-body>
                          ${Object(c.g)(this.hass.localize,e)}
                        </paper-item-body>
                        <mwc-button
                          @click=${this._continueFlow}
                          data-id="${e.flow_id}"
                          >${this.hass.localize("ui.panel.config.integrations.configure")}</mwc-button
                        >
                      </div>
                    `)}
                </ha-card>
              </ha-config-section>
            `:""}

        <ha-config-section class="configured">
          <span slot="header"
            >${this.hass.localize("ui.panel.config.integrations.configured")}</span
          >
          <ha-card>
            ${this.entityRegistryEntries.length?this.configEntries.map((e,t)=>n.f`
                    <a
                      href="/config/integrations/config_entry/${e.entry_id}"
                    >
                      <paper-item data-index=${t}>
                        <paper-item-body two-line>
                          <div>
                            ${this.hass.localize(`component.${e.domain}.config.title`)}:
                            ${e.title}
                          </div>
                          <div secondary>
                            ${this._getEntities(e).map(e=>n.f`
                                <span>
                                  <ha-state-icon
                                    .stateObj=${e}
                                  ></ha-state-icon>
                                  <paper-tooltip position="bottom"
                                    >${Object(s.a)(e)}</paper-tooltip
                                  >
                                </span>
                              `)}
                          </div>
                        </paper-item-body>
                        <ha-icon-next></ha-icon-next>
                      </paper-item>
                    </a>
                  `):n.f`
                  <div class="config-entry-row">
                    <paper-item-body two-line>
                      <div>
                        ${this.hass.localize("ui.panel.config.integrations.none")}
                      </div>
                    </paper-item-body>
                  </div>
                `}
          </ha-card>
        </ha-config-section>

        <ha-fab
          icon="hass:plus"
          title=${this.hass.localize("ui.panel.config.integrations.new")}
          @click=${this._createFlow}
          ?rtl=${Object(o.a)(this.hass)}
        ></ha-fab>
      </hass-subpage>
    `}_createFlow(){Object(r.b)(this,{dialogClosedCallback:()=>Object(l.a)(this,"hass-reload-entries")})}_continueFlow(e){Object(r.b)(this,{continueFlowId:e.target.getAttribute("data-id")||void 0,dialogClosedCallback:()=>Object(l.a)(this,"hass-reload-entries")})}_getEntities(e){if(!this.entityRegistryEntries)return[];const t=[];return this.entityRegistryEntries.forEach(i=>{i.config_entry_id===e.entry_id&&i.entity_id in this.hass.states&&t.push(this.hass.states[i.entity_id])}),t}static get styles(){return n.c`
      ha-card {
        overflow: hidden;
      }
      mwc-button {
        top: 3px;
        margin-right: -0.57em;
      }
      .config-entry-row {
        display: flex;
        padding: 0 16px;
      }
      ha-icon {
        cursor: pointer;
        margin: 8px;
      }
      .configured a {
        color: var(--primary-text-color);
        text-decoration: none;
      }
      ha-fab {
        position: fixed;
        bottom: 16px;
        right: 16px;
        z-index: 1;
      }

      ha-fab[rtl] {
        right: auto;
        left: 16px;
      }
    `}};Object(a.c)([Object(n.g)()],d.prototype,"hass",void 0),Object(a.c)([Object(n.g)()],d.prototype,"configEntries",void 0),Object(a.c)([Object(n.g)()],d.prototype,"entityRegistryEntries",void 0),Object(a.c)([Object(n.g)()],d.prototype,"configEntriesInProgress",void 0),d=Object(a.c)([Object(n.d)("ha-config-entries-dashboard")],d);var p=i(123),h=(i(161),i(185),i(202)),u=(i(184),i(146),i(145),i(4)),f=i(30),m=i(118),b=i(175),g=i(227),y=i(233),v=i(450);function _(e,t){if(t.name)return t.name;const i=e.states[t.entity_id];return i?Object(s.a)(i):null}customElements.define("ha-device-card",class extends(Object(m.a)(Object(b.a)(f.a))){static get template(){return u.a`
      <style>
        :host(:not([narrow])) .device-entities {
          max-height: 225px;
          overflow: auto;
        }
        ha-card {
          flex: 1 0 100%;
          padding-bottom: 10px;
          min-width: 0;
        }
        .card-header {
          display: flex;
          justify-content: space-between;
        }
        .card-header .name {
          width: 90%;
        }
        .device {
          width: 30%;
        }
        .device .name {
          font-weight: bold;
        }
        .device .model,
        .device .manuf,
        .device .area {
          color: var(--secondary-text-color);
        }
        .area .extra-info .name {
          color: var(--primary-text-color);
        }
        .extra-info {
          margin-top: 8px;
        }
        paper-icon-item {
          cursor: pointer;
          padding-top: 4px;
          padding-bottom: 4px;
        }
        .manuf,
        .entity-id,
        .area {
          color: var(--secondary-text-color);
        }
      </style>
      <ha-card>
        <div class="card-header">
          <template is="dom-if" if="[[!hideSettings]]">
            <div class="name">[[_deviceName(device)]]</div>
            <paper-icon-button
              icon="hass:settings"
              on-click="_gotoSettings"
            ></paper-icon-button>
          </template>
        </div>
        <div class="card-content">
          <div class="info">
            <div class="model">[[device.model]]</div>
            <div class="manuf">
              [[localize('ui.panel.config.integrations.config_entry.manuf',
              'manufacturer', device.manufacturer)]]
            </div>
            <template is="dom-if" if="[[device.area_id]]">
              <div class="area">
                <div class="extra-info">
                  [[localize('ui.panel.config.integrations.device_registry.area')]]
                  <span class="name">{{_computeArea(areas, device)}}</span>
                </div>
              </div>
            </template>
          </div>
          <template is="dom-if" if="[[device.via_device_id]]">
            <div class="extra-info">
              [[localize('ui.panel.config.integrations.config_entry.via')]]
              <span class="hub"
                >[[_computeDeviceName(devices, device.via_device_id)]]</span
              >
            </div>
          </template>
          <template is="dom-if" if="[[device.sw_version]]">
            <div class="extra-info">
              [[localize('ui.panel.config.integrations.config_entry.firmware',
              'version', device.sw_version)]]
            </div>
          </template>
        </div>

        <template is="dom-if" if="[[!hideEntities]]">
          <div class="device-entities">
            <template
              is="dom-repeat"
              items="[[_computeDeviceEntities(hass, device, entities)]]"
              as="entity"
            >
              <paper-icon-item on-click="_openMoreInfo">
                <state-badge
                  state-obj="[[_computeStateObj(entity, hass)]]"
                  slot="item-icon"
                ></state-badge>
                <paper-item-body>
                  <div class="name">[[_computeEntityName(entity, hass)]]</div>
                  <div class="secondary entity-id">[[entity.entity_id]]</div>
                </paper-item-body>
              </paper-icon-item>
            </template>
          </div>
        </template>
      </ha-card>
    `}static get properties(){return{device:Object,devices:Array,areas:Array,entities:Array,hass:Object,narrow:{type:Boolean,reflectToAttribute:!0},hideSettings:{type:Boolean,value:!1},hideEntities:{type:Boolean,value:!1},_childDevices:{type:Array,computed:"_computeChildDevices(device, devices)"}}}firstUpdated(e){super.firstUpdated(e),Object(v.a)()}connectedCallback(){super.connectedCallback(),this._unsubAreas=Object(y.c)(this.hass.connection,e=>{this._areas=e}),this._unsubDevices=Object(g.a)(this.hass.connection,e=>{this.devices=e,this.device=e.find(e=>e.id===this.device.id)})}disconnectedCallback(){super.disconnectedCallback(),this._unsubAreas&&this._unsubAreas(),this._unsubDevices&&this._unsubDevices()}_computeArea(e,t){return e&&t&&t.area_id?e.find(e=>e.area_id===t.area_id).name:"No Area"}_computeChildDevices(e,t){return t.filter(t=>t.via_device_id===e.id).sort((e,t)=>Object(h.b)(e.name,t.name))}_computeDeviceEntities(e,t,i){return i.filter(e=>e.device_id===t.id).sort((t,i)=>Object(h.b)(_(e,t)||`zzz${t.entity_id}`,_(e,i)||`zzz${i.entity_id}`))}_computeStateObj(e,t){return t.states[e.entity_id]}_computeEntityName(e,t){return _(t,e)||`(${this.localize("ui.panel.config.integrations.config_entry.entity_unavailable")})`}_deviceName(e){return e.name_by_user||e.name}_computeDeviceName(e,t){const i=e.find(e=>e.id===t);return i?this._deviceName(i):`(${this.localize("ui.panel.config.integrations.config_entry.device_unavailable")})`}_gotoSettings(){const e=this.device;Object(v.b)(this,{device:e,updateEntry:async t=>{await Object(g.b)(this.hass,e.id,t)}})}_openMoreInfo(e){this.fire("hass-more-info",{entityId:e.model.entity.entity_id})}});var x=i(267);customElements.define("ha-ce-entities-card",class extends(Object(b.a)(Object(m.a)(f.a))){static get template(){return u.a`
      <style>
        ha-card {
          flex: 1 0 100%;
          padding-bottom: 8px;
        }
        paper-icon-item {
          cursor: pointer;
          padding-top: 4px;
          padding-bottom: 4px;
        }
      </style>
      <ha-card header="[[heading]]">
        <template is="dom-repeat" items="[[entities]]" as="entity">
          <paper-icon-item on-click="_openMoreInfo">
            <state-badge
              state-obj="[[_computeStateObj(entity, hass)]]"
              slot="item-icon"
            ></state-badge>
            <paper-item-body>
              <div class="name">[[_computeEntityName(entity, hass)]]</div>
              <div class="secondary entity-id">[[entity.entity_id]]</div>
            </paper-item-body>
          </paper-icon-item>
        </template>
      </ha-card>
    `}static get properties(){return{heading:String,entities:Array,hass:Object}}_computeStateObj(e,t){return t.states[e.entity_id]}_computeEntityName(e,t){return Object(x.a)(t,e)||`(${this.localize("ui.panel.config.integrations.config_entry.entity_unavailable")})`}_openMoreInfo(e){this.fire("hass-more-info",{entityId:e.model.entity.entity_id})}});const w=(e,t)=>e.callApi("POST","config/config_entries/options/flow",{handler:t}),k=(e,t)=>e.callApi("GET",`config/config_entries/options/flow/${t}`),j=(e,t,i)=>e.callApi("POST",`config/config_entries/options/flow/${t}`,i),O=(e,t)=>e.callApi("DELETE",`config/config_entries/options/flow/${t}`);var $=i(58),E=i(399);E.a;const C=(e,t)=>Object(E.b)(e,{startFlowHandler:t.entry_id},{loadDevicesAndAreas:!1,createFlow:w,fetchFlow:k,handleFlowStep:j,deleteFlow:O,renderAbortDescription(e,i){const a=Object($.b)(e.localize,`component.${t.domain}.options.abort.${i.reason}`,i.description_placeholders);return a?n.f`
              <ha-markdown allowsvg .content=${a}></ha-markdown>
            `:""},renderShowFormStepHeader:(e,t)=>e.localize("ui.dialogs.options_flow.form.header"),renderShowFormStepDescription:(e,t)=>"",renderShowFormStepFieldLabel:(e,i,a)=>e.localize(`component.${t.domain}.options.step.${i.step_id}.data.${a.name}`),renderShowFormStepFieldError:(e,i,a)=>e.localize(`component.${t.domain}.options.error.${a}`),renderExternalStepHeader:(e,t)=>"",renderExternalStepDescription:(e,t)=>"",renderCreateEntryDescription:(e,t)=>n.f`
          <p>${e.localize("ui.dialogs.options_flow.success.description")}</p>
        `});var z=i(99),P=i(315);const S=()=>Promise.all([i.e(114),i.e(26)]).then(i.bind(null,722)),I=(e,t)=>{Object(l.a)(e,"show-dialog",{dialogTag:"dialog-config-entry-system-options",dialogImport:S,dialogParams:t})};class A extends n.a{constructor(){super(...arguments),this._computeConfigEntryDevices=Object(p.a)((e,t)=>t?t.filter(t=>t.config_entries.includes(e.entry_id)).sort((e,t)=>Number(!!e.via_device_id)-Number(!!t.via_device_id)||Object(h.b)(e.name||"",t.name||"")):[]),this._computeNoDeviceEntities=Object(p.a)((e,t)=>t?t.filter(t=>!t.device_id&&t.config_entry_id===e.entry_id):[])}get _configEntry(){return this.configEntries?this.configEntries.find(e=>e.entry_id===this.configEntryId):void 0}render(){const e=this._configEntry;if(!e)return n.f`
        <hass-error-screen error="Integration not found."></hass-error-screen>
      `;const t=this._computeConfigEntryDevices(e,this.deviceRegistryEntries),i=this._computeNoDeviceEntities(e,this.entityRegistryEntries);return n.f`
      <hass-subpage .header=${e.title}>
        ${e.supports_options?n.f`
              <paper-icon-button
                slot="toolbar-icon"
                icon="hass:settings"
                @click=${this._showSettings}
              ></paper-icon-button>
            `:""}
        <paper-icon-button
          slot="toolbar-icon"
          icon="hass:message-settings-variant"
          @click=${this._showSystemOptions}
        ></paper-icon-button>
        <paper-icon-button
          slot="toolbar-icon"
          icon="hass:delete"
          @click=${this._removeEntry}
        ></paper-icon-button>

        <div class="content">
          ${0===t.length&&0===i.length?n.f`
                <p>
                  ${this.hass.localize("ui.panel.config.integrations.config_entry.no_devices")}
                </p>
              `:""}
          ${t.map(e=>n.f`
              <ha-device-card
                class="card"
                .hass=${this.hass}
                .areas=${this.areas}
                .devices=${this.deviceRegistryEntries}
                .device=${e}
                .entities=${this.entityRegistryEntries}
                .narrow=${this.narrow}
              ></ha-device-card>
            `)}
          ${i.length>0?n.f`
                <ha-ce-entities-card
                  class="card"
                  .heading=${this.hass.localize("ui.panel.config.integrations.config_entry.no_device")}
                  .entities=${i}
                  .hass=${this.hass}
                  .narrow=${this.narrow}
                ></ha-ce-entities-card>
              `:""}
        </div>
      </hass-subpage>
    `}_showSettings(){C(this,this._configEntry)}_showSystemOptions(){I(this,{entry:this._configEntry})}_removeEntry(){confirm(this.hass.localize("ui.panel.config.integrations.config_entry.delete_confirm"))&&Object(P.a)(this.hass,this.configEntryId).then(e=>{Object(l.a)(this,"hass-reload-entries"),e.require_restart&&alert(this.hass.localize("ui.panel.config.integrations.config_entry.restart_confirm")),Object(z.a)(this,"/config/integrations/dashboard",!0)})}static get styles(){return n.c`
      .content {
        display: flex;
        flex-wrap: wrap;
        padding: 4px;
        justify-content: center;
      }
      .card {
        box-sizing: border-box;
        display: flex;
        flex: 1 0 300px;
        min-width: 0;
        max-width: 500px;
        padding: 8px;
      }
    `}}Object(a.c)([Object(n.g)()],A.prototype,"hass",void 0),Object(a.c)([Object(n.g)()],A.prototype,"narrow",void 0),Object(a.c)([Object(n.g)()],A.prototype,"configEntryId",void 0),Object(a.c)([Object(n.g)()],A.prototype,"configEntries",void 0),Object(a.c)([Object(n.g)()],A.prototype,"entityRegistryEntries",void 0),Object(a.c)([Object(n.g)()],A.prototype,"deviceRegistryEntries",void 0),Object(a.c)([Object(n.g)()],A.prototype,"areas",void 0),customElements.define("ha-config-entry-page",A);var F=i(133);let T=class extends F.a{constructor(){super(...arguments),this.routerOptions={defaultPage:"dashboard",routes:{dashboard:{tag:"ha-config-entries-dashboard"},config_entry:{tag:"ha-config-entry-page"}}},this._configEntries=[],this._configEntriesInProgress=[],this._entityRegistryEntries=[],this._deviceRegistryEntries=[],this._areas=[]}connectedCallback(){super.connectedCallback(),this.hass&&this._loadData()}disconnectedCallback(){if(super.disconnectedCallback(),this._unsubs){for(;this._unsubs.length;)this._unsubs.pop()();this._unsubs=void 0}}firstUpdated(e){super.firstUpdated(e),this.addEventListener("hass-reload-entries",()=>{this._loadData(),Object(c.e)(this.hass.connection).refresh()})}updated(e){super.updated(e),!this._unsubs&&e.has("hass")&&this._loadData()}updatePageEl(e){e.hass=this.hass,e.entityRegistryEntries=this._entityRegistryEntries,e.configEntries=this._configEntries,"dashboard"!==this._currentPage?(e.configEntryId=this.routeTail.path.substr(1),e.deviceRegistryEntries=this._deviceRegistryEntries,e.areas=this._areas,e.narrow=this.narrow):e.configEntriesInProgress=this._configEntriesInProgress}_loadData(){Object(P.b)(this.hass).then(e=>{this._configEntries=e.sort((e,t)=>Object(h.b)(e.title,t.title))}),this._unsubs||(this._unsubs=[Object(y.c)(this.hass.connection,e=>{this._areas=e}),Object(x.c)(this.hass.connection,e=>{this._entityRegistryEntries=e}),Object(g.a)(this.hass.connection,e=>{this._deviceRegistryEntries=e}),Object(c.h)(this.hass,e=>{this._configEntriesInProgress=e})])}};Object(a.c)([Object(n.g)()],T.prototype,"hass",void 0),Object(a.c)([Object(n.g)()],T.prototype,"narrow",void 0),Object(a.c)([Object(n.g)()],T.prototype,"_configEntries",void 0),Object(a.c)([Object(n.g)()],T.prototype,"_configEntriesInProgress",void 0),Object(a.c)([Object(n.g)()],T.prototype,"_entityRegistryEntries",void 0),Object(a.c)([Object(n.g)()],T.prototype,"_deviceRegistryEntries",void 0),Object(a.c)([Object(n.g)()],T.prototype,"_areas",void 0),T=Object(a.c)([Object(n.d)("ha-config-integrations")],T)},93:function(e,t,i){"use strict";i(5),i(113),i(114),i(115),i(116);var a=i(60),n=(i(41),i(6)),o=i(4),s=i(96);Object(n.a)({is:"paper-input",_template:o.a`
    <style>
      :host {
        display: block;
      }

      :host([focused]) {
        outline: none;
      }

      :host([hidden]) {
        display: none !important;
      }

      input {
        /* Firefox sets a min-width on the input, which can cause layout issues */
        min-width: 0;
      }

      /* In 1.x, the <input> is distributed to paper-input-container, which styles it.
      In 2.x the <iron-input> is distributed to paper-input-container, which styles
      it, but in order for this to work correctly, we need to reset some
      of the native input's properties to inherit (from the iron-input) */
      iron-input > input {
        @apply --paper-input-container-shared-input-style;
        font-family: inherit;
        font-weight: inherit;
        font-size: inherit;
        letter-spacing: inherit;
        word-spacing: inherit;
        line-height: inherit;
        text-shadow: inherit;
        color: inherit;
        cursor: inherit;
      }

      input:disabled {
        @apply --paper-input-container-input-disabled;
      }

      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-calendar-picker-indicator {
        @apply --paper-input-container-input-webkit-calendar-picker-indicator;
      }

      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-reveal {
        @apply --paper-input-container-ms-reveal;
      }

      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$="[[_inputId]]" slot="label">[[label]]</label>

      <!-- Need to bind maxlength so that the paper-input-char-counter works correctly -->
      <iron-input bind-value="{{value}}" slot="input" class="input-element" id$="[[_inputId]]" maxlength$="[[maxlength]]" allowed-pattern="[[allowedPattern]]" invalid="{{invalid}}" validator="[[validator]]">
        <input 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>

      <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>
  `,behaviors:[s.a,a.a],properties:{value:{type:String}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&-1!==this._typesThatHaveText.indexOf(this.$.nativeInput.type)&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}})},94:function(e,t,i){"use strict";i.d(t,"a",function(){return o});i(5);var a=i(6),n=i(4);const o=Object(a.a)({_template:n.a`
    <style>
      :host {
        display: inline-block;
        position: fixed;
        clip: rect(0px,0px,0px,0px);
      }
    </style>
    <div aria-live$="[[mode]]">[[_text]]</div>
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){o.instance||(o.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},100)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});o.instance=null,o.requestAvailability=function(){o.instance||(o.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(o.instance)}}}]);
//# sourceMappingURL=chunk.ea3124c0ff216652145d.js.map