UNPKG

webdash-readme-preview

Version:
131 lines (128 loc) 68.6 kB
/** @license @nocompile Copyright (c) 2018 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ (function(){/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ 'use strict';var n,p="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)};function ba(){ba=function(){};p.Symbol||(p.Symbol=ca)}var ca=function(){var a=0;return function(b){return"jscomp_symbol_"+(b||"")+a++}}(); function da(){ba();var a=p.Symbol.iterator;a||(a=p.Symbol.iterator=p.Symbol("iterator"));"function"!=typeof Array.prototype[a]&&aa(Array.prototype,a,{configurable:!0,writable:!0,value:function(){return ea(this)}});da=function(){}}function ea(a){var b=0;return fa(function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}})}function fa(a){da();a={next:a};a[p.Symbol.iterator]=function(){return this};return a}function ha(a){da();var b=a[Symbol.iterator];return b?b.call(a):ea(a)} function ia(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function ja(){this.ia=this.root=null;this.P=!1;this.w=this.L=this.$=this.assignedSlot=this.assignedNodes=this.F=null;this.childNodes=this.nextSibling=this.previousSibling=this.lastChild=this.firstChild=this.parentNode=this.H=void 0;this.na=this.ca=!1}function r(a){a.V||(a.V=new ja);return a.V}function t(a){return a&&a.V};var u=window.ShadyDOM||{};u.xa=!(!Element.prototype.attachShadow||!Node.prototype.getRootNode);var ka=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild");u.s=!!(ka&&ka.configurable&&ka.get);u.ga=u.force||!u.xa;var la=navigator.userAgent.match("Trident"),ma=navigator.userAgent.match("Edge");void 0===u.la&&(u.la=u.s&&(la||ma));function v(a){return(a=t(a))&&void 0!==a.firstChild}function w(a){return"ShadyRoot"===a.ra}function x(a){a=a.getRootNode();if(w(a))return a} var na=Element.prototype,oa=na.matches||na.matchesSelector||na.mozMatchesSelector||na.msMatchesSelector||na.oMatchesSelector||na.webkitMatchesSelector;function pa(a,b){if(a&&b)for(var c=Object.getOwnPropertyNames(b),d=0,e;d<c.length&&(e=c[d]);d++){var f=Object.getOwnPropertyDescriptor(b,e);f&&Object.defineProperty(a,e,f)}}function qa(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];for(d=0;d<c.length;d++)pa(a,c[d]);return a}function sa(a,b){for(var c in b)a[c]=b[c]} var ta=document.createTextNode(""),ua=0,va=[];(new MutationObserver(function(){for(;va.length;)try{va.shift()()}catch(a){throw ta.textContent=ua++,a;}})).observe(ta,{characterData:!0});function wa(a){va.push(a);ta.textContent=ua++}var xa=!!document.contains;function ya(a,b){for(;b;){if(b==a)return!0;b=b.parentNode}return!1};var za=[],Aa;function Ba(a){Aa||(Aa=!0,wa(Ca));za.push(a)}function Ca(){Aa=!1;for(var a=!!za.length;za.length;)za.shift()();return a}Ca.list=za;function Da(){this.a=!1;this.addedNodes=[];this.removedNodes=[];this.O=new Set}function Ea(a){a.a||(a.a=!0,wa(function(){Fa(a)}))}function Fa(a){if(a.a){a.a=!1;var b=a.takeRecords();b.length&&a.O.forEach(function(a){a(b)})}}Da.prototype.takeRecords=function(){if(this.addedNodes.length||this.removedNodes.length){var a=[{addedNodes:this.addedNodes,removedNodes:this.removedNodes}];this.addedNodes=[];this.removedNodes=[];return a}return[]}; function Ga(a,b){var c=r(a);c.F||(c.F=new Da);c.F.O.add(b);var d=c.F;return{pa:b,B:d,sa:a,takeRecords:function(){return d.takeRecords()}}}function Ha(a){var b=a&&a.B;b&&(b.O.delete(a.pa),b.O.size||(r(a.sa).F=null))} function Ia(a,b){var c=b.getRootNode();return a.map(function(a){var b=c===a.target.getRootNode();if(b&&a.addedNodes){if(b=Array.from(a.addedNodes).filter(function(a){return c===a.getRootNode()}),b.length)return a=Object.create(a),Object.defineProperty(a,"addedNodes",{value:b,configurable:!0}),a}else if(b)return a}).filter(function(a){return a})};var y={},Ja=Element.prototype.insertBefore,Ka=Element.prototype.replaceChild,La=Element.prototype.removeChild,Ma=Element.prototype.setAttribute,Na=Element.prototype.removeAttribute,Oa=Element.prototype.cloneNode,Pa=Document.prototype.importNode,Qa=Element.prototype.addEventListener,Ra=Element.prototype.removeEventListener,Sa=Window.prototype.addEventListener,Ta=Window.prototype.removeEventListener,Ua=Element.prototype.dispatchEvent,Va=Node.prototype.contains||HTMLElement.prototype.contains,Wa=Element.prototype.querySelector, Xa=DocumentFragment.prototype.querySelector,Ya=Document.prototype.querySelector,Za=Element.prototype.querySelectorAll,$a=DocumentFragment.prototype.querySelectorAll,ab=Document.prototype.querySelectorAll;y.appendChild=Element.prototype.appendChild;y.insertBefore=Ja;y.replaceChild=Ka;y.removeChild=La;y.setAttribute=Ma;y.removeAttribute=Na;y.cloneNode=Oa;y.importNode=Pa;y.addEventListener=Qa;y.removeEventListener=Ra;y.Fa=Sa;y.Ga=Ta;y.dispatchEvent=Ua;y.contains=Va;y.Oa=Wa;y.Ra=Xa;y.Ma=Ya; y.querySelector=function(a){switch(this.nodeType){case Node.ELEMENT_NODE:return Wa.call(this,a);case Node.DOCUMENT_NODE:return Ya.call(this,a);default:return Xa.call(this,a)}};y.Pa=Za;y.Sa=$a;y.Na=ab;y.querySelectorAll=function(a){switch(this.nodeType){case Node.ELEMENT_NODE:return Za.call(this,a);case Node.DOCUMENT_NODE:return ab.call(this,a);default:return $a.call(this,a)}};var bb=/[&\u00A0"]/g,cb=/[&\u00A0<>]/g;function db(a){switch(a){case "&":return"&amp;";case "<":return"&lt;";case ">":return"&gt;";case '"':return"&quot;";case "\u00a0":return"&nbsp;"}}function eb(a){for(var b={},c=0;c<a.length;c++)b[a[c]]=!0;return b}var fb=eb("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),gb=eb("style script xmp iframe noembed noframes plaintext noscript".split(" ")); function hb(a,b){"template"===a.localName&&(a=a.content);for(var c="",d=b?b(a):a.childNodes,e=0,f=d.length,g;e<f&&(g=d[e]);e++){a:{var h=g;var k=a;var l=b;switch(h.nodeType){case Node.ELEMENT_NODE:for(var m=h.localName,q="<"+m,O=h.attributes,L=0;k=O[L];L++)q+=" "+k.name+'="'+k.value.replace(bb,db)+'"';q+=">";h=fb[m]?q:q+hb(h,l)+"</"+m+">";break a;case Node.TEXT_NODE:h=h.data;h=k&&gb[k.localName]?h:h.replace(cb,db);break a;case Node.COMMENT_NODE:h="\x3c!--"+h.data+"--\x3e";break a;default:throw window.console.error(h), Error("not implemented");}}c+=h}return c};var z={},A=document.createTreeWalker(document,NodeFilter.SHOW_ALL,null,!1),B=document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT,null,!1);function ib(a){var b=[];A.currentNode=a;for(a=A.firstChild();a;)b.push(a),a=A.nextSibling();return b}z.parentNode=function(a){A.currentNode=a;return A.parentNode()};z.firstChild=function(a){A.currentNode=a;return A.firstChild()};z.lastChild=function(a){A.currentNode=a;return A.lastChild()};z.previousSibling=function(a){A.currentNode=a;return A.previousSibling()}; z.nextSibling=function(a){A.currentNode=a;return A.nextSibling()};z.childNodes=ib;z.parentElement=function(a){B.currentNode=a;return B.parentNode()};z.firstElementChild=function(a){B.currentNode=a;return B.firstChild()};z.lastElementChild=function(a){B.currentNode=a;return B.lastChild()};z.previousElementSibling=function(a){B.currentNode=a;return B.previousSibling()};z.nextElementSibling=function(a){B.currentNode=a;return B.nextSibling()}; z.children=function(a){var b=[];B.currentNode=a;for(a=B.firstChild();a;)b.push(a),a=B.nextSibling();return b};z.innerHTML=function(a){return hb(a,function(a){return ib(a)})};z.textContent=function(a){switch(a.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:a=document.createTreeWalker(a,NodeFilter.SHOW_TEXT,null,!1);for(var b="",c;c=a.nextNode();)b+=c.nodeValue;return b;default:return a.nodeValue}};var C={},jb=u.s,kb=[Node.prototype,Element.prototype,HTMLElement.prototype];function D(a){var b;a:{for(b=0;b<kb.length;b++){var c=kb[b];if(c.hasOwnProperty(a)){b=c;break a}}b=void 0}if(!b)throw Error("Could not find descriptor for "+a);return Object.getOwnPropertyDescriptor(b,a)} var E=jb?{parentNode:D("parentNode"),firstChild:D("firstChild"),lastChild:D("lastChild"),previousSibling:D("previousSibling"),nextSibling:D("nextSibling"),childNodes:D("childNodes"),parentElement:D("parentElement"),previousElementSibling:D("previousElementSibling"),nextElementSibling:D("nextElementSibling"),innerHTML:D("innerHTML"),textContent:D("textContent"),firstElementChild:D("firstElementChild"),lastElementChild:D("lastElementChild"),children:D("children")}:{},lb=jb?{firstElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype, "firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(DocumentFragment.prototype,"children")}:{},mb=jb?{firstElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"firstElementChild"),lastElementChild:Object.getOwnPropertyDescriptor(Document.prototype,"lastElementChild"),children:Object.getOwnPropertyDescriptor(Document.prototype,"children")}:{};C.ha=E;C.Qa=lb;C.La=mb;C.parentNode=function(a){return E.parentNode.get.call(a)}; C.firstChild=function(a){return E.firstChild.get.call(a)};C.lastChild=function(a){return E.lastChild.get.call(a)};C.previousSibling=function(a){return E.previousSibling.get.call(a)};C.nextSibling=function(a){return E.nextSibling.get.call(a)};C.childNodes=function(a){return Array.prototype.slice.call(E.childNodes.get.call(a))};C.parentElement=function(a){return E.parentElement.get.call(a)};C.previousElementSibling=function(a){return E.previousElementSibling.get.call(a)};C.nextElementSibling=function(a){return E.nextElementSibling.get.call(a)}; C.innerHTML=function(a){return E.innerHTML.get.call(a)};C.textContent=function(a){return E.textContent.get.call(a)};C.children=function(a){switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:a=lb.children.get.call(a);break;case Node.DOCUMENT_NODE:a=mb.children.get.call(a);break;default:a=E.children.get.call(a)}return Array.prototype.slice.call(a)}; C.firstElementChild=function(a){switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return lb.firstElementChild.get.call(a);case Node.DOCUMENT_NODE:return mb.firstElementChild.get.call(a);default:return E.firstElementChild.get.call(a)}};C.lastElementChild=function(a){switch(a.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:return lb.lastElementChild.get.call(a);case Node.DOCUMENT_NODE:return mb.lastElementChild.get.call(a);default:return E.lastElementChild.get.call(a)}};var F=u.la?C:z;function nb(a){for(;a.firstChild;)a.removeChild(a.firstChild)} var ob=u.s,pb=document.implementation.createHTMLDocument("inert"),qb=Object.getOwnPropertyDescriptor(Node.prototype,"isConnected"),rb=qb&&qb.get,sb=Object.getOwnPropertyDescriptor(Document.prototype,"activeElement"),tb={parentElement:{get:function(){var a=t(this);(a=a&&a.parentNode)&&a.nodeType!==Node.ELEMENT_NODE&&(a=null);return void 0!==a?a:F.parentElement(this)},configurable:!0},parentNode:{get:function(){var a=t(this);a=a&&a.parentNode;return void 0!==a?a:F.parentNode(this)},configurable:!0}, nextSibling:{get:function(){var a=t(this);a=a&&a.nextSibling;return void 0!==a?a:F.nextSibling(this)},configurable:!0},previousSibling:{get:function(){var a=t(this);a=a&&a.previousSibling;return void 0!==a?a:F.previousSibling(this)},configurable:!0},nextElementSibling:{get:function(){var a=t(this);if(a&&void 0!==a.nextSibling){for(a=this.nextSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return F.nextElementSibling(this)},configurable:!0},previousElementSibling:{get:function(){var a= t(this);if(a&&void 0!==a.previousSibling){for(a=this.previousSibling;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return F.previousElementSibling(this)},configurable:!0}},ub={className:{get:function(){return this.getAttribute("class")||""},set:function(a){this.setAttribute("class",a)},configurable:!0}},vb={childNodes:{get:function(){if(v(this)){var a=t(this);if(!a.childNodes){a.childNodes=[];for(var b=this.firstChild;b;b=b.nextSibling)a.childNodes.push(b)}var c=a.childNodes}else c= F.childNodes(this);c.item=function(a){return c[a]};return c},configurable:!0},childElementCount:{get:function(){return this.children.length},configurable:!0},firstChild:{get:function(){var a=t(this);a=a&&a.firstChild;return void 0!==a?a:F.firstChild(this)},configurable:!0},lastChild:{get:function(){var a=t(this);a=a&&a.lastChild;return void 0!==a?a:F.lastChild(this)},configurable:!0},textContent:{get:function(){if(v(this)){for(var a=[],b=0,c=this.childNodes,d;d=c[b];b++)d.nodeType!==Node.COMMENT_NODE&& a.push(d.textContent);return a.join("")}return F.textContent(this)},set:function(a){if("undefined"===typeof a||null===a)a="";switch(this.nodeType){case Node.ELEMENT_NODE:case Node.DOCUMENT_FRAGMENT_NODE:if(!v(this)&&ob){var b=this.firstChild;(b!=this.lastChild||b&&b.nodeType!=Node.TEXT_NODE)&&nb(this);C.ha.textContent.set.call(this,a)}else nb(this),(0<a.length||this.nodeType===Node.ELEMENT_NODE)&&this.appendChild(document.createTextNode(a));break;default:this.nodeValue=a}},configurable:!0},firstElementChild:{get:function(){var a= t(this);if(a&&void 0!==a.firstChild){for(a=this.firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.nextSibling;return a}return F.firstElementChild(this)},configurable:!0},lastElementChild:{get:function(){var a=t(this);if(a&&void 0!==a.lastChild){for(a=this.lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.previousSibling;return a}return F.lastElementChild(this)},configurable:!0},children:{get:function(){var a=v(this)?Array.prototype.filter.call(this.childNodes,function(a){return a.nodeType===Node.ELEMENT_NODE}): F.children(this);a.item=function(b){return a[b]};return a},configurable:!0},innerHTML:{get:function(){return v(this)?hb("template"===this.localName?this.content:this):F.innerHTML(this)},set:function(a){var b="template"===this.localName?this.content:this;nb(b);var c=this.localName;c&&"template"!==c||(c="div");c=pb.createElement(c);for(ob?C.ha.innerHTML.set.call(c,a):c.innerHTML=a;c.firstChild;)b.appendChild(c.firstChild)},configurable:!0}},wb={shadowRoot:{get:function(){var a=t(this);return a&&a.ia|| null},configurable:!0}},xb={activeElement:{get:function(){var a=sb&&sb.get?sb.get.call(document):u.s?void 0:document.activeElement;if(a&&a.nodeType){var b=!!w(this);if(this===document||b&&this.host!==a&&y.contains.call(this.host,a)){for(b=x(a);b&&b!==this;)a=b.host,b=x(a);a=this===document?b?null:a:b===this?a:null}else a=null}else a=null;return a},set:function(){},configurable:!0}}; function G(a,b,c){for(var d in b){var e=Object.getOwnPropertyDescriptor(a,d);e&&e.configurable||!e&&c?Object.defineProperty(a,d,b[d]):c&&console.warn("Could not define",d,"on",a)}}function H(a){G(a,tb);G(a,ub);G(a,vb);G(a,xb)} function yb(){var a=zb.prototype;a.__proto__=DocumentFragment.prototype;G(a,tb,!0);G(a,vb,!0);G(a,xb,!0);Object.defineProperties(a,{nodeType:{value:Node.DOCUMENT_FRAGMENT_NODE,configurable:!0},nodeName:{value:"#document-fragment",configurable:!0},nodeValue:{value:null,configurable:!0}});["localName","namespaceURI","prefix"].forEach(function(b){Object.defineProperty(a,b,{value:void 0,configurable:!0})});["ownerDocument","baseURI","isConnected"].forEach(function(b){Object.defineProperty(a,b,{get:function(){return this.host[b]}, configurable:!0})})}var Ab=u.s?function(){}:function(a){var b=r(a);b.ca||(b.ca=!0,G(a,tb,!0),G(a,ub,!0))},Bb=u.s?function(){}:function(a){r(a).na||(G(a,vb,!0),G(a,wb,!0))};var Cb=F.childNodes;function Db(a,b,c){Ab(a);c=c||null;var d=r(a),e=r(b),f=c?r(c):null;d.previousSibling=c?f.previousSibling:b.lastChild;if(f=t(d.previousSibling))f.nextSibling=a;if(f=t(d.nextSibling=c))f.previousSibling=a;d.parentNode=b;c?c===e.firstChild&&(e.firstChild=a):(e.lastChild=a,e.firstChild||(e.firstChild=a));e.childNodes=null} function Eb(a,b){var c=r(a);if(void 0===c.firstChild)for(b=b||Cb(a),c.firstChild=b[0]||null,c.lastChild=b[b.length-1]||null,Bb(a),c=0;c<b.length;c++){var d=b[c],e=r(d);e.parentNode=a;e.nextSibling=b[c+1]||null;e.previousSibling=b[c-1]||null;Ab(d)}};var Fb=F.parentNode; function Gb(a,b,c){if(b===a)throw Error("Failed to execute 'appendChild' on 'Node': The new child element contains the parent.");if(c){var d=t(c);d=d&&d.parentNode;if(void 0!==d&&d!==a||void 0===d&&Fb(c)!==a)throw Error("Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.");}if(c===b)return b;b.parentNode&&Hb(b.parentNode,b);var e,f;if(!b.__noInsertionPoint){if(f=e=x(a)){var g;"slot"===b.localName?g=[b]:b.querySelectorAll&& (g=b.querySelectorAll("slot"));f=g&&g.length?g:void 0}f&&(g=e,d=f,g.o=g.o||[],g.f=g.f||[],g.g=g.g||{},g.o.push.apply(g.o,[].concat(d instanceof Array?d:ia(ha(d)))))}("slot"===a.localName||f)&&(e=e||x(a))&&Ib(e);if(v(a)){e=c;Bb(a);f=r(a);void 0!==f.firstChild&&(f.childNodes=null);if(b.nodeType===Node.DOCUMENT_FRAGMENT_NODE){f=b.childNodes;for(g=0;g<f.length;g++)Db(f[g],a,e);e=r(b);f=void 0!==e.firstChild?null:void 0;e.firstChild=e.lastChild=f;e.childNodes=f}else Db(b,a,e);e=t(a);if(Jb(a)){Ib(e.root); var h=!0}else e.root&&(h=!0)}h||(h=w(a)?a.host:a,c?(c=Kb(c),y.insertBefore.call(h,b,c)):y.appendChild.call(h,b));Lb(a,b);return b} function Hb(a,b){if(b.parentNode!==a)throw Error("The node to be removed is not a child of this node: "+b);var c=x(b),d=t(a);if(v(a)){var e=r(b),f=r(a);b===f.firstChild&&(f.firstChild=e.nextSibling);b===f.lastChild&&(f.lastChild=e.previousSibling);var g=e.previousSibling,h=e.nextSibling;g&&(r(g).nextSibling=h);h&&(r(h).previousSibling=g);e.parentNode=e.previousSibling=e.nextSibling=void 0;void 0!==f.childNodes&&(f.childNodes=null);if(Jb(a)){Ib(d.root);var k=!0}}Mb(b);if(c){(e=a&&"slot"===a.localName)&& (k=!0);if(c.f){Nb(c);f=c.g;for(ra in f)for(g=f[ra],h=0;h<g.length;h++){var l=g[h];if(ya(b,l)){g.splice(h,1);var m=c.f.indexOf(l);0<=m&&c.f.splice(m,1);h--;m=t(l);if(l=m.w)for(var q=0;q<l.length;q++){var O=l[q],L=Ob(O);L&&y.removeChild.call(L,O)}m.w=[];m.assignedNodes=[];m=!0}}var ra=m}else ra=void 0;(ra||e)&&Ib(c)}k||(k=w(a)?a.host:a,(!d.root&&"slot"!==b.localName||k===Fb(b))&&y.removeChild.call(k,b));Lb(a,null,b);return b} function Mb(a){var b=t(a);if(b&&void 0!==b.H){b=a.childNodes;for(var c=0,d=b.length,e;c<d&&(e=b[c]);c++)Mb(e)}if(a=t(a))a.H=void 0}function Kb(a){var b=a;a&&"slot"===a.localName&&(b=(b=(b=t(a))&&b.w)&&b.length?b[0]:Kb(a.nextSibling));return b}function Jb(a){return(a=(a=t(a))&&a.root)&&Pb(a)} function Qb(a,b){if("slot"===b)a=a.parentNode,Jb(a)&&Ib(t(a).root);else if("slot"===a.localName&&"name"===b&&(b=x(a))){if(b.f){var c=a.oa,d=Rb(a);if(d!==c){c=b.g[c];var e=c.indexOf(a);0<=e&&c.splice(e,1);c=b.g[d]||(b.g[d]=[]);c.push(a);1<c.length&&(b.g[d]=Sb(c))}}Ib(b)}}function Lb(a,b,c){if(a=(a=t(a))&&a.F)b&&a.addedNodes.push(b),c&&a.removedNodes.push(c),Ea(a)} function Tb(a){if(a&&a.nodeType){var b=r(a),c=b.H;void 0===c&&(w(a)?(c=a,b.H=c):(c=(c=a.parentNode)?Tb(c):a,y.contains.call(document.documentElement,a)&&(b.H=c)));return c}}function Ub(a,b,c){var d=[];Vb(a.childNodes,b,c,d);return d}function Vb(a,b,c,d){for(var e=0,f=a.length,g;e<f&&(g=a[e]);e++){var h;if(h=g.nodeType===Node.ELEMENT_NODE){h=g;var k=b,l=c,m=d,q=k(h);q&&m.push(h);l&&l(q)?h=q:(Vb(h.childNodes,k,l,m),h=void 0)}if(h)break}}var Wb=null; function Xb(a,b,c){Wb||(Wb=window.ShadyCSS&&window.ShadyCSS.ScopingShim);Wb&&"class"===b?Wb.setElementClass(a,c):(y.setAttribute.call(a,b,c),Qb(a,b))}function Yb(a,b){if(a.ownerDocument!==document)return y.importNode.call(document,a,b);var c=y.importNode.call(document,a,!1);if(b){a=a.childNodes;b=0;for(var d;b<a.length;b++)d=Yb(a[b],!0),c.appendChild(d)}return c};var Zb="__eventWrappers"+Date.now(),$b={blur:!0,focus:!0,focusin:!0,focusout:!0,click:!0,dblclick:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,wheel:!0,beforeinput:!0,input:!0,keydown:!0,keyup:!0,compositionstart:!0,compositionupdate:!0,compositionend:!0,touchstart:!0,touchend:!0,touchmove:!0,touchcancel:!0,pointerover:!0,pointerenter:!0,pointerdown:!0,pointermove:!0,pointerup:!0,pointercancel:!0,pointerout:!0,pointerleave:!0,gotpointercapture:!0,lostpointercapture:!0, dragstart:!0,drag:!0,dragenter:!0,dragleave:!0,dragover:!0,drop:!0,dragend:!0,DOMActivate:!0,DOMFocusIn:!0,DOMFocusOut:!0,keypress:!0};function ac(a,b){var c=[],d=a;for(a=a===window?window:a.getRootNode();d;)c.push(d),d=d.assignedSlot?d.assignedSlot:d.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&d.host&&(b||d!==a)?d.host:d.parentNode;c[c.length-1]===document&&c.push(window);return c} function bc(a,b){if(!w)return a;a=ac(a,!0);for(var c=0,d,e,f,g;c<b.length;c++)if(d=b[c],f=d===window?window:d.getRootNode(),f!==e&&(g=a.indexOf(f),e=f),!w(f)||-1<g)return d} var cc={get composed(){!1!==this.isTrusted&&void 0===this.T&&(this.T=$b[this.type]);return this.T||!1},composedPath:function(){this.b||(this.b=ac(this.__target,this.composed));return this.b},get target(){return bc(this.currentTarget,this.composedPath())},get relatedTarget(){if(!this.U)return null;this.c||(this.c=ac(this.U,!0));return bc(this.currentTarget,this.c)},stopPropagation:function(){Event.prototype.stopPropagation.call(this);this.a=!0},stopImmediatePropagation:function(){Event.prototype.stopImmediatePropagation.call(this); this.a=this.h=!0}};function dc(a){function b(b,d){b=new a(b,d);b.T=d&&!!d.composed;return b}sa(b,a);b.prototype=a.prototype;return b}var ec={focus:!0,blur:!0};function fc(a){return a.__target!==a.target||a.U!==a.relatedTarget}function gc(a,b,c){if(c=b.__handlers&&b.__handlers[a.type]&&b.__handlers[a.type][c])for(var d=0,e;(e=c[d])&&(!fc(a)||a.target!==a.relatedTarget)&&(e.call(b,a),!a.h);d++);} function hc(a){var b=a.composedPath();Object.defineProperty(a,"currentTarget",{get:function(){return d},configurable:!0});for(var c=b.length-1;0<=c;c--){var d=b[c];gc(a,d,"capture");if(a.a)return}Object.defineProperty(a,"eventPhase",{get:function(){return Event.AT_TARGET}});var e;for(c=0;c<b.length;c++){d=b[c];var f=t(d);f=f&&f.root;if(0===c||f&&f===e)if(gc(a,d,"bubble"),d!==window&&(e=d.getRootNode()),a.a)break}} function ic(a,b,c,d,e,f){for(var g=0;g<a.length;g++){var h=a[g],k=h.type,l=h.capture,m=h.once,q=h.passive;if(b===h.node&&c===k&&d===l&&e===m&&f===q)return g}return-1} function jc(a,b,c){if(b){var d=typeof b;if("function"===d||"object"===d)if("object"!==d||b.handleEvent&&"function"===typeof b.handleEvent){if(c&&"object"===typeof c){var e=!!c.capture;var f=!!c.once;var g=!!c.passive}else e=!!c,g=f=!1;var h=c&&c.W||this,k=b[Zb];if(k){if(-1<ic(k,h,a,e,f,g))return}else b[Zb]=[];k=function(e){f&&this.removeEventListener(a,b,c);e.__target||kc(e);if(h!==this){var g=Object.getOwnPropertyDescriptor(e,"currentTarget");Object.defineProperty(e,"currentTarget",{get:function(){return h}, configurable:!0})}if(e.composed||-1<e.composedPath().indexOf(h))if(fc(e)&&e.target===e.relatedTarget)e.eventPhase===Event.BUBBLING_PHASE&&e.stopImmediatePropagation();else if(e.eventPhase===Event.CAPTURING_PHASE||e.bubbles||e.target===h||h instanceof Window){var k="function"===d?b.call(h,e):b.handleEvent&&b.handleEvent(e);h!==this&&(g?(Object.defineProperty(e,"currentTarget",g),g=null):delete e.currentTarget);return k}};b[Zb].push({node:h,type:a,capture:e,once:f,passive:g,Ha:k});ec[a]?(this.__handlers= this.__handlers||{},this.__handlers[a]=this.__handlers[a]||{capture:[],bubble:[]},this.__handlers[a][e?"capture":"bubble"].push(k)):(this instanceof Window?y.Fa:y.addEventListener).call(this,a,k,c)}}} function lc(a,b,c){if(b){if(c&&"object"===typeof c){var d=!!c.capture;var e=!!c.once;var f=!!c.passive}else d=!!c,f=e=!1;var g=c&&c.W||this,h=void 0;var k=null;try{k=b[Zb]}catch(l){}k&&(e=ic(k,g,a,d,e,f),-1<e&&(h=k.splice(e,1)[0].Ha,k.length||(b[Zb]=void 0)));(this instanceof Window?y.Ga:y.removeEventListener).call(this,a,h||b,c);h&&ec[a]&&this.__handlers&&this.__handlers[a]&&(a=this.__handlers[a][d?"capture":"bubble"],h=a.indexOf(h),-1<h&&a.splice(h,1))}} function mc(){for(var a in ec)window.addEventListener(a,function(a){a.__target||(kc(a),hc(a))},!0)}function kc(a){a.__target=a.target;a.U=a.relatedTarget;if(u.s){var b=Object.getPrototypeOf(a);if(!b.hasOwnProperty("__patchProto")){var c=Object.create(b);c.Ja=b;pa(c,cc);b.__patchProto=c}a.__proto__=b.__patchProto}else pa(a,cc)}var nc=dc(window.Event),oc=dc(window.CustomEvent),pc=dc(window.MouseEvent);function qc(a,b){return{index:a,I:[],N:b}} function rc(a,b,c,d){var e=0,f=0,g=0,h=0,k=Math.min(b-e,d-f);if(0==e&&0==f)a:{for(g=0;g<k;g++)if(a[g]!==c[g])break a;g=k}if(b==a.length&&d==c.length){h=a.length;for(var l=c.length,m=0;m<k-g&&sc(a[--h],c[--l]);)m++;h=m}e+=g;f+=g;b-=h;d-=h;if(0==b-e&&0==d-f)return[];if(e==b){for(b=qc(e,0);f<d;)b.I.push(c[f++]);return[b]}if(f==d)return[qc(e,b-e)];k=e;g=f;d=d-g+1;h=b-k+1;b=Array(d);for(l=0;l<d;l++)b[l]=Array(h),b[l][0]=l;for(l=0;l<h;l++)b[0][l]=l;for(l=1;l<d;l++)for(m=1;m<h;m++)if(a[k+m-1]===c[g+l-1])b[l][m]= b[l-1][m-1];else{var q=b[l-1][m]+1,O=b[l][m-1]+1;b[l][m]=q<O?q:O}k=b.length-1;g=b[0].length-1;d=b[k][g];for(a=[];0<k||0<g;)0==k?(a.push(2),g--):0==g?(a.push(3),k--):(h=b[k-1][g-1],l=b[k-1][g],m=b[k][g-1],q=l<m?l<h?l:h:m<h?m:h,q==h?(h==d?a.push(0):(a.push(1),d=h),k--,g--):q==l?(a.push(3),k--,d=l):(a.push(2),g--,d=m));a.reverse();b=void 0;k=[];for(g=0;g<a.length;g++)switch(a[g]){case 0:b&&(k.push(b),b=void 0);e++;f++;break;case 1:b||(b=qc(e,0));b.N++;e++;b.I.push(c[f]);f++;break;case 2:b||(b=qc(e,0)); b.N++;e++;break;case 3:b||(b=qc(e,0)),b.I.push(c[f]),f++}b&&k.push(b);return k}function sc(a,b){return a===b};var Ob=F.parentNode,tc=F.childNodes,uc={};function vc(a){var b=[];do b.unshift(a);while(a=a.parentNode);return b}function zb(a,b,c){if(a!==uc)throw new TypeError("Illegal constructor");this.ra="ShadyRoot";a=tc(b);this.host=b;this.a=c&&c.mode;Eb(b,a);c=t(b);c.root=this;c.ia="closed"!==this.a?this:null;c=r(this);c.firstChild=c.lastChild=c.parentNode=c.nextSibling=c.previousSibling=null;c.childNodes=[];this.M=!1;this.o=this.g=this.f=null;c=0;for(var d=a.length;c<d;c++)y.removeChild.call(b,a[c])} function Ib(a){a.M||(a.M=!0,Ba(function(){return wc(a)}))}function wc(a){for(var b;a;){a.M&&(b=a);a:{var c=a;a=c.host.getRootNode();if(w(a))for(var d=c.host.childNodes,e=0;e<d.length;e++)if(c=d[e],"slot"==c.localName)break a;a=void 0}}b&&b._renderRoot()} zb.prototype._renderRoot=function(){this.M=!1;if(this.f){Nb(this);for(var a=0,b;a<this.f.length;a++){b=this.f[a];var c=t(b),d=c.assignedNodes;c.assignedNodes=[];c.w=[];if(c.$=d)for(c=0;c<d.length;c++){var e=t(d[c]);e.L=e.assignedSlot;e.assignedSlot===b&&(e.assignedSlot=null)}}for(b=this.host.firstChild;b;b=b.nextSibling)xc(this,b);for(a=0;a<this.f.length;a++){b=this.f[a];d=t(b);if(!d.assignedNodes.length)for(c=b.firstChild;c;c=c.nextSibling)xc(this,c,b);(c=(c=t(b.parentNode))&&c.root)&&Pb(c)&&c._renderRoot(); yc(this,d.w,d.assignedNodes);if(c=d.$){for(e=0;e<c.length;e++)t(c[e]).L=null;d.$=null;c.length>d.assignedNodes.length&&(d.P=!0)}d.P&&(d.P=!1,zc(this,b))}a=this.f;b=[];for(d=0;d<a.length;d++)c=a[d].parentNode,(e=t(c))&&e.root||!(0>b.indexOf(c))||b.push(c);for(a=0;a<b.length;a++){d=b[a];c=d===this?this.host:d;e=[];d=d.childNodes;for(var f=0;f<d.length;f++){var g=d[f];if("slot"==g.localName){g=t(g).w;for(var h=0;h<g.length;h++)e.push(g[h])}else e.push(g)}d=void 0;f=tc(c);g=rc(e,e.length,f,f.length); for(var k=h=0;h<g.length&&(d=g[h]);h++){for(var l=0,m;l<d.I.length&&(m=d.I[l]);l++)Ob(m)===c&&y.removeChild.call(c,m),f.splice(d.index+k,1);k-=d.N}for(k=0;k<g.length&&(d=g[k]);k++)for(h=f[d.index],l=d.index;l<d.index+d.N;l++)m=e[l],y.insertBefore.call(c,m,h),f.splice(l,0,m)}}};function xc(a,b,c){var d=r(b),e=d.L;d.L=null;c||(c=(a=a.g[b.slot||"__catchall"])&&a[0]);c?(r(c).assignedNodes.push(b),d.assignedSlot=c):d.assignedSlot=void 0;e!==d.assignedSlot&&d.assignedSlot&&(r(d.assignedSlot).P=!0)} function yc(a,b,c){for(var d=0,e;d<c.length&&(e=c[d]);d++)if("slot"==e.localName){var f=t(e).assignedNodes;f&&f.length&&yc(a,b,f)}else b.push(c[d])}function zc(a,b){y.dispatchEvent.call(b,new Event("slotchange"));b=t(b);b.assignedSlot&&zc(a,b.assignedSlot)}function Nb(a){if(a.o&&a.o.length){for(var b=a.o,c,d=0;d<b.length;d++){var e=b[d];Eb(e);Eb(e.parentNode);var f=Rb(e);a.g[f]?(c=c||{},c[f]=!0,a.g[f].push(e)):a.g[f]=[e];a.f.push(e)}if(c)for(var g in c)a.g[g]=Sb(a.g[g]);a.o=[]}} function Rb(a){var b=a.name||a.getAttribute("name")||"__catchall";return a.oa=b}function Sb(a){return a.sort(function(a,c){a=vc(a);for(var b=vc(c),e=0;e<a.length;e++){c=a[e];var f=b[e];if(c!==f)return a=Array.from(c.parentNode.childNodes),a.indexOf(c)-a.indexOf(f)}})}function Pb(a){Nb(a);return!(!a.f||!a.f.length)};function Ac(a){var b=a.getRootNode();w(b)&&wc(b);return(a=t(a))&&a.assignedSlot||null} var Bc={addEventListener:jc.bind(window),removeEventListener:lc.bind(window)},Cc={addEventListener:jc,removeEventListener:lc,appendChild:function(a){return Gb(this,a)},insertBefore:function(a,b){return Gb(this,a,b)},removeChild:function(a){return Hb(this,a)},replaceChild:function(a,b){Gb(this,a,b);Hb(this,b);return a},cloneNode:function(a){if("template"==this.localName)var b=y.cloneNode.call(this,a);else if(b=y.cloneNode.call(this,!1),a){a=this.childNodes;for(var c=0,d;c<a.length;c++)d=a[c].cloneNode(!0), b.appendChild(d)}return b},getRootNode:function(){return Tb(this)},contains:function(a){return ya(this,a)},dispatchEvent:function(a){Ca();return y.dispatchEvent.call(this,a)}}; Object.defineProperties(Cc,{isConnected:{get:function(){if(rb&&rb.call(this))return!0;if(this.nodeType==Node.DOCUMENT_FRAGMENT_NODE)return!1;var a=this.ownerDocument;if(xa){if(y.contains.call(a,this))return!0}else if(a.documentElement&&y.contains.call(a.documentElement,this))return!0;for(a=this;a&&!(a instanceof Document);)a=a.parentNode||(w(a)?a.host:void 0);return!!(a&&a instanceof Document)},configurable:!0}}); var Dc={get assignedSlot(){return Ac(this)}},Ec={querySelector:function(a){return Ub(this,function(b){return oa.call(b,a)},function(a){return!!a})[0]||null},querySelectorAll:function(a,b){if(b){b=Array.prototype.slice.call(y.querySelectorAll(this,a));var c=this.getRootNode();return b.filter(function(a){return a.getRootNode()==c})}return Ub(this,function(b){return oa.call(b,a)})}},Fc={assignedNodes:function(a){if("slot"===this.localName){var b=this.getRootNode();w(b)&&wc(b);return(b=t(this))?(a&&a.flatten? b.w:b.assignedNodes)||[]:[]}}},Gc=qa({setAttribute:function(a,b){Xb(this,a,b)},removeAttribute:function(a){y.removeAttribute.call(this,a);Qb(this,a)},attachShadow:function(a){if(!this)throw"Must provide a host.";if(!a)throw"Not enough arguments.";return new zb(uc,this,a)},get slot(){return this.getAttribute("slot")},set slot(a){Xb(this,"slot",a)},get assignedSlot(){return Ac(this)}},Ec,Fc);Object.defineProperties(Gc,wb); var Hc=qa({importNode:function(a,b){return Yb(a,b)},getElementById:function(a){return Ub(this,function(b){return b.id==a},function(a){return!!a})[0]||null}},Ec);Object.defineProperties(Hc,{_activeElement:xb.activeElement}); var Ic=HTMLElement.prototype.blur,Jc=qa({blur:function(){var a=t(this);(a=(a=a&&a.root)&&a.activeElement)?a.blur():Ic.call(this)}}),Kc={addEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.W=this;this.host.addEventListener(a,b,c)},removeEventListener:function(a,b,c){"object"!==typeof c&&(c={capture:!!c});c.W=this;this.host.removeEventListener(a,b,c)},getElementById:function(a){return Ub(this,function(b){return b.id==a},function(a){return!!a})[0]||null}}; function I(a,b){for(var c=Object.getOwnPropertyNames(b),d=0;d<c.length;d++){var e=c[d],f=Object.getOwnPropertyDescriptor(b,e);f.value?a[e]=f.value:Object.defineProperty(a,e,f)}};if(u.ga){var ShadyDOM={inUse:u.ga,patch:function(a){Bb(a);Ab(a);return a},isShadyRoot:w,enqueue:Ba,flush:Ca,settings:u,filterMutations:Ia,observeChildren:Ga,unobserveChildren:Ha,nativeMethods:y,nativeTree:F};window.ShadyDOM=ShadyDOM;window.Event=nc;window.CustomEvent=oc;window.MouseEvent=pc;mc();var Lc=window.customElements&&window.customElements.nativeHTMLElement||HTMLElement;I(zb.prototype,Kc);I(window.Node.prototype,Cc);I(window.Window.prototype,Bc);I(window.Text.prototype,Dc);I(window.DocumentFragment.prototype, Ec);I(window.Element.prototype,Gc);I(window.Document.prototype,Hc);window.HTMLSlotElement&&I(window.HTMLSlotElement.prototype,Fc);I(Lc.prototype,Jc);u.s&&(H(window.Node.prototype),H(window.Text.prototype),H(window.DocumentFragment.prototype),H(window.Element.prototype),H(Lc.prototype),H(window.Document.prototype),window.HTMLSlotElement&&H(window.HTMLSlotElement.prototype));yb();window.ShadowRoot=zb};var Mc=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function Nc(a){var b=Mc.has(a);a=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(a);return!b&&a}function J(a){var b=a.isConnected;if(void 0!==b)return b;for(;a&&!(a.__CE_isImportDocument||a instanceof Document);)a=a.parentNode||(window.ShadowRoot&&a instanceof ShadowRoot?a.host:void 0);return!(!a||!(a.__CE_isImportDocument||a instanceof Document))} function Oc(a,b){for(;b&&b!==a&&!b.nextSibling;)b=b.parentNode;return b&&b!==a?b.nextSibling:null} function K(a,b,c){c=void 0===c?new Set:c;for(var d=a;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;b(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)K(d,b,c);d=Oc(a,e);continue}else if("template"===f){d=Oc(a,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)K(e,b,c)}d=d.firstChild?d.firstChild:Oc(a,d)}}function M(a,b,c){a[b]=c};function Pc(){this.a=new Map;this.D=new Map;this.h=[];this.c=!1}function Qc(a,b,c){a.a.set(b,c);a.D.set(c.constructor,c)}function Rc(a,b){a.c=!0;a.h.push(b)}function Sc(a,b){a.c&&K(b,function(b){return a.b(b)})}Pc.prototype.b=function(a){if(this.c&&!a.__CE_patched){a.__CE_patched=!0;for(var b=0;b<this.h.length;b++)this.h[b](a)}};function N(a,b){var c=[];K(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state?a.connectedCallback(d):Tc(a,d)}} function P(a,b){var c=[];K(b,function(a){return c.push(a)});for(b=0;b<c.length;b++){var d=c[b];1===d.__CE_state&&a.disconnectedCallback(d)}} function Q(a,b,c){c=void 0===c?{}:c;var d=c.Ea||new Set,e=c.ka||function(b){return Tc(a,b)},f=[];K(b,function(b){if("link"===b.localName&&"import"===b.getAttribute("rel")){var c=b.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:b.addEventListener("load",function(){var c=b.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);Q(a,c,{Ea:f,ka:e})}})}else f.push(b)},d);if(a.c)for(b= 0;b<f.length;b++)a.b(f[b]);for(b=0;b<f.length;b++)e(f[b])} function Tc(a,b){if(void 0===b.__CE_state){var c=b.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=a.a.get(b.localName)){c.constructionStack.push(b);var d=c.constructor;try{try{if(new d!==b)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(g){throw b.__CE_state=2,g;}b.__CE_state=1;b.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d], f=b.getAttribute(e);null!==f&&a.attributeChangedCallback(b,e,null,f,null)}J(b)&&a.connectedCallback(b)}}}Pc.prototype.connectedCallback=function(a){var b=a.__CE_definition;b.connectedCallback&&b.connectedCallback.call(a)};Pc.prototype.disconnectedCallback=function(a){var b=a.__CE_definition;b.disconnectedCallback&&b.disconnectedCallback.call(a)}; Pc.prototype.attributeChangedCallback=function(a,b,c,d,e){var f=a.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(b)&&f.attributeChangedCallback.call(a,b,c,d,e)};function Uc(a){var b=document;this.j=a;this.a=b;this.B=void 0;Q(this.j,this.a);"loading"===this.a.readyState&&(this.B=new MutationObserver(this.b.bind(this)),this.B.observe(this.a,{childList:!0,subtree:!0}))}function Vc(a){a.B&&a.B.disconnect()}Uc.prototype.b=function(a){var b=this.a.readyState;"interactive"!==b&&"complete"!==b||Vc(this);for(b=0;b<a.length;b++)for(var c=a[b].addedNodes,d=0;d<c.length;d++)Q(this.j,c[d])};function Wc(){var a=this;this.b=this.a=void 0;this.c=new Promise(function(b){a.b=b;a.a&&b(a.a)})}function Xc(a){if(a.a)throw Error("Already resolved.");a.a=void 0;a.b&&a.b(void 0)};function R(a){this.X=!1;this.j=a;this.aa=new Map;this.Y=function(a){return a()};this.K=!1;this.Z=[];this.qa=new Uc(a)} R.prototype.define=function(a,b){var c=this;if(!(b instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!Nc(a))throw new SyntaxError("The element name '"+a+"' is not valid.");if(this.j.a.get(a))throw Error("A custom element with name '"+a+"' has already been defined.");if(this.X)throw Error("A custom element is already being defined.");this.X=!0;try{var d=function(a){var b=e[a];if(void 0!==b&&!(b instanceof Function))throw Error("The '"+a+"' callback must be a function."); return b},e=b.prototype;if(!(e instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");var f=d("connectedCallback");var g=d("disconnectedCallback");var h=d("adoptedCallback");var k=d("attributeChangedCallback");var l=b.observedAttributes||[]}catch(m){return}finally{this.X=!1}b={localName:a,constructor:b,connectedCallback:f,disconnectedCallback:g,adoptedCallback:h,attributeChangedCallback:k,observedAttributes:l,constructionStack:[]};Qc(this.j,a,b);this.Z.push(b); this.K||(this.K=!0,this.Y(function(){return Yc(c)}))};function Yc(a){if(!1!==a.K){a.K=!1;for(var b=a.Z,c=[],d=new Map,e=0;e<b.length;e++)d.set(b[e].localName,[]);Q(a.j,document,{ka:function(b){if(void 0===b.__CE_state){var e=b.localName,f=d.get(e);f?f.push(b):a.j.a.get(e)&&c.push(b)}}});for(e=0;e<c.length;e++)Tc(a.j,c[e]);for(;0<b.length;){var f=b.shift();e=f.localName;f=d.get(f.localName);for(var g=0;g<f.length;g++)Tc(a.j,f[g]);(e=a.aa.get(e))&&Xc(e)}}}R.prototype.get=function(a){if(a=this.j.a.get(a))return a.constructor}; R.prototype.a=function(a){if(!Nc(a))return Promise.reject(new SyntaxError("'"+a+"' is not a valid custom element name."));var b=this.aa.get(a);if(b)return b.c;b=new Wc;this.aa.set(a,b);this.j.a.get(a)&&!this.Z.some(function(b){return b.localName===a})&&Xc(b);return b.c};R.prototype.b=function(a){Vc(this.qa);var b=this.Y;this.Y=function(c){return a(function(){return b(c)})}};window.CustomElementRegistry=R;R.prototype.define=R.prototype.define;R.prototype.get=R.prototype.get; R.prototype.whenDefined=R.prototype.a;R.prototype.polyfillWrapFlushCallback=R.prototype.b;var Zc=window.Document.prototype.createElement,$c=window.Document.prototype.createElementNS,ad=window.Document.prototype.importNode,bd=window.Document.prototype.prepend,cd=window.Document.prototype.append,dd=window.DocumentFragment.prototype.prepend,ed=window.DocumentFragment.prototype.append,fd=window.Node.prototype.cloneNode,gd=window.Node.prototype.appendChild,hd=window.Node.prototype.insertBefore,id=window.Node.prototype.removeChild,jd=window.Node.prototype.replaceChild,kd=Object.getOwnPropertyDescriptor(window.Node.prototype, "textContent"),ld=window.Element.prototype.attachShadow,md=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),nd=window.Element.prototype.getAttribute,od=window.Element.prototype.setAttribute,pd=window.Element.prototype.removeAttribute,qd=window.Element.prototype.getAttributeNS,rd=window.Element.prototype.setAttributeNS,sd=window.Element.prototype.removeAttributeNS,td=window.Element.prototype.insertAdjacentElement,ud=window.Element.prototype.insertAdjacentHTML,vd=window.Element.prototype.prepend, wd=window.Element.prototype.append,xd=window.Element.prototype.before,yd=window.Element.prototype.after,zd=window.Element.prototype.replaceWith,Ad=window.Element.prototype.remove,Bd=window.HTMLElement,Cd=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),Dd=window.HTMLElement.prototype.insertAdjacentElement,Ed=window.HTMLElement.prototype.insertAdjacentHTML;var Fd=new function(){};function Gd(){var a=Hd;window.HTMLElement=function(){function b(){var b=this.constructor,d=a.D.get(b);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(0===e.length)return e=Zc.call(document,d.localName),Object.setPrototypeOf(e,b.prototype),e.__CE_state=1,e.__CE_definition=d,a.b(e),e;d=e.length-1;var f=e[d];if(f===Fd)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times."); e[d]=Fd;Object.setPrototypeOf(f,b.prototype);a.b(f);return f}b.prototype=Bd.prototype;return b}()};function Id(a,b,c){function d(b){return function(c){for(var e=[],d=0;d<arguments.length;++d)e[d-0]=arguments[d];d=[];for(var f=[],l=0;l<e.length;l++){var m=e[l];m instanceof Element&&J(m)&&f.push(m);if(m instanceof DocumentFragment)for(m=m.firstChild;m;m=m.nextSibling)d.push(m);else d.push(m)}b.apply(this,e);for(e=0;e<f.length;e++)P(a,f[e]);if(J(this))for(e=0;e<d.length;e++)f=d[e],f instanceof Element&&N(a,f)}}void 0!==c.S&&(b.prepend=d(c.S));void 0!==c.append&&(b.append=d(c.append))};function Jd(){var a=Hd;M(Document.prototype,"createElement",function(b){if(this.__CE_hasRegistry){var c=a.a.get(b);if(c)return new c.constructor}b=Zc.call(this,b);a.b(b);return b});M(Document.prototype,"importNode",function(b,c){b=ad.call(this,b,c);this.__CE_hasRegistry?Q(a,b):Sc(a,b);return b});M(Document.prototype,"createElementNS",function(b,c){if(this.__CE_hasRegistry&&(null===b||"http://www.w3.org/1999/xhtml"===b)){var d=a.a.get(c);if(d)return new d.constructor}b=$c.call(this,b,c);a.b(b);return b}); Id(a,Document.prototype,{S:bd,append:cd})};function Kd(){var a=Hd;function b(b,d){Object.defineProperty(b,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(b){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,b);else{var c=void 0;if(this.firstChild){var e=this.childNodes,h=e.length;if(0<h&&J(this)){c=Array(h);for(var k=0;k<h;k++)c[k]=e[k]}}d.set.call(this,b);if(c)for(b=0;b<c.length;b++)P(a,c[b])}}})}M(Node.prototype,"insertBefore",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes); b=hd.call(this,b,d);if(J(this))for(d=0;d<c.length;d++)N(a,c[d]);return b}c=J(b);d=hd.call(this,b,d);c&&P(a,b);J(this)&&N(a,b);return d});M(Node.prototype,"appendChild",function(b){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=gd.call(this,b);if(J(this))for(var e=0;e<c.length;e++)N(a,c[e]);return b}c=J(b);e=gd.call(this,b);c&&P(a,b);J(this)&&N(a,b);return e});M(Node.prototype,"cloneNode",function(b){b=fd.call(this,b);this.ownerDocument.__CE_hasRegistry?Q(a,b): Sc(a,b);return b});M(Node.prototype,"removeChild",function(b){var c=J(b),e=id.call(this,b);c&&P(a,b);return e});M(Node.prototype,"replaceChild",function(b,d){if(b instanceof DocumentFragment){var c=Array.prototype.slice.apply(b.childNodes);b=jd.call(this,b,d);if(J(this))for(P(a,d),d=0;d<c.length;d++)N(a,c[d]);return b}c=J(b);var f=jd.call(this,b,d),g=J(this);g&&P(a,d);c&&P(a,b);g&&N(a,b);return f});kd&&kd.get?b(Node.prototype,kd):Rc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){for(var a= [],b=0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)id.call(this,this.firstChild);gd.call(this,document.createTextNode(a))}})})};function Ld(a){var b=Element.prototype;function c(b){return function(c){for(var d=[],e=0;e<arguments.length;++e)d[e-0]=arguments[e];e=[];for(var h=[],k=0;k<d.length;k++){var l=d[k];l instanceof Element&&J(l)&&h.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)e.push(l);else e.push(l)}b.apply(this,d);for(d=0;d<h.length;d++)P(a,h[d]);if(J(this))for(d=0;d<e.length;d++)h=e[d],h instanceof Element&&N(a,h)}}void 0!==xd&&(b.before=c(xd));void 0!==xd&&(b.after=c(yd));void 0!== zd&&M(b,"replaceWith",function(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];d=[];for(var g=[],h=0;h<c.length;h++){var k=c[h];k instanceof Element&&J(k)&&g.push(k);if(k instanceof DocumentFragment)for(k=k.firstChild;k;k=k.nextSibling)d.push(k);else d.push(k)}h=J(this);zd.apply(this,c);for(c=0;c<g.length;c++)P(a,g[c]);if(h)for(P(a,this),c=0;c<d.length;c++)g=d[c],g instanceof Element&&N(a,g)});void 0!==Ad&&M(b,"remove",function(){var b=J(this);Ad.call(this);b&&P(a,this)})};function Md(){var a=Hd;function b(b,c){Object.defineProperty(b,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(b){var d=this,e=void 0;J(this)&&(e=[],K(this,function(a){a!==d&&e.push(a)}));c.set.call(this,b);if(e)for(var f=0;f<e.length;f++){var g=e[f];1===g.__CE_state&&a.disconnectedCallback(g)}this.ownerDocument.__CE_hasRegistry?Q(a,this):Sc(a,this);return b}})}function c(b,c){M(b,"insertAdjacentElement",function(b,d){var e=J(d);b=c.call(this,b,d);e&&P(a,d);J(b)&&N(a,d); return b})}function d(b,c){function d(b,c){for(var d=[];b!==c;b=b.nextSibling)d.push(b);for(c=0;c<d.length;c++)Q(a,d[c])}M(b,"insertAdjacentHTML",function(a,b){a=a.toLowerCase();if("beforebegin"===a){var e=this.previousSibling;c.call(this,a,b);d(e||this.parentNode.firstChild,this)}else if("afterbegin"===a)e=this.firstChild,c.call(this,a,b),d(this.firstChild,e);else if("beforeend"===a)e=this.lastChild,c.call(this,a,b),d(e||this.firstChild,null);else if("afterend"===a)e=this.nextSibling,c.call(this, a,b),d(this.nextSibling,e);else throw new SyntaxError("The value provided ("+String(a)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");})}ld&&M(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=ld.call(this,a)});md&&md.get?b(Element.prototype,md):Cd&&Cd.get?b(HTMLElement.prototype,Cd):Rc(a,function(a){b(a,{enumerable:!0,configurable:!0,get:function(){return fd.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,c=b?this.content: this,d=Zc.call(document,this.localName);for(d.innerHTML=a;0<c.childNodes.length;)id.call(c,c.childNodes[0]);for(a=b?d.content:d;0<a.childNodes.length;)gd.call(c,a.childNodes[0])}})});M(Element.prototype,"setAttribute",function(b,c){if(1!==this.__CE_state)return od.call(this,b,c);var d=nd.call(this,b);od.call(this,b,c);c=nd.call(this,b);a.attributeChangedCallback(this,b,d,c,null)});M(Element.prototype,"setAttributeNS",function(b,c,d){if(1!==this.__CE_state)return rd.call(this,b,c,d);var e=qd.call(this, b,c);rd.call(this,b,c,d);d=qd.call(this,b,c);a.attributeChangedCallback(this,c,e,d,b)});M(Element.prototype,"removeAttribute",function(b){if(1!==this.__CE_state)return pd.call(this,b);var c=nd.call(this,b);pd.call(this,b);null!==c&&a.attributeChangedCallback(this,b,c,null,null)});M(Element.prototype,"removeAttributeNS",function(b,c){if(1!==this.__CE_state)return sd.call(this,b,c);var d=qd.call(this,b,c);sd.call(this,b,c);var e=qd.call(this,b,c);d!==e&&a.attributeChangedCallback(this,c,d,e,b)});Dd? c(HTMLElement.prototype,Dd):td?c(Element.prototype,td):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");Ed?d(HTMLElement.prototype,Ed):ud?d(Element.prototype,ud):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");Id(a,Element.prototype,{S:vd,append:wd});Ld(a)};/* Copyright (c) 2016 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ var Nd=window.customElements;if(!Nd||Nd.forcePolyfill||"function"!=typeof Nd.define||"function"!=typeof Nd.get){var Hd=new Pc;Gd();Jd();Id(Hd,DocumentFragment.prototype,{S:dd,append:ed});Kd();Md();document.__CE_hasRegistry=!0;var customElements=new R(Hd);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};/* Copyright (c) 2017 The Polymer Project Authors. All rights reserved. This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt */ function Od(){this.end=this.start=0;this.rules=this.parent=this.previous=null;this.cssText=this.parsedCssText="";this.atRule=!1;this.type=0;this.parsedSelector=this.selector=this.keyframesName=""} function Pd(a){a=a.replace(Qd,"").replace(Rd,"");var b=Sd,c=a,d=new Od;d.start=0;d.end=c.length;for(var e=d,f=0,g=c.length;f<g;f++)if("{"===c[f]){e.rules||(e.rules=[]);var h=e,k=h.rules[h.rules.length-1]||null;e=new Od;e.start=f+1;e.parent=h;e.previous=k;h.rules.push(e)}else"}"===c[f]&&(e.end=f+1