/** @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 v;function ba(a){var b=0;return function(){return b\x20\t\r\n\f]+)/i.exec(r)||["",""])[1].toLowerCase()];if(B)for(var K=0;K"+r+"";y.body.innerHTML=r;for(a.bootstrap(y);this.content.firstChild;)k.call(this.content,this.content.firstChild);r=y.body;if(B)for(K=0;K"+this.innerHTML+""},set:function(r){if(this.parentNode){y.body.innerHTML= r;for(r=this.ownerDocument.createDocumentFragment();y.body.firstChild;)l.call(r,y.body.firstChild);m.call(this.parentNode,r,this)}else throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");},configurable:!0})};n(a.prototype);J(a.prototype);a.bootstrap=function(p){p=b(p,"template");for(var r=0,B=p.length,K;r]/g,ib=function(p){switch(p){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}; x=function(p){for(var r={},B=0;B";break a;case Node.TEXT_NODE:z=z.data;z=R&&jb[R.localName]?z:z.replace(kc,ib);break a;case Node.COMMENT_NODE:z="\x3c!--"+z.data+"--\x3e";break a;default:throw window.console.error(z),Error("not implemented");}}B+=z}return B}}if(c||N){a.va=function(p,r){var B=f.call(p,!1);this.Z&&this.Z(B);r&&(l.call(B.content,f.call(p.content,!0)),I(B.content,p.content));return B};var I=function(p,r){if(r.querySelectorAll&& (r=b(r,"template"),0!==r.length)){p=b(p,"template");for(var B=0,K=p.length,aa,ma;B]/g;function qd(a){switch(a){case "&":return"&";case "<":return"<";case ">":return">";case '"':return""";case "\u00a0":return" "}}function rd(a){for(var b={},c=0;c";break a;case Node.TEXT_NODE:h=h.data;h=k&&td[k.localName]?h:h.replace(pd,qd);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 vd=M.D,wd={querySelector:function(a){return this.__shady_native_querySelector(a)},querySelectorAll:function(a){return this.__shady_native_querySelectorAll(a)}},xd={};function yd(a){xd[a]=function(b){return b["__shady_native_"+a]}}function zd(a,b){P(a,b,"__shady_native_");for(var c in b)yd(c)}function S(a,b){b=void 0===b?[]:b;for(var c=0;c","+","~"]),h=g===e?a[e]:a.substring(e,g);if(","===h)b();else if(-1===[void 0," ",">","+","~"].indexOf(f)||" "!==h)" "===f&&-1!==[">","+","~"].indexOf(h)?d[d.length-1]=h:d.push(h);e=g+(g===e?1:0)}b();return c};function Ze(a,b,c){var d=[];$e(a,b,c,d);return d}function $e(a,b,c,d){for(a=a.__shady_firstChild;a;a=a.__shady_nextSibling){var e;if(e=a.nodeType===Node.ELEMENT_NODE){e=a;var f=b,g=c,h=d,k=f(e);k&&h.push(e);g&&g(k)?e=k:($e(e,f,g,h),e=void 0)}if(e)break}} var af={get firstElementChild(){var a=L(this);if(a&&void 0!==a.firstChild){for(a=this.__shady_firstChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_nextSibling;return a}return this.__shady_native_firstElementChild},get lastElementChild(){var a=L(this);if(a&&void 0!==a.lastChild){for(a=this.__shady_lastChild;a&&a.nodeType!==Node.ELEMENT_NODE;)a=a.__shady_previousSibling;return a}return this.__shady_native_lastElementChild},get children(){return Lc(this)?Wc(Array.prototype.filter.call(Yc(this), function(a){return a.nodeType===Node.ELEMENT_NODE})):this.__shady_native_children},get childElementCount(){var a=this.__shady_children;return a?a.length:0}},bf=Q((af.append=function(a){for(var b=[],c=0;cd.length)return[];for(b=dd(Ze(a,function(){return!0}).map(function(e){return dd(d.map(function(f){var g=f.La,h=g.length-1;return c(e,g[h])?{target:e,da:f,fa:e,index:h}:[]}))}));b.some(function(e){return 0=e.index)return e;var f=e.target,g=e.fa,h=e.da;e=e.index-1;var k=h.Za[e],l=h.La[e];if(" "===k){k=[];for(g=g.__shady_parentElement;g;g=g.__shady_parentElement)c(g, l)&&k.push({target:f,da:h,fa:g,index:e});return k}if(">"===k)return g=g.__shady_parentElement,c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("+"===k)return(g=g.__shady_previousElementSibling)&&c(g,l)?{target:f,da:h,fa:g,index:e}:[];if("~"===k){k=[];for(g=g.__shady_previousElementSibling;g;g=g.__shady_previousElementSibling)c(g,l)&&k.push({target:f,da:h,fa:g,index:e});return k}throw Error("Unrecognized combinator: '"+k+"'.");}));return ed(b.map(function(e){return e.target}))} var df=M.querySelectorImplementation,ef=Q({querySelector:function(a){if("native"===df){var b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a)),c=this.__shady_getRootNode();b=ka(b);for(var d=b.next();!d.done;d=b.next())if(d=d.value,d.__shady_getRootNode()==c)return d;return null}if("selectorEngine"===df)return cf(this,a)[0]||null;if(void 0===df)return Ze(this,function(e){return Pc.call(e,a)},function(e){return!!e})[0]||null;throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+ (df+"'"));},querySelectorAll:function(a,b){if(b||"native"===df){b=Array.prototype.slice.call((this instanceof ShadowRoot?this.host:this).__shady_native_querySelectorAll(a));var c=this.__shady_getRootNode();return Wc(b.filter(function(d){return d.__shady_getRootNode()==c}))}if("selectorEngine"===df)return Wc(cf(this,a));if(void 0===df)return Wc(Ze(this,function(d){return Pc.call(d,a)}));throw Error("Unrecognized value of ShadyDOM.querySelectorImplementation: '"+(df+"'"));}}),ff=M.ha&&!M.J?ad({},bf): bf;ad(bf,ef);var gf=Q({after:function(a){for(var b=[],c=0;ce.assignedNodes.length&&(e.Aa=!0)}e.Aa&&(e.Aa=!1,Wf(this,c))}c=this.g;b=[];for(e=0;eb.indexOf(d))||b.push(d);for(c=0;c "+h}))}return{value:a,Ya:b,stop:f}}function Hi(a,b){a=a.split(/(\[.+?\])/);for(var c=[],d=0;d+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,Ki=/[[.:#*]/,Ci=/^(::slotted)/,Ji=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Ii=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,Fi=/(.*):dir\((?:(ltr|rtl))\)(.*)/,Ai=/:(?:matches|any|-(?:webkit|moz)-any)/,pi=new mi;function Mi(a,b,c,d,e){this.M=a||null;this.h=b||null;this.Ca=c||[];this.K=null;this.cssBuild=e||"";this.ja=d||"";this.g=this.L=this.R=null}function Ni(a){return a?a.__styleInfo:null}function Oi(a,b){return a.__styleInfo=b}Mi.prototype.i=function(){return this.M};Mi.prototype._getStyleRules=Mi.prototype.i;function Pi(a){var b=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return b&&b.call(this,a)}var Qi=/:host\s*>\s*/,Ri=navigator.userAgent.match("Trident");function Si(){}function Ti(a){var b={},c=[],d=0;Xh(a,function(f){Ui(f);f.index=d++;f=f.F.cssText;for(var g;g=Rh.exec(f);){var h=g[1];":"!==g[2]&&(b[h]=!0)}},function(f){c.push(f)});a.h=c;a=[];for(var e in b)a.push(e);return a} function Ui(a){if(!a.F){var b={},c={};Vi(a,c)&&(b.P=c,a.rules=null);b.cssText=a.parsedCssText.replace(Uh,"").replace(Ph,"");a.F=b}}function Vi(a,b){var c=a.F;if(c){if(c.P)return Object.assign(b,c.P),!0}else{c=a.parsedCssText;for(var d;a=Ph.exec(c);){d=(a[2]||a[3]).trim();if("inherit"!==d||"unset"!==d)b[a[1].trim()]=d;d=!0}return d}} function Wi(a,b,c){b&&(b=0<=b.indexOf(";")?Xi(a,b,c):fi(b,function(d,e,f,g){if(!e)return d+g;(e=Wi(a,c[e],c))&&"initial"!==e?"apply-shim-inherit"===e&&(e="inherit"):e=Wi(a,c[f]||f,c)||f;return d+(e||"")+g}));return b&&b.trim()||""} function Xi(a,b,c){b=b.split(";");for(var d=0,e,f;d *."+e||-1!==f.indexOf("html"),h=!g&&0===f.indexOf(e));if(g||h)c=e,h&&(b.G||(b.G=wi(pi,b,pi.h,a?"."+a:"",e)),c=b.G||e),g&&"html"===e&&(c=b.G||b.O),d({Ea:c,gb:h,vb:g})}} function $i(a,b,c){var d={},e={};Xh(b,function(f){Zi(a,f,c,function(g){Pi.call(a._element||a,g.Ea)&&(g.gb?Vi(f,d):Vi(f,e))})},null,!0);return{mb:e,eb:d}} function aj(a,b,c,d){var e=ii(b),f=vi(e.is,e.ja),g=new RegExp("(?:^|[^.#[:])"+(b.extends?"\\"+f.slice(0,-1)+"\\]":f)+"($|[.:[\\s>+~])"),h=Ni(b);e=h.M;h=h.cssBuild;var k=bj(e,d);return ti(b,e,function(l){var m="";l.F||Ui(l);l.F.cssText&&(m=Xi(a,l.F.cssText,c));l.cssText=m;if(!V&&!$h(l)&&l.cssText){var q=m=l.cssText;null==l.Ma&&(l.Ma=Sh.test(m));if(l.Ma)if(null==l.ra){l.ra=[];for(var H in k)q=k[H],q=q(m),m!==q&&(m=q,l.ra.push(H))}else{for(H=0;H=l._useCount&&l.parentNode&&l.parentNode.removeChild(l));V?k.g?(k.g.textContent=h,g=k.g):h&&(g=ai(h,f,a.shadowRoot,k.h)):g?g.parentNode||(Ri&&-1F&&-1==[34,35,60,62,63,96].indexOf(F)?t:encodeURIComponent(t)}function d(t){var F=t.charCodeAt(0);return 32F&&-1==[34,35,60,62,96].indexOf(F)?t:encodeURIComponent(t)}function e(t,F,E){function N(ha){sa.push(ha)}var y=F||"scheme start",X=0,x="",ta=!1,ia=!1,sa=[];a:for(;(void 0!=t[X-1]||0==X)&&!this.m;){var n=t[X];switch(y){case "scheme start":if(n&&q.test(n))x+= n.toLowerCase(),y="scheme";else if(F){N("Invalid scheme.");break a}else{x="";y="no scheme";continue}break;case "scheme":if(n&&H.test(n))x+=n.toLowerCase();else if(":"==n){this.l=x;x="";if(F)break a;void 0!==l[this.l]&&(this.H=!0);y="file"==this.l?"relative":this.H&&E&&E.l==this.l?"relative or authority":this.H?"authority first slash":"scheme data"}else if(F){void 0!=n&&N("Code point not allowed in scheme: "+n);break a}else{x="";X=0;y="no scheme";continue}break;case "scheme data":"?"==n?(this.A="?", y="query"):"#"==n?(this.C="#",y="fragment"):void 0!=n&&"\t"!=n&&"\n"!=n&&"\r"!=n&&(this.ya+=c(n));break;case "no scheme":if(E&&void 0!==l[E.l]){y="relative";continue}else N("Missing scheme."),f.call(this),this.m=!0;break;case "relative or authority":if("/"==n&&"/"==t[X+1])y="authority ignore slashes";else{N("Expected /, got: "+n);y="relative";continue}break;case "relative":this.H=!0;"file"!=this.l&&(this.l=E.l);if(void 0==n){this.o=E.o;this.v=E.v;this.s=E.s.slice();this.A=E.A;this.B=E.B;this.j=E.j; break a}else if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="relative slash";else if("?"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A="?",this.B=E.B,this.j=E.j,y="query";else if("#"==n)this.o=E.o,this.v=E.v,this.s=E.s.slice(),this.A=E.A,this.C="#",this.B=E.B,this.j=E.j,y="fragment";else{y=t[X+1];var J=t[X+2];if("file"!=this.l||!q.test(n)||":"!=y&&"|"!=y||void 0!=J&&"/"!=J&&"\\"!=J&&"?"!=J&&"#"!=J)this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j,this.s=E.s.slice(),this.s.pop();y= "relative path";continue}break;case "relative slash":if("/"==n||"\\"==n)"\\"==n&&N("\\ is an invalid code point."),y="file"==this.l?"file host":"authority ignore slashes";else{"file"!=this.l&&(this.o=E.o,this.v=E.v,this.B=E.B,this.j=E.j);y="relative path";continue}break;case "authority first slash":if("/"==n)y="authority second slash";else{N("Expected '/', got: "+n);y="authority ignore slashes";continue}break;case "authority second slash":y="authority ignore slashes";if("/"!=n){N("Expected '/', got: "+ n);continue}break;case "authority ignore slashes":if("/"!=n&&"\\"!=n){y="authority";continue}else N("Expected authority, got: "+n);break;case "authority":if("@"==n){ta&&(N("@ already seen."),x+="%40");ta=!0;for(n=0;n