\n `;\n }\n\n private _backTapped(): void {\n history.back();\n }\n\n static get styles(): CSSResult {\n return css`\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n font-size: 20px;\n height: 65px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n }\n\n ha-menu-button,\n ha-paper-icon-button-arrow-prev,\n ::slotted([slot=\"toolbar-icon\"]) {\n pointer-events: auto;\n }\n\n ha-paper-icon-button-arrow-prev.hidden {\n visibility: hidden;\n }\n\n [main-title] {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n .content {\n position: relative;\n width: 100%;\n height: calc(100% - 65px);\n overflow-y: auto;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"hass-subpage\": HassSubpage;\n }\n}\n","import \"@polymer/paper-icon-button/paper-icon-button\";\nimport { Constructor } from \"../types\";\n// Not duplicate, this is for typing.\n// tslint:disable-next-line\nimport { PaperIconButtonElement } from \"@polymer/paper-icon-button/paper-icon-button\";\n\nconst paperIconButtonClass = customElements.get(\n \"paper-icon-button\"\n) as Constructor;\n\nexport class HaPaperIconButtonArrowPrev extends paperIconButtonClass {\n public hassio?: boolean;\n\n public connectedCallback() {\n super.connectedCallback();\n\n // wait to check for direction since otherwise direction is wrong even though top level is RTL\n setTimeout(() => {\n this.icon =\n window.getComputedStyle(this).direction === \"ltr\"\n ? this.hassio\n ? \"hassio:arrow-left\"\n : \"hass:arrow-left\"\n : this.hassio\n ? \"hassio:arrow-right\"\n : \"hass:arrow-right\";\n }, 100);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-icon-button-arrow-prev\": HaPaperIconButtonArrowPrev;\n }\n}\n\ncustomElements.define(\n \"ha-paper-icon-button-arrow-prev\",\n HaPaperIconButtonArrowPrev\n);\n","import \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport \"@polymer/paper-spinner/paper-spinner-lite\";\nimport {\n LitElement,\n TemplateResult,\n html,\n CSSResultArray,\n css,\n customElement,\n property,\n} from \"lit-element\";\nimport \"../components/ha-menu-button\";\nimport \"../components/ha-paper-icon-button-arrow-prev\";\nimport { haStyle } from \"../resources/styles\";\nimport { HomeAssistant } from \"../types\";\n\n@customElement(\"hass-loading-screen\")\nclass HassLoadingScreen extends LitElement {\n @property({ type: Boolean }) public rootnav? = false;\n @property() public hass?: HomeAssistant;\n @property() public narrow?: boolean;\n\n protected render(): TemplateResult {\n return html`\n \n ${this.rootnav\n ? html`\n \n `\n : html`\n \n `}\n \n
\n \n
\n `;\n }\n\n private _handleBack() {\n history.back();\n }\n\n static get styles(): CSSResultArray {\n return [\n haStyle,\n css`\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n .content {\n height: calc(100% - 64px);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"hass-loading-screen\": HassLoadingScreen;\n }\n}\n","// Polymer legacy event helpers used courtesy of the Polymer project.\n//\n// Copyright (c) 2017 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\ndeclare global {\n // tslint:disable-next-line\n interface HASSDomEvents {}\n}\n\nexport type ValidHassDomEvent = keyof HASSDomEvents;\n\nexport interface HASSDomEvent extends Event {\n detail: T;\n}\n\n/**\n * Dispatches a custom event with an optional detail value.\n *\n * @param {string} type Name of event type.\n * @param {*=} detail Detail value containing event-specific\n * payload.\n * @param {{ bubbles: (boolean|undefined),\n * cancelable: (boolean|undefined),\n * composed: (boolean|undefined) }=}\n * options Object specifying options. These may include:\n * `bubbles` (boolean, defaults to `true`),\n * `cancelable` (boolean, defaults to false), and\n * `node` on which to fire the event (HTMLElement, defaults to `this`).\n * @return {Event} The new event that was fired.\n */\nexport const fireEvent = (\n node: HTMLElement | Window,\n type: HassEvent,\n detail?: HASSDomEvents[HassEvent],\n options?: {\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n }\n) => {\n options = options || {};\n // @ts-ignore\n detail = detail === null || detail === undefined ? {} : detail;\n const event = new Event(type, {\n bubbles: options.bubbles === undefined ? true : options.bubbles,\n cancelable: Boolean(options.cancelable),\n composed: options.composed === undefined ? true : options.composed,\n });\n (event as any).detail = detail;\n node.dispatchEvent(event);\n return event;\n};\n","import \"@material/mwc-button\";\nimport \"@polymer/paper-spinner/paper-spinner\";\nimport { html } from \"@polymer/polymer/lib/utils/html-tag\";\nimport { PolymerElement } from \"@polymer/polymer/polymer-element\";\n\nclass HaProgressButton extends PolymerElement {\n static get template() {\n return html`\n \n
\n Configure which add-on repositories to fetch data from:\n
\n
\n ${// Use repeat so that the fade-out from call-service-api-button\n // stays with the correct repo after we add/delete one.\n repeat(\n repos,\n (repo) => repo.slug,\n (repo) => html`\n \n
\n \n `;\n }\n\n private _valueChanged(ev: PolymerChangedEvent) {\n this._value = ev.detail.value;\n }\n\n private async _dismiss(): Promise {\n if (this._params!.cancel) {\n this._params!.cancel();\n }\n this._params = undefined;\n }\n\n private async _confirm(): Promise {\n if (this._params!.confirm) {\n this._params!.confirm(this._value);\n }\n this._dismiss();\n }\n\n private _openedChanged(ev: PolymerChangedEvent): void {\n if (!(ev.detail as any).value) {\n this._params = undefined;\n }\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n css`\n ha-paper-dialog {\n min-width: 400px;\n max-width: 500px;\n }\n @media (max-width: 400px) {\n ha-paper-dialog {\n min-width: initial;\n }\n }\n p {\n margin: 0;\n padding-top: 6px;\n padding-bottom: 24px;\n color: var(--primary-text-color);\n }\n .no-bottom-padding {\n padding-bottom: 0;\n }\n .secondary {\n color: var(--secondary-text-color);\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-box\": DialogBox;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import {\n customElement,\n CSSResult,\n css,\n query,\n html,\n property,\n} from \"lit-element\";\nimport \"@material/mwc-switch\";\nimport { style } from \"@material/mwc-switch/mwc-switch-css\";\n// tslint:disable-next-line\nimport { Switch } from \"@material/mwc-switch\";\nimport { Constructor } from \"../types\";\nimport { forwardHaptic } from \"../data/haptics\";\nimport { ripple } from \"@material/mwc-ripple/ripple-directive\";\n// tslint:disable-next-line\nconst MwcSwitch = customElements.get(\"mwc-switch\") as Constructor;\n\n@customElement(\"ha-switch\")\nexport class HaSwitch extends MwcSwitch {\n // Generate a haptic vibration.\n // Only set to true if the new value of the switch is applied right away when toggling.\n // Do not add haptic when a user is required to press save.\n @property({ type: Boolean }) public haptic = false;\n @query(\"slot\") private _slot!: HTMLSlotElement;\n\n protected firstUpdated() {\n super.firstUpdated();\n this.style.setProperty(\n \"--mdc-theme-secondary\",\n \"var(--switch-checked-color)\"\n );\n this.classList.toggle(\n \"slotted\",\n Boolean(this._slot.assignedNodes().length)\n );\n this.addEventListener(\"change\", () => {\n if (this.haptic) {\n forwardHaptic(\"light\");\n }\n });\n }\n\n protected render() {\n return html`\n
\n \n
\n
\n \n
\n
\n
\n \n `;\n }\n\n protected static get styles(): CSSResult[] {\n return [\n style,\n css`\n :host {\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n .mdc-switch.mdc-switch--checked .mdc-switch__thumb {\n background-color: var(--switch-checked-button-color);\n border-color: var(--switch-checked-button-color);\n }\n .mdc-switch.mdc-switch--checked .mdc-switch__track {\n background-color: var(--switch-checked-track-color);\n border-color: var(--switch-checked-track-color);\n }\n .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb {\n background-color: var(--switch-unchecked-button-color);\n border-color: var(--switch-unchecked-button-color);\n }\n .mdc-switch:not(.mdc-switch--checked) .mdc-switch__track {\n background-color: var(--switch-unchecked-track-color);\n border-color: var(--switch-unchecked-track-color);\n }\n :host(.slotted) .mdc-switch {\n margin-right: 24px;\n }\n `,\n ];\n }\n\n private _haChangeHandler(e: Event) {\n this.mdcFoundation.handleChange(e);\n // catch \"click\" event and sync properties\n this.checked = this.formElement.checked;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-switch\": HaSwitch;\n }\n}\n","/**\n * Broadcast haptic feedback requests\n */\n\nimport { fireEvent, HASSDomEvent } from \"../common/dom/fire_event\";\n\n// Allowed types are from iOS HIG.\n// https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/feedback/#haptics\n// Implementors on platforms other than iOS should attempt to match the patterns (shown in HIG) as closely as possible.\nexport type HapticType =\n | \"success\"\n | \"warning\"\n | \"failure\"\n | \"light\"\n | \"medium\"\n | \"heavy\"\n | \"selection\";\n\ndeclare global {\n // for fire event\n interface HASSDomEvents {\n haptic: HapticType;\n }\n\n interface GlobalEventHandlersEventMap {\n haptic: HASSDomEvent;\n }\n}\n\nexport const forwardHaptic = (hapticType: HapticType) => {\n fireEvent(window, \"haptic\", hapticType);\n};\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///./src/dialogs/generic/dialog-box.ts","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-behavior.js","webpack:///./node_modules/@polymer/paper-dialog-scrollable/paper-dialog-scrollable.js","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js","webpack:///./node_modules/@polymer/paper-dialog/paper-dialog.js","webpack:///./src/components/dialog/ha-iron-focusables-helper.js","webpack:///./src/components/dialog/ha-paper-dialog.ts","webpack:///./src/components/ha-switch.ts","webpack:///./src/data/haptics.ts"],"names":["customElement","property","params","regeneratorRuntime","async","_context","prev","next","this","_params","prompt","_value","defaultValue","stop","html","_templateObject","confirmPrompt","confirmation","_templateObject2","_openedChanged","title","hass","localize","text","_templateObject3","classMap","no-bottom-padding","Boolean","_templateObject4","_valueChanged","inputLabel","inputType","_templateObject5","_dismiss","dismissText","_confirm","confirmText","ev","detail","value","_context2","cancel","undefined","_context3","confirm","haStyleDialog","css","_templateObject6","LitElement","__webpack_require__","d","__webpack_exports__","PaperDialogBehaviorImpl","PaperDialogBehavior","_polymer_iron_overlay_behavior_iron_overlay_behavior_js__WEBPACK_IMPORTED_MODULE_1__","_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_2__","hostAttributes","role","tabindex","properties","modal","type","__readied","observers","listeners","tap","ready","__prevNoCancelOnOutsideClick","noCancelOnOutsideClick","__prevNoCancelOnEscKey","noCancelOnEscKey","__prevWithBackdrop","withBackdrop","_modalChanged","readied","_updateClosingReasonConfirmed","confirmed","closingReason","_onDialogClick","event","path","dom","i","l","indexOf","target","hasAttribute","close","stopPropagation","IronOverlayBehavior","Polymer","_template","is","dialogElement","Object","scrollTarget","$","scrollable","_ensureTarget","classList","add","attached","requestAnimationFrame","updateScrollState","bind","toggleClass","scrollTop","offsetHeight","scrollHeight","parentElement","behaviors","sizingTarget","remove","$_documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","content","NeonAnimationRunnerBehavior","neon-animation-finish","_renderOpened","cancelAnimation","playAnimation","_renderClosed","_onNeonAnimationFinish","opened","_finishRenderOpened","_finishRenderClosed","HaIronFocusablesHelper","getTabbableNodes","node","result","_collectTabbableNodes","IronFocusablesHelper","_sortByTabIndex","nodeType","Node","ELEMENT_NODE","_isVisible","children","element","tabIndex","_normalizedTabIndex","needsSort","push","localName","getDistributedNodes","shadowRoot","root","length","paperDialogClass","customElements","get","haTabFixBehaviorImpl","_focusableNodes","HaPaperDialog","_mixinBehaviors","_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","apply","arguments","_inherits","mixinBehaviors","define","MwcSwitch","_decorate","_initialize","_MwcSwitch","HaSwitch","_MwcSwitch2","_getPrototypeOf2","_this","_len","args","Array","_key","call","concat","_assertThisInitialized","F","kind","decorators","key","query","_this2","_get","prototype","style","setProperty","toggle","_slot","assignedNodes","addEventListener","hapticType","haptic","fireEvent","window","ripple","interactionN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A,EAAAlB,IAAA,SAAAnJ,MAiDE,WACE,MAAO,CACLwJ,IACAjJ,YAFK5B,QAlDX,CAAAsK,KAAA,SAAAE,IAAA,mBAAAnJ,MAiFE,SAAyBsK,GACvBrM,KAAKsM,cAAcC,aAAaF,GAEhCrM,KAAKwM,QAAUxM,KAAKyM,YAAYD,aApFNxC","file":"chunk.429840c83fad61bc51a8.js","sourcesContent":["import {\n LitElement,\n html,\n css,\n CSSResult,\n TemplateResult,\n customElement,\n property,\n} from \"lit-element\";\nimport \"@polymer/paper-dialog-scrollable/paper-dialog-scrollable\";\nimport \"@polymer/paper-input/paper-input\";\n\nimport \"../../components/dialog/ha-paper-dialog\";\nimport \"../../components/ha-switch\";\n\nimport { HomeAssistant } from \"../../types\";\nimport { DialogParams } from \"./show-dialog-box\";\nimport { PolymerChangedEvent } from \"../../polymer-types\";\nimport { haStyleDialog } from \"../../resources/styles\";\nimport { classMap } from \"lit-html/directives/class-map\";\n\n@customElement(\"dialog-box\")\nclass DialogBox extends LitElement {\n @property() public hass!: HomeAssistant;\n @property() private _params?: DialogParams;\n @property() private _value?: string;\n\n public async showDialog(params: DialogParams): Promise {\n this._params = params;\n if (params.prompt) {\n this._value = params.defaultValue;\n }\n }\n\n protected render(): TemplateResult {\n if (!this._params) {\n return html``;\n }\n\n const confirmPrompt = this._params.confirmation || this._params.prompt;\n\n return html`\n \n
\n \n `;\n }\n\n private _valueChanged(ev: PolymerChangedEvent) {\n this._value = ev.detail.value;\n }\n\n private async _dismiss(): Promise {\n if (this._params!.cancel) {\n this._params!.cancel();\n }\n this._params = undefined;\n }\n\n private async _confirm(): Promise {\n if (this._params!.confirm) {\n this._params!.confirm(this._value);\n }\n this._dismiss();\n }\n\n private _openedChanged(ev: PolymerChangedEvent): void {\n if (!(ev.detail as any).value) {\n this._params = undefined;\n }\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n css`\n ha-paper-dialog {\n min-width: 400px;\n max-width: 500px;\n }\n @media (max-width: 400px) {\n ha-paper-dialog {\n min-width: initial;\n }\n }\n p {\n margin: 0;\n padding-top: 6px;\n padding-bottom: 24px;\n color: var(--primary-text-color);\n }\n .no-bottom-padding {\n padding-bottom: 0;\n }\n .secondary {\n color: var(--secondary-text-color);\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-box\": DialogBox;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import {\n customElement,\n CSSResult,\n css,\n query,\n html,\n property,\n} from \"lit-element\";\nimport \"@material/mwc-switch\";\nimport { style } from \"@material/mwc-switch/mwc-switch-css\";\n// tslint:disable-next-line\nimport { Switch } from \"@material/mwc-switch\";\nimport { Constructor } from \"../types\";\nimport { forwardHaptic } from \"../data/haptics\";\nimport { ripple } from \"@material/mwc-ripple/ripple-directive\";\n// tslint:disable-next-line\nconst MwcSwitch = customElements.get(\"mwc-switch\") as Constructor;\n\n@customElement(\"ha-switch\")\nexport class HaSwitch extends MwcSwitch {\n // Generate a haptic vibration.\n // Only set to true if the new value of the switch is applied right away when toggling.\n // Do not add haptic when a user is required to press save.\n @property({ type: Boolean }) public haptic = false;\n @query(\"slot\") private _slot!: HTMLSlotElement;\n\n protected firstUpdated() {\n super.firstUpdated();\n this.style.setProperty(\n \"--mdc-theme-secondary\",\n \"var(--switch-checked-color)\"\n );\n this.classList.toggle(\n \"slotted\",\n Boolean(this._slot.assignedNodes().length)\n );\n this.addEventListener(\"change\", () => {\n if (this.haptic) {\n forwardHaptic(\"light\");\n }\n });\n }\n\n protected render() {\n return html`\n
\n \n
\n
\n \n
\n
\n
\n \n `;\n }\n\n protected static get styles(): CSSResult[] {\n return [\n style,\n css`\n :host {\n display: flex;\n flex-direction: row;\n align-items: center;\n }\n .mdc-switch.mdc-switch--checked .mdc-switch__thumb {\n background-color: var(--switch-checked-button-color);\n border-color: var(--switch-checked-button-color);\n }\n .mdc-switch.mdc-switch--checked .mdc-switch__track {\n background-color: var(--switch-checked-track-color);\n border-color: var(--switch-checked-track-color);\n }\n .mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb {\n background-color: var(--switch-unchecked-button-color);\n border-color: var(--switch-unchecked-button-color);\n }\n .mdc-switch:not(.mdc-switch--checked) .mdc-switch__track {\n background-color: var(--switch-unchecked-track-color);\n border-color: var(--switch-unchecked-track-color);\n }\n :host(.slotted) .mdc-switch {\n margin-right: 24px;\n }\n `,\n ];\n }\n\n private _haChangeHandler(e: Event) {\n this.mdcFoundation.handleChange(e);\n // catch \"click\" event and sync properties\n this.checked = this.formElement.checked;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-switch\": HaSwitch;\n }\n}\n","/**\n * Broadcast haptic feedback requests\n */\n\nimport { fireEvent, HASSDomEvent } from \"../common/dom/fire_event\";\n\n// Allowed types are from iOS HIG.\n// https://developer.apple.com/design/human-interface-guidelines/ios/user-interaction/feedback/#haptics\n// Implementors on platforms other than iOS should attempt to match the patterns (shown in HIG) as closely as possible.\nexport type HapticType =\n | \"success\"\n | \"warning\"\n | \"failure\"\n | \"light\"\n | \"medium\"\n | \"heavy\"\n | \"selection\";\n\ndeclare global {\n // for fire event\n interface HASSDomEvents {\n haptic: HapticType;\n }\n\n interface GlobalEventHandlersEventMap {\n haptic: HASSDomEvent;\n }\n}\n\nexport const forwardHaptic = (hapticType: HapticType) => {\n fireEvent(window, \"haptic\", hapticType);\n};\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/hassio/api/panel/chunk.8b198fe00454712c9c14.js b/hassio/api/panel/chunk.43e40fd69686ad51301d.js
similarity index 99%
rename from hassio/api/panel/chunk.8b198fe00454712c9c14.js
rename to hassio/api/panel/chunk.43e40fd69686ad51301d.js
index 81139b7b2..140f7e4a6 100644
--- a/hassio/api/panel/chunk.8b198fe00454712c9c14.js
+++ b/hassio/api/panel/chunk.43e40fd69686ad51301d.js
@@ -1,2 +1,2 @@
-(self.webpackJsonp=self.webpackJsonp||[]).push([[7],{177:function(e,t,r){"use strict";r.r(t);r(109),r(125),r(48),r(24),r(82);var n=r(5),i=r(27),o=r(15),a=r(10),s=(r(136),r(18),r(19),r(172),r(173),r(137),r(116));function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(){var e=h(["\n :host,\n paper-card,\n paper-dropdown-menu {\n display: block;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n paper-item {\n width: 450px;\n }\n .card-actions {\n text-align: right;\n }\n "]);return l=function(){return e},e}function d(){var e=h(["\n ","\n "]);return d=function(){return e},e}function u(){var e=h(["\n ","\n "]);return u=function(){return e},e}function p(){var e=h(['\n
\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n \n\n ","\n "]);return Dt=function(){return e},e}function At(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zt(e){var t,r=Nt(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function Rt(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Ft(e){return e.decorators&&e.decorators.length}function It(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ht(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function Nt(e){var t=function(e,t){if("object"!==Ye(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ye(t)?t:String(t)}function Mt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Ut(e){if(Array.isArray(e))return e}var Lt={rating:{title:"Add-on Security Rating",description:"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\n\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk)."},host_network:{title:"Host Network",description:"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on."},homeassistant_api:{title:"Home Assistant API Access",description:"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens."},full_access:{title:"Full Hardware Access",description:"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},hassio_api:{title:"Hass.io API Access",description:"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively."},docker_api:{title:"Full Docker Access",description:"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},host_pid:{title:"Host Processes Namespace",description:"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},apparmor:{title:"AppArmor",description:"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\n\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on."},auth_api:{title:"Home Assistant Authentication",description:"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability."},ingress:{title:"Ingress",description:"This add-on is using Ingress to embed its interface securely into Home Assistant."}},Vt=(function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!Ft(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a0||"0"===t&&Number(r)>=92}},{kind:"method",key:"_startOnBootToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={boot:"auto"===this.addon.boot?"manual":"auto"},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_autoUpdateToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={auto_update:!this.addon.auto_update},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_protectionToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={protected:!this.addon.protected},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.h)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"security"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon security option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_panelToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={ingress_panel:!this.addon.ingress_panel},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_openChangelog",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return this._error=void 0,r.prev=1,r.next=4,regeneratorRuntime.awrap(Object(i.a)(this.hass,this.addon.slug));case 4:e=r.sent,Object(Ge.a)(this,{title:"Changelog",content:e}),r.next=11;break;case 8:r.prev=8,r.t0=r.catch(1),this._error="Failed to get addon changelog, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 11:case"end":return r.stop()}},null,this,[[1,8]])}},{kind:"method",key:"_installClicked",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return this._error=void 0,this._installing=!0,r.prev=2,r.next=5,regeneratorRuntime.awrap(Object(i.e)(this.hass,this.addon.slug));case 5:e={success:!0,response:void 0,path:"install"},Object(P.a)(this,"hass-api-called",e),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),this._error="Failed to install addon, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 12:this._installing=!1;case 13:case"end":return r.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_uninstallClicked",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(confirm("Are you sure you want to uninstall this add-on?")){r.next=2;break}return r.abrupt("return");case 2:return this._error=void 0,r.prev=3,r.next=6,regeneratorRuntime.awrap(Object(i.i)(this.hass,this.addon.slug));case 6:e={success:!0,response:void 0,path:"uninstall"},Object(P.a)(this,"hass-api-called",e),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(3),this._error="Failed to uninstall addon, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 13:case"end":return r.stop()}},null,this,[[3,10]])}}]}},n.a),r(118));function Bt(e){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(){var e=Yt(["\n :host,\n paper-card {\n display: block;\n }\n pre {\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n "]);return qt=function(){return e},e}function Wt(){var e=Yt(['\n
\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n \n\n ","\n "]);return Dt=function(){return e},e}function At(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Ct(e){return(Ct=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Tt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function St(e,t){return(St=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function zt(e){var t,r=Nt(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function Rt(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Ft(e){return e.decorators&&e.decorators.length}function It(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Ht(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function Nt(e){var t=function(e,t){if("object"!==Ye(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==Ye(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===Ye(t)?t:String(t)}function Mt(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function Ut(e){if(Array.isArray(e))return e}var Lt={rating:{title:"Add-on Security Rating",description:"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\n\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk)."},host_network:{title:"Host Network",description:"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on."},homeassistant_api:{title:"Home Assistant API Access",description:"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens."},full_access:{title:"Full Hardware Access",description:"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},hassio_api:{title:"Hass.io API Access",description:"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively."},docker_api:{title:"Full Docker Access",description:"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},host_pid:{title:"Host Processes Namespace",description:"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\n\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on."},apparmor:{title:"AppArmor",description:"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\n\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on."},auth_api:{title:"Home Assistant Authentication",description:"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability."},ingress:{title:"Ingress",description:"This add-on is using Ingress to embed its interface securely into Home Assistant."}},Vt=(function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!Ft(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var d=0;d=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a0||"0"===t&&Number(r)>=92}},{kind:"method",key:"_startOnBootToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={boot:"auto"===this.addon.boot?"manual":"auto"},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_autoUpdateToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={auto_update:!this.addon.auto_update},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_protectionToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={protected:!this.addon.protected},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.h)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"security"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon security option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_panelToggled",value:function(){var e,t,r;return regeneratorRuntime.async(function(n){for(;;)switch(n.prev=n.next){case 0:return this._error=void 0,e={ingress_panel:!this.addon.ingress_panel},n.prev=2,n.next=5,regeneratorRuntime.awrap(Object(i.g)(this.hass,this.addon.slug,e));case 5:t={success:!0,response:void 0,path:"option"},Object(P.a)(this,"hass-api-called",t),n.next=12;break;case 9:n.prev=9,n.t0=n.catch(2),this._error="Failed to set addon option, ".concat((null===(r=n.t0.body)||void 0===r?void 0:r.message)||n.t0);case 12:case"end":return n.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_openChangelog",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return this._error=void 0,r.prev=1,r.next=4,regeneratorRuntime.awrap(Object(i.a)(this.hass,this.addon.slug));case 4:e=r.sent,Object(Ge.a)(this,{title:"Changelog",content:e}),r.next=11;break;case 8:r.prev=8,r.t0=r.catch(1),this._error="Failed to get addon changelog, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 11:case"end":return r.stop()}},null,this,[[1,8]])}},{kind:"method",key:"_installClicked",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:return this._error=void 0,this._installing=!0,r.prev=2,r.next=5,regeneratorRuntime.awrap(Object(i.e)(this.hass,this.addon.slug));case 5:e={success:!0,response:void 0,path:"install"},Object(P.a)(this,"hass-api-called",e),r.next=12;break;case 9:r.prev=9,r.t0=r.catch(2),this._error="Failed to install addon, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 12:this._installing=!1;case 13:case"end":return r.stop()}},null,this,[[2,9]])}},{kind:"method",key:"_uninstallClicked",value:function(){var e,t;return regeneratorRuntime.async(function(r){for(;;)switch(r.prev=r.next){case 0:if(confirm("Are you sure you want to uninstall this add-on?")){r.next=2;break}return r.abrupt("return");case 2:return this._error=void 0,r.prev=3,r.next=6,regeneratorRuntime.awrap(Object(i.i)(this.hass,this.addon.slug));case 6:e={success:!0,response:void 0,path:"uninstall"},Object(P.a)(this,"hass-api-called",e),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(3),this._error="Failed to uninstall addon, ".concat((null===(t=r.t0.body)||void 0===t?void 0:t.message)||r.t0);case 13:case"end":return r.stop()}},null,this,[[3,10]])}}]}},n.a),r(118));function Bt(e){return(Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qt(){var e=Yt(["\n :host,\n paper-card {\n display: block;\n }\n pre {\n overflow-x: auto;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n }\n .errors {\n color: var(--google-red-500);\n margin-bottom: 16px;\n }\n "]);return qt=function(){return e},e}function Wt(){var e=Yt(['\n
\n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n css`\n .badge-container {\n display: inline-block;\n text-align: center;\n vertical-align: top;\n }\n .label-badge {\n position: relative;\n display: block;\n margin: 0 auto;\n width: var(--ha-label-badge-size, 2.5em);\n text-align: center;\n height: var(--ha-label-badge-size, 2.5em);\n line-height: var(--ha-label-badge-size, 2.5em);\n font-size: var(--ha-label-badge-font-size, 1.5em);\n border-radius: 50%;\n border: 0.1em solid var(--ha-label-badge-color, var(--primary-color));\n color: var(--label-badge-text-color, rgb(76, 76, 76));\n\n white-space: nowrap;\n background-color: var(--label-badge-background-color, white);\n background-size: cover;\n transition: border 0.3s ease-in-out;\n }\n .label-badge .value {\n font-size: 90%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .label-badge .value.big {\n font-size: 70%;\n }\n .label-badge .label {\n position: absolute;\n bottom: -1em;\n /* Make the label as wide as container+border. (parent_borderwidth / font-size) */\n left: -0.2em;\n right: -0.2em;\n line-height: 1em;\n font-size: 0.5em;\n }\n .label-badge .label span {\n box-sizing: border-box;\n max-width: 100%;\n display: inline-block;\n background-color: var(--ha-label-badge-color, var(--primary-color));\n color: var(--ha-label-badge-label-color, white);\n border-radius: 1em;\n padding: 9% 16% 8% 16%; /* mostly apitalized text, not much descenders => bit more top margin */\n font-weight: 500;\n overflow: hidden;\n text-transform: uppercase;\n text-overflow: ellipsis;\n transition: background-color 0.3s ease-in-out;\n text-transform: var(--ha-label-badge-label-text-transform, uppercase);\n }\n .label-badge .label.big span {\n font-size: 90%;\n padding: 10% 12% 7% 12%; /* push smaller text a bit down to center vertically */\n }\n .badge-container .title {\n margin-top: 1em;\n font-size: var(--ha-label-badge-title-font-size, 0.9em);\n width: var(--ha-label-badge-title-width, 5em);\n font-weight: var(--ha-label-badge-title-font-weight, 400);\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: normal;\n }\n `,\n ];\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has(\"image\")) {\n this.shadowRoot!.getElementById(\"badge\")!.style.backgroundImage = this\n .image\n ? `url(${this.image})`\n : \"\";\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-label-badge\": HaLabelBadge;\n }\n}\n\ncustomElements.define(\"ha-label-badge\", HaLabelBadge);\n","import \"@material/mwc-button\";\nimport \"@polymer/iron-icon/iron-icon\";\nimport \"@polymer/paper-card/paper-card\";\nimport \"@polymer/paper-tooltip/paper-tooltip\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from \"lit-element\";\nimport { classMap } from \"lit-html/directives/class-map\";\n\nimport \"../../../src/components/buttons/ha-call-api-button\";\nimport \"../../../src/components/buttons/ha-progress-button\";\nimport \"../../../src/components/ha-label-badge\";\nimport \"../../../src/components/ha-markdown\";\nimport \"../../../src/components/ha-switch\";\nimport \"../components/hassio-card-content\";\n\nimport { fireEvent } from \"../../../src/common/dom/fire_event\";\nimport {\n HassioAddonDetails,\n HassioAddonSetOptionParams,\n HassioAddonSetSecurityParams,\n setHassioAddonOption,\n setHassioAddonSecurity,\n uninstallHassioAddon,\n installHassioAddon,\n fetchHassioAddonChangelog,\n} from \"../../../src/data/hassio/addon\";\nimport { hassioStyle } from \"../resources/hassio-style\";\nimport { haStyle } from \"../../../src/resources/styles\";\nimport { HomeAssistant } from \"../../../src/types\";\nimport { navigate } from \"../../../src/common/navigate\";\nimport { showHassioMarkdownDialog } from \"../dialogs/markdown/show-dialog-hassio-markdown\";\n\nconst PERMIS_DESC = {\n rating: {\n title: \"Add-on Security Rating\",\n description:\n \"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\\n\\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk).\",\n },\n host_network: {\n title: \"Host Network\",\n description:\n \"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on.\",\n },\n homeassistant_api: {\n title: \"Home Assistant API Access\",\n description:\n \"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens.\",\n },\n full_access: {\n title: \"Full Hardware Access\",\n description:\n \"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n hassio_api: {\n title: \"Hass.io API Access\",\n description:\n \"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively.\",\n },\n docker_api: {\n title: \"Full Docker Access\",\n description:\n \"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n host_pid: {\n title: \"Host Processes Namespace\",\n description:\n \"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n apparmor: {\n title: \"AppArmor\",\n description:\n \"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\\n\\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on.\",\n },\n auth_api: {\n title: \"Home Assistant Authentication\",\n description:\n \"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability.\",\n },\n ingress: {\n title: \"Ingress\",\n description:\n \"This add-on is using Ingress to embed its interface securely into Home Assistant.\",\n },\n};\n\n@customElement(\"hassio-addon-info\")\nclass HassioAddonInfo extends LitElement {\n @property() public hass!: HomeAssistant;\n @property() public addon!: HassioAddonDetails;\n @property() private _error?: string;\n @property({ type: Boolean }) private _installing = false;\n\n protected render(): TemplateResult {\n return html`\n ${this._computeUpdateAvailable\n ? html`\n \n
\n \n ${!this.addon.available\n ? html`\n
\n This update is no longer compatible with your system.\n
\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n css`\n .badge-container {\n display: inline-block;\n text-align: center;\n vertical-align: top;\n }\n .label-badge {\n position: relative;\n display: block;\n margin: 0 auto;\n width: var(--ha-label-badge-size, 2.5em);\n text-align: center;\n height: var(--ha-label-badge-size, 2.5em);\n line-height: var(--ha-label-badge-size, 2.5em);\n font-size: var(--ha-label-badge-font-size, 1.5em);\n border-radius: 50%;\n border: 0.1em solid var(--ha-label-badge-color, var(--primary-color));\n color: var(--label-badge-text-color, rgb(76, 76, 76));\n\n white-space: nowrap;\n background-color: var(--label-badge-background-color, white);\n background-size: cover;\n transition: border 0.3s ease-in-out;\n }\n .label-badge .value {\n font-size: 90%;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n .label-badge .value.big {\n font-size: 70%;\n }\n .label-badge .label {\n position: absolute;\n bottom: -1em;\n /* Make the label as wide as container+border. (parent_borderwidth / font-size) */\n left: -0.2em;\n right: -0.2em;\n line-height: 1em;\n font-size: 0.5em;\n }\n .label-badge .label span {\n box-sizing: border-box;\n max-width: 100%;\n display: inline-block;\n background-color: var(--ha-label-badge-color, var(--primary-color));\n color: var(--ha-label-badge-label-color, white);\n border-radius: 1em;\n padding: 9% 16% 8% 16%; /* mostly apitalized text, not much descenders => bit more top margin */\n font-weight: 500;\n overflow: hidden;\n text-transform: uppercase;\n text-overflow: ellipsis;\n transition: background-color 0.3s ease-in-out;\n text-transform: var(--ha-label-badge-label-text-transform, uppercase);\n }\n .label-badge .label.big span {\n font-size: 90%;\n padding: 10% 12% 7% 12%; /* push smaller text a bit down to center vertically */\n }\n .badge-container .title {\n margin-top: 1em;\n font-size: var(--ha-label-badge-title-font-size, 0.9em);\n width: var(--ha-label-badge-title-width, 5em);\n font-weight: var(--ha-label-badge-title-font-weight, 400);\n overflow: hidden;\n text-overflow: ellipsis;\n line-height: normal;\n }\n `,\n ];\n }\n\n protected updated(changedProperties: PropertyValues): void {\n super.updated(changedProperties);\n if (changedProperties.has(\"image\")) {\n this.shadowRoot!.getElementById(\"badge\")!.style.backgroundImage = this\n .image\n ? `url(${this.image})`\n : \"\";\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-label-badge\": HaLabelBadge;\n }\n}\n\ncustomElements.define(\"ha-label-badge\", HaLabelBadge);\n","import \"@material/mwc-button\";\nimport \"@polymer/iron-icon/iron-icon\";\nimport \"@polymer/paper-card/paper-card\";\nimport \"@polymer/paper-tooltip/paper-tooltip\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n} from \"lit-element\";\nimport { classMap } from \"lit-html/directives/class-map\";\n\nimport \"../../../src/components/buttons/ha-call-api-button\";\nimport \"../../../src/components/buttons/ha-progress-button\";\nimport \"../../../src/components/ha-label-badge\";\nimport \"../../../src/components/ha-markdown\";\nimport \"../../../src/components/ha-switch\";\nimport \"../components/hassio-card-content\";\n\nimport { fireEvent } from \"../../../src/common/dom/fire_event\";\nimport {\n HassioAddonDetails,\n HassioAddonSetOptionParams,\n HassioAddonSetSecurityParams,\n setHassioAddonOption,\n setHassioAddonSecurity,\n uninstallHassioAddon,\n installHassioAddon,\n fetchHassioAddonChangelog,\n} from \"../../../src/data/hassio/addon\";\nimport { hassioStyle } from \"../resources/hassio-style\";\nimport { haStyle } from \"../../../src/resources/styles\";\nimport { HomeAssistant } from \"../../../src/types\";\nimport { navigate } from \"../../../src/common/navigate\";\nimport { showHassioMarkdownDialog } from \"../dialogs/markdown/show-dialog-hassio-markdown\";\n\nconst PERMIS_DESC = {\n rating: {\n title: \"Add-on Security Rating\",\n description:\n \"Hass.io provides a security rating to each of the add-ons, which indicates the risks involved when using this add-on. The more access an add-on requires on your system, the lower the score, thus raising the possible security risks.\\n\\nA score is on a scale from 1 to 6. Where 1 is the lowest score (considered the most insecure and highest risk) and a score of 6 is the highest score (considered the most secure and lowest risk).\",\n },\n host_network: {\n title: \"Host Network\",\n description:\n \"Add-ons usually run in their own isolated network layer, which prevents them from accessing the network of the host operating system. In some cases, this network isolation can limit add-ons in providing their services and therefore, the isolation can be lifted by the add-on author, giving the add-on full access to the network capabilities of the host machine. This gives the add-on more networking capabilities but lowers the security, hence, the security rating of the add-on will be lowered when this option is used by the add-on.\",\n },\n homeassistant_api: {\n title: \"Home Assistant API Access\",\n description:\n \"This add-on is allowed to access your running Home Assistant instance directly via the Home Assistant API. This mode handles authentication for the add-on as well, which enables an add-on to interact with Home Assistant without the need for additional authentication tokens.\",\n },\n full_access: {\n title: \"Full Hardware Access\",\n description:\n \"This add-on is given full access to the hardware of your system, by request of the add-on author. Access is comparable to the privileged mode in Docker. Since this opens up possible security risks, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n hassio_api: {\n title: \"Hass.io API Access\",\n description:\n \"The add-on was given access to the Hass.io API, by request of the add-on author. By default, the add-on can access general version information of your system. When the add-on requests 'manager' or 'admin' level access to the API, it will gain access to control multiple parts of your Hass.io system. This permission is indicated by this badge and will impact the security score of the addon negatively.\",\n },\n docker_api: {\n title: \"Full Docker Access\",\n description:\n \"The add-on author has requested the add-on to have management access to the Docker instance running on your system. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n host_pid: {\n title: \"Host Processes Namespace\",\n description:\n \"Usually, the processes the add-on runs, are isolated from all other system processes. The add-on author has requested the add-on to have access to the system processes running on the host system instance, and allow the add-on to spawn processes on the host system as well. This mode gives the add-on full access and control to your entire Hass.io system, which adds security risks, and could damage your system when misused. Therefore, this feature impacts the add-on security score negatively.\\n\\nThis level of access is not granted automatically and needs to be confirmed by you. To do this, you need to disable the protection mode on the add-on manually. Only disable the protection mode if you know, need AND trust the source of this add-on.\",\n },\n apparmor: {\n title: \"AppArmor\",\n description:\n \"AppArmor ('Application Armor') is a Linux kernel security module that restricts add-ons capabilities like network access, raw socket access, and permission to read, write, or execute specific files.\\n\\nAdd-on authors can provide their security profiles, optimized for the add-on, or request it to be disabled. If AppArmor is disabled, it will raise security risks and therefore, has a negative impact on the security score of the add-on.\",\n },\n auth_api: {\n title: \"Home Assistant Authentication\",\n description:\n \"An add-on can authenticate users against Home Assistant, allowing add-ons to give users the possibility to log into applications running inside add-ons, using their Home Assistant username/password. This badge indicates if the add-on author requests this capability.\",\n },\n ingress: {\n title: \"Ingress\",\n description:\n \"This add-on is using Ingress to embed its interface securely into Home Assistant.\",\n },\n};\n\n@customElement(\"hassio-addon-info\")\nclass HassioAddonInfo extends LitElement {\n @property() public hass!: HomeAssistant;\n @property() public addon!: HassioAddonDetails;\n @property() private _error?: string;\n @property({ type: Boolean }) private _installing = false;\n\n protected render(): TemplateResult {\n return html`\n ${this._computeUpdateAvailable\n ? html`\n \n
\n \n ${!this.addon.available\n ? html`\n
\n This update is no longer compatible with your system.\n
\n Protection mode on this add-on is disabled! This gives the add-on full access to the entire system, which adds security risks, and could damage your system when used incorrectly. Only disable the protection mode if you know, need AND trust the source of this add-on.\n
\n \n \n \n \n \n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n hassioStyle,\n css`\n ha-paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n ha-paper-dialog {\n max-height: 100%;\n }\n ha-paper-dialog::before {\n content: \"\";\n position: fixed;\n z-index: -1;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: inherit;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-hassio-markdown\": HassioMarkdownDialog;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import { UpdatingElement, property, customElement } from \"lit-element\";\n// eslint-disable-next-line import/no-webpack-loader-syntax\n// @ts-ignore\n// tslint:disable-next-line: no-implicit-dependencies\nimport markdownWorker from \"workerize-loader!../resources/markdown_worker\";\nimport { fireEvent } from \"../common/dom/fire_event\";\n\nlet worker: any | undefined;\n\n@customElement(\"ha-markdown\")\nclass HaMarkdown extends UpdatingElement {\n @property() public content = \"\";\n @property({ type: Boolean }) public allowSvg = false;\n\n protected update(changedProps) {\n super.update(changedProps);\n\n if (!worker) {\n worker = markdownWorker();\n }\n\n this._render();\n }\n\n private async _render() {\n this.innerHTML = await worker.renderMarkdown(\n this.content,\n {\n breaks: true,\n gfm: true,\n tables: true,\n },\n {\n allowSvg: this.allowSvg,\n }\n );\n\n this._resize();\n\n const walker = document.createTreeWalker(\n this,\n 1 /* SHOW_ELEMENT */,\n null,\n false\n );\n\n while (walker.nextNode()) {\n const node = walker.currentNode;\n\n // Open external links in a new window\n if (\n node instanceof HTMLAnchorElement &&\n node.host !== document.location.host\n ) {\n node.target = \"_blank\";\n\n // protect referrer on external links and deny window.opener access for security reasons\n // (see https://mathiasbynens.github.io/rel-noopener/)\n node.rel = \"noreferrer noopener\";\n\n // Fire a resize event when images loaded to notify content resized\n } else if (node) {\n node.addEventListener(\"load\", this._resize);\n }\n }\n }\n\n private _resize = () => fireEvent(this, \"iron-resize\");\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-markdown\": HaMarkdown;\n }\n}\n","\n\t\t\t\tvar addMethods = require(\"../../node_modules/workerize-loader/dist/rpc-wrapper.js\")\n\t\t\t\tvar methods = [\"renderMarkdown\"]\n\t\t\t\tmodule.exports = function() {\n\t\t\t\t\tvar w = new Worker(__webpack_public_path__ + \"201359fd5a526afe13ef.worker.js\", { name: \"[hash].worker.js\" })\n\t\t\t\t\taddMethods(w, methods)\n\t\t\t\t\t\n\t\t\t\t\treturn w\n\t\t\t\t}\n\t\t\t","export default function addMethods(worker, methods) {\n\tlet c = 0;\n\tlet callbacks = {};\n\tworker.addEventListener('message', (e) => {\n\t\tlet d = e.data;\n\t\tif (d.type!=='RPC') return;\n\t\tif (d.id) {\n\t\t\tlet f = callbacks[d.id];\n\t\t\tif (f) {\n\t\t\t\tdelete callbacks[d.id];\n\t\t\t\tif (d.error) {\n\t\t\t\t\tf[1](Object.assign(Error(d.error.message), d.error));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tf[0](d.result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tlet evt = document.createEvent('Event');\n\t\t\tevt.initEvent(d.method, false, false);\n\t\t\tevt.data = d.params;\n\t\t\tworker.dispatchEvent(evt);\n\t\t}\n\t});\n\tmethods.forEach( method => {\n\t\tworker[method] = (...params) => new Promise( (a, b) => {\n\t\t\tlet id = ++c;\n\t\t\tcallbacks[id] = [a, b];\n\t\t\tworker.postMessage({ type: 'RPC', id, method, params });\n\t\t});\n\t});\n}\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///./hassio/src/dialogs/markdown/dialog-hassio-markdown.ts","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-behavior.js","webpack:///./node_modules/@polymer/paper-dialog-scrollable/paper-dialog-scrollable.js","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js","webpack:///./node_modules/@polymer/paper-dialog/paper-dialog.js","webpack:///./src/components/dialog/ha-iron-focusables-helper.js","webpack:///./src/components/dialog/ha-paper-dialog.ts","webpack:///./src/components/ha-markdown.ts","webpack:///./src/resources/markdown_worker.ts","webpack:///../src/rpc-wrapper.js"],"names":["customElement","property","query","params","this","title","content","_dialog","open","html","_templateObject","haStyleDialog","hassioStyle","css","_templateObject2","LitElement","__webpack_require__","d","__webpack_exports__","PaperDialogBehaviorImpl","PaperDialogBehavior","_polymer_iron_overlay_behavior_iron_overlay_behavior_js__WEBPACK_IMPORTED_MODULE_1__","_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_2__","hostAttributes","role","tabindex","properties","modal","type","Boolean","value","__readied","observers","listeners","tap","ready","__prevNoCancelOnOutsideClick","noCancelOnOutsideClick","__prevNoCancelOnEscKey","noCancelOnEscKey","__prevWithBackdrop","withBackdrop","_modalChanged","readied","_updateClosingReasonConfirmed","confirmed","closingReason","_onDialogClick","event","path","dom","i","l","indexOf","target","hasAttribute","close","stopPropagation","IronOverlayBehavior","Polymer","_template","is","dialogElement","Object","scrollTarget","$","scrollable","_ensureTarget","classList","add","attached","requestAnimationFrame","updateScrollState","bind","toggleClass","scrollTop","offsetHeight","scrollHeight","parentElement","behaviors","sizingTarget","remove","$_documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","NeonAnimationRunnerBehavior","neon-animation-finish","_renderOpened","cancelAnimation","playAnimation","_renderClosed","_onNeonAnimationFinish","opened","_finishRenderOpened","_finishRenderClosed","HaIronFocusablesHelper","getTabbableNodes","node","result","_collectTabbableNodes","IronFocusablesHelper","_sortByTabIndex","nodeType","Node","ELEMENT_NODE","_isVisible","children","element","tabIndex","_normalizedTabIndex","needsSort","push","localName","getDistributedNodes","shadowRoot","root","length","paperDialogClass","customElements","get","haTabFixBehaviorImpl","_focusableNodes","HaPaperDialog","_mixinBehaviors","_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","apply","arguments","_inherits","mixinBehaviors","define","worker","HaMarkdown","changedProps","_get","prototype","call","markdownWorker","_render","walker","regeneratorRuntime","async","_context","prev","next","awrap","renderMarkdown","breaks","gfm","tables","allowSvg","sent","_resize","createTreeWalker","nextNode","currentNode","HTMLAnchorElement","host","location","rel","addEventListener","stop","fireEvent","_this2","UpdatingElement","addMethods","methods","module","exports","w","Worker","p","name","c","callbacks","e","data","id","f","error","Error","evt","method","Promise","a","b"],"mappings":";w4SAsBCA,YAAc,2oBAEZC,mEACAA,qEACAC,YAAM,8EAEP,SAAkBC,GAChBC,KAAKC,MAAQF,EAAOE,MACpBD,KAAKE,QAAUH,EAAOG,QACtBF,KAAKG,QAAQC,2CAGf,WACE,OAAOC,YAAPC,IAO2BN,KAAKC,MAGFD,KAAKE,SAAW,+CAMhD,WACE,MAAO,CACLK,IACAC,IACAC,YAHKC,WA7BwBC,sCCvBnCC,EAAAC,EA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SAAA0J,SAAAK,SAA2BxL","file":"chunk.715824f4764bdbe425b1.js","sourcesContent":["import \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport \"@polymer/paper-dialog-scrollable/paper-dialog-scrollable\";\nimport \"@polymer/paper-icon-button/paper-icon-button\";\nimport { PaperDialogElement } from \"@polymer/paper-dialog\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n query,\n} from \"lit-element\";\n\nimport { hassioStyle } from \"../../resources/hassio-style\";\nimport { haStyleDialog } from \"../../../../src/resources/styles\";\nimport { HassioMarkdownDialogParams } from \"./show-dialog-hassio-markdown\";\n\nimport \"../../../../src/components/dialog/ha-paper-dialog\";\nimport \"../../../../src/components/ha-markdown\";\n\n@customElement(\"dialog-hassio-markdown\")\nclass HassioMarkdownDialog extends LitElement {\n @property() public title!: string;\n @property() public content!: string;\n @query(\"#dialog\") private _dialog!: PaperDialogElement;\n\n public showDialog(params: HassioMarkdownDialogParams) {\n this.title = params.title;\n this.content = params.content;\n this._dialog.open();\n }\n\n protected render(): TemplateResult {\n return html`\n \n \n \n
${this.title}
\n \n \n \n \n \n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n hassioStyle,\n css`\n ha-paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n ha-paper-dialog {\n max-height: 100%;\n }\n ha-paper-dialog::before {\n content: \"\";\n position: fixed;\n z-index: -1;\n top: 0px;\n left: 0px;\n right: 0px;\n bottom: 0px;\n background-color: inherit;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-hassio-markdown\": HassioMarkdownDialog;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import { UpdatingElement, property, customElement } from \"lit-element\";\n// eslint-disable-next-line import/no-webpack-loader-syntax\n// @ts-ignore\n// tslint:disable-next-line: no-implicit-dependencies\nimport markdownWorker from \"workerize-loader!../resources/markdown_worker\";\nimport { fireEvent } from \"../common/dom/fire_event\";\n\nlet worker: any | undefined;\n\n@customElement(\"ha-markdown\")\nclass HaMarkdown extends UpdatingElement {\n @property() public content = \"\";\n @property({ type: Boolean }) public allowSvg = false;\n\n protected update(changedProps) {\n super.update(changedProps);\n\n if (!worker) {\n worker = markdownWorker();\n }\n\n this._render();\n }\n\n private async _render() {\n this.innerHTML = await worker.renderMarkdown(\n this.content,\n {\n breaks: true,\n gfm: true,\n tables: true,\n },\n {\n allowSvg: this.allowSvg,\n }\n );\n\n this._resize();\n\n const walker = document.createTreeWalker(\n this,\n 1 /* SHOW_ELEMENT */,\n null,\n false\n );\n\n while (walker.nextNode()) {\n const node = walker.currentNode;\n\n // Open external links in a new window\n if (\n node instanceof HTMLAnchorElement &&\n node.host !== document.location.host\n ) {\n node.target = \"_blank\";\n\n // protect referrer on external links and deny window.opener access for security reasons\n // (see https://mathiasbynens.github.io/rel-noopener/)\n node.rel = \"noreferrer noopener\";\n\n // Fire a resize event when images loaded to notify content resized\n } else if (node) {\n node.addEventListener(\"load\", this._resize);\n }\n }\n }\n\n private _resize = () => fireEvent(this, \"iron-resize\");\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-markdown\": HaMarkdown;\n }\n}\n","\n\t\t\t\tvar addMethods = require(\"../../node_modules/workerize-loader/dist/rpc-wrapper.js\")\n\t\t\t\tvar methods = [\"renderMarkdown\"]\n\t\t\t\tmodule.exports = function() {\n\t\t\t\t\tvar w = new Worker(__webpack_public_path__ + \"201359fd5a526afe13ef.worker.js\", { name: \"[hash].worker.js\" })\n\t\t\t\t\taddMethods(w, methods)\n\t\t\t\t\t\n\t\t\t\t\treturn w\n\t\t\t\t}\n\t\t\t","export default function addMethods(worker, methods) {\n\tlet c = 0;\n\tlet callbacks = {};\n\tworker.addEventListener('message', (e) => {\n\t\tlet d = e.data;\n\t\tif (d.type!=='RPC') return;\n\t\tif (d.id) {\n\t\t\tlet f = callbacks[d.id];\n\t\t\tif (f) {\n\t\t\t\tdelete callbacks[d.id];\n\t\t\t\tif (d.error) {\n\t\t\t\t\tf[1](Object.assign(Error(d.error.message), d.error));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tf[0](d.result);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tlet evt = document.createEvent('Event');\n\t\t\tevt.initEvent(d.method, false, false);\n\t\t\tevt.data = d.params;\n\t\t\tworker.dispatchEvent(evt);\n\t\t}\n\t});\n\tmethods.forEach( method => {\n\t\tworker[method] = (...params) => new Promise( (a, b) => {\n\t\t\tlet id = ++c;\n\t\t\tcallbacks[id] = [a, b];\n\t\t\tworker.postMessage({ type: 'RPC', id, method, params });\n\t\t});\n\t});\n}\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/hassio/api/panel/chunk.8b198fe00454712c9c14.js.gz b/hassio/api/panel/chunk.8b198fe00454712c9c14.js.gz
deleted file mode 100644
index cc766dceb..000000000
Binary files a/hassio/api/panel/chunk.8b198fe00454712c9c14.js.gz and /dev/null differ
diff --git a/hassio/api/panel/chunk.0c4f6887f9b7e7b11ef5.js b/hassio/api/panel/chunk.9d371c8143226d4eaaee.js
similarity index 99%
rename from hassio/api/panel/chunk.0c4f6887f9b7e7b11ef5.js
rename to hassio/api/panel/chunk.9d371c8143226d4eaaee.js
index c12b26968..5e2f8e0c3 100644
--- a/hassio/api/panel/chunk.0c4f6887f9b7e7b11ef5.js
+++ b/hassio/api/panel/chunk.9d371c8143226d4eaaee.js
@@ -1,3 +1,3 @@
-/*! For license information please see chunk.0c4f6887f9b7e7b11ef5.js.LICENSE */
-(self.webpackJsonp=self.webpackJsonp||[]).push([[5],{178:function(e,t,n){"use strict";n.r(t);n(18),n(48),n(22),n(53),n(24),n(40);var o=n(5),r=n(115),i=("".concat(location.protocol,"//").concat(location.host),n(10));n(55);function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){var e=y(["\n ha-paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n ha-paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n ha-paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n .buttons {\n display: flex;\n flex-direction: column;\n }\n .buttons li {\n list-style-type: none;\n }\n .buttons .icon {\n margin-right: 16px;\n }\n .no-margin-top {\n margin-top: 0;\n }\n "]);return a=function(){return e},e}function l(){var e=y(["\n
\n \n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n css`\n ha-paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n ha-paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n ha-paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n .buttons {\n display: flex;\n flex-direction: column;\n }\n .buttons li {\n list-style-type: none;\n }\n .buttons .icon {\n margin-right: 16px;\n }\n .no-margin-top {\n margin-top: 0;\n }\n `,\n ];\n }\n\n private _updateFolders(item: FolderItem, value: boolean | null | undefined) {\n this._folders = this._folders.map((folder) => {\n if (folder.slug === item.slug) {\n folder.checked = value;\n }\n return folder;\n });\n }\n\n private _updateAddons(item: AddonItem, value: boolean | null | undefined) {\n this._addons = this._addons.map((addon) => {\n if (addon.slug === item.slug) {\n addon.checked = value;\n }\n return addon;\n });\n }\n\n private _passwordInput(ev: PolymerChangedEvent) {\n this._snapshotPassword = ev.detail.value;\n }\n\n private _partialRestoreClicked() {\n if (!confirm(\"Are you sure you want to restore this snapshot?\")) {\n return;\n }\n\n const addons = this._addons\n .filter((addon) => addon.checked)\n .map((addon) => addon.slug);\n\n const folders = this._folders\n .filter((folder) => folder.checked)\n .map((folder) => folder.slug);\n\n const data: {\n homeassistant: boolean | null | undefined;\n addons: any;\n folders: any;\n password?: string;\n } = {\n homeassistant: this._restoreHass,\n addons,\n folders,\n };\n\n if (this.snapshot!.protected) {\n data.password = this._snapshotPassword;\n }\n\n this.hass\n .callApi(\n \"POST\",\n\n `hassio/snapshots/${this.snapshot!.slug}/restore/partial`,\n data\n )\n .then(\n () => {\n alert(\"Snapshot restored!\");\n this._dialog.close();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private _fullRestoreClicked() {\n if (!confirm(\"Are you sure you want to restore this snapshot?\")) {\n return;\n }\n\n const data = this.snapshot!.protected\n ? { password: this._snapshotPassword }\n : undefined;\n\n this.hass\n .callApi(\n \"POST\",\n `hassio/snapshots/${this.snapshot!.slug}/restore/full`,\n data\n )\n .then(\n () => {\n alert(\"Snapshot restored!\");\n this._dialog.close();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private _deleteClicked() {\n if (!confirm(\"Are you sure you want to delete this snapshot?\")) {\n return;\n }\n\n this.hass\n\n .callApi(\"POST\", `hassio/snapshots/${this.snapshot!.slug}/remove`)\n .then(\n () => {\n this._dialog.close();\n this._dialogParams!.onDelete();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private async _downloadClicked() {\n let signedPath: { path: string };\n try {\n signedPath = await getSignedPath(\n this.hass,\n `/api/hassio/snapshots/${this.snapshot!.slug}/download`\n );\n } catch (err) {\n alert(`Error: ${err.message}`);\n return;\n }\n\n const name = this._computeName.replace(/[^a-z0-9]+/gi, \"_\");\n const a = document.createElement(\"a\");\n a.href = signedPath.path;\n a.download = `Hass_io_${name}.tar`;\n this._dialog.appendChild(a);\n a.click();\n this._dialog.removeChild(a);\n }\n\n private get _computeName() {\n return this.snapshot\n ? this.snapshot.name || this.snapshot.slug\n : \"Unnamed snapshot\";\n }\n\n private get _computeSize() {\n return Math.ceil(this.snapshot!.size * 10) / 10 + \" MB\";\n }\n\n private _formatDatetime(datetime) {\n return new Date(datetime).toLocaleDateString(navigator.language, {\n weekday: \"long\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n }\n\n private _dialogClosed() {\n this._dialogParams = undefined;\n this.snapshot = undefined;\n this._snapshotPassword = \"\";\n this._folders = [];\n this._addons = [];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-hassio-snapshot\": HassioSnapshotDialog;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///./src/data/auth.ts","webpack:///./hassio/src/dialogs/snapshot/dialog-hassio-snapshot.ts","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-behavior.js","webpack:///./node_modules/@polymer/paper-dialog-scrollable/paper-dialog-scrollable.js","webpack:///./node_modules/@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js","webpack:///./node_modules/@polymer/paper-dialog/paper-dialog.js","webpack:///./src/components/dialog/ha-iron-focusables-helper.js","webpack:///./src/components/dialog/ha-paper-dialog.ts"],"names":["concat","location","protocol","host","customElement","property","query","params","regeneratorRuntime","async","_context","prev","next","awrap","fetchHassioSnapshotInfo","this","hass","slug","snapshot","sent","_folders","folders","list","includes","push","name","checked","sort","a","b","_addons","addons","map","addon","version","_dialogParams","_dialog","open","t0","showDialog","stop","_this2","html","_templateObject2","_dialogClosed","_computeName","type","_computeSize","_formatDatetime","date","_restoreHass","ev","target","homeassistant","length","_templateObject3","item","_templateObject4","_updateFolders","_templateObject5","_templateObject6","_updateAddons","_templateObject7","_passwordInput","_snapshotPassword","_error","_templateObject8","_downloadClicked","_partialRestoreClicked","_templateObject9","_fullRestoreClicked","_deleteClicked","_templateObject","haStyleDialog","css","_templateObject10","value","folder","detail","_this3","confirm","filter","data","password","callApi","then","alert","close","error","body","message","_this4","undefined","_this5","onDelete","signedPath","_context2","path","callWS","abrupt","replace","document","createElement","href","download","appendChild","click","removeChild","Math","ceil","size","datetime","Date","toLocaleDateString","navigator","language","weekday","year","month","day","hour","minute","LitElement","__webpack_require__","d","__webpack_exports__","PaperDialogBehaviorImpl","PaperDialogBehavior","_polymer_iron_overlay_behavior_iron_overlay_behavior_js__WEBPACK_IMPORTED_MODULE_1__","_polymer_polymer_lib_legacy_polymer_dom_js__WEBPACK_IMPORTED_MODULE_2__","hostAttributes","role","tabindex","properties","modal","Boolean","__readied","observers","listeners","tap","ready","__prevNoCancelOnOutsideClick","noCancelOnOutsideClick","__prevNoCancelOnEscKey","noCancelOnEscKey","__prevWithBackdrop","withBackdrop","_modalChanged","readied","_updateClosingReasonConfirmed","confirmed","closingReason","_onDialogClick","event","dom","i","l","indexOf","hasAttribute","stopPropagation","IronOverlayBehavior","Polymer","_template","is","dialogElement","Object","scrollTarget","$","scrollable","_ensureTarget","classList","add","attached","requestAnimationFrame","updateScrollState","bind","toggleClass","scrollTop","offsetHeight","scrollHeight","parentElement","behaviors","sizingTarget","remove","$_documentContainer","setAttribute","innerHTML","head","content","NeonAnimationRunnerBehavior","neon-animation-finish","_renderOpened","cancelAnimation","playAnimation","_renderClosed","_onNeonAnimationFinish","opened","_finishRenderOpened","_finishRenderClosed","HaIronFocusablesHelper","getTabbableNodes","node","result","_collectTabbableNodes","IronFocusablesHelper","_sortByTabIndex","nodeType","Node","ELEMENT_NODE","_isVisible","children","element","tabIndex","_normalizedTabIndex","needsSort","localName","getDistributedNodes","shadowRoot","root","paperDialogClass","customElements","get","haTabFixBehaviorImpl","_focusableNodes","HaPaperDialog","_mixinBehaviors","_classCallCheck","_possibleConstructorReturn","_getPrototypeOf","apply","arguments","_inherits","mixinBehaviors","define"],"mappings":";wJAgBoB,GAAAA,OAAMC,SAASC,SAAf,MAAAF,OAA4BC,SAASE,wyYC0DxDC,YAAc,2oBAEZC,kEACAA,oEACAA,sEACAA,sEACAA,qEACAA,2EACAA,+EACAA,0DAA8D,8BAC9DC,YAA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jL,KAAKkL,cAAc,SAGrBE,uBAAwB,WAClBpL,KAAKqL,OACPrL,KAAKsL,sBAELtL,KAAKuL,oDCvFEC,EAAyB,CAQpCC,iBAAkB,SAASC,GACzB,IAAIC,EAAS,GAIb,OAD0B3L,KAAK4L,sBAAsBF,EAAMC,GAElDE,IAAqBC,gBAAgBH,GAEvCA,GAYTC,sBAAuB,SAASF,EAAMC,GAEpC,GACED,EAAKK,WAAaC,KAAKC,eACtBJ,IAAqBK,WAAWR,GAEjC,OAAO,EAET,IAoBIS,EApBAC,EAAuCV,EACvCW,EAAWR,IAAqBS,oBAAoBF,GACpDG,EAAYF,EAAW,EACvBA,GAAY,GACdV,EAAOlL,KAAK2L,GAkBZD,EADwB,YAAtBC,EAAQI,WAAiD,SAAtBJ,EAAQI,UAClC7D,YAAIyD,GAASK,sBAKb9D,YAAIyD,EAAQM,YAAcN,EAAQO,MAAQP,GAASD,SAGhE,IAAK,IAAIvD,EAAI,EAAGA,EAAIuD,EAAS5J,OAAQqG,IAEnC2D,EAAYvM,KAAK4L,sBAAsBO,EAASvD,GAAI+C,IAAWY,EAEjE,OAAOA,qoBCjFX,IAAMK,EAAmBC,eAAeC,IAAI,gBAGtCC,EAAuB,CAC3BC,sBACE,OAAOxB,EAAuBC,iBAAiBzL,QAOtCiN,EAAb,SAAAC,GAAA,SAAAD,IAAA,mGAAAE,CAAAnN,KAAAiN,GAAAG,EAAApN,KAAAqN,EAAAJ,GAAAK,MAAAtN,KAAAuN,YAAA,yOAAAC,CAAAP,EACUQ,eAAe,CAACV,GAAuBH,IADjDK,EAAA,GASAJ,eAAea,OAAO,kBAAmBT","file":"chunk.9d371c8143226d4eaaee.js","sourcesContent":["import { HomeAssistant } from \"../types\";\n\nexport interface AuthProvider {\n name: string;\n id: string;\n type: string;\n}\n\nexport interface Credential {\n type: string;\n}\n\nexport interface SignedPath {\n path: string;\n}\n\nexport const hassUrl = `${location.protocol}//${location.host}`;\n\nexport const getSignedPath = (\n hass: HomeAssistant,\n path: string\n): Promise => hass.callWS({ type: \"auth/sign_path\", path });\n\nexport const fetchAuthProviders = () =>\n fetch(\"/auth/providers\", {\n credentials: \"same-origin\",\n });\n","import \"@material/mwc-button\";\nimport \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport \"@polymer/iron-icon/iron-icon\";\nimport \"@polymer/paper-dialog-scrollable/paper-dialog-scrollable\";\nimport \"@polymer/paper-icon-button/paper-icon-button\";\nimport \"@polymer/paper-input/paper-input\";\nimport { PaperDialogElement } from \"@polymer/paper-dialog\";\nimport { PaperCheckboxElement } from \"@polymer/paper-checkbox/paper-checkbox\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n LitElement,\n property,\n TemplateResult,\n query,\n} from \"lit-element\";\n\nimport {\n fetchHassioSnapshotInfo,\n HassioSnapshotDetail,\n} from \"../../../../src/data/hassio/snapshot\";\nimport { getSignedPath } from \"../../../../src/data/auth\";\nimport { HassioSnapshotDialogParams } from \"./show-dialog-hassio-snapshot\";\nimport { haStyleDialog } from \"../../../../src/resources/styles\";\nimport { HomeAssistant } from \"../../../../src/types\";\nimport { PolymerChangedEvent } from \"../../../../src/polymer-types\";\n\nimport \"../../../../src/components/dialog/ha-paper-dialog\";\n\nconst _computeFolders = (folders) => {\n const list: Array<{ slug: string; name: string; checked: boolean }> = [];\n if (folders.includes(\"homeassistant\")) {\n list.push({\n slug: \"homeassistant\",\n name: \"Home Assistant configuration\",\n checked: true,\n });\n }\n if (folders.includes(\"ssl\")) {\n list.push({ slug: \"ssl\", name: \"SSL\", checked: true });\n }\n if (folders.includes(\"share\")) {\n list.push({ slug: \"share\", name: \"Share\", checked: true });\n }\n if (folders.includes(\"addons/local\")) {\n list.push({ slug: \"addons/local\", name: \"Local add-ons\", checked: true });\n }\n return list;\n};\n\nconst _computeAddons = (addons) => {\n return addons.map((addon) => ({\n slug: addon.slug,\n name: addon.name,\n version: addon.version,\n checked: true,\n }));\n};\n\ninterface AddonItem {\n slug: string;\n name: string;\n version: string;\n checked: boolean | null | undefined;\n}\n\ninterface FolderItem {\n slug: string;\n name: string;\n checked: boolean | null | undefined;\n}\n\n@customElement(\"dialog-hassio-snapshot\")\nclass HassioSnapshotDialog extends LitElement {\n @property() public hass!: HomeAssistant;\n @property() private _error?: string;\n @property() private snapshot?: HassioSnapshotDetail;\n @property() private _folders!: FolderItem[];\n @property() private _addons!: AddonItem[];\n @property() private _dialogParams?: HassioSnapshotDialogParams;\n @property() private _snapshotPassword!: string;\n @property() private _restoreHass: boolean | null | undefined = true;\n @query(\"#dialog\") private _dialog!: PaperDialogElement;\n\n public async showDialog(params: HassioSnapshotDialogParams) {\n this.snapshot = await fetchHassioSnapshotInfo(this.hass, params.slug);\n this._folders = _computeFolders(\n this.snapshot.folders\n ).sort((a: FolderItem, b: FolderItem) => (a.name > b.name ? 1 : -1));\n this._addons = _computeAddons(\n this.snapshot.addons\n ).sort((a: AddonItem, b: AddonItem) => (a.name > b.name ? 1 : -1));\n\n this._dialogParams = params;\n\n try {\n this._dialog.open();\n } catch {\n await this.showDialog(params);\n }\n }\n\n protected render(): TemplateResult {\n if (!this.snapshot) {\n return html``;\n }\n return html`\n \n \n \n
\n \n `;\n }\n\n static get styles(): CSSResult[] {\n return [\n haStyleDialog,\n css`\n ha-paper-dialog {\n min-width: 350px;\n font-size: 14px;\n border-radius: 2px;\n }\n app-toolbar {\n margin: 0;\n padding: 0 16px;\n color: var(--primary-text-color);\n background-color: var(--secondary-background-color);\n }\n app-toolbar [main-title] {\n margin-left: 16px;\n }\n ha-paper-dialog-scrollable {\n margin: 0;\n }\n paper-checkbox {\n display: block;\n margin: 4px;\n }\n @media all and (max-width: 450px), all and (max-height: 500px) {\n ha-paper-dialog {\n max-height: 100%;\n height: 100%;\n }\n app-toolbar {\n color: var(--text-primary-color);\n background-color: var(--primary-color);\n }\n }\n .details {\n color: var(--secondary-text-color);\n }\n .warning,\n .error {\n color: var(--google-red-500);\n }\n .buttons {\n display: flex;\n flex-direction: column;\n }\n .buttons li {\n list-style-type: none;\n }\n .buttons .icon {\n margin-right: 16px;\n }\n .no-margin-top {\n margin-top: 0;\n }\n `,\n ];\n }\n\n private _updateFolders(item: FolderItem, value: boolean | null | undefined) {\n this._folders = this._folders.map((folder) => {\n if (folder.slug === item.slug) {\n folder.checked = value;\n }\n return folder;\n });\n }\n\n private _updateAddons(item: AddonItem, value: boolean | null | undefined) {\n this._addons = this._addons.map((addon) => {\n if (addon.slug === item.slug) {\n addon.checked = value;\n }\n return addon;\n });\n }\n\n private _passwordInput(ev: PolymerChangedEvent) {\n this._snapshotPassword = ev.detail.value;\n }\n\n private _partialRestoreClicked() {\n if (!confirm(\"Are you sure you want to restore this snapshot?\")) {\n return;\n }\n\n const addons = this._addons\n .filter((addon) => addon.checked)\n .map((addon) => addon.slug);\n\n const folders = this._folders\n .filter((folder) => folder.checked)\n .map((folder) => folder.slug);\n\n const data: {\n homeassistant: boolean | null | undefined;\n addons: any;\n folders: any;\n password?: string;\n } = {\n homeassistant: this._restoreHass,\n addons,\n folders,\n };\n\n if (this.snapshot!.protected) {\n data.password = this._snapshotPassword;\n }\n\n this.hass\n .callApi(\n \"POST\",\n\n `hassio/snapshots/${this.snapshot!.slug}/restore/partial`,\n data\n )\n .then(\n () => {\n alert(\"Snapshot restored!\");\n this._dialog.close();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private _fullRestoreClicked() {\n if (!confirm(\"Are you sure you want to restore this snapshot?\")) {\n return;\n }\n\n const data = this.snapshot!.protected\n ? { password: this._snapshotPassword }\n : undefined;\n\n this.hass\n .callApi(\n \"POST\",\n `hassio/snapshots/${this.snapshot!.slug}/restore/full`,\n data\n )\n .then(\n () => {\n alert(\"Snapshot restored!\");\n this._dialog.close();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private _deleteClicked() {\n if (!confirm(\"Are you sure you want to delete this snapshot?\")) {\n return;\n }\n\n this.hass\n\n .callApi(\"POST\", `hassio/snapshots/${this.snapshot!.slug}/remove`)\n .then(\n () => {\n this._dialog.close();\n this._dialogParams!.onDelete();\n },\n (error) => {\n this._error = error.body.message;\n }\n );\n }\n\n private async _downloadClicked() {\n let signedPath: { path: string };\n try {\n signedPath = await getSignedPath(\n this.hass,\n `/api/hassio/snapshots/${this.snapshot!.slug}/download`\n );\n } catch (err) {\n alert(`Error: ${err.message}`);\n return;\n }\n\n const name = this._computeName.replace(/[^a-z0-9]+/gi, \"_\");\n const a = document.createElement(\"a\");\n a.href = signedPath.path;\n a.download = `Hass_io_${name}.tar`;\n this._dialog.appendChild(a);\n a.click();\n this._dialog.removeChild(a);\n }\n\n private get _computeName() {\n return this.snapshot\n ? this.snapshot.name || this.snapshot.slug\n : \"Unnamed snapshot\";\n }\n\n private get _computeSize() {\n return Math.ceil(this.snapshot!.size * 10) / 10 + \" MB\";\n }\n\n private _formatDatetime(datetime) {\n return new Date(datetime).toLocaleDateString(navigator.language, {\n weekday: \"long\",\n year: \"numeric\",\n month: \"short\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n });\n }\n\n private _dialogClosed() {\n this._dialogParams = undefined;\n this.snapshot = undefined;\n this._snapshotPassword = \"\";\n this._folders = [];\n this._addons = [];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"dialog-hassio-snapshot\": HassioSnapshotDialog;\n }\n}\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {IronOverlayBehavior} from '@polymer/iron-overlay-behavior/iron-overlay-behavior.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n Use `Polymer.PaperDialogBehavior` and `paper-dialog-shared-styles.html` to\n implement a Material Design dialog.\n\n For example, if `` implements this behavior:\n\n \n
Header
\n
Dialog body
\n
\n Cancel\n Accept\n
\n \n\n `paper-dialog-shared-styles.html` provide styles for a header, content area,\n and an action area for buttons. Use the `
` tag for the header and the\n `buttons` class for the action area. You can use the `paper-dialog-scrollable`\n element (in its own repository) if you need a scrolling content area.\n\n Use the `dialog-dismiss` and `dialog-confirm` attributes on interactive\n controls to close the dialog. If the user dismisses the dialog with\n `dialog-confirm`, the `closingReason` will update to include `confirmed:\n true`.\n\n ### Accessibility\n\n This element has `role=\"dialog\"` by default. Depending on the context, it may\n be more appropriate to override this attribute with `role=\"alertdialog\"`.\n\n If `modal` is set, the element will prevent the focus from exiting the\n element. It will also ensure that focus remains in the dialog.\n\n @hero hero.svg\n @demo demo/index.html\n @polymerBehavior PaperDialogBehavior\n */\nexport const PaperDialogBehaviorImpl = {\n\n hostAttributes: {'role': 'dialog', 'tabindex': '-1'},\n\n properties: {\n\n /**\n * If `modal` is true, this implies `no-cancel-on-outside-click`,\n * `no-cancel-on-esc-key` and `with-backdrop`.\n */\n modal: {type: Boolean, value: false},\n\n __readied: {type: Boolean, value: false}\n\n },\n\n observers: ['_modalChanged(modal, __readied)'],\n\n listeners: {'tap': '_onDialogClick'},\n\n /**\n * @return {void}\n */\n ready: function() {\n // Only now these properties can be read.\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.__readied = true;\n },\n\n _modalChanged: function(modal, readied) {\n // modal implies noCancelOnOutsideClick, noCancelOnEscKey and withBackdrop.\n // We need to wait for the element to be ready before we can read the\n // properties values.\n if (!readied) {\n return;\n }\n\n if (modal) {\n this.__prevNoCancelOnOutsideClick = this.noCancelOnOutsideClick;\n this.__prevNoCancelOnEscKey = this.noCancelOnEscKey;\n this.__prevWithBackdrop = this.withBackdrop;\n this.noCancelOnOutsideClick = true;\n this.noCancelOnEscKey = true;\n this.withBackdrop = true;\n } else {\n // If the value was changed to false, let it false.\n this.noCancelOnOutsideClick =\n this.noCancelOnOutsideClick && this.__prevNoCancelOnOutsideClick;\n this.noCancelOnEscKey =\n this.noCancelOnEscKey && this.__prevNoCancelOnEscKey;\n this.withBackdrop = this.withBackdrop && this.__prevWithBackdrop;\n }\n },\n\n _updateClosingReasonConfirmed: function(confirmed) {\n this.closingReason = this.closingReason || {};\n this.closingReason.confirmed = confirmed;\n },\n\n /**\n * Will dismiss the dialog if user clicked on an element with dialog-dismiss\n * or dialog-confirm attribute.\n */\n _onDialogClick: function(event) {\n // Search for the element with dialog-confirm or dialog-dismiss,\n // from the root target until this (excluded).\n var path = dom(event).path;\n for (var i = 0, l = path.indexOf(this); i < l; i++) {\n var target = path[i];\n if (target.hasAttribute &&\n (target.hasAttribute('dialog-dismiss') ||\n target.hasAttribute('dialog-confirm'))) {\n this._updateClosingReasonConfirmed(\n target.hasAttribute('dialog-confirm'));\n this.close();\n event.stopPropagation();\n break;\n }\n }\n }\n\n};\n\n/** @polymerBehavior */\nexport const PaperDialogBehavior =\n [IronOverlayBehavior, PaperDialogBehaviorImpl];\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperDialogBehaviorImpl} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`paper-dialog-scrollable` implements a scrolling area used in a Material Design\ndialog. It shows a divider at the top and/or bottom indicating more content,\ndepending on scroll position. Use this together with elements implementing\n`Polymer.PaperDialogBehavior`.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n OK\n
\n \n\nIt shows a top divider after scrolling if it is not the first child in its\nparent container, indicating there is more content above. It shows a bottom\ndivider if it is scrollable and it is not the last child in its parent\ncontainer, indicating there is more content below. The bottom divider is hidden\nif it is scrolled to the bottom.\n\nIf `paper-dialog-scrollable` is not a direct child of the element implementing\n`Polymer.PaperDialogBehavior`, remember to set the `dialogElement`:\n\n \n
Header
\n
\n
Sub-header
\n \n Lorem ipsum...\n \n
\n
\n OK\n
\n \n\n \n\n### Styling\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-scrollable` | Mixin for the scrollable content | {}\n\n@group Paper Elements\n@element paper-dialog-scrollable\n@demo demo/index.html\n@hero hero.svg\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
\n`,\n\n is: 'paper-dialog-scrollable',\n\n properties: {\n\n /**\n * The dialog element that implements `Polymer.PaperDialogBehavior`\n * containing this element.\n * @type {?Node}\n */\n dialogElement: {type: Object}\n\n },\n\n /**\n * Returns the scrolling element.\n */\n get scrollTarget() {\n return this.$.scrollable;\n },\n\n ready: function() {\n this._ensureTarget();\n this.classList.add('no-padding');\n },\n\n attached: function() {\n this._ensureTarget();\n requestAnimationFrame(this.updateScrollState.bind(this));\n },\n\n updateScrollState: function() {\n this.toggleClass('is-scrolled', this.scrollTarget.scrollTop > 0);\n this.toggleClass(\n 'can-scroll',\n this.scrollTarget.offsetHeight < this.scrollTarget.scrollHeight);\n this.toggleClass(\n 'scrolled-to-bottom',\n this.scrollTarget.scrollTop + this.scrollTarget.offsetHeight >=\n this.scrollTarget.scrollHeight);\n },\n\n _ensureTarget: function() {\n // Read parentElement instead of parentNode in order to skip shadowRoots.\n this.dialogElement = this.dialogElement || this.parentElement;\n // Check if dialog implements paper-dialog-behavior. If not, fit\n // scrollTarget to host.\n if (this.dialogElement && this.dialogElement.behaviors &&\n this.dialogElement.behaviors.indexOf(PaperDialogBehaviorImpl) >= 0) {\n this.dialogElement.sizingTarget = this.scrollTarget;\n this.scrollTarget.classList.remove('fit');\n } else if (this.dialogElement) {\n this.scrollTarget.classList.add('fit');\n }\n }\n});\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n### Styling\n\nThe following custom properties and mixins are available for styling.\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-dialog-background-color` | Dialog background color | `--primary-background-color`\n`--paper-dialog-color` | Dialog foreground color | `--primary-text-color`\n`--paper-dialog` | Mixin applied to the dialog | `{}`\n`--paper-dialog-title` | Mixin applied to the title (`
`) element | `{}`\n`--paper-dialog-button-color` | Button area foreground color | `--default-primary-color`\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\nimport '@polymer/paper-styles/shadow.js';\nconst $_documentContainer = document.createElement('template');\n$_documentContainer.setAttribute('style', 'display: none;');\n\n$_documentContainer.innerHTML = `\n \n \n \n`;\n\ndocument.head.appendChild($_documentContainer.content);\n","/**\n@license\nCopyright (c) 2015 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/paper-dialog-behavior/paper-dialog-shared-styles.js';\n\nimport {NeonAnimationRunnerBehavior} from '@polymer/neon-animation/neon-animation-runner-behavior.js';\nimport {PaperDialogBehavior} from '@polymer/paper-dialog-behavior/paper-dialog-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\nMaterial design:\n[Dialogs](https://www.google.com/design/spec/components/dialogs.html)\n\n`` is a dialog with Material Design styling and optional\nanimations when it is opened or closed. It provides styles for a header, content\narea, and an action area for buttons. You can use the\n`` element (in its own repository) if you need a\nscrolling content area. To autofocus a specific child element after opening the\ndialog, give it the `autofocus` attribute. See `Polymer.PaperDialogBehavior` and\n`Polymer.IronOverlayBehavior` for specifics.\n\nFor example, the following code implements a dialog with a header, scrolling\ncontent area and buttons. Focus will be given to the `dialog-confirm` button\nwhen the dialog is opened.\n\n \n
Header
\n \n Lorem ipsum...\n \n
\n Cancel\n Accept\n
\n \n\n### Styling\n\nSee the docs for `Polymer.PaperDialogBehavior` for the custom properties\navailable for styling this element.\n\n### Animations\n\nSet the `entry-animation` and/or `exit-animation` attributes to add an animation\nwhen the dialog is opened or closed. See the documentation in\n[PolymerElements/neon-animation](https://github.com/PolymerElements/neon-animation)\nfor more info.\n\nFor example:\n\n \n\n \n
Header
\n
Dialog body
\n \n\n### Accessibility\n\nSee the docs for `Polymer.PaperDialogBehavior` for accessibility features\nimplemented by this element.\n\n@group Paper Elements\n@element paper-dialog\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'paper-dialog',\n behaviors: [PaperDialogBehavior, NeonAnimationRunnerBehavior],\n listeners: {'neon-animation-finish': '_onNeonAnimationFinish'},\n\n _renderOpened: function() {\n this.cancelAnimation();\n this.playAnimation('entry');\n },\n\n _renderClosed: function() {\n this.cancelAnimation();\n this.playAnimation('exit');\n },\n\n _onNeonAnimationFinish: function() {\n if (this.opened) {\n this._finishRenderOpened();\n } else {\n this._finishRenderClosed();\n }\n }\n});\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at\nhttp://polymer.github.io/LICENSE.txt The complete set of authors may be found at\nhttp://polymer.github.io/AUTHORS.txt The complete set of contributors may be\nfound at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as\npart of the polymer project is also subject to an additional IP rights grant\nfound at http://polymer.github.io/PATENTS.txt\n*/\n/*\n Fixes issue with not using shadow dom properly in iron-overlay-behavior/icon-focusables-helper.js\n*/\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom.js\";\n\nimport { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper.js\";\n\nexport const HaIronFocusablesHelper = {\n /**\n * Returns a sorted array of tabbable nodes, including the root node.\n * It searches the tabbable nodes in the light and shadow dom of the chidren,\n * sorting the result by tabindex.\n * @param {!Node} node\n * @return {!Array}\n */\n getTabbableNodes: function(node) {\n var result = [];\n // If there is at least one element with tabindex > 0, we need to sort\n // the final array by tabindex.\n var needsSortByTabIndex = this._collectTabbableNodes(node, result);\n if (needsSortByTabIndex) {\n return IronFocusablesHelper._sortByTabIndex(result);\n }\n return result;\n },\n\n /**\n * Searches for nodes that are tabbable and adds them to the `result` array.\n * Returns if the `result` array needs to be sorted by tabindex.\n * @param {!Node} node The starting point for the search; added to `result`\n * if tabbable.\n * @param {!Array} result\n * @return {boolean}\n * @private\n */\n _collectTabbableNodes: function(node, result) {\n // If not an element or not visible, no need to explore children.\n if (\n node.nodeType !== Node.ELEMENT_NODE ||\n !IronFocusablesHelper._isVisible(node)\n ) {\n return false;\n }\n var element = /** @type {!HTMLElement} */ (node);\n var tabIndex = IronFocusablesHelper._normalizedTabIndex(element);\n var needsSort = tabIndex > 0;\n if (tabIndex >= 0) {\n result.push(element);\n }\n\n // In ShadowDOM v1, tab order is affected by the order of distrubution.\n // E.g. getTabbableNodes(#root) in ShadowDOM v1 should return [#A, #B];\n // in ShadowDOM v0 tab order is not affected by the distrubution order,\n // in fact getTabbableNodes(#root) returns [#B, #A].\n //
\n // \n // \n // \n // \n // \n // \n //
\n // TODO(valdrin) support ShadowDOM v1 when upgrading to Polymer v2.0.\n var children;\n if (element.localName === \"content\" || element.localName === \"slot\") {\n children = dom(element).getDistributedNodes();\n } else {\n // /////////////////////////\n // Use shadow root if possible, will check for distributed nodes.\n // THIS IS THE CHANGED LINE\n children = dom(element.shadowRoot || element.root || element).children;\n // /////////////////////////\n }\n for (var i = 0; i < children.length; i++) {\n // Ensure method is always invoked to collect tabbable children.\n needsSort = this._collectTabbableNodes(children[i], result) || needsSort;\n }\n return needsSort;\n },\n};\n","import \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper.js\";\n// tslint:disable-next-line\nimport { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\");\n\n// behavior that will override existing iron-overlay-behavior and call the fixed implementation\nconst haTabFixBehaviorImpl = {\n get _focusableNodes() {\n return HaIronFocusablesHelper.getTabbableNodes(this);\n },\n};\n\n// paper-dialog that uses the haTabFixBehaviorImpl behvaior\n// export class HaPaperDialog extends paperDialogClass {}\n// @ts-ignore\nexport class HaPaperDialog\n extends mixinBehaviors([haTabFixBehaviorImpl], paperDialogClass)\n implements PaperDialogElement {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-dialog\": HaPaperDialog;\n }\n}\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/hassio/api/panel/chunk.c1c599e0ec49ba4de253.js b/hassio/api/panel/chunk.c1c599e0ec49ba4de253.js
new file mode 100644
index 000000000..018cc459e
--- /dev/null
+++ b/hassio/api/panel/chunk.c1c599e0ec49ba4de253.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[10],{10:function(e,t,r){"use strict";r.d(t,"a",function(){return s}),r.d(t,"b",function(){return c}),r.d(t,"c",function(){return l});var n=r(5);function i(){var e=a(["\n /* prevent clipping of positioned elements */\n paper-dialog-scrollable {\n --paper-dialog-scrollable: {\n -webkit-overflow-scrolling: auto;\n }\n }\n\n /* force smooth scrolling for iOS 10 */\n paper-dialog-scrollable.can-scroll {\n --paper-dialog-scrollable: {\n -webkit-overflow-scrolling: touch;\n }\n }\n\n .paper-dialog-buttons {\n align-items: flex-end;\n padding: 8px;\n }\n\n .paper-dialog-buttons .warning {\n --mdc-theme-primary: var(--google-red-500);\n }\n\n @media all and (max-width: 450px), all and (max-height: 500px) {\n paper-dialog,\n ha-paper-dialog {\n margin: 0;\n width: 100% !important;\n max-height: calc(100% - 64px);\n\n position: fixed !important;\n bottom: 0px;\n left: 0px;\n right: 0px;\n overflow: scroll;\n border-bottom-left-radius: 0px;\n border-bottom-right-radius: 0px;\n }\n }\n"]);return i=function(){return e},e}function o(){var e=a(["\n :host {\n @apply --paper-font-body1;\n }\n\n app-header-layout,\n ha-app-layout {\n background-color: var(--primary-background-color);\n }\n\n app-header,\n app-toolbar {\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n }\n\n app-toolbar ha-menu-button + [main-title],\n app-toolbar ha-paper-icon-button-arrow-prev + [main-title],\n app-toolbar paper-icon-button + [main-title] {\n margin-left: 24px;\n }\n\n h1 {\n @apply --paper-font-title;\n }\n\n button.link {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n text-align: left;\n text-decoration: underline;\n cursor: pointer;\n }\n\n .card-actions a {\n text-decoration: none;\n }\n\n .card-actions .warning {\n --mdc-theme-primary: var(--google-red-500);\n }\n"]);return o=function(){return e},e}function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s={"paper-spinner-color":"var(--primary-color)","error-state-color":"var(--error-color)","state-icon-unavailable-color":"var(--disabled-text-color)","sidebar-text-color":"var(--primary-text-color)","sidebar-background-color":"var(--paper-listbox-background-color);","sidebar-selected-text-color":"var(--primary-color)","sidebar-selected-icon-color":"var(--primary-color)","switch-checked-color":"var(--primary-color)","switch-checked-button-color":"var(--switch-checked-color, var(--paper-grey-50))","switch-checked-track-color":"var(--switch-checked-color, #000000)","switch-unchecked-button-color":"var(--switch-unchecked-color, var(--paper-grey-50))","switch-unchecked-track-color":"var(--switch-unchecked-color, #000000)","slider-color":"var(--primary-color)","slider-secondary-color":"var(--light-primary-color)","slider-bar-color":"var(--disabled-text-color)","label-badge-grey":"var(--paper-grey-500)","paper-card-background-color":"var(--card-background-color)","paper-listbox-background-color":"var(--card-background-color)","paper-item-icon-color":"var(--state-icon-color)","paper-item-icon-active-color":"var(--state-icon-active-color)","table-row-background-color":"var(--primary-background-color)","table-row-alternative-background-color":"var(--secondary-background-color)","paper-slider-knob-color":"var(--slider-color)","paper-slider-knob-start-color":"var(--slider-color)","paper-slider-pin-color":"var(--slider-color)","paper-slider-active-color":"var(--slider-color)","paper-slider-secondary-color":"var(--slider-secondary-color)","paper-slider-container-color":"var(--slider-bar-color)","data-table-background-color":"var(--card-background-color)","mdc-theme-primary":"var(--primary-color)","mdc-theme-secondary":"var(--accent-color)","mdc-theme-background":"var(--primary-background-color)","mdc-theme-surface":"var(--paper-card-background-color, var(--card-background-color))","mdc-theme-on-primary":"var(--text-primary-color)","mdc-theme-on-secondary":"var(--text-primary-color)","mdc-theme-on-surface":"var(--primary-text-color)","app-header-text-color":"var(--text-primary-color)","app-header-background-color":"var(--primary-color)"},c=Object(n.c)(o()),l=Object(n.c)(i())},101:function(e,t){},104:function(e,t,r){"use strict";var n=r(5),i=(r(91),r(105),r(47));function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(){var e=c(['\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n font-size: 20px;\n height: 65px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n }\n\n ha-menu-button,\n ha-paper-icon-button-arrow-prev,\n ::slotted([slot="toolbar-icon"]) {\n pointer-events: auto;\n }\n\n ha-paper-icon-button-arrow-prev.hidden {\n visibility: hidden;\n }\n\n [main-title] {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n .content {\n position: relative;\n width: 100%;\n height: calc(100% - 65px);\n overflow-y: auto;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n ']);return a=function(){return e},e}function s(){var e=c(['\n
\n \n \n
\n
\n ']);return s=function(){return e},e}function c(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function f(e){var t,r=v(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:r,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function p(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function h(e){return e.decorators&&e.decorators.length}function m(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function y(e,t){var r=e[t];if(void 0!==r&&"function"!=typeof r)throw new TypeError("Expected '"+t+"' to be a function");return r}function v(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===o(t)?t:String(t)}!function(e,t,r,n){var i=function(){var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(r){t.forEach(function(t){t.kind===r&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var r=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var i=t.placement;if(t.kind===n&&("static"===i||"prototype"===i)){var o="static"===i?e:r;this.defineClassElement(o,t)}},this)},this)},defineClassElement:function(e,t){var r=t.descriptor;if("field"===t.kind){var n=t.initializer;r={enumerable:r.enumerable,writable:r.writable,configurable:r.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,r)},decorateClass:function(e,t){var r=[],n=[],i={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,i)},this),e.forEach(function(e){if(!h(e))return r.push(e);var t=this.decorateElement(e,i);r.push(t.element),r.push.apply(r,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:r,finishers:n};var o=this.decorateConstructor(r,t);return n.push.apply(n,o.finishers),o.finishers=n,o},addElementPlacement:function(e,t,r){var n=t[e.placement];if(!r&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var r=[],n=[],i=e.decorators,o=i.length-1;o>=0;o--){var a=t[e.placement];a.splice(a.indexOf(e.key),1);var s=this.fromElementDescriptor(e),c=this.toElementFinisherExtras((0,i[o])(s)||s);e=c.element,this.addElementPlacement(e,t),c.finisher&&n.push(c.finisher);var l=c.extras;if(l){for(var u=0;u=0;n--){var i=this.fromClassDescriptor(e),o=this.toClassDescriptor((0,t[n])(i)||i);if(void 0!==o.finisher&&r.push(o.finisher),void 0!==o.elements){e=o.elements;for(var a=0;a\n "]);return s=function(){return e},e}function c(){var e=u(["\n \n "]);return c=function(){return e},e}function l(){var e=u(["\n \n ",'\n \n
\n `;\n }\n\n private _backTapped(): void {\n history.back();\n }\n\n static get styles(): CSSResult {\n return css`\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n\n .toolbar {\n display: flex;\n align-items: center;\n font-size: 20px;\n height: 65px;\n padding: 0 16px;\n pointer-events: none;\n background-color: var(--app-header-background-color);\n font-weight: 400;\n color: var(--app-header-text-color, white);\n border-bottom: var(--app-header-border-bottom, none);\n box-sizing: border-box;\n }\n\n ha-menu-button,\n ha-paper-icon-button-arrow-prev,\n ::slotted([slot=\"toolbar-icon\"]) {\n pointer-events: auto;\n }\n\n ha-paper-icon-button-arrow-prev.hidden {\n visibility: hidden;\n }\n\n [main-title] {\n margin: 0 0 0 24px;\n line-height: 20px;\n flex-grow: 1;\n }\n\n .content {\n position: relative;\n width: 100%;\n height: calc(100% - 65px);\n overflow-y: auto;\n overflow: auto;\n -webkit-overflow-scrolling: touch;\n }\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"hass-subpage\": HassSubpage;\n }\n}\n","import \"@polymer/paper-icon-button/paper-icon-button\";\nimport { Constructor } from \"../types\";\n// Not duplicate, this is for typing.\n// tslint:disable-next-line\nimport { PaperIconButtonElement } from \"@polymer/paper-icon-button/paper-icon-button\";\n\nconst paperIconButtonClass = customElements.get(\n \"paper-icon-button\"\n) as Constructor;\n\nexport class HaPaperIconButtonArrowPrev extends paperIconButtonClass {\n public hassio?: boolean;\n\n public connectedCallback() {\n super.connectedCallback();\n\n // wait to check for direction since otherwise direction is wrong even though top level is RTL\n setTimeout(() => {\n this.icon =\n window.getComputedStyle(this).direction === \"ltr\"\n ? this.hassio\n ? \"hassio:arrow-left\"\n : \"hass:arrow-left\"\n : this.hassio\n ? \"hassio:arrow-right\"\n : \"hass:arrow-right\";\n }, 100);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"ha-paper-icon-button-arrow-prev\": HaPaperIconButtonArrowPrev;\n }\n}\n\ncustomElements.define(\n \"ha-paper-icon-button-arrow-prev\",\n HaPaperIconButtonArrowPrev\n);\n","import \"@polymer/app-layout/app-toolbar/app-toolbar\";\nimport \"@polymer/paper-spinner/paper-spinner-lite\";\nimport {\n LitElement,\n TemplateResult,\n html,\n CSSResultArray,\n css,\n customElement,\n property,\n} from \"lit-element\";\nimport \"../components/ha-menu-button\";\nimport \"../components/ha-paper-icon-button-arrow-prev\";\nimport { haStyle } from \"../resources/styles\";\nimport { HomeAssistant } from \"../types\";\n\n@customElement(\"hass-loading-screen\")\nclass HassLoadingScreen extends LitElement {\n @property({ type: Boolean }) public rootnav? = false;\n @property() public hass?: HomeAssistant;\n @property() public narrow?: boolean;\n\n protected render(): TemplateResult {\n return html`\n \n ${this.rootnav\n ? html`\n \n `\n : html`\n \n `}\n \n
\n \n
\n `;\n }\n\n private _handleBack() {\n history.back();\n }\n\n static get styles(): CSSResultArray {\n return [\n haStyle,\n css`\n :host {\n display: block;\n height: 100%;\n background-color: var(--primary-background-color);\n }\n .content {\n height: calc(100% - 64px);\n display: flex;\n align-items: center;\n justify-content: center;\n }\n `,\n ];\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"hass-loading-screen\": HassLoadingScreen;\n }\n}\n","// Polymer legacy event helpers used courtesy of the Polymer project.\n//\n// Copyright (c) 2017 The Polymer Authors. All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\ndeclare global {\n // tslint:disable-next-line\n interface HASSDomEvents {}\n}\n\nexport type ValidHassDomEvent = keyof HASSDomEvents;\n\nexport interface HASSDomEvent extends Event {\n detail: T;\n}\n\n/**\n * Dispatches a custom event with an optional detail value.\n *\n * @param {string} type Name of event type.\n * @param {*=} detail Detail value containing event-specific\n * payload.\n * @param {{ bubbles: (boolean|undefined),\n * cancelable: (boolean|undefined),\n * composed: (boolean|undefined) }=}\n * options Object specifying options. These may include:\n * `bubbles` (boolean, defaults to `true`),\n * `cancelable` (boolean, defaults to false), and\n * `node` on which to fire the event (HTMLElement, defaults to `this`).\n * @return {Event} The new event that was fired.\n */\nexport const fireEvent = (\n node: HTMLElement | Window,\n type: HassEvent,\n detail?: HASSDomEvents[HassEvent],\n options?: {\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: boolean;\n }\n) => {\n options = options || {};\n // @ts-ignore\n detail = detail === null || detail === undefined ? {} : detail;\n const event = new Event(type, {\n bubbles: options.bubbles === undefined ? true : options.bubbles,\n cancelable: Boolean(options.cancelable),\n composed: options.composed === undefined ? true : options.composed,\n });\n (event as any).detail = detail;\n node.dispatchEvent(event);\n return event;\n};\n","import \"@material/mwc-button\";\nimport \"@polymer/paper-spinner/paper-spinner\";\nimport { html } from \"@polymer/polymer/lib/utils/html-tag\";\nimport { PolymerElement } from \"@polymer/polymer/polymer-element\";\n\nclass HaProgressButton extends PolymerElement {\n static get template() {\n return html`\n \n
\n Configure which add-on repositories to fetch data from:\n
\n
\n ${// Use repeat so that the fade-out from call-service-api-button\n // stays with the correct repo after we add/delete one.\n repeat(\n repos,\n (repo) => repo.slug,\n (repo) => html`\n \n