\\n';\n};\n\nRenderer.prototype.tablecell = function(content, flags) {\n var type = flags.header ? 'th' : 'td';\n var tag = flags.align\n ? '<' + type + ' align=\"' + flags.align + '\">'\n : '<' + type + '>';\n return tag + content + '' + type + '>\\n';\n};\n\n// span level renderer\nRenderer.prototype.strong = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.em = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.codespan = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.br = function() {\n return this.options.xhtml ? ' ' : ' ';\n};\n\nRenderer.prototype.del = function(text) {\n return '' + text + '';\n};\n\nRenderer.prototype.link = function(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n var out = '' + text + '';\n return out;\n};\n\nRenderer.prototype.image = function(href, title, text) {\n href = cleanUrl(this.options.sanitize, this.options.baseUrl, href);\n if (href === null) {\n return text;\n }\n\n var out = '' : '>';\n return out;\n};\n\nRenderer.prototype.text = function(text) {\n return text;\n};\n\n/**\n * TextRenderer\n * returns only the textual part of the token\n */\n\nfunction TextRenderer() {}\n\n// no need for block level renderers\n\nTextRenderer.prototype.strong =\nTextRenderer.prototype.em =\nTextRenderer.prototype.codespan =\nTextRenderer.prototype.del =\nTextRenderer.prototype.text = function (text) {\n return text;\n};\n\nTextRenderer.prototype.link =\nTextRenderer.prototype.image = function(href, title, text) {\n return '' + text;\n};\n\nTextRenderer.prototype.br = function() {\n return '';\n};\n\n/**\n * Parsing & Compiling\n */\n\nfunction Parser(options) {\n this.tokens = [];\n this.token = null;\n this.options = options || marked.defaults;\n this.options.renderer = this.options.renderer || new Renderer();\n this.renderer = this.options.renderer;\n this.renderer.options = this.options;\n this.slugger = new Slugger();\n}\n\n/**\n * Static Parse Method\n */\n\nParser.parse = function(src, options) {\n var parser = new Parser(options);\n return parser.parse(src);\n};\n\n/**\n * Parse Loop\n */\n\nParser.prototype.parse = function(src) {\n this.inline = new InlineLexer(src.links, this.options);\n // use an InlineLexer with a TextRenderer to extract pure text\n this.inlineText = new InlineLexer(\n src.links,\n merge({}, this.options, {renderer: new TextRenderer()})\n );\n this.tokens = src.reverse();\n\n var out = '';\n while (this.next()) {\n out += this.tok();\n }\n\n return out;\n};\n\n/**\n * Next Token\n */\n\nParser.prototype.next = function() {\n return this.token = this.tokens.pop();\n};\n\n/**\n * Preview Next Token\n */\n\nParser.prototype.peek = function() {\n return this.tokens[this.tokens.length - 1] || 0;\n};\n\n/**\n * Parse Text Tokens\n */\n\nParser.prototype.parseText = function() {\n var body = this.token.text;\n\n while (this.peek().type === 'text') {\n body += '\\n' + this.next().text;\n }\n\n return this.inline.output(body);\n};\n\n/**\n * Parse Current Token\n */\n\nParser.prototype.tok = function() {\n switch (this.token.type) {\n case 'space': {\n return '';\n }\n case 'hr': {\n return this.renderer.hr();\n }\n case 'heading': {\n return this.renderer.heading(\n this.inline.output(this.token.text),\n this.token.depth,\n unescape(this.inlineText.output(this.token.text)),\n this.slugger);\n }\n case 'code': {\n return this.renderer.code(this.token.text,\n this.token.lang,\n this.token.escaped);\n }\n case 'table': {\n var header = '',\n body = '',\n i,\n row,\n cell,\n j;\n\n // header\n cell = '';\n for (i = 0; i < this.token.header.length; i++) {\n cell += this.renderer.tablecell(\n this.inline.output(this.token.header[i]),\n { header: true, align: this.token.align[i] }\n );\n }\n header += this.renderer.tablerow(cell);\n\n for (i = 0; i < this.token.cells.length; i++) {\n row = this.token.cells[i];\n\n cell = '';\n for (j = 0; j < row.length; j++) {\n cell += this.renderer.tablecell(\n this.inline.output(row[j]),\n { header: false, align: this.token.align[j] }\n );\n }\n\n body += this.renderer.tablerow(cell);\n }\n return this.renderer.table(header, body);\n }\n case 'blockquote_start': {\n body = '';\n\n while (this.next().type !== 'blockquote_end') {\n body += this.tok();\n }\n\n return this.renderer.blockquote(body);\n }\n case 'list_start': {\n body = '';\n var ordered = this.token.ordered,\n start = this.token.start;\n\n while (this.next().type !== 'list_end') {\n body += this.tok();\n }\n\n return this.renderer.list(body, ordered, start);\n }\n case 'list_item_start': {\n body = '';\n var loose = this.token.loose;\n var checked = this.token.checked;\n var task = this.token.task;\n\n if (this.token.task) {\n body += this.renderer.checkbox(checked);\n }\n\n while (this.next().type !== 'list_item_end') {\n body += !loose && this.token.type === 'text'\n ? this.parseText()\n : this.tok();\n }\n return this.renderer.listitem(body, task, checked);\n }\n case 'html': {\n // TODO parse inline content if parameter markdown=1\n return this.renderer.html(this.token.text);\n }\n case 'paragraph': {\n return this.renderer.paragraph(this.inline.output(this.token.text));\n }\n case 'text': {\n return this.renderer.paragraph(this.parseText());\n }\n default: {\n var errMsg = 'Token with \"' + this.token.type + '\" type was not found.';\n if (this.options.silent) {\n console.log(errMsg);\n } else {\n throw new Error(errMsg);\n }\n }\n }\n};\n\n/**\n * Slugger generates header id\n */\n\nfunction Slugger () {\n this.seen = {};\n}\n\n/**\n * Convert string to unique id\n */\n\nSlugger.prototype.slug = function (value) {\n var slug = value\n .toLowerCase()\n .trim()\n .replace(/[\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,./:;<=>?@[\\]^`{|}~]/g, '')\n .replace(/\\s/g, '-');\n\n if (this.seen.hasOwnProperty(slug)) {\n var originalSlug = slug;\n do {\n this.seen[originalSlug]++;\n slug = originalSlug + '-' + this.seen[originalSlug];\n } while (this.seen.hasOwnProperty(slug));\n }\n this.seen[slug] = 0;\n\n return slug;\n};\n\n/**\n * Helpers\n */\n\nfunction escape(html, encode) {\n if (encode) {\n if (escape.escapeTest.test(html)) {\n return html.replace(escape.escapeReplace, function (ch) { return escape.replacements[ch]; });\n }\n } else {\n if (escape.escapeTestNoEncode.test(html)) {\n return html.replace(escape.escapeReplaceNoEncode, function (ch) { return escape.replacements[ch]; });\n }\n }\n\n return html;\n}\n\nescape.escapeTest = /[&<>\"']/;\nescape.escapeReplace = /[&<>\"']/g;\nescape.replacements = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n};\n\nescape.escapeTestNoEncode = /[<>\"']|&(?!#?\\w+;)/;\nescape.escapeReplaceNoEncode = /[<>\"']|&(?!#?\\w+;)/g;\n\nfunction unescape(html) {\n // explicitly match decimal, hex, and named HTML entities\n return html.replace(/&(#(?:\\d+)|(?:#x[0-9A-Fa-f]+)|(?:\\w+));?/ig, function(_, n) {\n n = n.toLowerCase();\n if (n === 'colon') return ':';\n if (n.charAt(0) === '#') {\n return n.charAt(1) === 'x'\n ? String.fromCharCode(parseInt(n.substring(2), 16))\n : String.fromCharCode(+n.substring(1));\n }\n return '';\n });\n}\n\nfunction edit(regex, opt) {\n regex = regex.source || regex;\n opt = opt || '';\n return {\n replace: function(name, val) {\n val = val.source || val;\n val = val.replace(/(^|[^\\[])\\^/g, '$1');\n regex = regex.replace(name, val);\n return this;\n },\n getRegex: function() {\n return new RegExp(regex, opt);\n }\n };\n}\n\nfunction cleanUrl(sanitize, base, href) {\n if (sanitize) {\n try {\n var prot = decodeURIComponent(unescape(href))\n .replace(/[^\\w:]/g, '')\n .toLowerCase();\n } catch (e) {\n return null;\n }\n if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0 || prot.indexOf('data:') === 0) {\n return null;\n }\n }\n if (base && !originIndependentUrl.test(href)) {\n href = resolveUrl(base, href);\n }\n try {\n href = encodeURI(href).replace(/%25/g, '%');\n } catch (e) {\n return null;\n }\n return href;\n}\n\nfunction resolveUrl(base, href) {\n if (!baseUrls[' ' + base]) {\n // we can ignore everything in base after the last slash of its path component,\n // but we might need to add _that_\n // https://tools.ietf.org/html/rfc3986#section-3\n if (/^[^:]+:\\/*[^/]*$/.test(base)) {\n baseUrls[' ' + base] = base + '/';\n } else {\n baseUrls[' ' + base] = rtrim(base, '/', true);\n }\n }\n base = baseUrls[' ' + base];\n\n if (href.slice(0, 2) === '//') {\n return base.replace(/:[\\s\\S]*/, ':') + href;\n } else if (href.charAt(0) === '/') {\n return base.replace(/(:\\/*[^/]*)[\\s\\S]*/, '$1') + href;\n } else {\n return base + href;\n }\n}\nvar baseUrls = {};\nvar originIndependentUrl = /^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;\n\nfunction noop() {}\nnoop.exec = noop;\n\nfunction merge(obj) {\n var i = 1,\n target,\n key;\n\n for (; i < arguments.length; i++) {\n target = arguments[i];\n for (key in target) {\n if (Object.prototype.hasOwnProperty.call(target, key)) {\n obj[key] = target[key];\n }\n }\n }\n\n return obj;\n}\n\nfunction splitCells(tableRow, count) {\n // ensure that every cell-delimiting pipe has a space\n // before it to distinguish it from an escaped pipe\n var row = tableRow.replace(/\\|/g, function (match, offset, str) {\n var escaped = false,\n curr = offset;\n while (--curr >= 0 && str[curr] === '\\\\') escaped = !escaped;\n if (escaped) {\n // odd number of slashes means | is escaped\n // so we leave it alone\n return '|';\n } else {\n // add space before unescaped |\n return ' |';\n }\n }),\n cells = row.split(/ \\|/),\n i = 0;\n\n if (cells.length > count) {\n cells.splice(count);\n } else {\n while (cells.length < count) cells.push('');\n }\n\n for (; i < cells.length; i++) {\n // leading or trailing whitespace is ignored per the gfm spec\n cells[i] = cells[i].trim().replace(/\\\\\\|/g, '|');\n }\n return cells;\n}\n\n// Remove trailing 'c's. Equivalent to str.replace(/c*$/, '').\n// /c*$/ is vulnerable to REDOS.\n// invert: Remove suffix of non-c chars instead. Default falsey.\nfunction rtrim(str, c, invert) {\n if (str.length === 0) {\n return '';\n }\n\n // Length of suffix matching the invert condition.\n var suffLen = 0;\n\n // Step left until we fail to match the invert condition.\n while (suffLen < str.length) {\n var currChar = str.charAt(str.length - suffLen - 1);\n if (currChar === c && !invert) {\n suffLen++;\n } else if (currChar !== c && invert) {\n suffLen++;\n } else {\n break;\n }\n }\n\n return str.substr(0, str.length - suffLen);\n}\n\nfunction findClosingBracket(str, b) {\n if (str.indexOf(b[1]) === -1) {\n return -1;\n }\n var level = 0;\n for (var i = 0; i < str.length; i++) {\n if (str[i] === '\\\\') {\n i++;\n } else if (str[i] === b[0]) {\n level++;\n } else if (str[i] === b[1]) {\n level--;\n if (level < 0) {\n return i;\n }\n }\n }\n return -1;\n}\n\n/**\n * Marked\n */\n\nfunction marked(src, opt, callback) {\n // throw error in case of non string input\n if (typeof src === 'undefined' || src === null) {\n throw new Error('marked(): input parameter is undefined or null');\n }\n if (typeof src !== 'string') {\n throw new Error('marked(): input parameter is of type '\n + Object.prototype.toString.call(src) + ', string expected');\n }\n\n if (callback || typeof opt === 'function') {\n if (!callback) {\n callback = opt;\n opt = null;\n }\n\n opt = merge({}, marked.defaults, opt || {});\n\n var highlight = opt.highlight,\n tokens,\n pending,\n i = 0;\n\n try {\n tokens = Lexer.lex(src, opt);\n } catch (e) {\n return callback(e);\n }\n\n pending = tokens.length;\n\n var done = function(err) {\n if (err) {\n opt.highlight = highlight;\n return callback(err);\n }\n\n var out;\n\n try {\n out = Parser.parse(tokens, opt);\n } catch (e) {\n err = e;\n }\n\n opt.highlight = highlight;\n\n return err\n ? callback(err)\n : callback(null, out);\n };\n\n if (!highlight || highlight.length < 3) {\n return done();\n }\n\n delete opt.highlight;\n\n if (!pending) return done();\n\n for (; i < tokens.length; i++) {\n (function(token) {\n if (token.type !== 'code') {\n return --pending || done();\n }\n return highlight(token.text, token.lang, function(err, code) {\n if (err) return done(err);\n if (code == null || code === token.text) {\n return --pending || done();\n }\n token.text = code;\n token.escaped = true;\n --pending || done();\n });\n })(tokens[i]);\n }\n\n return;\n }\n try {\n if (opt) opt = merge({}, marked.defaults, opt);\n return Parser.parse(Lexer.lex(src, opt), opt);\n } catch (e) {\n e.message += '\\nPlease report this to https://github.com/markedjs/marked.';\n if ((opt || marked.defaults).silent) {\n return '
An error occurred:
'\n + escape(e.message + '', true)\n + '
';\n }\n throw e;\n }\n}\n\n/**\n * Options\n */\n\nmarked.options =\nmarked.setOptions = function(opt) {\n merge(marked.defaults, opt);\n return marked;\n};\n\nmarked.getDefaults = function () {\n return {\n baseUrl: null,\n breaks: false,\n gfm: true,\n headerIds: true,\n headerPrefix: '',\n highlight: null,\n langPrefix: 'language-',\n mangle: true,\n pedantic: false,\n renderer: new Renderer(),\n sanitize: false,\n sanitizer: null,\n silent: false,\n smartLists: false,\n smartypants: false,\n tables: true,\n xhtml: false\n };\n};\n\nmarked.defaults = marked.getDefaults();\n\n/**\n * Expose\n */\n\nmarked.Parser = Parser;\nmarked.parser = Parser.parse;\n\nmarked.Renderer = Renderer;\nmarked.TextRenderer = TextRenderer;\n\nmarked.Lexer = Lexer;\nmarked.lexer = Lexer.lex;\n\nmarked.InlineLexer = InlineLexer;\nmarked.inlineLexer = InlineLexer.output;\n\nmarked.Slugger = Slugger;\n\nmarked.parse = marked;\n\nif (typeof module !== 'undefined' && typeof exports === 'object') {\n module.exports = marked;\n} else if (typeof define === 'function' && define.amd) {\n define(function() { return marked; });\n} else {\n root.marked = marked;\n}\n})(this || (typeof window !== 'undefined' ? window : global));\n","import marked from \"marked\"; // @ts-ignore\n\nimport filterXSS from \"xss\";\nvar whiteListNormal;\nvar whiteListSvg;\nexport var renderMarkdown = function renderMarkdown(content, markedOptions) {\n var hassOptions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!whiteListNormal) {\n whiteListNormal = Object.assign({}, filterXSS.whiteList, {\n \"ha-icon\": [\"icon\"]\n });\n }\n\n var whiteList;\n\n if (hassOptions.allowSvg) {\n if (!whiteListSvg) {\n whiteListSvg = Object.assign({}, whiteListNormal, {\n svg: [\"xmlns\", \"height\", \"width\"],\n path: [\"transform\", \"stroke\", \"d\"],\n img: [\"src\"]\n });\n }\n\n whiteList = whiteListSvg;\n } else {\n whiteList = whiteListNormal;\n }\n\n return filterXSS(marked(content, markedOptions), {\n whiteList: whiteList\n });\n};\naddEventListener('message', function (e) {var ref = e.data;var type = ref.type;var method = ref.method;var id = ref.id;var params = ref.params;var f,p;if (type === 'RPC' && method) {if (f = __webpack_exports__[method]) {p = Promise.resolve().then(function () { return f.apply(__webpack_exports__, params); });} else {p = Promise.reject('No such method');}p.then(function (result) {postMessage({type: 'RPC',id: id,result: result});}).catch(function (e) {var error = {message: e};if (e.stack) {error.message = e.message;error.stack = e.stack;error.name = e.name;}postMessage({type: 'RPC',id: id,error: error});});}});postMessage({type: 'RPC',method: 'ready'});","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar DEFAULT = require('./default');\nvar parseStyle = require('./parser');\nvar _ = require('./util');\n\n\n/**\n * 返回值是否为空\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull (obj) {\n return (obj === undefined || obj === null);\n}\n\n/**\n * 浅拷贝对象\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject (obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\n/**\n * 创建CSS过滤器\n *\n * @param {Object} options\n * - {Object} whiteList\n * - {Function} onAttr\n * - {Function} onIgnoreAttr\n * - {Function} safeAttrValue\n */\nfunction FilterCSS (options) {\n options = shallowCopyObject(options || {});\n options.whiteList = options.whiteList || DEFAULT.whiteList;\n options.onAttr = options.onAttr || DEFAULT.onAttr;\n options.onIgnoreAttr = options.onIgnoreAttr || DEFAULT.onIgnoreAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n this.options = options;\n}\n\nFilterCSS.prototype.process = function (css) {\n // 兼容各种奇葩输入\n css = css || '';\n css = css.toString();\n if (!css) return '';\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onAttr = options.onAttr;\n var onIgnoreAttr = options.onIgnoreAttr;\n var safeAttrValue = options.safeAttrValue;\n\n var retCSS = parseStyle(css, function (sourcePosition, position, name, value, source) {\n\n var check = whiteList[name];\n var isWhite = false;\n if (check === true) isWhite = check;\n else if (typeof check === 'function') isWhite = check(value);\n else if (check instanceof RegExp) isWhite = check.test(value);\n if (isWhite !== true) isWhite = false;\n\n // 如果过滤后 value 为空则直接忽略\n value = safeAttrValue(name, value);\n if (!value) return;\n\n var opts = {\n position: position,\n sourcePosition: sourcePosition,\n source: source,\n isWhite: isWhite\n };\n\n if (isWhite) {\n\n var ret = onAttr(name, value, opts);\n if (isNull(ret)) {\n return name + ':' + value;\n } else {\n return ret;\n }\n\n } else {\n\n var ret = onIgnoreAttr(name, value, opts);\n if (!isNull(ret)) {\n return ret;\n }\n\n }\n });\n\n return retCSS;\n};\n\n\nmodule.exports = FilterCSS;\n","/**\n * cssfilter\n *\n * @author 老雷\n */\n\nvar _ = require('./util');\n\n\n/**\n * 解析style\n *\n * @param {String} css\n * @param {Function} onAttr 处理属性的函数\n * 参数格式: function (sourcePosition, position, name, value, source)\n * @return {String}\n */\nfunction parseStyle (css, onAttr) {\n css = _.trimRight(css);\n if (css[css.length - 1] !== ';') css += ';';\n var cssLength = css.length;\n var isParenthesisOpen = false;\n var lastPos = 0;\n var i = 0;\n var retCSS = '';\n\n function addNewAttr () {\n // 如果没有正常的闭合圆括号,则直接忽略当前属性\n if (!isParenthesisOpen) {\n var source = _.trim(css.slice(lastPos, i));\n var j = source.indexOf(':');\n if (j !== -1) {\n var name = _.trim(source.slice(0, j));\n var value = _.trim(source.slice(j + 1));\n // 必须有属性名称\n if (name) {\n var ret = onAttr(lastPos, retCSS.length, name, value, source);\n if (ret) retCSS += ret + '; ';\n }\n }\n }\n lastPos = i + 1;\n }\n\n for (; i < cssLength; i++) {\n var c = css[i];\n if (c === '/' && css[i + 1] === '*') {\n // 备注开始\n var j = css.indexOf('*/', i + 2);\n // 如果没有正常的备注结束,则后面的部分全部跳过\n if (j === -1) break;\n // 直接将当前位置调到备注结尾,并且初始化状态\n i = j + 1;\n lastPos = i + 1;\n isParenthesisOpen = false;\n } else if (c === '(') {\n isParenthesisOpen = true;\n } else if (c === ')') {\n isParenthesisOpen = false;\n } else if (c === ';') {\n if (isParenthesisOpen) {\n // 在圆括号里面,忽略\n } else {\n addNewAttr();\n }\n } else if (c === '\\n') {\n addNewAttr();\n }\n }\n\n return _.trim(retCSS);\n}\n\nmodule.exports = parseStyle;\n","/**\n * filter xss\n *\n * @author Zongmin Lei\n */\n\nvar FilterCSS = require(\"cssfilter\").FilterCSS;\nvar DEFAULT = require(\"./default\");\nvar parser = require(\"./parser\");\nvar parseTag = parser.parseTag;\nvar parseAttr = parser.parseAttr;\nvar _ = require(\"./util\");\n\n/**\n * returns `true` if the input value is `undefined` or `null`\n *\n * @param {Object} obj\n * @return {Boolean}\n */\nfunction isNull(obj) {\n return obj === undefined || obj === null;\n}\n\n/**\n * get attributes for a tag\n *\n * @param {String} html\n * @return {Object}\n * - {String} html\n * - {Boolean} closing\n */\nfunction getAttrs(html) {\n var i = _.spaceIndex(html);\n if (i === -1) {\n return {\n html: \"\",\n closing: html[html.length - 2] === \"/\"\n };\n }\n html = _.trim(html.slice(i + 1, -1));\n var isClosing = html[html.length - 1] === \"/\";\n if (isClosing) html = _.trim(html.slice(0, -1));\n return {\n html: html,\n closing: isClosing\n };\n}\n\n/**\n * shallow copy\n *\n * @param {Object} obj\n * @return {Object}\n */\nfunction shallowCopyObject(obj) {\n var ret = {};\n for (var i in obj) {\n ret[i] = obj[i];\n }\n return ret;\n}\n\n/**\n * FilterXSS class\n *\n * @param {Object} options\n * whiteList, onTag, onTagAttr, onIgnoreTag,\n * onIgnoreTagAttr, safeAttrValue, escapeHtml\n * stripIgnoreTagBody, allowCommentTag, stripBlankChar\n * css{whiteList, onAttr, onIgnoreAttr} `css=false` means don't use `cssfilter`\n */\nfunction FilterXSS(options) {\n options = shallowCopyObject(options || {});\n\n if (options.stripIgnoreTag) {\n if (options.onIgnoreTag) {\n console.error(\n 'Notes: cannot use these two options \"stripIgnoreTag\" and \"onIgnoreTag\" at the same time'\n );\n }\n options.onIgnoreTag = DEFAULT.onIgnoreTagStripAll;\n }\n\n options.whiteList = options.whiteList || DEFAULT.whiteList;\n options.onTag = options.onTag || DEFAULT.onTag;\n options.onTagAttr = options.onTagAttr || DEFAULT.onTagAttr;\n options.onIgnoreTag = options.onIgnoreTag || DEFAULT.onIgnoreTag;\n options.onIgnoreTagAttr = options.onIgnoreTagAttr || DEFAULT.onIgnoreTagAttr;\n options.safeAttrValue = options.safeAttrValue || DEFAULT.safeAttrValue;\n options.escapeHtml = options.escapeHtml || DEFAULT.escapeHtml;\n this.options = options;\n\n if (options.css === false) {\n this.cssFilter = false;\n } else {\n options.css = options.css || {};\n this.cssFilter = new FilterCSS(options.css);\n }\n}\n\n/**\n * start process and returns result\n *\n * @param {String} html\n * @return {String}\n */\nFilterXSS.prototype.process = function(html) {\n // compatible with the input\n html = html || \"\";\n html = html.toString();\n if (!html) return \"\";\n\n var me = this;\n var options = me.options;\n var whiteList = options.whiteList;\n var onTag = options.onTag;\n var onIgnoreTag = options.onIgnoreTag;\n var onTagAttr = options.onTagAttr;\n var onIgnoreTagAttr = options.onIgnoreTagAttr;\n var safeAttrValue = options.safeAttrValue;\n var escapeHtml = options.escapeHtml;\n var cssFilter = me.cssFilter;\n\n // remove invisible characters\n if (options.stripBlankChar) {\n html = DEFAULT.stripBlankChar(html);\n }\n\n // remove html comments\n if (!options.allowCommentTag) {\n html = DEFAULT.stripCommentTag(html);\n }\n\n // if enable stripIgnoreTagBody\n var stripIgnoreTagBody = false;\n if (options.stripIgnoreTagBody) {\n var stripIgnoreTagBody = DEFAULT.StripTagBody(\n options.stripIgnoreTagBody,\n onIgnoreTag\n );\n onIgnoreTag = stripIgnoreTagBody.onIgnoreTag;\n }\n\n var retHtml = parseTag(\n html,\n function(sourcePosition, position, tag, html, isClosing) {\n var info = {\n sourcePosition: sourcePosition,\n position: position,\n isClosing: isClosing,\n isWhite: whiteList.hasOwnProperty(tag)\n };\n\n // call `onTag()`\n var ret = onTag(tag, html, info);\n if (!isNull(ret)) return ret;\n\n if (info.isWhite) {\n if (info.isClosing) {\n return \"\" + tag + \">\";\n }\n\n var attrs = getAttrs(html);\n var whiteAttrList = whiteList[tag];\n var attrsHtml = parseAttr(attrs.html, function(name, value) {\n // call `onTagAttr()`\n var isWhiteAttr = _.indexOf(whiteAttrList, name) !== -1;\n var ret = onTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n\n if (isWhiteAttr) {\n // call `safeAttrValue()`\n value = safeAttrValue(tag, name, value, cssFilter);\n if (value) {\n return name + '=\"' + value + '\"';\n } else {\n return name;\n }\n } else {\n // call `onIgnoreTagAttr()`\n var ret = onIgnoreTagAttr(tag, name, value, isWhiteAttr);\n if (!isNull(ret)) return ret;\n return;\n }\n });\n\n // build new tag html\n var html = \"<\" + tag;\n if (attrsHtml) html += \" \" + attrsHtml;\n if (attrs.closing) html += \" /\";\n html += \">\";\n return html;\n } else {\n // call `onIgnoreTag()`\n var ret = onIgnoreTag(tag, html, info);\n if (!isNull(ret)) return ret;\n return escapeHtml(html);\n }\n },\n escapeHtml\n );\n\n // if enable stripIgnoreTagBody\n if (stripIgnoreTagBody) {\n retHtml = stripIgnoreTagBody.remove(retHtml);\n }\n\n return retHtml;\n};\n\nmodule.exports = FilterXSS;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.0f20b7eb2535b079dbfe.js b/supervisor/api/panel/chunk.0f20b7eb2535b079dbfe.js
new file mode 100644
index 000000000..0b32362ec
--- /dev/null
+++ b/supervisor/api/panel/chunk.0f20b7eb2535b079dbfe.js
@@ -0,0 +1,3 @@
+/*! For license information please see chunk.0f20b7eb2535b079dbfe.js.LICENSE */
+(self.webpackJsonp=self.webpackJsonp||[]).push([[0],{124:function(t,e,r){"use strict";var n=r(29),c=r(6),o=function(t){return function(e,r){if(e.constructor._observers){if(!e.constructor.hasOwnProperty("_observers")){var n=e.constructor._observers;e.constructor._observers=new Map,n.forEach(function(t,r){return e.constructor._observers.set(r,t)})}}else{e.constructor._observers=new Map;var c=e.updated;e.updated=function(t){var e=this;c.call(this,t),t.forEach(function(t,r){var n=e.constructor._observers.get(r);void 0!==n&&n.call(e,e[r],t)})}}e.constructor._observers.set(r,t)}};r(107);var i=function(){},a={get passive(){return!0,!1}};document.addEventListener("x",i,a),document.removeEventListener("x",i);function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){for(var r=0;r\n \n
\n
\n \n
\n
\n \n ']);return E=function(){return t},t}function R(t,e){for(var r=0;r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (proto: any, propName: PropertyKey) => {\n // if we haven't wrapped `updated` in this class, do so\n if (!proto.constructor._observers) {\n proto.constructor._observers = new Map();\n const userUpdated = proto.updated;\n proto.updated = function(changedProperties: PropertyValues) {\n userUpdated.call(this, changedProperties);\n changedProperties.forEach((v, k) => {\n const observer = this.constructor._observers.get(k);\n if (observer !== undefined) {\n observer.call(this, this[k], v);\n }\n });\n };\n // clone any existing observers (superclasses)\n } else if (!proto.constructor.hasOwnProperty('_observers')) {\n const observers = proto.constructor._observers;\n proto.constructor._observers = new Map();\n observers.forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (v: any, k: PropertyKey) => proto.constructor._observers.set(k, v));\n }\n // set this method\n proto.constructor._observers.set(propName, observer);\n };\n","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n/**\n * Return an element assigned to a given slot that matches the given selector\n */\n\nimport {matches} from '@material/dom/ponyfill';\n\n/**\n * Determines whether a node is an element.\n *\n * @param node Node to check\n */\nexport const isNodeElement = (node: Node): node is Element => {\n return node.nodeType === Node.ELEMENT_NODE;\n};\n\nexport function findAssignedElement(slot: HTMLSlotElement, selector: string) {\n for (const node of slot.assignedNodes({flatten: true})) {\n if (isNodeElement(node)) {\n const el = (node as HTMLElement);\n if (matches(el, selector)) {\n return el;\n }\n }\n }\n\n return null;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type Constructor = new (...args: any[]) => T;\n\nexport function addHasRemoveClass(element: HTMLElement) {\n return {\n addClass: (className: string) => {\n element.classList.add(className);\n },\n removeClass: (className: string) => {\n element.classList.remove(className);\n },\n hasClass: (className: string) => element.classList.contains(className),\n };\n}\n\nlet supportsPassive = false;\nconst fn = () => { /* empty listener */ };\nconst optionsBlock: AddEventListenerOptions = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n};\ndocument.addEventListener('x', fn, optionsBlock);\ndocument.removeEventListener('x', fn);\n/**\n * Do event listeners suport the `passive` option?\n */\nexport const supportsPassiveEventListener = supportsPassive;\n\nexport const deepActiveElementPath = (doc = window.document): Element[] => {\n let activeElement = doc.activeElement;\n const path: Element[] = [];\n\n if (!activeElement) {\n return path;\n }\n\n while (activeElement) {\n path.push(activeElement);\n if (activeElement.shadowRoot) {\n activeElement = activeElement.shadowRoot.activeElement;\n } else {\n break;\n }\n }\n\n return path;\n};\n\nexport const doesElementContainFocus = (element: HTMLElement): boolean => {\n const activePath = deepActiveElementPath();\n\n if (!activePath.length) {\n return false;\n }\n\n const deepActiveElement = activePath[activePath.length - 1];\n const focusEv =\n new Event('check-if-focused', {bubbles: true, composed: true});\n let composedPath: EventTarget[] = [];\n const listener = (ev: Event) => {\n composedPath = ev.composedPath();\n };\n\n document.body.addEventListener('check-if-focused', listener);\n deepActiveElement.dispatchEvent(focusEv);\n document.body.removeEventListener('check-if-focused', listener);\n\n return composedPath.indexOf(element) !== -1;\n};\n","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport {MDCFoundation} from '@material/base';\nimport {LitElement} from 'lit-element';\n\nimport {Constructor} from './utils.js';\nexport {observer} from './observer.js';\nexport {addHasRemoveClass} from './utils.js';\nexport * from '@material/base/types.js';\n\nexport abstract class BaseElement extends LitElement {\n /**\n * Root element for MDC Foundation usage.\n *\n * Define in your component with the `@query` decorator\n */\n protected abstract mdcRoot: HTMLElement;\n\n /**\n * Return the foundation class for this component\n */\n protected abstract readonly mdcFoundationClass: Constructor;\n\n /**\n * An instance of the MDC Foundation class to attach to the root element\n */\n protected abstract mdcFoundation: MDCFoundation;\n\n /**\n * Create the adapter for the `mdcFoundation`.\n *\n * Override and return an object with the Adapter's functions implemented:\n *\n * {\n * addClass: () => {},\n * removeClass: () => {},\n * ...\n * }\n */\n protected abstract createAdapter(): {}\n\n /**\n * Create and attach the MDC Foundation to the instance\n */\n protected createFoundation() {\n if (this.mdcFoundation !== undefined) {\n this.mdcFoundation.destroy();\n }\n this.mdcFoundation = new this.mdcFoundationClass(this.createAdapter());\n this.mdcFoundation.init();\n }\n\n protected firstUpdated() {\n this.createFoundation();\n }\n}\n","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport {MDCRippleFoundation} from '@material/ripple/foundation.js';\n\nimport {BaseElement} from './base-element';\n\nexport * from './base-element';\n\nexport interface HTMLElementWithRipple extends HTMLElement {\n ripple?: MDCRippleFoundation;\n}\n\nexport abstract class FormElement extends BaseElement {\n /**\n * Form-capable element in the component ShadowRoot.\n *\n * Define in your component with the `@query` decorator\n */\n protected abstract formElement: HTMLElement;\n\n protected createRenderRoot() {\n return this.attachShadow({mode: 'open', delegatesFocus: true});\n }\n\n /**\n * Implement ripple getter for Ripple integration with mwc-formfield\n */\n readonly ripple?: MDCRippleFoundation;\n\n click() {\n if (this.formElement) {\n this.formElement.focus();\n this.formElement.click();\n }\n }\n\n setAriaLabel(label: string) {\n if (this.formElement) {\n this.formElement.setAttribute('aria-label', label);\n }\n }\n\n protected firstUpdated() {\n super.firstUpdated();\n this.mdcRoot.addEventListener('change', (e) => {\n this.dispatchEvent(new Event('change', e));\n });\n }\n}\n","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n/** CSS classes used by the switch. */\nvar cssClasses = {\n /** Class used for a switch that is in the \"checked\" (on) position. */\n CHECKED: 'mdc-switch--checked',\n /** Class used for a switch that is disabled. */\n DISABLED: 'mdc-switch--disabled',\n};\n/** String constants used by the switch. */\nvar strings = {\n /** Aria attribute for checked or unchecked state of switch */\n ARIA_CHECKED_ATTR: 'aria-checked',\n /** A CSS selector used to locate the native HTML control for the switch. */\n NATIVE_CONTROL_SELECTOR: '.mdc-switch__native-control',\n /** A CSS selector used to locate the ripple surface element for the switch. */\n RIPPLE_SURFACE_SELECTOR: '.mdc-switch__thumb-underlay',\n};\nexport { cssClasses, strings };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2018 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport * as tslib_1 from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { cssClasses, strings } from './constants';\nvar MDCSwitchFoundation = /** @class */ (function (_super) {\n tslib_1.__extends(MDCSwitchFoundation, _super);\n function MDCSwitchFoundation(adapter) {\n return _super.call(this, tslib_1.__assign({}, MDCSwitchFoundation.defaultAdapter, adapter)) || this;\n }\n Object.defineProperty(MDCSwitchFoundation, \"strings\", {\n /** The string constants used by the switch. */\n get: function () {\n return strings;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSwitchFoundation, \"cssClasses\", {\n /** The CSS classes used by the switch. */\n get: function () {\n return cssClasses;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(MDCSwitchFoundation, \"defaultAdapter\", {\n /** The default Adapter for the switch. */\n get: function () {\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n setNativeControlChecked: function () { return undefined; },\n setNativeControlDisabled: function () { return undefined; },\n setNativeControlAttr: function () { return undefined; },\n };\n },\n enumerable: true,\n configurable: true\n });\n /** Sets the checked state of the switch. */\n MDCSwitchFoundation.prototype.setChecked = function (checked) {\n this.adapter_.setNativeControlChecked(checked);\n this.updateAriaChecked_(checked);\n this.updateCheckedStyling_(checked);\n };\n /** Sets the disabled state of the switch. */\n MDCSwitchFoundation.prototype.setDisabled = function (disabled) {\n this.adapter_.setNativeControlDisabled(disabled);\n if (disabled) {\n this.adapter_.addClass(cssClasses.DISABLED);\n }\n else {\n this.adapter_.removeClass(cssClasses.DISABLED);\n }\n };\n /** Handles the change event for the switch native control. */\n MDCSwitchFoundation.prototype.handleChange = function (evt) {\n var nativeControl = evt.target;\n this.updateAriaChecked_(nativeControl.checked);\n this.updateCheckedStyling_(nativeControl.checked);\n };\n /** Updates the styling of the switch based on its checked state. */\n MDCSwitchFoundation.prototype.updateCheckedStyling_ = function (checked) {\n if (checked) {\n this.adapter_.addClass(cssClasses.CHECKED);\n }\n else {\n this.adapter_.removeClass(cssClasses.CHECKED);\n }\n };\n MDCSwitchFoundation.prototype.updateAriaChecked_ = function (checked) {\n this.adapter_.setNativeControlAttr(strings.ARIA_CHECKED_ATTR, \"\" + !!checked);\n };\n return MDCSwitchFoundation;\n}(MDCFoundation));\nexport { MDCSwitchFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCSwitchFoundation;\n//# sourceMappingURL=foundation.js.map","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport {addHasRemoveClass, FormElement, HTMLElementWithRipple, observer} from '@material/mwc-base/form-element.js';\nimport {ripple} from '@material/mwc-ripple/ripple-directive.js';\nimport {MDCSwitchAdapter} from '@material/switch/adapter';\nimport MDCSwitchFoundation from '@material/switch/foundation.js';\nimport {html, property, query} from 'lit-element';\n\nexport class SwitchBase extends FormElement {\n @property({type: Boolean})\n @observer(function(this: SwitchBase, value: boolean) {\n this.mdcFoundation.setChecked(value);\n })\n checked = false;\n\n @property({type: Boolean})\n @observer(function(this: SwitchBase, value: boolean) {\n this.mdcFoundation.setDisabled(value);\n })\n disabled = false;\n\n @query('.mdc-switch') protected mdcRoot!: HTMLElement;\n\n @query('input') protected formElement!: HTMLInputElement;\n\n protected mdcFoundation!: MDCSwitchFoundation;\n\n private _changeHandler(e: Event) {\n this.mdcFoundation.handleChange(e);\n // catch \"click\" event and sync properties\n this.checked = this.formElement.checked;\n }\n\n protected readonly mdcFoundationClass = MDCSwitchFoundation;\n\n protected createAdapter(): MDCSwitchAdapter {\n return {\n ...addHasRemoveClass(this.mdcRoot),\n setNativeControlChecked: (checked: boolean) => {\n this.formElement.checked = checked;\n },\n setNativeControlDisabled: (disabled: boolean) => {\n this.formElement.disabled = disabled;\n },\n setNativeControlAttr: (attr, value) => {\n this.formElement.setAttribute(attr, value);\n },\n };\n }\n\n get ripple() {\n return this.rippleNode.ripple;\n }\n\n @query('.mdc-switch__thumb-underlay')\n protected rippleNode!: HTMLElementWithRipple;\n\n protected render() {\n return html`\n
\n \n
\n
\n \n
\n
\n
\n `;\n }\n}\n","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport {customElement} from 'lit-element';\n\nimport {SwitchBase} from './mwc-switch-base.js';\nimport {style} from './mwc-switch-css.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'mwc-switch': Switch;\n }\n}\n\n@customElement('mwc-switch')\nexport class Switch extends SwitchBase {\n static styles = style;\n}\n","/**\n@license\nCopyright 2018 Google Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\nimport {css} from 'lit-element';\n\nexport const style = css`.mdc-switch__thumb-underlay{left:-18px;right:initial;top:-17px;width:48px;height:48px}[dir=rtl] .mdc-switch__thumb-underlay,.mdc-switch__thumb-underlay[dir=rtl]{left:initial;right:-18px}.mdc-switch__native-control{width:68px;height:48px}.mdc-switch{display:inline-block;position:relative;outline:none;user-select:none}.mdc-switch.mdc-switch--checked .mdc-switch__track{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch.mdc-switch--checked .mdc-switch__thumb{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786);border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__track{background-color:#000}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb{background-color:#fff;border-color:#fff}.mdc-switch__native-control{left:0;right:initial;position:absolute;top:0;margin:0;opacity:0;cursor:pointer;pointer-events:auto}[dir=rtl] .mdc-switch__native-control,.mdc-switch__native-control[dir=rtl]{left:initial;right:0}.mdc-switch__track{box-sizing:border-box;width:32px;height:14px;border:1px solid;border-radius:7px;opacity:.38;transition:opacity 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1);border-color:transparent}.mdc-switch__thumb-underlay{display:flex;position:absolute;align-items:center;justify-content:center;transform:translateX(0);transition:transform 90ms cubic-bezier(0.4, 0, 0.2, 1),background-color 90ms cubic-bezier(0.4, 0, 0.2, 1),border-color 90ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-switch__thumb{box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2),0px 2px 2px 0px rgba(0, 0, 0, 0.14),0px 1px 5px 0px rgba(0,0,0,.12);box-sizing:border-box;width:20px;height:20px;border:10px solid;border-radius:50%;pointer-events:none;z-index:1}.mdc-switch--checked .mdc-switch__track{opacity:.54}.mdc-switch--checked .mdc-switch__thumb-underlay{transform:translateX(20px)}[dir=rtl] .mdc-switch--checked .mdc-switch__thumb-underlay,.mdc-switch--checked .mdc-switch__thumb-underlay[dir=rtl]{transform:translateX(-20px)}.mdc-switch--checked .mdc-switch__native-control{transform:translateX(-20px)}[dir=rtl] .mdc-switch--checked .mdc-switch__native-control,.mdc-switch--checked .mdc-switch__native-control[dir=rtl]{transform:translateX(20px)}.mdc-switch--disabled{opacity:.38;pointer-events:none}.mdc-switch--disabled .mdc-switch__thumb{border-width:1px}.mdc-switch--disabled .mdc-switch__native-control{cursor:default;pointer-events:none}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay::before,.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay::after{background-color:#9e9e9e}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:hover::before{opacity:.08}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay.mdc-ripple-upgraded--background-focused::before,.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24}.mdc-switch:not(.mdc-switch--checked) .mdc-switch__thumb-underlay.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: 0.24}.mdc-switch__thumb-underlay{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-switch__thumb-underlay::before,.mdc-switch__thumb-underlay::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.mdc-switch__thumb-underlay::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1}.mdc-switch__thumb-underlay.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-switch__thumb-underlay.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-switch__thumb-underlay.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-switch__thumb-underlay.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-switch__thumb-underlay::before,.mdc-switch__thumb-underlay::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-switch__thumb-underlay.mdc-ripple-upgraded::before,.mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-switch__thumb-underlay.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-switch__thumb-underlay::before,.mdc-switch__thumb-underlay::after{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-switch__thumb-underlay:hover::before{opacity:.04}.mdc-switch__thumb-underlay.mdc-ripple-upgraded--background-focused::before,.mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12}.mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-switch__thumb-underlay:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12}.mdc-switch__thumb-underlay.mdc-ripple-upgraded{--mdc-ripple-fg-opacity: 0.12}:host{outline:none}`;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js
new file mode 100644
index 000000000..3bd5c019c
--- /dev/null
+++ b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[8],{4:function(t,e,n){"use strict";n.r(e);n(78);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){for(var n=0;n',document.head.appendChild(a.content)}}]);
+//# sourceMappingURL=chunk.19d5bc1992ac27173ab6.js.map
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.gz b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.gz
new file mode 100644
index 000000000..2e07f89bb
Binary files /dev/null and b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.gz differ
diff --git a/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.map b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.map
new file mode 100644
index 000000000..353a2a695
--- /dev/null
+++ b/supervisor/api/panel/chunk.19d5bc1992ac27173ab6.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///./src/components/ha-iconset-svg.js","webpack:///./hassio/hassio-icons.html","webpack:///./hassio/src/resources/hassio-icons.js"],"names":["IronIconsetClass","customElements","get","HaIconset","_this","this","async","fire","node","window","_this2","_meta","value","key","name","ownerDocument","readyState","addEventListener","_fireIronIconsetAdded","define","documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","content"],"mappings":"yyCAEA,IAAMA,EAAmBC,eAAeC,IAAI,oBAEtCC,oPAAkBH,kOAIE,IAAAI,EAAAC,KACtBA,KAAKC,MAAM,kBAAMF,EAAKG,KAAK,qBAAsBH,EAAM,CAAEI,KAAMC,kDAQlD,IAAAC,EAAAL,KACbA,KAAKM,MAAMC,MAAQ,KACnBP,KAAKM,MAAME,IAAMR,KAAKS,KACtBT,KAAKM,MAAMC,MAAQP,KACfA,KAAKU,eAAmD,YAAlCV,KAAKU,cAAcC,WAE3CX,KAAKU,cAAcE,iBAAiB,mBAAoB,WACtDP,EAAKQ,0BAGPb,KAAKa,6DAKXjB,eAAekB,OAAO,iBAAkBhB,GChCzB,ICGTiB,EAAoBC,SAASC,cAAc,YACjDF,EAAkBG,aAAa,QAAS,kBACxCH,EAAkBI,UDLH,oxPCMfH,SAASI,KAAKC,YAAYN,EAAkBO","file":"chunk.19d5bc1992ac27173ab6.js","sourcesContent":["import \"@polymer/iron-iconset-svg/iron-iconset-svg\";\n\nconst IronIconsetClass = customElements.get(\"iron-iconset-svg\");\n\nclass HaIconset extends IronIconsetClass {\n /**\n * Fire 'iron-iconset-added' event at next microtask.\n */\n _fireIronIconsetAdded() {\n this.async(() => this.fire(\"iron-iconset-added\", this, { node: window }));\n }\n\n /**\n *\n * When name is changed, register iconset metadata\n *\n */\n _nameChanged() {\n this._meta.value = null;\n this._meta.key = this.name;\n this._meta.value = this;\n if (this.ownerDocument && this.ownerDocument.readyState === \"loading\") {\n // Document still loading. It could be that not all icons in the iconset are parsed yet.\n this.ownerDocument.addEventListener(\"DOMContentLoaded\", () => {\n this._fireIronIconsetAdded();\n });\n } else {\n this._fireIronIconsetAdded();\n }\n }\n}\n\ncustomElements.define(\"ha-iconset-svg\", HaIconset);\n","export default \"\";","import \"../../../src/components/ha-iconset-svg\";\nimport iconSetContent from \"../../hassio-icons.html\";\n\nconst documentContainer = document.createElement(\"template\");\ndocumentContainer.setAttribute(\"style\", \"display: none;\");\ndocumentContainer.innerHTML = iconSetContent;\ndocument.head.appendChild(documentContainer.content);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js
new file mode 100644
index 000000000..a0145da73
--- /dev/null
+++ b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[11],{183:function(H,V,C){"use strict";C.r(V);var L=document.createElement("template");L.setAttribute("style","display: none;"),L.innerHTML='',document.head.appendChild(L.content)}}]);
+//# sourceMappingURL=chunk.1ff951c379cdd1f35962.js.map
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.gz b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.gz
new file mode 100644
index 000000000..5d853252e
Binary files /dev/null and b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.gz differ
diff --git a/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.map b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.map
new file mode 100644
index 000000000..1e7417db0
--- /dev/null
+++ b/supervisor/api/panel/chunk.1ff951c379cdd1f35962.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///./build/mdi.html","webpack:///./src/resources/mdi-icons.js"],"names":["documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","content"],"mappings":"8FAAe,ICETA,EAAoBC,SAASC,cAAc,YACjDF,EAAkBG,aAAa,QAAS,kBACxCH,EAAkBI,UDJH,w3vrDCKfH,SAASI,KAAKC,YAAYN,EAAkBO","file":"chunk.1ff951c379cdd1f35962.js","sourcesContent":["export default \"\";","import iconSetContent from \"../../build/mdi.html\";\n\nconst documentContainer = document.createElement(\"template\");\ndocumentContainer.setAttribute(\"style\", \"display: none;\");\ndocumentContainer.innerHTML = iconSetContent;\ndocument.head.appendChild(documentContainer.content);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.257952ea452437810f3f.js b/supervisor/api/panel/chunk.257952ea452437810f3f.js
new file mode 100644
index 000000000..0eed3eb48
--- /dev/null
+++ b/supervisor/api/panel/chunk.257952ea452437810f3f.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[8],{4:function(t,e,n){"use strict";n.r(e);n(97);function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function L(t,e){for(var n=0;n',document.head.appendChild(a.content)}}]);
+//# sourceMappingURL=chunk.257952ea452437810f3f.js.map
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.257952ea452437810f3f.js.gz b/supervisor/api/panel/chunk.257952ea452437810f3f.js.gz
new file mode 100644
index 000000000..cdc3577d4
Binary files /dev/null and b/supervisor/api/panel/chunk.257952ea452437810f3f.js.gz differ
diff --git a/supervisor/api/panel/chunk.257952ea452437810f3f.js.map b/supervisor/api/panel/chunk.257952ea452437810f3f.js.map
new file mode 100644
index 000000000..6ab3fdf39
--- /dev/null
+++ b/supervisor/api/panel/chunk.257952ea452437810f3f.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///./src/components/ha-iconset-svg.js","webpack:///./hassio/hassio-icons.html","webpack:///./hassio/src/resources/hassio-icons.js"],"names":["IronIconsetClass","customElements","get","HaIconset","_this","this","async","fire","node","window","_this2","_meta","value","key","name","ownerDocument","readyState","addEventListener","_fireIronIconsetAdded","define","documentContainer","document","createElement","setAttribute","innerHTML","head","appendChild","content"],"mappings":"yyCAEA,IAAMA,EAAmBC,eAAeC,IAAI,oBAEtCC,oPAAkBH,kOAIE,IAAAI,EAAAC,KACtBA,KAAKC,MAAM,kBAAMF,EAAKG,KAAK,qBAAsBH,EAAM,CAAEI,KAAMC,kDAQlD,IAAAC,EAAAL,KACbA,KAAKM,MAAMC,MAAQ,KACnBP,KAAKM,MAAME,IAAMR,KAAKS,KACtBT,KAAKM,MAAMC,MAAQP,KACfA,KAAKU,eAAmD,YAAlCV,KAAKU,cAAcC,WAE3CX,KAAKU,cAAcE,iBAAiB,mBAAoB,WACtDP,EAAKQ,0BAGPb,KAAKa,6DAKXjB,eAAekB,OAAO,iBAAkBhB,GChCzB,ICGTiB,EAAoBC,SAASC,cAAc,YACjDF,EAAkBG,aAAa,QAAS,kBACxCH,EAAkBI,UDLH,iiPCMfH,SAASI,KAAKC,YAAYN,EAAkBO","file":"chunk.257952ea452437810f3f.js","sourcesContent":["import \"@polymer/iron-iconset-svg/iron-iconset-svg\";\n\nconst IronIconsetClass = customElements.get(\"iron-iconset-svg\");\n\nclass HaIconset extends IronIconsetClass {\n /**\n * Fire 'iron-iconset-added' event at next microtask.\n */\n _fireIronIconsetAdded() {\n this.async(() => this.fire(\"iron-iconset-added\", this, { node: window }));\n }\n\n /**\n *\n * When name is changed, register iconset metadata\n *\n */\n _nameChanged() {\n this._meta.value = null;\n this._meta.key = this.name;\n this._meta.value = this;\n if (this.ownerDocument && this.ownerDocument.readyState === \"loading\") {\n // Document still loading. It could be that not all icons in the iconset are parsed yet.\n this.ownerDocument.addEventListener(\"DOMContentLoaded\", () => {\n this._fireIronIconsetAdded();\n });\n } else {\n this._fireIronIconsetAdded();\n }\n }\n}\n\ncustomElements.define(\"ha-iconset-svg\", HaIconset);\n","export default \"\";","import \"../../../src/components/ha-iconset-svg\";\nimport iconSetContent from \"../../hassio-icons.html\";\n\nconst documentContainer = document.createElement(\"template\");\ndocumentContainer.setAttribute(\"style\", \"display: none;\");\ndocumentContainer.innerHTML = iconSetContent;\ndocument.head.appendChild(documentContainer.content);\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.2efa3db34abe2c94f3f1.js b/supervisor/api/panel/chunk.2efa3db34abe2c94f3f1.js
new file mode 100644
index 000000000..6600788d5
--- /dev/null
+++ b/supervisor/api/panel/chunk.2efa3db34abe2c94f3f1.js
@@ -0,0 +1,3 @@
+/*! For license information please see chunk.2efa3db34abe2c94f3f1.js.LICENSE */
+(self.webpackJsonp=self.webpackJsonp||[]).push([[3],{167:function(e,t,r){"use strict";r.r(t);r(18),r(53),r(42);var n=r(6),i=r(34),o=(r(56),r(94),r(11));function a(e){return(a="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 s(){var e=f(["\n :host([inert]) {\n pointer-events: initial !important;\n cursor: initial !important;\n }\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 a {\n color: var(--primary-color);\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 "]);return s=function(){return e},e}function c(){var e=f(['\n \n ',"\n \n "]);return c=function(){return e},e}function l(){var e=f(["\n \n "]);return l=function(){return e},e}function u(){var e=f(["\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 _handleKeyUp(ev: KeyboardEvent) {\n if (ev.keyCode === 13) {\n this._confirm();\n }\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 :host([inert]) {\n pointer-events: initial !important;\n cursor: initial !important;\n }\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 a {\n color: var(--primary-color);\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 { IronFocusablesHelper } from \"@polymer/iron-overlay-behavior/iron-focusables-helper\";\nimport { dom } from \"@polymer/polymer/lib/legacy/polymer.dom\";\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 type { PaperDialogElement } from \"@polymer/paper-dialog/paper-dialog\";\nimport { mixinBehaviors } from \"@polymer/polymer/lib/legacy/class\";\nimport type { Constructor } from \"../../types\";\nimport { HaIronFocusablesHelper } from \"./ha-iron-focusables-helper\";\n\nconst paperDialogClass = customElements.get(\"paper-dialog\") as Constructor<\n PaperDialogElement\n>;\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}\n// @ts-ignore\ncustomElements.define(\"ha-paper-dialog\", HaPaperDialog);\n","import { ripple } from \"@material/mwc-ripple/ripple-directive\";\nimport \"@material/mwc-switch\";\nimport type { Switch } from \"@material/mwc-switch\";\nimport { style } from \"@material/mwc-switch/mwc-switch-css\";\nimport {\n css,\n CSSResult,\n customElement,\n html,\n property,\n query,\n} from \"lit-element\";\nimport { forwardHaptic } from \"../data/haptics\";\nimport { Constructor } from \"../types\";\n\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\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/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js
new file mode 100644
index 000000000..ad57916bd
--- /dev/null
+++ b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[2],{181:function(e,r,n){"use strict";n.r(r),n.d(r,"codeMirror",function(){return c}),n.d(r,"codeMirrorCss",function(){return i});var a=n(56),o=n.n(a),s=n(173),t=(n(174),n(175),n(12));o.a.commands.save=function(e){Object(t.a)(e.getWrapperElement(),"editor-save")};var c=o.a,i=s.a}}]);
+//# sourceMappingURL=chunk.3bc6767cb58f54994cc9.js.map
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.gz b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.gz
new file mode 100644
index 000000000..62f03721f
Binary files /dev/null and b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.gz differ
diff --git a/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.map b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.map
new file mode 100644
index 000000000..34d20c862
--- /dev/null
+++ b/supervisor/api/panel/chunk.3bc6767cb58f54994cc9.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["webpack:///./src/resources/codemirror.ts"],"names":["__webpack_require__","r","__webpack_exports__","d","codeMirror","codeMirrorCss","codemirror__WEBPACK_IMPORTED_MODULE_0__","codemirror__WEBPACK_IMPORTED_MODULE_0___default","n","codemirror_lib_codemirror_css__WEBPACK_IMPORTED_MODULE_1__","_common_dom_fire_event__WEBPACK_IMPORTED_MODULE_4__","_CodeMirror","commands","save","cm","fireEvent","getWrapperElement","_codeMirrorCss"],"mappings":"sFAAAA,EAAAC,EAAAC,GAAAF,EAAAG,EAAAD,EAAA,+BAAAE,IAAAJ,EAAAG,EAAAD,EAAA,kCAAAG,IAAA,IAAAC,EAAAN,EAAA,IAAAO,EAAAP,EAAAQ,EAAAF,GAAAG,EAAAT,EAAA,KAAAU,GAAAV,EAAA,KAAAA,EAAA,KAAAA,EAAA,KAQAW,IAAYC,SAASC,KAAO,SAACC,GAC3BC,YAAUD,EAAGE,oBAAqB,gBAE7B,IAAMZ,EAAkBO,IAClBN,EAAqBY","file":"chunk.3bc6767cb58f54994cc9.js","sourcesContent":["// @ts-ignore\nimport _CodeMirror, { Editor } from \"codemirror\";\n// @ts-ignore\nimport _codeMirrorCss from \"codemirror/lib/codemirror.css\";\nimport \"codemirror/mode/jinja2/jinja2\";\nimport \"codemirror/mode/yaml/yaml\";\nimport { fireEvent } from \"../common/dom/fire_event\";\n\n_CodeMirror.commands.save = (cm: Editor) => {\n fireEvent(cm.getWrapperElement(), \"editor-save\");\n};\nexport const codeMirror: any = _CodeMirror;\nexport const codeMirrorCss: any = _codeMirrorCss;\n"],"sourceRoot":""}
\ No newline at end of file
diff --git a/supervisor/api/panel/chunk.4caf65292b82df27c80d.js b/supervisor/api/panel/chunk.4caf65292b82df27c80d.js
new file mode 100644
index 000000000..3a90058df
--- /dev/null
+++ b/supervisor/api/panel/chunk.4caf65292b82df27c80d.js
@@ -0,0 +1,2 @@
+(self.webpackJsonp=self.webpackJsonp||[]).push([[7],{178:function(e,t,r){"use strict";r.r(t);r(33),r(35);var n=r(6),i=r(49),o=r(23),a=r(11),s=r(13),c=(r(18),r(20),r(126),r(127),r(118),r(138),r(116));function l(e){return(l="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 u(e){return function(e){if(Array.isArray(e))return S(e)}(e)||A(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(l){return void r(l)}s.done?t(c):Promise.resolve(c).then(n,i)}function f(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var o=e.apply(t,r);function a(e){d(o,n,i,a,s,"next",e)}function s(e){d(o,n,i,a,s,"throw",e)}a(void 0)})}}function p(){var e=b(["\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 p=function(){return e},e}function h(){var e=b(["\n ","\n "]);return h=function(){return e},e}function m(){var e=b(["\n ","\n "]);return m=function(){return e},e}function y(){var e=b(['
\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 $t=function(){return e},e}function Vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function qt(e,t){return(qt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Wt(e){return function(){var t,r=Yt(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=Yt(this).constructor;t=Reflect.construct(r,arguments,n)}else t=r.apply(this,arguments);return function(e,t){if(t&&("object"===st(t)||"function"==typeof t))return t;return Gt(e)}(this,t)}}function Gt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yt(e){return(Yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Jt(e){var t,r=er(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 Kt(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function Qt(e){return e.decorators&&e.decorators.length}function Xt(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function Zt(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 er(e){var t=function(e,t){if("object"!==st(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==st(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===st(t)?t:String(t)}function tr(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r**Stable**: These are add-ons ready to be used in production.\n**Experimental**: These may contain bugs, and may be unfinished.\n**Deprecated**: These add-ons will no longer recieve any updates.")},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."}};(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(!Qt(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"]);return ar=function(){return e},e}function sr(){var e=ur([""]);return sr=function(){return e},e}function cr(){var e=ur(['
\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\";\nimport { atLeastVersion } from \"../../../../src/common/config/version\";\nimport { fireEvent } from \"../../../../src/common/dom/fire_event\";\nimport { navigate } from \"../../../../src/common/navigate\";\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 {\n fetchHassioAddonChangelog,\n HassioAddonDetails,\n HassioAddonSetOptionParams,\n HassioAddonSetSecurityParams,\n installHassioAddon,\n setHassioAddonOption,\n setHassioAddonSecurity,\n uninstallHassioAddon,\n} from \"../../../../src/data/hassio/addon\";\nimport { haStyle } from \"../../../../src/resources/styles\";\nimport { HomeAssistant } from \"../../../../src/types\";\nimport \"../../components/hassio-card-content\";\nimport { showHassioMarkdownDialog } from \"../../dialogs/markdown/show-dialog-hassio-markdown\";\nimport { hassioStyle } from \"../../resources/hassio-style\";\n\nconst STAGE_ICON = {\n stable: \"mdi:check-circle\",\n experimental: \"mdi:flask\",\n deprecated: \"mdi:exclamation-thick\",\n};\n\nconst PERMIS_DESC = {\n stage: {\n title: \"Add-on Stage\",\n description: `Add-ons can have one of three stages:\\n\\n**Stable**: These are add-ons ready to be used in production.\\n**Experimental**: These may contain bugs, and may be unfinished.\\n**Deprecated**: These add-ons will no longer recieve any updates.`,\n },\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({ type: Boolean }) public narrow!: boolean;\n\n @property({ attribute: false }) public hass!: HomeAssistant;\n\n @property({ attribute: false }) public addon!: HassioAddonDetails;\n\n @property() private _error?: string;\n\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']);return h=function(){return t},t}function f(){var t=b(['\n\n \n\n']);return f=function(){return t},t}function b(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var v=Object(o.a)(f());function m(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n\n \x3c!--\n If the paper-input-error element is directly referenced by an\n `aria-describedby` attribute, such as when used as a paper-input add-on,\n then applying `visibility: hidden;` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n --\x3e\n
\n \n
\n'],['\n \n\n \x3c!--\n If the paper-input-error element is directly referenced by an\n \\`aria-describedby\\` attribute, such as when used as a paper-input add-on,\n then applying \\`visibility: hidden;\\` to the paper-input-error element itself\n does not hide the error.\n\n For more information, see:\n https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description\n --\x3e\n
\n \n']);return p=function(){return t},t}Object(s.a)({is:"paper-menu-grow-height-animation",behaviors:[u],configure:function(t){var e=t.node,n=e.getBoundingClientRect().height;return this._effect=new KeyframeEffect(e,[{height:n/2+"px"},{height:n+"px"}],this.timingFromConfig(t)),this._effect}}),Object(s.a)({is:"paper-menu-grow-width-animation",behaviors:[u],configure:function(t){var e=t.node,n=e.getBoundingClientRect().width;return this._effect=new KeyframeEffect(e,[{width:n/2+"px"},{width:n+"px"}],this.timingFromConfig(t)),this._effect}}),Object(s.a)({is:"paper-menu-shrink-width-animation",behaviors:[u],configure:function(t){var e=t.node,n=e.getBoundingClientRect().width;return this._effect=new KeyframeEffect(e,[{width:n+"px"},{width:n-n/20+"px"}],this.timingFromConfig(t)),this._effect}}),Object(s.a)({is:"paper-menu-shrink-height-animation",behaviors:[u],configure:function(t){var e=t.node,n=e.getBoundingClientRect().height;return this.setPrefixedProperty(e,"transformOrigin","0 0"),this._effect=new KeyframeEffect(e,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(t)),this._effect}});var h={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},f=Object(s.a)({_template:Object(c.a)(p()),is:"paper-menu-button",behaviors:[i.a,o.a],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:h.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:h.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:h.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var t=Object(l.a)(this.$.content).getDistributedNodes(),e=0,n=t.length;e-1&&t.preventDefault()}});Object.keys(h).forEach(function(t){f[t]=h[t]})},function(t,e,n){"use strict";n(5),n(28),n(22),n(43),n(129),n(107),n(15),n(78);var i=document.createElement("template");i.setAttribute("style","display: none;"),i.innerHTML='\n\n',document.head.appendChild(i.content);var o=document.createElement("template");o.setAttribute("style","display: none;"),o.innerHTML='\n \n \n \n',document.head.appendChild(o.content);var r=n(46),a=n(27),s=n(89),l=n(70),c=n(8),d=n(9),u=n(61),p=n(7);function h(){var t=function(t,e){e||(e=t.slice(0));return Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}(['\n \n\n \x3c!-- this div fulfills an a11y requirement for combobox, do not remove --\x3e\n \n \n \x3c!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via --\x3e\n
\n \n \x3c!-- paper-input has type="text" for a11y, do not remove --\x3e\n \n \x3c!-- support hybrid mode: user might be using paper-input 1.x which distributes via --\x3e\n \n \n
\n\n@group Paper Elements\n@demo demo/index.html\n*/\n\nimport '@polymer/polymer/polymer-legacy.js';\nimport '../shadow.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n \n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.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';\n\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/iron-image/iron-image.js';\nimport '@polymer/paper-styles/element-styles/paper-material-styles.js';\nimport '@polymer/paper-styles/default-theme.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[Cards](https://www.google.com/design/spec/components/cards.html)\n\n`paper-card` is a container with a drop shadow.\n\nExample:\n\n \n
Some content
\n
\n Some action\n
\n \n\nExample - top card image:\n\n \n ...\n \n\n### Accessibility\n\nBy default, the `aria-label` will be set to the value of the `heading`\nattribute.\n\n### Styling\n\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-card-background-color` | The background color of the card | `--primary-background-color`\n`--paper-card-header-color` | The color of the header text | `#000`\n`--paper-card-header` | Mixin applied to the card header section | `{}`\n`--paper-card-header-text` | Mixin applied to the title in the card header section | `{}`\n`--paper-card-header-image` | Mixin applied to the image in the card header section | `{}`\n`--paper-card-header-image-text` | Mixin applied to the text overlapping the image in the card header section | `{}`\n`--paper-card-content` | Mixin applied to the card content section| `{}`\n`--paper-card-actions` | Mixin applied to the card action section | `{}`\n`--paper-card` | Mixin applied to the card | `{}`\n\n@group Paper Elements\n@element paper-card\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n\n
\n \n
[[heading]]
\n
\n\n \n`,\n\n is: 'paper-card',\n\n properties: {\n /**\n * The title of the card.\n */\n heading: {type: String, value: '', observer: '_headingChanged'},\n\n /**\n * The url of the title image of the card.\n */\n image: {type: String, value: ''},\n\n /**\n * The text alternative of the card's title image.\n */\n alt: {type: String},\n\n /**\n * When `true`, any change to the image url property will cause the\n * `placeholder` image to be shown until the image is fully rendered.\n */\n preloadImage: {type: Boolean, value: false},\n\n /**\n * When `preloadImage` is true, setting `fadeImage` to true will cause the\n * image to fade into place.\n */\n fadeImage: {type: Boolean, value: false},\n\n /**\n * This image will be used as a background/placeholder until the src image\n * has loaded. Use of a data-URI for placeholder is encouraged for instant\n * rendering.\n */\n placeholderImage: {type: String, value: null},\n\n /**\n * The z-depth of the card, from 0-5.\n */\n elevation: {type: Number, value: 1, reflectToAttribute: true},\n\n /**\n * Set this to true to animate the card shadow when setting a new\n * `z` value.\n */\n animatedShadow: {type: Boolean, value: false},\n\n /**\n * Read-only property used to pass down the `animatedShadow` value to\n * the underlying paper-material style (since they have different names).\n */\n animated: {\n type: Boolean,\n reflectToAttribute: true,\n readOnly: true,\n computed: '_computeAnimated(animatedShadow)'\n }\n },\n\n /**\n * Format function for aria-hidden. Use the ! operator results in the\n * empty string when given a falsy value.\n */\n _isHidden: function(image) {\n return image ? 'false' : 'true';\n },\n\n _headingChanged: function(heading) {\n var currentHeading = this.getAttribute('heading'),\n currentLabel = this.getAttribute('aria-label');\n\n if (typeof currentLabel !== 'string' || currentLabel === currentHeading) {\n this.setAttribute('aria-label', heading);\n }\n },\n\n _computeHeadingClass: function(image) {\n return image ? ' over-image' : '';\n },\n\n _computeAnimated: function(animatedShadow) {\n return animatedShadow;\n }\n});\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\nimport {isDirective} from './directive.js';\nimport {removeNodes} from './dom.js';\nimport {noChange, nothing, Part} from './part.js';\nimport {RenderOptions} from './render-options.js';\nimport {TemplateInstance} from './template-instance.js';\nimport {TemplateResult} from './template-result.js';\nimport {createMarker} from './template.js';\n\n// https://tc39.github.io/ecma262/#sec-typeof-operator\nexport type Primitive = null|undefined|boolean|number|string|Symbol|bigint;\nexport const isPrimitive = (value: unknown): value is Primitive => {\n return (\n value === null ||\n !(typeof value === 'object' || typeof value === 'function'));\n};\nexport const isIterable = (value: unknown): value is Iterable => {\n return Array.isArray(value) ||\n // tslint:disable-next-line:no-any\n !!(value && (value as any)[Symbol.iterator]);\n};\n\n/**\n * Writes attribute values to the DOM for a group of AttributeParts bound to a\n * single attibute. The value is only set once even if there are multiple parts\n * for an attribute.\n */\nexport class AttributeCommitter {\n readonly element: Element;\n readonly name: string;\n readonly strings: ReadonlyArray;\n readonly parts: ReadonlyArray;\n dirty = true;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n this.element = element;\n this.name = name;\n this.strings = strings;\n this.parts = [];\n for (let i = 0; i < strings.length - 1; i++) {\n (this.parts as AttributePart[])[i] = this._createPart();\n }\n }\n\n /**\n * Creates a single part. Override this to create a differnt type of part.\n */\n protected _createPart(): AttributePart {\n return new AttributePart(this);\n }\n\n protected _getValue(): unknown {\n const strings = this.strings;\n const l = strings.length - 1;\n let text = '';\n\n for (let i = 0; i < l; i++) {\n text += strings[i];\n const part = this.parts[i];\n if (part !== undefined) {\n const v = part.value;\n if (isPrimitive(v) || !isIterable(v)) {\n text += typeof v === 'string' ? v : String(v);\n } else {\n for (const t of v) {\n text += typeof t === 'string' ? t : String(t);\n }\n }\n }\n }\n\n text += strings[l];\n return text;\n }\n\n commit(): void {\n if (this.dirty) {\n this.dirty = false;\n this.element.setAttribute(this.name, this._getValue() as string);\n }\n }\n}\n\n/**\n * A Part that controls all or part of an attribute value.\n */\nexport class AttributePart implements Part {\n readonly committer: AttributeCommitter;\n value: unknown = undefined;\n\n constructor(committer: AttributeCommitter) {\n this.committer = committer;\n }\n\n setValue(value: unknown): void {\n if (value !== noChange && (!isPrimitive(value) || value !== this.value)) {\n this.value = value;\n // If the value is a not a directive, dirty the committer so that it'll\n // call setAttribute. If the value is a directive, it'll dirty the\n // committer if it calls setValue().\n if (!isDirective(value)) {\n this.committer.dirty = true;\n }\n }\n }\n\n commit() {\n while (isDirective(this.value)) {\n const directive = this.value;\n this.value = noChange;\n directive(this);\n }\n if (this.value === noChange) {\n return;\n }\n this.committer.commit();\n }\n}\n\n/**\n * A Part that controls a location within a Node tree. Like a Range, NodePart\n * has start and end locations and can set and update the Nodes between those\n * locations.\n *\n * NodeParts support several value types: primitives, Nodes, TemplateResults,\n * as well as arrays and iterables of those types.\n */\nexport class NodePart implements Part {\n readonly options: RenderOptions;\n startNode!: Node;\n endNode!: Node;\n value: unknown = undefined;\n private __pendingValue: unknown = undefined;\n\n constructor(options: RenderOptions) {\n this.options = options;\n }\n\n /**\n * Appends this part into a container.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendInto(container: Node) {\n this.startNode = container.appendChild(createMarker());\n this.endNode = container.appendChild(createMarker());\n }\n\n /**\n * Inserts this part after the `ref` node (between `ref` and `ref`'s next\n * sibling). Both `ref` and its next sibling must be static, unchanging nodes\n * such as those that appear in a literal section of a template.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterNode(ref: Node) {\n this.startNode = ref;\n this.endNode = ref.nextSibling!;\n }\n\n /**\n * Appends this part into a parent part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n appendIntoPart(part: NodePart) {\n part.__insert(this.startNode = createMarker());\n part.__insert(this.endNode = createMarker());\n }\n\n /**\n * Inserts this part after the `ref` part.\n *\n * This part must be empty, as its contents are not automatically moved.\n */\n insertAfterPart(ref: NodePart) {\n ref.__insert(this.startNode = createMarker());\n this.endNode = ref.endNode;\n ref.endNode = this.startNode;\n }\n\n setValue(value: unknown): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n const value = this.__pendingValue;\n if (value === noChange) {\n return;\n }\n if (isPrimitive(value)) {\n if (value !== this.value) {\n this.__commitText(value);\n }\n } else if (value instanceof TemplateResult) {\n this.__commitTemplateResult(value);\n } else if (value instanceof Node) {\n this.__commitNode(value);\n } else if (isIterable(value)) {\n this.__commitIterable(value);\n } else if (value === nothing) {\n this.value = nothing;\n this.clear();\n } else {\n // Fallback, will render the string representation\n this.__commitText(value);\n }\n }\n\n private __insert(node: Node) {\n this.endNode.parentNode!.insertBefore(node, this.endNode);\n }\n\n private __commitNode(value: Node): void {\n if (this.value === value) {\n return;\n }\n this.clear();\n this.__insert(value);\n this.value = value;\n }\n\n private __commitText(value: unknown): void {\n const node = this.startNode.nextSibling!;\n value = value == null ? '' : value;\n // If `value` isn't already a string, we explicitly convert it here in case\n // it can't be implicitly converted - i.e. it's a symbol.\n const valueAsString: string =\n typeof value === 'string' ? value : String(value);\n if (node === this.endNode.previousSibling &&\n node.nodeType === 3 /* Node.TEXT_NODE */) {\n // If we only have a single text node between the markers, we can just\n // set its value, rather than replacing it.\n // TODO(justinfagnani): Can we just check if this.value is primitive?\n (node as Text).data = valueAsString;\n } else {\n this.__commitNode(document.createTextNode(valueAsString));\n }\n this.value = value;\n }\n\n private __commitTemplateResult(value: TemplateResult): void {\n const template = this.options.templateFactory(value);\n if (this.value instanceof TemplateInstance &&\n this.value.template === template) {\n this.value.update(value.values);\n } else {\n // Make sure we propagate the template processor from the TemplateResult\n // so that we use its syntax extension, etc. The template factory comes\n // from the render function options so that it can control template\n // caching and preprocessing.\n const instance =\n new TemplateInstance(template, value.processor, this.options);\n const fragment = instance._clone();\n instance.update(value.values);\n this.__commitNode(fragment);\n this.value = instance;\n }\n }\n\n private __commitIterable(value: Iterable): void {\n // For an Iterable, we create a new InstancePart per item, then set its\n // value to the item. This is a little bit of overhead for every item in\n // an Iterable, but it lets us recurse easily and efficiently update Arrays\n // of TemplateResults that will be commonly returned from expressions like:\n // array.map((i) => html`${i}`), by reusing existing TemplateInstances.\n\n // If _value is an array, then the previous render was of an\n // iterable and _value will contain the NodeParts from the previous\n // render. If _value is not an array, clear this part and make a new\n // array for NodeParts.\n if (!Array.isArray(this.value)) {\n this.value = [];\n this.clear();\n }\n\n // Lets us keep track of how many items we stamped so we can clear leftover\n // items from a previous render\n const itemParts = this.value as NodePart[];\n let partIndex = 0;\n let itemPart: NodePart|undefined;\n\n for (const item of value) {\n // Try to reuse an existing part\n itemPart = itemParts[partIndex];\n\n // If no existing part, create a new one\n if (itemPart === undefined) {\n itemPart = new NodePart(this.options);\n itemParts.push(itemPart);\n if (partIndex === 0) {\n itemPart.appendIntoPart(this);\n } else {\n itemPart.insertAfterPart(itemParts[partIndex - 1]);\n }\n }\n itemPart.setValue(item);\n itemPart.commit();\n partIndex++;\n }\n\n if (partIndex < itemParts.length) {\n // Truncate the parts array so _value reflects the current state\n itemParts.length = partIndex;\n this.clear(itemPart && itemPart.endNode);\n }\n }\n\n clear(startNode: Node = this.startNode) {\n removeNodes(\n this.startNode.parentNode!, startNode.nextSibling!, this.endNode);\n }\n}\n\n/**\n * Implements a boolean attribute, roughly as defined in the HTML\n * specification.\n *\n * If the value is truthy, then the attribute is present with a value of\n * ''. If the value is falsey, the attribute is removed.\n */\nexport class BooleanAttributePart implements Part {\n readonly element: Element;\n readonly name: string;\n readonly strings: ReadonlyArray;\n value: unknown = undefined;\n private __pendingValue: unknown = undefined;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n if (strings.length !== 2 || strings[0] !== '' || strings[1] !== '') {\n throw new Error(\n 'Boolean attributes can only contain a single expression');\n }\n this.element = element;\n this.name = name;\n this.strings = strings;\n }\n\n setValue(value: unknown): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n const value = !!this.__pendingValue;\n if (this.value !== value) {\n if (value) {\n this.element.setAttribute(this.name, '');\n } else {\n this.element.removeAttribute(this.name);\n }\n this.value = value;\n }\n this.__pendingValue = noChange;\n }\n}\n\n/**\n * Sets attribute values for PropertyParts, so that the value is only set once\n * even if there are multiple parts for a property.\n *\n * If an expression controls the whole property value, then the value is simply\n * assigned to the property under control. If there are string literals or\n * multiple expressions, then the strings are expressions are interpolated into\n * a string first.\n */\nexport class PropertyCommitter extends AttributeCommitter {\n readonly single: boolean;\n\n constructor(element: Element, name: string, strings: ReadonlyArray) {\n super(element, name, strings);\n this.single =\n (strings.length === 2 && strings[0] === '' && strings[1] === '');\n }\n\n protected _createPart(): PropertyPart {\n return new PropertyPart(this);\n }\n\n protected _getValue() {\n if (this.single) {\n return this.parts[0].value;\n }\n return super._getValue();\n }\n\n commit(): void {\n if (this.dirty) {\n this.dirty = false;\n // tslint:disable-next-line:no-any\n (this.element as any)[this.name] = this._getValue();\n }\n }\n}\n\nexport class PropertyPart extends AttributePart {}\n\n// Detect event listener options support. If the `capture` property is read\n// from the options object, then options are supported. If not, then the thrid\n// argument to add/removeEventListener is interpreted as the boolean capture\n// value so we should only pass the `capture` property.\nlet eventOptionsSupported = false;\n\ntry {\n const options = {\n get capture() {\n eventOptionsSupported = true;\n return false;\n }\n };\n // tslint:disable-next-line:no-any\n window.addEventListener('test', options as any, options);\n // tslint:disable-next-line:no-any\n window.removeEventListener('test', options as any, options);\n} catch (_e) {\n}\n\n\ntype EventHandlerWithOptions =\n EventListenerOrEventListenerObject&Partial;\nexport class EventPart implements Part {\n readonly element: Element;\n readonly eventName: string;\n readonly eventContext?: EventTarget;\n value: undefined|EventHandlerWithOptions = undefined;\n private __options?: AddEventListenerOptions;\n private __pendingValue: undefined|EventHandlerWithOptions = undefined;\n private readonly __boundHandleEvent: (event: Event) => void;\n\n constructor(element: Element, eventName: string, eventContext?: EventTarget) {\n this.element = element;\n this.eventName = eventName;\n this.eventContext = eventContext;\n this.__boundHandleEvent = (e) => this.handleEvent(e);\n }\n\n setValue(value: undefined|EventHandlerWithOptions): void {\n this.__pendingValue = value;\n }\n\n commit() {\n while (isDirective(this.__pendingValue)) {\n const directive = this.__pendingValue;\n this.__pendingValue = noChange as EventHandlerWithOptions;\n directive(this);\n }\n if (this.__pendingValue === noChange) {\n return;\n }\n\n const newListener = this.__pendingValue;\n const oldListener = this.value;\n const shouldRemoveListener = newListener == null ||\n oldListener != null &&\n (newListener.capture !== oldListener.capture ||\n newListener.once !== oldListener.once ||\n newListener.passive !== oldListener.passive);\n const shouldAddListener =\n newListener != null && (oldListener == null || shouldRemoveListener);\n\n if (shouldRemoveListener) {\n this.element.removeEventListener(\n this.eventName, this.__boundHandleEvent, this.__options);\n }\n if (shouldAddListener) {\n this.__options = getOptions(newListener);\n this.element.addEventListener(\n this.eventName, this.__boundHandleEvent, this.__options);\n }\n this.value = newListener;\n this.__pendingValue = noChange as EventHandlerWithOptions;\n }\n\n handleEvent(event: Event) {\n if (typeof this.value === 'function') {\n this.value.call(this.eventContext || this.element, event);\n } else {\n (this.value as EventListenerObject).handleEvent(event);\n }\n }\n}\n\n// We copy options because of the inconsistent behavior of browsers when reading\n// the third argument of add/removeEventListener. IE11 doesn't support options\n// at all. Chrome 41 only reads `capture` if the argument is an object.\nconst getOptions = (o: AddEventListenerOptions|undefined) => o &&\n (eventOptionsSupported ?\n {capture: o.capture, passive: o.passive, once: o.once} :\n o.capture as AddEventListenerOptions);\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/iron-flex-layout/iron-flex-layout.js';\n\nimport {IronMeta} from '@polymer/iron-meta/iron-meta.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nimport {Base} from '@polymer/polymer/polymer-legacy.js';\n\n/**\n\nThe `iron-icon` element displays an icon. By default an icon renders as a 24px\nsquare.\n\nExample using src:\n\n \n\nExample setting size to 32px x 32px:\n\n \n\n \n\nThe iron elements include several sets of icons. To use the default set of\nicons, import `iron-icons.js` and use the `icon` attribute to specify an icon:\n\n \n\n \n\nTo use a different built-in set of icons, import the specific\n`iron-icons/-icons.js`, and specify the icon as `:`.\nFor example, to use a communication icon, you would use:\n\n \n\n \n\nYou can also create custom icon sets of bitmap or SVG icons.\n\nExample of using an icon named `cherry` from a custom iconset with the ID\n`fruit`:\n\n \n\nSee `` and `` for more information about how to\ncreate a custom iconset.\n\nSee the `iron-icons` demo to see the icons available in the various iconsets.\n\n### Styling\n\nThe following custom properties are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--iron-icon` | Mixin applied to the icon | {}\n`--iron-icon-width` | Width of the icon | `24px`\n`--iron-icon-height` | Height of the icon | `24px`\n`--iron-icon-fill-color` | Fill color of the svg icon | `currentcolor`\n`--iron-icon-stroke-color` | Stroke color of the svg icon | none\n\n@group Iron Elements\n@element iron-icon\n@demo demo/index.html\n@hero hero.svg\n@homepage polymer.github.io\n*/\nPolymer({\n _template: html`\n \n`,\n\n is: 'iron-icon',\n\n properties: {\n\n /**\n * The name of the icon to use. The name should be of the form:\n * `iconset_name:icon_name`.\n */\n icon: {type: String},\n\n /**\n * The name of the theme to used, if one is specified by the\n * iconset.\n */\n theme: {type: String},\n\n /**\n * If using iron-icon without an iconset, you can set the src to be\n * the URL of an individual icon image file. Note that this will take\n * precedence over a given icon attribute.\n */\n src: {type: String},\n\n /**\n * @type {!IronMeta}\n */\n _meta: {value: Base.create('iron-meta', {type: 'iconset'})}\n\n },\n\n observers: [\n '_updateIcon(_meta, isAttached)',\n '_updateIcon(theme, isAttached)',\n '_srcChanged(src, isAttached)',\n '_iconChanged(icon, isAttached)'\n ],\n\n _DEFAULT_ICONSET: 'icons',\n\n _iconChanged: function(icon) {\n var parts = (icon || '').split(':');\n this._iconName = parts.pop();\n this._iconsetName = parts.pop() || this._DEFAULT_ICONSET;\n this._updateIcon();\n },\n\n _srcChanged: function(src) {\n this._updateIcon();\n },\n\n _usesIconset: function() {\n return this.icon || !this.src;\n },\n\n /** @suppress {visibility} */\n _updateIcon: function() {\n if (this._usesIconset()) {\n if (this._img && this._img.parentNode) {\n dom(this.root).removeChild(this._img);\n }\n if (this._iconName === '') {\n if (this._iconset) {\n this._iconset.removeIcon(this);\n }\n } else if (this._iconsetName && this._meta) {\n this._iconset = /** @type {?Polymer.Iconset} */ (\n this._meta.byKey(this._iconsetName));\n if (this._iconset) {\n this._iconset.applyIcon(this, this._iconName, this.theme);\n this.unlisten(window, 'iron-iconset-added', '_updateIcon');\n } else {\n this.listen(window, 'iron-iconset-added', '_updateIcon');\n }\n }\n } else {\n if (this._iconset) {\n this._iconset.removeIcon(this);\n }\n if (!this._img) {\n this._img = document.createElement('img');\n this._img.style.width = '100%';\n this._img.style.height = '100%';\n this._img.draggable = false;\n }\n this._img.src = this.src;\n dom(this.root).appendChild(this._img);\n }\n }\n});\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\nimport {TemplateResult} from './template-result.js';\n\n/**\n * An expression marker with embedded unique key to avoid collision with\n * possible text in templates.\n */\nexport const marker = `{{lit-${String(Math.random()).slice(2)}}}`;\n\n/**\n * An expression marker used text-positions, multi-binding attributes, and\n * attributes with markup-like text values.\n */\nexport const nodeMarker = ``;\n\nexport const markerRegex = new RegExp(`${marker}|${nodeMarker}`);\n\n/**\n * Suffix appended to all bound attribute names.\n */\nexport const boundAttributeSuffix = '$lit$';\n\n/**\n * An updateable Template that tracks the location of dynamic parts.\n */\nexport class Template {\n readonly parts: TemplatePart[] = [];\n readonly element: HTMLTemplateElement;\n\n constructor(result: TemplateResult, element: HTMLTemplateElement) {\n this.element = element;\n\n const nodesToRemove: Node[] = [];\n const stack: Node[] = [];\n // Edge needs all 4 parameters present; IE11 needs 3rd parameter to be null\n const walker = document.createTreeWalker(\n element.content,\n 133 /* NodeFilter.SHOW_{ELEMENT|COMMENT|TEXT} */,\n null,\n false);\n // Keeps track of the last index associated with a part. We try to delete\n // unnecessary nodes, but we never want to associate two different parts\n // to the same index. They must have a constant node between.\n let lastPartIndex = 0;\n let index = -1;\n let partIndex = 0;\n const {strings, values: {length}} = result;\n while (partIndex < length) {\n const node = walker.nextNode() as Element | Comment | Text | null;\n if (node === null) {\n // We've exhausted the content inside a nested template element.\n // Because we still have parts (the outer for-loop), we know:\n // - There is a template in the stack\n // - The walker will find a nextNode outside the template\n walker.currentNode = stack.pop()!;\n continue;\n }\n index++;\n\n if (node.nodeType === 1 /* Node.ELEMENT_NODE */) {\n if ((node as Element).hasAttributes()) {\n const attributes = (node as Element).attributes;\n const {length} = attributes;\n // Per\n // https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap,\n // attributes are not guaranteed to be returned in document order.\n // In particular, Edge/IE can return them out of order, so we cannot\n // assume a correspondence between part index and attribute index.\n let count = 0;\n for (let i = 0; i < length; i++) {\n if (endsWith(attributes[i].name, boundAttributeSuffix)) {\n count++;\n }\n }\n while (count-- > 0) {\n // Get the template literal section leading up to the first\n // expression in this attribute\n const stringForPart = strings[partIndex];\n // Find the attribute name\n const name = lastAttributeNameRegex.exec(stringForPart)![2];\n // Find the corresponding attribute\n // All bound attributes have had a suffix added in\n // TemplateResult#getHTML to opt out of special attribute\n // handling. To look up the attribute value we also need to add\n // the suffix.\n const attributeLookupName =\n name.toLowerCase() + boundAttributeSuffix;\n const attributeValue =\n (node as Element).getAttribute(attributeLookupName)!;\n (node as Element).removeAttribute(attributeLookupName);\n const statics = attributeValue.split(markerRegex);\n this.parts.push({type: 'attribute', index, name, strings: statics});\n partIndex += statics.length - 1;\n }\n }\n if ((node as Element).tagName === 'TEMPLATE') {\n stack.push(node);\n walker.currentNode = (node as HTMLTemplateElement).content;\n }\n } else if (node.nodeType === 3 /* Node.TEXT_NODE */) {\n const data = (node as Text).data;\n if (data.indexOf(marker) >= 0) {\n const parent = node.parentNode!;\n const strings = data.split(markerRegex);\n const lastIndex = strings.length - 1;\n // Generate a new text node for each literal section\n // These nodes are also used as the markers for node parts\n for (let i = 0; i < lastIndex; i++) {\n let insert: Node;\n let s = strings[i];\n if (s === '') {\n insert = createMarker();\n } else {\n const match = lastAttributeNameRegex.exec(s);\n if (match !== null && endsWith(match[2], boundAttributeSuffix)) {\n s = s.slice(0, match.index) + match[1] +\n match[2].slice(0, -boundAttributeSuffix.length) + match[3];\n }\n insert = document.createTextNode(s);\n }\n parent.insertBefore(insert, node);\n this.parts.push({type: 'node', index: ++index});\n }\n // If there's no text, we must insert a comment to mark our place.\n // Else, we can trust it will stick around after cloning.\n if (strings[lastIndex] === '') {\n parent.insertBefore(createMarker(), node);\n nodesToRemove.push(node);\n } else {\n (node as Text).data = strings[lastIndex];\n }\n // We have a part for each match found\n partIndex += lastIndex;\n }\n } else if (node.nodeType === 8 /* Node.COMMENT_NODE */) {\n if ((node as Comment).data === marker) {\n const parent = node.parentNode!;\n // Add a new marker node to be the startNode of the Part if any of\n // the following are true:\n // * We don't have a previousSibling\n // * The previousSibling is already the start of a previous part\n if (node.previousSibling === null || index === lastPartIndex) {\n index++;\n parent.insertBefore(createMarker(), node);\n }\n lastPartIndex = index;\n this.parts.push({type: 'node', index});\n // If we don't have a nextSibling, keep this node so we have an end.\n // Else, we can remove it to save future costs.\n if (node.nextSibling === null) {\n (node as Comment).data = '';\n } else {\n nodesToRemove.push(node);\n index--;\n }\n partIndex++;\n } else {\n let i = -1;\n while ((i = (node as Comment).data.indexOf(marker, i + 1)) !== -1) {\n // Comment node has a binding marker inside, make an inactive part\n // The binding won't work, but subsequent bindings will\n // TODO (justinfagnani): consider whether it's even worth it to\n // make bindings in comments work\n this.parts.push({type: 'node', index: -1});\n partIndex++;\n }\n }\n }\n }\n\n // Remove text binding nodes after the walk to not disturb the TreeWalker\n for (const n of nodesToRemove) {\n n.parentNode!.removeChild(n);\n }\n }\n}\n\nconst endsWith = (str: string, suffix: string): boolean => {\n const index = str.length - suffix.length;\n return index >= 0 && str.slice(index) === suffix;\n};\n\n/**\n * A placeholder for a dynamic expression in an HTML template.\n *\n * There are two built-in part types: AttributePart and NodePart. NodeParts\n * always represent a single dynamic expression, while AttributeParts may\n * represent as many expressions are contained in the attribute.\n *\n * A Template's parts are mutable, so parts can be replaced or modified\n * (possibly to implement different template semantics). The contract is that\n * parts can only be replaced, not removed, added or reordered, and parts must\n * always consume the correct number of values in their `update()` method.\n *\n * TODO(justinfagnani): That requirement is a little fragile. A\n * TemplateInstance could instead be more careful about which values it gives\n * to Part.update().\n */\nexport type TemplatePart = {\n readonly type: 'node',\n index: number\n}|{readonly type: 'attribute', index: number, readonly name: string, readonly strings: ReadonlyArray};\n\nexport const isTemplatePartActive = (part: TemplatePart) => part.index !== -1;\n\n// Allows `document.createComment('')` to be renamed for a\n// small manual size-savings.\nexport const createMarker = () => document.createComment('');\n\n/**\n * This regex extracts the attribute name preceding an attribute-position\n * expression. It does this by matching the syntax allowed for attributes\n * against the string literal directly preceding the expression, assuming that\n * the expression is in an attribute-value position.\n *\n * See attributes in the HTML spec:\n * https://www.w3.org/TR/html5/syntax.html#elements-attributes\n *\n * \" \\x09\\x0a\\x0c\\x0d\" are HTML space characters:\n * https://www.w3.org/TR/html5/infrastructure.html#space-characters\n *\n * \"\\0-\\x1F\\x7F-\\x9F\" are Unicode control characters, which includes every\n * space character except \" \".\n *\n * So an attribute is:\n * * The name: any character except a control character, space character, ('),\n * (\"), \">\", \"=\", or \"/\"\n * * Followed by zero or more space characters\n * * Followed by \"=\"\n * * Followed by zero or more space characters\n * * Followed by:\n * * Any character except space, ('), (\"), \"<\", \">\", \"=\", (`), or\n * * (\") then any non-(\"), or\n * * (') then any non-(')\n */\nexport const lastAttributeNameRegex =\n /([ \\x09\\x0a\\x0c\\x0d])([^\\0-\\x1F\\x7F-\\x9F \"'>=/]+)([ \\x09\\x0a\\x0c\\x0d]*=[ \\x09\\x0a\\x0c\\x0d]*(?:[^ \\x09\\x0a\\x0c\\x0d\"'`<>=]*|\"[^\"]*|'[^']*))$/;\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-icon/iron-icon.js';\nimport '@polymer/paper-styles/default-theme.js';\n\nimport {PaperInkyFocusBehavior} from '@polymer/paper-behaviors/paper-inky-focus-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: [Icon\ntoggles](https://www.google.com/design/spec/components/buttons.html#buttons-toggle-buttons)\n\n`paper-icon-button` is a button with an image placed at the center. When the\nuser touches the button, a ripple effect emanates from the center of the button.\n\n`paper-icon-button` does not include a default icon set. To use icons from the\ndefault set, include `PolymerElements/iron-icons/iron-icons.html`, and use the\n`icon` attribute to specify which icon from the icon set to use.\n\n \n\nSee [`iron-iconset`](iron-iconset) for more information about\nhow to use a custom icon set.\n\nExample:\n\n \n\n \n \n\nTo use `paper-icon-button` as a link, wrap it in an anchor tag. Since\n`paper-icon-button` will already receive focus, you may want to prevent the\nanchor tag from receiving focus as well by setting its tabindex to -1.\n\n \n \n \n\n### Styling\n\nStyle the button with CSS as you would a normal DOM element. If you are using\nthe icons provided by `iron-icons`, they will inherit the foreground color of\nthe button.\n\n /* make a red \"favorite\" button *\\/\n \n\nBy default, the ripple is the same color as the foreground at 25% opacity. You\nmay customize the color using the `--paper-icon-button-ink-color` custom\nproperty.\n\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-icon-button-disabled-text` | The color of the disabled button | `--disabled-text-color`\n`--paper-icon-button-ink-color` | Selected/focus ripple color | `--primary-text-color`\n`--paper-icon-button` | Mixin for a button | `{}`\n`--paper-icon-button-disabled` | Mixin for a disabled button | `{}`\n`--paper-icon-button-hover` | Mixin for button on hover | `{}`\n\n@group Paper Elements\n@element paper-icon-button\n@demo demo/index.html\n*/\nPolymer({\n is: 'paper-icon-button',\n\n _template: html`\n \n\n \n `,\n\n hostAttributes: {role: 'button', tabindex: '0'},\n\n behaviors: [PaperInkyFocusBehavior],\n\n registered: function() {\n this._template.setAttribute('strip-whitespace', '');\n },\n\n properties: {\n /**\n * The URL of an image for the icon. If the src property is specified,\n * the icon property should not be.\n */\n src: {type: String},\n\n /**\n * Specifies the icon name or index in the set of icons available in\n * the icon's icon set. If the icon property is specified,\n * the src property should not be.\n */\n icon: {type: String},\n\n /**\n * Specifies the alternate text for the button, for accessibility.\n */\n alt: {type: String, observer: '_altChanged'}\n },\n\n _altChanged: function(newValue, oldValue) {\n var label = this.getAttribute('aria-label');\n\n // Don't stomp over a user-set aria-label.\n if (!label || oldValue == label) {\n this.setAttribute('aria-label', newValue);\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*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\n\n/**\n * @demo demo/index.html\n * @polymerBehavior\n */\nexport const IronControlState = {\n\n properties: {\n\n /**\n * If true, the element currently has focus.\n */\n focused: {\n type: Boolean,\n value: false,\n notify: true,\n readOnly: true,\n reflectToAttribute: true\n },\n\n /**\n * If true, the user cannot interact with this element.\n */\n disabled: {\n type: Boolean,\n value: false,\n notify: true,\n observer: '_disabledChanged',\n reflectToAttribute: true\n },\n\n /**\n * Value of the `tabindex` attribute before `disabled` was activated.\n * `null` means the attribute was not present.\n * @type {?string|undefined}\n */\n _oldTabIndex: {type: String},\n\n _boundFocusBlurHandler: {\n type: Function,\n value: function() {\n return this._focusBlurHandler.bind(this);\n }\n }\n },\n\n observers: ['_changedControlState(focused, disabled)'],\n\n /**\n * @return {void}\n */\n ready: function() {\n this.addEventListener('focus', this._boundFocusBlurHandler, true);\n this.addEventListener('blur', this._boundFocusBlurHandler, true);\n },\n\n _focusBlurHandler: function(event) {\n // Polymer takes care of retargeting events.\n this._setFocused(event.type === 'focus');\n return;\n },\n\n _disabledChanged: function(disabled, old) {\n this.setAttribute('aria-disabled', disabled ? 'true' : 'false');\n this.style.pointerEvents = disabled ? 'none' : '';\n if (disabled) {\n // Read the `tabindex` attribute instead of the `tabIndex` property.\n // The property returns `-1` if there is no `tabindex` attribute.\n // This distinction is important when restoring the value because\n // leaving `-1` hides shadow root children from the tab order.\n this._oldTabIndex = this.getAttribute('tabindex');\n this._setFocused(false);\n this.tabIndex = -1;\n this.blur();\n } else if (this._oldTabIndex !== undefined) {\n if (this._oldTabIndex === null) {\n this.removeAttribute('tabindex');\n } else {\n this.setAttribute('tabindex', this._oldTabIndex);\n }\n }\n },\n\n _changedControlState: function() {\n // _controlStateChanged is abstract, follow-on behaviors may implement it\n if (this._controlStateChanged) {\n this._controlStateChanged();\n }\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*/\nimport '@polymer/polymer/polymer-legacy.js';\n\n/**\n * Chrome uses an older version of DOM Level 3 Keyboard Events\n *\n * Most keys are labeled as text, but some are Unicode codepoints.\n * Values taken from:\n * http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html#KeySet-Set\n */\nvar KEY_IDENTIFIER = {\n 'U+0008': 'backspace',\n 'U+0009': 'tab',\n 'U+001B': 'esc',\n 'U+0020': 'space',\n 'U+007F': 'del'\n};\n\n/**\n * Special table for KeyboardEvent.keyCode.\n * KeyboardEvent.keyIdentifier is better, and KeyBoardEvent.key is even better\n * than that.\n *\n * Values from:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode#Value_of_keyCode\n */\nvar KEY_CODE = {\n 8: 'backspace',\n 9: 'tab',\n 13: 'enter',\n 27: 'esc',\n 33: 'pageup',\n 34: 'pagedown',\n 35: 'end',\n 36: 'home',\n 32: 'space',\n 37: 'left',\n 38: 'up',\n 39: 'right',\n 40: 'down',\n 46: 'del',\n 106: '*'\n};\n\n/**\n * MODIFIER_KEYS maps the short name for modifier keys used in a key\n * combo string to the property name that references those same keys\n * in a KeyboardEvent instance.\n */\nvar MODIFIER_KEYS = {\n 'shift': 'shiftKey',\n 'ctrl': 'ctrlKey',\n 'alt': 'altKey',\n 'meta': 'metaKey'\n};\n\n/**\n * KeyboardEvent.key is mostly represented by printable character made by\n * the keyboard, with unprintable keys labeled nicely.\n *\n * However, on OS X, Alt+char can make a Unicode character that follows an\n * Apple-specific mapping. In this case, we fall back to .keyCode.\n */\nvar KEY_CHAR = /[a-z0-9*]/;\n\n/**\n * Matches a keyIdentifier string.\n */\nvar IDENT_CHAR = /U\\+/;\n\n/**\n * Matches arrow keys in Gecko 27.0+\n */\nvar ARROW_KEY = /^arrow/;\n\n/**\n * Matches space keys everywhere (notably including IE10's exceptional name\n * `spacebar`).\n */\nvar SPACE_KEY = /^space(bar)?/;\n\n/**\n * Matches ESC key.\n *\n * Value from: http://w3c.github.io/uievents-key/#key-Escape\n */\nvar ESC_KEY = /^escape$/;\n\n/**\n * Transforms the key.\n * @param {string} key The KeyBoardEvent.key\n * @param {Boolean} [noSpecialChars] Limits the transformation to\n * alpha-numeric characters.\n */\nfunction transformKey(key, noSpecialChars) {\n var validKey = '';\n if (key) {\n var lKey = key.toLowerCase();\n if (lKey === ' ' || SPACE_KEY.test(lKey)) {\n validKey = 'space';\n } else if (ESC_KEY.test(lKey)) {\n validKey = 'esc';\n } else if (lKey.length == 1) {\n if (!noSpecialChars || KEY_CHAR.test(lKey)) {\n validKey = lKey;\n }\n } else if (ARROW_KEY.test(lKey)) {\n validKey = lKey.replace('arrow', '');\n } else if (lKey == 'multiply') {\n // numpad '*' can map to Multiply on IE/Windows\n validKey = '*';\n } else {\n validKey = lKey;\n }\n }\n return validKey;\n}\n\nfunction transformKeyIdentifier(keyIdent) {\n var validKey = '';\n if (keyIdent) {\n if (keyIdent in KEY_IDENTIFIER) {\n validKey = KEY_IDENTIFIER[keyIdent];\n } else if (IDENT_CHAR.test(keyIdent)) {\n keyIdent = parseInt(keyIdent.replace('U+', '0x'), 16);\n validKey = String.fromCharCode(keyIdent).toLowerCase();\n } else {\n validKey = keyIdent.toLowerCase();\n }\n }\n return validKey;\n}\n\nfunction transformKeyCode(keyCode) {\n var validKey = '';\n if (Number(keyCode)) {\n if (keyCode >= 65 && keyCode <= 90) {\n // ascii a-z\n // lowercase is 32 offset from uppercase\n validKey = String.fromCharCode(32 + keyCode);\n } else if (keyCode >= 112 && keyCode <= 123) {\n // function keys f1-f12\n validKey = 'f' + (keyCode - 112 + 1);\n } else if (keyCode >= 48 && keyCode <= 57) {\n // top 0-9 keys\n validKey = String(keyCode - 48);\n } else if (keyCode >= 96 && keyCode <= 105) {\n // num pad 0-9\n validKey = String(keyCode - 96);\n } else {\n validKey = KEY_CODE[keyCode];\n }\n }\n return validKey;\n}\n\n/**\n * Calculates the normalized key for a KeyboardEvent.\n * @param {KeyboardEvent} keyEvent\n * @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key\n * transformation to alpha-numeric chars. This is useful with key\n * combinations like shift + 2, which on FF for MacOS produces\n * keyEvent.key = @\n * To get 2 returned, set noSpecialChars = true\n * To get @ returned, set noSpecialChars = false\n */\nfunction normalizedKeyForEvent(keyEvent, noSpecialChars) {\n // Fall back from .key, to .detail.key for artifical keyboard events,\n // and then to deprecated .keyIdentifier and .keyCode.\n if (keyEvent.key) {\n return transformKey(keyEvent.key, noSpecialChars);\n }\n if (keyEvent.detail && keyEvent.detail.key) {\n return transformKey(keyEvent.detail.key, noSpecialChars);\n }\n return transformKeyIdentifier(keyEvent.keyIdentifier) ||\n transformKeyCode(keyEvent.keyCode) || '';\n}\n\nfunction keyComboMatchesEvent(keyCombo, event) {\n // For combos with modifiers we support only alpha-numeric keys\n var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers);\n return keyEvent === keyCombo.key &&\n (!keyCombo.hasModifiers ||\n (!!event.shiftKey === !!keyCombo.shiftKey &&\n !!event.ctrlKey === !!keyCombo.ctrlKey &&\n !!event.altKey === !!keyCombo.altKey &&\n !!event.metaKey === !!keyCombo.metaKey));\n}\n\nfunction parseKeyComboString(keyComboString) {\n if (keyComboString.length === 1) {\n return {combo: keyComboString, key: keyComboString, event: 'keydown'};\n }\n return keyComboString.split('+')\n .reduce(function(parsedKeyCombo, keyComboPart) {\n var eventParts = keyComboPart.split(':');\n var keyName = eventParts[0];\n var event = eventParts[1];\n\n if (keyName in MODIFIER_KEYS) {\n parsedKeyCombo[MODIFIER_KEYS[keyName]] = true;\n parsedKeyCombo.hasModifiers = true;\n } else {\n parsedKeyCombo.key = keyName;\n parsedKeyCombo.event = event || 'keydown';\n }\n\n return parsedKeyCombo;\n }, {combo: keyComboString.split(':').shift()});\n}\n\nfunction parseEventString(eventString) {\n return eventString.trim().split(' ').map(function(keyComboString) {\n return parseKeyComboString(keyComboString);\n });\n}\n\n/**\n * `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing\n * keyboard commands that pertain to [WAI-ARIA best\n * practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding). The\n * element takes care of browser differences with respect to Keyboard events and\n * uses an expressive syntax to filter key presses.\n *\n * Use the `keyBindings` prototype property to express what combination of keys\n * will trigger the callback. A key binding has the format\n * `\"KEY+MODIFIER:EVENT\": \"callback\"` (`\"KEY\": \"callback\"` or\n * `\"KEY:EVENT\": \"callback\"` are valid as well). Some examples:\n *\n * keyBindings: {\n * 'space': '_onKeydown', // same as 'space:keydown'\n * 'shift+tab': '_onKeydown',\n * 'enter:keypress': '_onKeypress',\n * 'esc:keyup': '_onKeyup'\n * }\n *\n * The callback will receive with an event containing the following information\n * in `event.detail`:\n *\n * _onKeydown: function(event) {\n * console.log(event.detail.combo); // KEY+MODIFIER, e.g. \"shift+tab\"\n * console.log(event.detail.key); // KEY only, e.g. \"tab\"\n * console.log(event.detail.event); // EVENT, e.g. \"keydown\"\n * console.log(event.detail.keyboardEvent); // the original KeyboardEvent\n * }\n *\n * Use the `keyEventTarget` attribute to set up event handlers on a specific\n * node.\n *\n * See the [demo source\n * code](https://github.com/PolymerElements/iron-a11y-keys-behavior/blob/master/demo/x-key-aware.html)\n * for an example.\n *\n * @demo demo/index.html\n * @polymerBehavior\n */\nexport const IronA11yKeysBehavior = {\n properties: {\n /**\n * The EventTarget that will be firing relevant KeyboardEvents. Set it to\n * `null` to disable the listeners.\n * @type {?EventTarget}\n */\n keyEventTarget: {\n type: Object,\n value: function() {\n return this;\n }\n },\n\n /**\n * If true, this property will cause the implementing element to\n * automatically stop propagation on any handled KeyboardEvents.\n */\n stopKeyboardEventPropagation: {type: Boolean, value: false},\n\n _boundKeyHandlers: {\n type: Array,\n value: function() {\n return [];\n }\n },\n\n // We use this due to a limitation in IE10 where instances will have\n // own properties of everything on the \"prototype\".\n _imperativeKeyBindings: {\n type: Object,\n value: function() {\n return {};\n }\n }\n },\n\n observers: ['_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)'],\n\n\n /**\n * To be used to express what combination of keys will trigger the relative\n * callback. e.g. `keyBindings: { 'esc': '_onEscPressed'}`\n * @type {!Object}\n */\n keyBindings: {},\n\n registered: function() {\n this._prepKeyBindings();\n },\n\n attached: function() {\n this._listenKeyEventListeners();\n },\n\n detached: function() {\n this._unlistenKeyEventListeners();\n },\n\n /**\n * Can be used to imperatively add a key binding to the implementing\n * element. This is the imperative equivalent of declaring a keybinding\n * in the `keyBindings` prototype property.\n *\n * @param {string} eventString\n * @param {string} handlerName\n */\n addOwnKeyBinding: function(eventString, handlerName) {\n this._imperativeKeyBindings[eventString] = handlerName;\n this._prepKeyBindings();\n this._resetKeyEventListeners();\n },\n\n /**\n * When called, will remove all imperatively-added key bindings.\n */\n removeOwnKeyBindings: function() {\n this._imperativeKeyBindings = {};\n this._prepKeyBindings();\n this._resetKeyEventListeners();\n },\n\n /**\n * Returns true if a keyboard event matches `eventString`.\n *\n * @param {KeyboardEvent} event\n * @param {string} eventString\n * @return {boolean}\n */\n keyboardEventMatchesKeys: function(event, eventString) {\n var keyCombos = parseEventString(eventString);\n for (var i = 0; i < keyCombos.length; ++i) {\n if (keyComboMatchesEvent(keyCombos[i], event)) {\n return true;\n }\n }\n return false;\n },\n\n _collectKeyBindings: function() {\n var keyBindings = this.behaviors.map(function(behavior) {\n return behavior.keyBindings;\n });\n\n if (keyBindings.indexOf(this.keyBindings) === -1) {\n keyBindings.push(this.keyBindings);\n }\n\n return keyBindings;\n },\n\n _prepKeyBindings: function() {\n this._keyBindings = {};\n\n this._collectKeyBindings().forEach(function(keyBindings) {\n for (var eventString in keyBindings) {\n this._addKeyBinding(eventString, keyBindings[eventString]);\n }\n }, this);\n\n for (var eventString in this._imperativeKeyBindings) {\n this._addKeyBinding(\n eventString, this._imperativeKeyBindings[eventString]);\n }\n\n // Give precedence to combos with modifiers to be checked first.\n for (var eventName in this._keyBindings) {\n this._keyBindings[eventName].sort(function(kb1, kb2) {\n var b1 = kb1[0].hasModifiers;\n var b2 = kb2[0].hasModifiers;\n return (b1 === b2) ? 0 : b1 ? -1 : 1;\n })\n }\n },\n\n _addKeyBinding: function(eventString, handlerName) {\n parseEventString(eventString).forEach(function(keyCombo) {\n this._keyBindings[keyCombo.event] =\n this._keyBindings[keyCombo.event] || [];\n\n this._keyBindings[keyCombo.event].push([keyCombo, handlerName]);\n }, this);\n },\n\n _resetKeyEventListeners: function() {\n this._unlistenKeyEventListeners();\n\n if (this.isAttached) {\n this._listenKeyEventListeners();\n }\n },\n\n _listenKeyEventListeners: function() {\n if (!this.keyEventTarget) {\n return;\n }\n Object.keys(this._keyBindings).forEach(function(eventName) {\n var keyBindings = this._keyBindings[eventName];\n var boundKeyHandler = this._onKeyBindingEvent.bind(this, keyBindings);\n\n this._boundKeyHandlers.push(\n [this.keyEventTarget, eventName, boundKeyHandler]);\n\n this.keyEventTarget.addEventListener(eventName, boundKeyHandler);\n }, this);\n },\n\n _unlistenKeyEventListeners: function() {\n var keyHandlerTuple;\n var keyEventTarget;\n var eventName;\n var boundKeyHandler;\n\n while (this._boundKeyHandlers.length) {\n // My kingdom for block-scope binding and destructuring assignment..\n keyHandlerTuple = this._boundKeyHandlers.pop();\n keyEventTarget = keyHandlerTuple[0];\n eventName = keyHandlerTuple[1];\n boundKeyHandler = keyHandlerTuple[2];\n\n keyEventTarget.removeEventListener(eventName, boundKeyHandler);\n }\n },\n\n _onKeyBindingEvent: function(keyBindings, event) {\n if (this.stopKeyboardEventPropagation) {\n event.stopPropagation();\n }\n\n // if event has been already prevented, don't do anything\n if (event.defaultPrevented) {\n return;\n }\n\n for (var i = 0; i < keyBindings.length; i++) {\n var keyCombo = keyBindings[i][0];\n var handlerName = keyBindings[i][1];\n if (keyComboMatchesEvent(keyCombo, event)) {\n this._triggerKeyHandler(keyCombo, handlerName, event);\n // exit the loop if eventDefault was prevented\n if (event.defaultPrevented) {\n return;\n }\n }\n }\n },\n\n _triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {\n var detail = Object.create(keyCombo);\n detail.keyboardEvent = keyboardEvent;\n var event =\n new CustomEvent(keyCombo.event, {detail: detail, cancelable: true});\n this[handlerName].call(this, event);\n if (event.defaultPrevented) {\n keyboardEvent.preventDefault();\n }\n }\n};\n","/**\n * @license\n * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * @module lit-html\n */\n\ninterface MaybePolyfilledCe extends CustomElementRegistry {\n readonly polyfillWrapFlushCallback?: object;\n}\n\n/**\n * True if the custom elements polyfill is in use.\n */\nexport const isCEPolyfill = window.customElements !== undefined &&\n (window.customElements as MaybePolyfilledCe).polyfillWrapFlushCallback !==\n undefined;\n\n/**\n * Reparents nodes, starting from `start` (inclusive) to `end` (exclusive),\n * into another container (could be the same container), before `before`. If\n * `before` is null, it appends the nodes to the container.\n */\nexport const reparentNodes =\n (container: Node,\n start: Node|null,\n end: Node|null = null,\n before: Node|null = null): void => {\n while (start !== end) {\n const n = start!.nextSibling;\n container.insertBefore(start!, before);\n start = n;\n }\n };\n\n/**\n * Removes nodes, starting from `start` (inclusive) to `end` (exclusive), from\n * `container`.\n */\nexport const removeNodes =\n (container: Node, start: Node|null, end: Node|null = null): void => {\n while (start !== end) {\n const n = start!.nextSibling;\n container.removeChild(start!);\n start = n;\n }\n };\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\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/*\nTypographic styles are provided matching the Material Design standard styles:\nhttp://www.google.com/design/spec/style/typography.html#typography-standard-styles\n\nNote that these are English/Latin centric styles. You may need to further adjust\nline heights and weights for CJK typesetting. See the notes in the Material\nDesign typography section.\n*/\n\nimport '@polymer/polymer/polymer-legacy.js';\nimport '@polymer/font-roboto/roboto.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n","/**\n * @license\n * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at\n * http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at\n * http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at\n * http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at\n * http://polymer.github.io/PATENTS.txt\n */\n\nimport {AttributePart, directive, Part, PropertyPart} from '../lit-html.js';\n\n\nexport interface ClassInfo {\n readonly [name: string]: string|boolean|number;\n}\n\n/**\n * Stores the ClassInfo object applied to a given AttributePart.\n * Used to unset existing values when a new ClassInfo object is applied.\n */\nconst classMapCache = new WeakMap();\n\n/**\n * A directive that applies CSS classes. This must be used in the `class`\n * attribute and must be the only part used in the attribute. It takes each\n * property in the `classInfo` argument and adds the property name to the\n * element's `classList` if the property value is truthy; if the property value\n * is falsey, the property name is removed from the element's `classList`. For\n * example\n * `{foo: bar}` applies the class `foo` if the value of `bar` is truthy.\n * @param classInfo {ClassInfo}\n */\nexport const classMap = directive((classInfo: ClassInfo) => (part: Part) => {\n if (!(part instanceof AttributePart) || (part instanceof PropertyPart) ||\n part.committer.name !== 'class' || part.committer.parts.length > 1) {\n throw new Error(\n 'The `classMap` directive must be used in the `class` attribute ' +\n 'and must be the only part in the attribute.');\n }\n\n const {committer} = part;\n const {element} = committer;\n\n // handle static classes\n if (!classMapCache.has(part)) {\n element.className = committer.strings.join(' ');\n }\n\n const {classList} = element;\n\n // remove old classes that no longer apply\n const oldInfo = classMapCache.get(part);\n for (const name in oldInfo) {\n if (!(name in classInfo)) {\n classList.remove(name);\n }\n }\n\n // add new classes\n for (const name in classInfo) {\n const value = classInfo[name];\n if (!oldInfo || value !== oldInfo[name]) {\n // We explicitly want a loose truthy check here because\n // it seems more convenient that '' and 0 are skipped.\n const method = value ? 'add' : 'remove';\n classList[method](name);\n }\n }\n classMapCache.set(part, classInfo);\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';\nimport '@polymer/paper-styles/color.js';\nimport './paper-spinner-styles.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\nimport {PaperSpinnerBehavior} from './paper-spinner-behavior.js';\n\nconst template = html`\n \n\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n`;\ntemplate.setAttribute('strip-whitespace', '');\n\n/**\nMaterial design: [Progress &\nactivity](https://www.google.com/design/spec/components/progress-activity.html)\n\nElement providing a single color material design circular spinner.\n\n \n\nThe default spinner is blue. It can be customized to be a different color.\n\n### Accessibility\n\nAlt attribute should be set to provide adequate context for accessibility. If\nnot provided, it defaults to 'loading'. Empty alt can be provided to mark the\nelement as decorative if alternative content is provided in another form (e.g. a\ntext block following the spinner).\n\n \n\n### Styling\n\nThe following custom properties and mixins are available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-spinner-color` | Color of the spinner | `--google-blue-500`\n`--paper-spinner-stroke-width` | The width of the spinner stroke | 3px\n\n@group Paper Elements\n@element paper-spinner-lite\n@hero hero.svg\n@demo demo/index.html\n*/\nPolymer({\n _template: template,\n\n is: 'paper-spinner-lite',\n\n behaviors: [PaperSpinnerBehavior]\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\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.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';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\n`iron-a11y-announcer` is a singleton element that is intended to add a11y\nto features that require on-demand announcement from screen readers. In\norder to make use of the announcer, it is best to request its availability\nin the announcing element.\n\nExample:\n\n Polymer({\n\n is: 'x-chatty',\n\n attached: function() {\n // This will create the singleton element if it has not\n // been created yet:\n Polymer.IronA11yAnnouncer.requestAvailability();\n }\n });\n\nAfter the `iron-a11y-announcer` has been made available, elements can\nmake announces by firing bubbling `iron-announce` events.\n\nExample:\n\n this.fire('iron-announce', {\n text: 'This is an announcement!'\n }, { bubbles: true });\n\nNote: announcements are only audible if you have a screen reader enabled.\n\n@group Iron Elements\n@demo demo/index.html\n*/\nexport const IronA11yAnnouncer = Polymer({\n _template: html`\n \n
[[_text]]
\n`,\n\n is: 'iron-a11y-announcer',\n\n properties: {\n\n /**\n * The value of mode is used to set the `aria-live` attribute\n * for the element that will be announced. Valid values are: `off`,\n * `polite` and `assertive`.\n */\n mode: {type: String, value: 'polite'},\n\n _text: {type: String, value: ''}\n },\n\n created: function() {\n if (!IronA11yAnnouncer.instance) {\n IronA11yAnnouncer.instance = this;\n }\n\n document.body.addEventListener(\n 'iron-announce', this._onIronAnnounce.bind(this));\n },\n\n /**\n * Cause a text string to be announced by screen readers.\n *\n * @param {string} text The text that should be announced.\n */\n announce: function(text) {\n this._text = '';\n this.async(function() {\n this._text = text;\n }, 100);\n },\n\n _onIronAnnounce: function(event) {\n if (event.detail && event.detail.text) {\n this.announce(event.detail.text);\n }\n }\n});\n\nIronA11yAnnouncer.instance = null;\n\nIronA11yAnnouncer.requestAvailability = function() {\n if (!IronA11yAnnouncer.instance) {\n IronA11yAnnouncer.instance = document.createElement('iron-a11y-announcer');\n }\n\n document.body.appendChild(IronA11yAnnouncer.instance);\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 {IronA11yAnnouncer} from '@polymer/iron-a11y-announcer/iron-a11y-announcer.js';\nimport {IronValidatableBehavior} from '@polymer/iron-validatable-behavior/iron-validatable-behavior.js';\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\n/**\n`` is a wrapper to a native `` element, that adds two-way\nbinding and prevention of invalid input. To use it, you must distribute a native\n`` yourself. You can continue to use the native `input` as you would\nnormally:\n\n \n \n \n\n \n \n \n\n### Two-way binding\n\nBy default you can only get notified of changes to a native ``'s `value`\ndue to user input:\n\n \n\nThis means that if you imperatively set the value (i.e. `someNativeInput.value =\n'foo'`), no events will be fired and this change cannot be observed.\n\n`iron-input` adds the `bind-value` property that mirrors the native `input`'s\n'`value` property; this property can be used for two-way data binding.\n`bind-value` will notify if it is changed either by user input or by script.\n\n \n \n \n\nNote: this means that if you want to imperatively set the native `input`'s, you\n_must_ set `bind-value` instead, so that the wrapper `iron-input` can be\nnotified.\n\n### Validation\n\n`iron-input` uses the native `input`'s validation. For simplicity, `iron-input`\nhas a `validate()` method (which internally just checks the distributed\n`input`'s validity), which sets an `invalid` attribute that can also be used for\nstyling.\n\nTo validate automatically as you type, you can use the `auto-validate`\nattribute.\n\n`iron-input` also fires an `iron-input-validate` event after `validate()` is\ncalled. You can use it to implement a custom validator:\n\n var CatsOnlyValidator = {\n validate: function(ironInput) {\n var valid = !ironInput.bindValue || ironInput.bindValue === 'cat';\n ironInput.invalid = !valid;\n return valid;\n }\n }\n ironInput.addEventListener('iron-input-validate', function() {\n CatsOnly.validate(input2);\n });\n\nYou can also use an element implementing an\n[`IronValidatorBehavior`](/element/PolymerElements/iron-validatable-behavior).\nThis example can also be found in the demo for this element:\n\n \n \n \n\n### Preventing invalid input\n\nIt may be desirable to only allow users to enter certain characters. You can use\nthe `allowed-pattern` attribute to accomplish this. This feature is separate\nfrom validation, and `allowed-pattern` does not affect how the input is\nvalidated.\n\n // Only allow typing digits, but a valid input has exactly 5 digits.\n \n \n \n\n@demo demo/index.html\n*/\nPolymer({\n _template: html`\n \n \n`,\n\n is: 'iron-input',\n behaviors: [IronValidatableBehavior],\n\n /**\n * Fired whenever `validate()` is called.\n *\n * @event iron-input-validate\n */\n\n properties: {\n\n /**\n * Use this property instead of `value` for two-way data binding, or to\n * set a default value for the input. **Do not** use the distributed\n * input's `value` property to set a default value.\n */\n bindValue: {type: String, value: ''},\n\n /**\n * Computed property that echoes `bindValue` (mostly used for Polymer 1.0\n * backcompatibility, if you were one-way binding to the Polymer 1.0\n * `input is=\"iron-input\"` value attribute).\n */\n value: {type: String, computed: '_computeValue(bindValue)'},\n\n /**\n * Regex-like list of characters allowed as input; all characters not in the\n * list will be rejected. The recommended format should be a list of allowed\n * characters, for example, `[a-zA-Z0-9.+-!;:]`.\n *\n * This pattern represents the allowed characters for the field; as the user\n * inputs text, each individual character will be checked against the\n * pattern (rather than checking the entire value as a whole). If a\n * character is not a match, it will be rejected.\n *\n * Pasted input will have each character checked individually; if any\n * character doesn't match `allowedPattern`, the entire pasted string will\n * be rejected.\n *\n * Note: if you were using `iron-input` in 1.0, you were also required to\n * set `prevent-invalid-input`. This is no longer needed as of Polymer 2.0,\n * and will be set automatically for you if an `allowedPattern` is provided.\n *\n */\n allowedPattern: {type: String},\n\n /**\n * Set to true to auto-validate the input value as you type.\n */\n autoValidate: {type: Boolean, value: false},\n\n /**\n * The native input element.\n */\n _inputElement: Object,\n },\n\n observers: ['_bindValueChanged(bindValue, _inputElement)'],\n listeners: {'input': '_onInput', 'keypress': '_onKeypress'},\n\n created: function() {\n IronA11yAnnouncer.requestAvailability();\n this._previousValidInput = '';\n this._patternAlreadyChecked = false;\n },\n\n attached: function() {\n // If the input is added at a later time, update the internal reference.\n this._observer = dom(this).observeNodes(function(info) {\n this._initSlottedInput();\n }.bind(this));\n },\n\n detached: function() {\n if (this._observer) {\n dom(this).unobserveNodes(this._observer);\n this._observer = null;\n }\n },\n\n /**\n * Returns the distributed input element.\n */\n get inputElement() {\n return this._inputElement;\n },\n\n _initSlottedInput: function() {\n this._inputElement = this.getEffectiveChildren()[0];\n\n if (this.inputElement && this.inputElement.value) {\n this.bindValue = this.inputElement.value;\n }\n\n this.fire('iron-input-ready');\n },\n\n get _patternRegExp() {\n var pattern;\n if (this.allowedPattern) {\n pattern = new RegExp(this.allowedPattern);\n } else {\n switch (this.inputElement.type) {\n case 'number':\n pattern = /[0-9.,e-]/;\n break;\n }\n }\n return pattern;\n },\n\n /**\n * @suppress {checkTypes}\n */\n _bindValueChanged: function(bindValue, inputElement) {\n // The observer could have run before attached() when we have actually\n // initialized this property.\n if (!inputElement) {\n return;\n }\n\n if (bindValue === undefined) {\n inputElement.value = null;\n } else if (bindValue !== inputElement.value) {\n this.inputElement.value = bindValue;\n }\n\n if (this.autoValidate) {\n this.validate();\n }\n\n // manually notify because we don't want to notify until after setting value\n this.fire('bind-value-changed', {value: bindValue});\n },\n\n _onInput: function() {\n // Need to validate each of the characters pasted if they haven't\n // been validated inside `_onKeypress` already.\n if (this.allowedPattern && !this._patternAlreadyChecked) {\n var valid = this._checkPatternValidity();\n if (!valid) {\n this._announceInvalidCharacter(\n 'Invalid string of characters not entered.');\n this.inputElement.value = this._previousValidInput;\n }\n }\n this.bindValue = this._previousValidInput = this.inputElement.value;\n this._patternAlreadyChecked = false;\n },\n\n _isPrintable: function(event) {\n // What a control/printable character is varies wildly based on the browser.\n // - most control characters (arrows, backspace) do not send a `keypress`\n // event\n // in Chrome, but the *do* on Firefox\n // - in Firefox, when they do send a `keypress` event, control chars have\n // a charCode = 0, keyCode = xx (for ex. 40 for down arrow)\n // - printable characters always send a keypress event.\n // - in Firefox, printable chars always have a keyCode = 0. In Chrome, the\n // keyCode\n // always matches the charCode.\n // None of this makes any sense.\n\n // For these keys, ASCII code == browser keycode.\n var anyNonPrintable = (event.keyCode == 8) || // backspace\n (event.keyCode == 9) || // tab\n (event.keyCode == 13) || // enter\n (event.keyCode == 27); // escape\n\n // For these keys, make sure it's a browser keycode and not an ASCII code.\n var mozNonPrintable = (event.keyCode == 19) || // pause\n (event.keyCode == 20) || // caps lock\n (event.keyCode == 45) || // insert\n (event.keyCode == 46) || // delete\n (event.keyCode == 144) || // num lock\n (event.keyCode == 145) || // scroll lock\n (event.keyCode > 32 &&\n event.keyCode < 41) || // page up/down, end, home, arrows\n (event.keyCode > 111 && event.keyCode < 124); // fn keys\n\n return !anyNonPrintable && !(event.charCode == 0 && mozNonPrintable);\n },\n\n _onKeypress: function(event) {\n if (!this.allowedPattern && this.inputElement.type !== 'number') {\n return;\n }\n var regexp = this._patternRegExp;\n if (!regexp) {\n return;\n }\n\n // Handle special keys and backspace\n if (event.metaKey || event.ctrlKey || event.altKey) {\n return;\n }\n\n // Check the pattern either here or in `_onInput`, but not in both.\n this._patternAlreadyChecked = true;\n\n var thisChar = String.fromCharCode(event.charCode);\n if (this._isPrintable(event) && !regexp.test(thisChar)) {\n event.preventDefault();\n this._announceInvalidCharacter(\n 'Invalid character ' + thisChar + ' not entered.');\n }\n },\n\n _checkPatternValidity: function() {\n var regexp = this._patternRegExp;\n if (!regexp) {\n return true;\n }\n for (var i = 0; i < this.inputElement.value.length; i++) {\n if (!regexp.test(this.inputElement.value[i])) {\n return false;\n }\n }\n return true;\n },\n\n /**\n * Returns true if `value` is valid. The validator provided in `validator`\n * will be used first, then any constraints.\n * @return {boolean} True if the value is valid.\n */\n validate: function() {\n if (!this.inputElement) {\n this.invalid = false;\n return true;\n }\n\n // Use the nested input's native validity.\n var valid = this.inputElement.checkValidity();\n\n // Only do extra checking if the browser thought this was valid.\n if (valid) {\n // Empty, required input is invalid\n if (this.required && this.bindValue === '') {\n valid = false;\n } else if (this.hasValidator()) {\n valid = IronValidatableBehavior.validate.call(this, this.bindValue);\n }\n }\n\n this.invalid = !valid;\n this.fire('iron-input-validate');\n return valid;\n },\n\n _announceInvalidCharacter: function(message) {\n this.fire('iron-announce', {text: message});\n },\n\n _computeValue: function(bindValue) {\n return bindValue;\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\n/**\n * Use `Polymer.PaperInputAddonBehavior` to implement an add-on for\n * ``. A add-on appears below the input, and may display\n * information based on the input value and validity such as a character counter\n * or an error message.\n * @polymerBehavior\n */\nexport const PaperInputAddonBehavior = {\n attached: function() {\n this.fire('addon-attached');\n },\n\n /**\n * The function called by `` when the input value or\n * validity changes.\n * @param {{\n * invalid: boolean,\n * inputElement: (Element|undefined),\n * value: (string|undefined)\n * }} state -\n * inputElement: The input element.\n * value: The input value.\n * invalid: True if the input value is invalid.\n */\n update: function(state) {}\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';\nimport '@polymer/paper-styles/typography.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\n\nimport {PaperInputAddonBehavior} from './paper-input-addon-behavior.js';\n\n/*\n`` is a character counter for use with\n``. It shows the number of characters entered in the\ninput and the max length if it is specified.\n\n \n \n \n \n\n### Styling\n\nThe following mixin is available for styling:\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--paper-input-char-counter` | Mixin applied to the element | `{}`\n*/\nPolymer({\n _template: html`\n \n\n [[_charCounterStr]]\n`,\n\n is: 'paper-input-char-counter',\n behaviors: [PaperInputAddonBehavior],\n properties: {_charCounterStr: {type: String, value: '0'}},\n\n /**\n * This overrides the update function in PaperInputAddonBehavior.\n * @param {{\n * inputElement: (Element|undefined),\n * value: (string|undefined),\n * invalid: boolean\n * }} state -\n * inputElement: The input element.\n * value: The input value.\n * invalid: True if the input value is invalid.\n */\n update: function(state) {\n if (!state.inputElement) {\n return;\n }\n\n state.value = state.value || '';\n\n var counter = state.value.toString().length.toString();\n\n if (state.inputElement.hasAttribute('maxlength')) {\n counter += '/' + state.inputElement.getAttribute('maxlength');\n }\n\n this._charCounterStr = counter;\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';\nimport '@polymer/iron-flex-layout/iron-flex-layout.js';\nimport '@polymer/paper-styles/default-theme.js';\nimport '@polymer/paper-styles/typography.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {dom} from '@polymer/polymer/lib/legacy/polymer.dom.js';\nimport {dashToCamelCase} from '@polymer/polymer/lib/utils/case-map.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nconst template = html`\n\n \n\n`;\ntemplate.setAttribute('style', 'display: none;');\ndocument.head.appendChild(template.content);\n\n/*\n`` is a container for a `