text: function MakePromise(t){function e(t){if("object"!=typeof this||"function"!=typeof t)throw new TypeError;this._state=null,this._value=null,this._deferreds=[],s(t,n.bind(this),r.bind(this))}function i(e){var i=this;return null===this._state?void this._deferreds.push(e):void t(function(){var t=i._state?e.onFulfilled:e.onRejected;if("function"!=typeof t)return void(i._state?e.resolve:e.reject)(i._value);var n;try{n=t(i._value)}catch(r){return void e.reject(r)}e.resolve(n)})}function n(t){try{if(t===this)throw new TypeError;if(t&&("object"==typeof t||"function"==typeof t)){var e=t.then;if("function"==typeof e)return void s(e.bind(t),n.bind(this),r.bind(this))}this._state=!0,this._value=t,o.call(this)}catch(i){r.call(this,i)}}function r(t){this._state=!1,this._value=t,o.call(this)}function o(){for(var t=0,e=this._deferreds.length;e>t;t++)i.call(this,this._deferreds[t]);this._deferreds=null}function s(t,e,i){var n=!1;try{t(function(t){n||(n=!0,e(t))},function(t){n||(n=!0,i(t))})}catch(r){if(n)return;n=!0,i(r)}}return e.prototype["catch"]=function(t){return this.then(null,t)},e.prototype.then=function(t,n){var r=this;return new e(function(e,o){i.call(r,{onFulfilled:t,onRejected:n,resolve:e,reject:o})})},e.resolve=function(t){return t&&"object"==typeof t&&t.constructor===e?t:new e(function(e){e(t)})},e.reject=function(t){return new e(function(e,i){i(t)})},e}function makeRequest(t){return new Promise(function(e,i){var n=new XMLHttpRequest;n.open("GET",t),n.onload=function(){this.status>=200&&this.status<300?e(n.response):i({status:this.status,statusText:n.statusText})},n.onerror=function(){i({status:this.status,statusText:n.statusText})},n.send()})}function showFjLoader(t){t&&fjContentLoading.classList.add("visible"),window.clearTimeout(timeouts.showFjLoader),timeouts.showFjLoader=window.setTimeout(function(){fjLoaderCircular.classList.add("active")},300)}function hideFjLoader(t){t&&fjContentLoading.classList.remove("visible"),fjLoaderCircular.classList.remove("active")}function showErrorButton(){hideFjLoader(),fjRetryLoader.classList.remove("is-hidden")}function getComputedTranslateX(t){if(window.getComputedStyle){var e=getComputedStyle(t),i=e.transform||e.webkitTransform||e.mozTransform,n=i.match(/^matrix3d\((.+)\)$/);return n?parseFloat(n[1].split(", ")[7]):(n=i.match(/^matrix\((.+)\)$/),n?parseFloat(n[1].split(", ")[4]):0)}}function setTranslate3dY(t,e){setTransform(t,"translate3d(0, "+e+", 0)")}function isTouchDevice(){try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}}function getScrollVelocityFactor(){return isTouchDevice()?20:5}function deleteNode(t){t.parentNode.removeChild(t)}function clearInner(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function setOpacity(t,e){t.style.opacity=e}function setTransform(t,e){t.style.transform=e,t.style.webkitTransform=e,t.style.mozTransform=e}function setTransition(t,e){t.style.transition=e,t.style.webkitTransition=e,t.style.mozTransition=e}function doClasses(t,e,i){for(var n in e)i?t.classList.remove(e[n]):t.classList.add(e[n])}function getHashAsArray(t){t=t.split("?"),t=t[0],t=t.split("/");for(var e=t.length;e--;)""===t[e]&&t.splice(e,1);return t}function getBasePage(t){var e="",i=getHashAsArray(window.location.pathname);for(var n in i)t?e+="/"+i[n]:i[n].indexOf(".html")===-1&&(e+="/"+i[n]);return e||(e="/"),e}function getQueryAsObjects(t){t=t.split("&");for(var e,i={},n=t.length;n--;)t[n]&&(e=t[n].split("="),i[e[0]]=e[1]);return i}function addQuery(t,e){var i=t.split("="),n=!0;queries[i[0]]=i[1],querystring="";for(var r in Object.keys(queries))r>0&&(querystring+="&"),querystring+=Object.keys(queries)[r]+"="+queries[Object.keys(queries)[r]];if(e&&querystring)try{newHash}catch(o){n=!1,page("?"+querystring)}finally{n&&page("#/"+newHash.join("/")+"?"+querystring)}}function removeQuery(t,e){delete queries[t.split("=")[0]],querystring="";for(var i in Object.keys(queries))addQuery(Object.keys(queries)[i]+"="+queries[i]);e&&page("#/"+newHash.join("/")+querystring)}window.Polymer={dom:"shadow",lazyRegister:!0};var projectHostName="https://feeljoy.in",crew_ref;!function(){window.WebComponents=window.WebComponents||{flags:{}};var t="webcomponents-lite.js",e=document.querySelector('script[src*="'+t+'"]'),i={};if(!i.noOpts){if(location.search.slice(1).split("&").forEach(function(t){var e,n=t.split("=");n[0]&&(e=n[0].match(/wc-(.+)/))&&(i[e[1]]=n[1]||!0)}),e)for(var n,r=0;n=e.attributes[r];r++)"src"!==n.name&&(i[n.name]=n.value||!0);if(i.log&&i.log.split){var o=i.log.split(",");i.log={},o.forEach(function(t){i.log[t]=!0})}else i.log={}}i.register&&(window.CustomElements=window.CustomElements||{flags:{}},window.CustomElements.flags.register=i.register),WebComponents.flags=i}(),function(t){"use strict";function e(t){return void 0!==d[t]}function i(){a.call(this),this._isInvalid=!0}function n(t){return""==t&&i.call(this),t.toLowerCase()}function r(t){var e=t.charCodeAt(0);return e>32&&127>e&&[34,35,60,62,63,96].indexOf(e)==-1?t:encodeURIComponent(t)}function o(t){var e=t.charCodeAt(0);return e>32&&127>e&&[34,35,60,62,96].indexOf(e)==-1?t:encodeURIComponent(t)}function s(t,s,a){function l(t){g.push(t)}var h=s||"scheme start",c=0,u="",y=!1,v=!1,g=[];t:for(;(t[c-1]!=p||0==c)&&!this._isInvalid;){var b=t[c];switch(h){case"scheme start":if(!b||!m.test(b)){if(s){l("Invalid scheme.");break t}u="",h="no scheme";continue}u+=b.toLowerCase(),h="scheme";break;case"scheme":if(b&&_.test(b))u+=b.toLowerCase();else{if(":"!=b){if(s){if(p==b)break t;l("Code point not allowed in scheme: "+b);break t}u="",c=0,h="no scheme";continue}if(this._scheme=u,u="",s)break t;e(this._scheme)&&(this._isRelative=!0),h="file"==this._scheme?"relative":this._isRelative&&a&&a._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==b?(this._query="?",h="query"):"#"==b?(this._fragment="#",h="fragment"):p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._schemeData+=r(b));break;case"no scheme":if(a&&e(a._scheme)){h="relative";continue}l("Missing scheme."),i.call(this);break;case"relative or authority":if("/"!=b||"/"!=t[c+1]){l("Expected /, got: "+b),h="relative";continue}h="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=a._scheme),p==b){this._host=a._host,this._port=a._port,this._path=a._path.slice(),this._query=a._query,this._username=a._username,this._password=a._password;break t}if("/"==b||"\\"==b)"\\"==b&&l("\\ is an invalid code point."),h="relative slash";else if("?"==b)this._host=a._host,this._port=a._port,this._path=a._path.slice(),this._query="?",this._username=a._username,this._password=a._password,h="query";else{if("#"!=b){var P=t[c+1],w=t[c+2];("file"!=this._scheme||!m.test(b)||":"!=P&&"|"!=P||p!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=a._host,this._port=a._port,this._username=a._username,this._password=a._password,this._path=a._path.slice(),this._path.pop()),h="relative path";continue}this._host=a._host,this._port=a._port,this._path=a._path.slice(),this._query=a._query,this._fragment="#",this._username=a._username,this._password=a._password,h="fragment"}break;case"relative slash":if("/"!=b&&"\\"!=b){"file"!=this._scheme&&(this._host=a._host,this._port=a._port,this._username=a._username,this._password=a._password),h="relative path";continue}"\\"==b&&l("\\ is an invalid code point."),h="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=b){l("Expected '/', got: "+b),h="authority ignore slashes";continue}h="authority second slash";break;case"authority second slash":if(h="authority ignore slashes","/"!=b){l("Expected '/', got: "+b);continue}break;case"authority ignore slashes":if("/"!=b&&"\\"!=b){h="authority";continue}l("Expected authority, got: "+b);break;case"authority":if("@"==b){y&&(l("@ already seen."),u+="%40"),y=!0;for(var C=0;C<u.length;C++){var S=u[C];if("\t"!=S&&"\n"!=S&&"\r"!=S)if(":"!=S||null!==this._password){var E=r(S);null!==this._password?this._password+=E:this._username+=E}else this._password="";else l("Invalid whitespace in authority.")}u=""}else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){c-=u.length,u="",h="host";continue}u+=b}break;case"file host":if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){2!=u.length||!m.test(u[0])||":"!=u[1]&&"|"!=u[1]?0==u.length?h="relative path start":(this._host=n.call(this,u),u="",h="relative path start"):h="relative path";continue}"\t"==b||"\n"==b||"\r"==b?l("Invalid whitespace in file host."):u+=b;break;case"host":case"hostname":if(":"!=b||v){if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b){if(this._host=n.call(this,u),u="",h="relative path start",s)break t;continue}"\t"!=b&&"\n"!=b&&"\r"!=b?("["==b?v=!0:"]"==b&&(v=!1),u+=b):l("Invalid code point in host/hostname: "+b)}else if(this._host=n.call(this,u),u="",h="port","hostname"==s)break t;break;case"port":if(/[0-9]/.test(b))u+=b;else{if(p==b||"/"==b||"\\"==b||"?"==b||"#"==b||s){if(""!=u){var T=parseInt(u,10);T!=d[this._scheme]&&(this._port=T+""),u=""}if(s)break t;h="relative path start";continue}"\t"==b||"\n"==b||"\r"==b?l("Invalid code point in port: "+b):i.call(this)}break;case"relative path start":if("\\"==b&&l("'\\' not allowed in path."),h="relative path","/"!=b&&"\\"!=b)continue;break;case"relative path":if(p!=b&&"/"!=b&&"\\"!=b&&(s||"?"!=b&&"#"!=b))"\t"!=b&&"\n"!=b&&"\r"!=b&&(u+=r(b));else{"\\"==b&&l("\\ not allowed in relative path.");var x;(x=f[u.toLowerCase()])&&(u=x),".."==u?(this._path.pop(),"/"!=b&&"\\"!=b&&this._path.push("")):"."==u&&"/"!=b&&"\\"!=b?this._path.push(""):"."!=u&&("file"==this._scheme&&0==this._path.length&&2==u.length&&m.test(u[0])&&"|"==u[1]&&(u=u[0]+":"),this._path.push(u)),u="","?"==b?(this._query="?",h="query"):"#"==b&&(this._fragment="#",h="fragment")}break;case"query":s||"#"!=b?p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._query+=o(b)):(this._fragment="#",h="fragment");break;case"fragment":p!=b&&"\t"!=b&&"\n"!=b&&"\r"!=b&&(this._fragment+=b)}c++}}function a(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function l(t,e){void 0===e||e instanceof l||(e=new l(e+"")),this._url=t,a.call(this);var i=t.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");s.call(this,i,null,e)}var h=!1;if(!t.forceJURL)try{var c=new URL("b","http://a");c.pathname="c%20d",h="http://a/c%20d"===c.href}catch(u){}if(!h){var d=Object.create(null);d.ftp=21,d.file=0,d.gopher=70,d.http=80,d.https=443,d.ws=80,d.wss=443;var f=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";var p=void 0,m=/[a-zA-Z]/,_=/[a-zA-Z0-9\+\-\.]/;l.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var t="";return""==this._username&&null==this._password||(t=this._username+(null!=this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+t+this.host:"")+this.pathname+this._query+this._fragment},set href(t){a.call(this),s.call(this,t)},get protocol(){return this._scheme+":"},set protocol(t){this._isInvalid||s.call(this,t+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(t){!this._isInvalid&&this._isRelative&&s.call(this,t,"host")},get hostname(){return this._host},set hostname(t){!this._isInvalid&&this._isRelative&&s.call(this,t,"hostname")},get port(){return this._port},set port(t){!this._isInvalid&&this._isRelative&&s.call(this,t,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(t){!this._isInvalid&&this._isRelative&&(this._path=[],s.call(this,t,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"==this._query?"":this._query},set search(t){!this._isInvalid&&this._isRelative&&(this._query="?","?"==t[0]&&(t=t.slice(1)),s.call(this,t,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"==this._fragment?"":this._fragment},set hash(t){this._isInvalid||(this._fragment="#","#"==t[0]&&(t=t.slice(1)),s.call(this,t,"fragment"))},get origin(){var t;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null"}return t=this.host,t?this._scheme+"://"+t:""}};var y=t.URL;y&&(l.createObjectURL=function(){return y.createObjectURL.apply(y,arguments)},l.revokeObjectURL=function(t){y.revokeObjectURL(t)}),t.URL=l}}(self),"undefined"==typeof WeakMap&&!function(){var t=Object.defineProperty,e=Date.now()%1e9,i=function(){this.name="__st"+(1e9*Math.random()>>>0)+(e++ +"__")};i.prototype={set:function(e,i){var n=e[this.name];return n&&n[0]===e?n[1]=i:t(e,this.name,{value:[e,i],writable:!0}),this},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},"delete":function(t){var e=t[this.name];return!(!e||e[0]!==t||(e[0]=e[1]=void 0,0))},has:function(t){var e=t[this.name];return!!e&&e[0]===t}},window.WeakMap=i}(),function(t){function e(t){b.push(t),g||(g=!0,m(n))}function i(t){return window.ShadowDOMPolyfill&&window.ShadowDOMPolyfill.wrapIfNeeded(t)||t}function n(){g=!1;var t=b;b=[],t.sort(function(t,e){return t.uid_-e.uid_});var e=!1;t.forEach(function(t){var i=t.takeRecords();r(t),i.length&&(t.callback_(i,t),e=!0)}),e&&n()}function r(t){t.nodes_.forEach(function(e){var i=_.get(e);i&&i.forEach(function(e){e.observer===t&&e.removeTransientObservers()})})}function o(t,e){for(var i=t;i;i=i.parentNode){var n=_.get(i);if(n)for(var r=0;r<n.length;r++){var o=n[r],s=o.options;if(i===t||s.subtree){var a=e(s);a&&o.enqueue(a)}}}}function s(t){this.callback_=t,this.nodes_=[],this.records_=[],this.uid_=++P}function a(t,e){this.type=t,this.target=e,this.addedNodes=[],this.removedNodes=[],this.previousSibling=null,this.nextSibling=null,this.attributeName=null,this.attributeNamespace=null,this.oldValue=null}function l(t){var e=new a(t.type,t.target);return e.addedNodes=t.addedNodes.slice(),e.removedNodes=t.removedNodes.slice(),e.previousSibling=t.previousSibling,e.nextSibling=t.nextSibling,e.attributeName=t.attributeName,e.attributeNamespace=t.attributeNamespace,e.oldValue=t.oldValue,e}function h(t,e){return w=new a(t,e)}function c(t){return C?C:(C=l(w),C.oldValue=t,C)}function u(){w=C=void 0}function d(t){return t===C||t===w}function f(t,e){return t===e?t:C&&d(t)?C:null}function p(t,e,i){this.observer=t,this.target=e,this.options=i,this.transientObservedNodes=[]}if(!t.JsMutationObserver){var m,_=new WeakMap;if(/Trident|Edge/.test(navigator.userAgent))m=setTimeout;else if(window.setImmediate)m=window.setImmediate;else{var y=[],v=Math.random()+"";window.addEventListener("message",function(t){if(t.data===v){var e=y;y=[],e.forEach(function(t){t()})}}),m=function(t){y.push(t),window.postMessage(v,"*")}}var g=!1,b=[],P=0;s.prototype={observe:function(t,e){if(t=i(t),!e.childList&&!e.attributes&&!e.characterData||e.attributeOldValue&&!e.attributes||e.attributeFilter&&e.attributeFilter.length&&!e.attributes||e.characterDataOldValue&&!e.characterData)throw new SyntaxError;var n=_.get(t);n||_.set(t,n=[]);for(var r,o=0;o<n.length;o++)if(n[o].observer===this){r=n[o],r.removeListeners(),r.options=e;break}r||(r=new p(this,t,e),n.push(r),this.nodes_.push(t)),r.addListeners()},disconnect:function(){this.nodes_.forEach(function(t){for(var e=_.get(t),i=0;i<e.length;i++){var n=e[i];if(n.observer===this){n.removeListeners(),e.splice(i,1);break}}},this),this.records_=[]},takeRecords:function(){var t=this.records_;return this.records_=[],t}};var w,C;p.prototype={enqueue:function(t){var i=this.observer.records_,n=i.length;if(i.length>0){var r=i[n-1],o=f(r,t);if(o)return void(i[n-1]=o)}else e(this.observer);i[n]=t},addListeners:function(){this.addListeners_(this.target)},addListeners_:function(t){var e=this.options;e.attributes&&t.addEventListener("DOMAttrModified",this,!0),e.characterData&&t.addEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.addEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.addEventListener("DOMNodeRemoved",this,!0)},removeListeners:function(){this.removeListeners_(this.target)},removeListeners_:function(t){var e=this.options;e.attributes&&t.removeEventListener("DOMAttrModified",this,!0),e.characterData&&t.removeEventListener("DOMCharacterDataModified",this,!0),e.childList&&t.removeEventListener("DOMNodeInserted",this,!0),(e.childList||e.subtree)&&t.removeEventListener("DOMNodeRemoved",this,!0)},addTransientObserver:function(t){if(t!==this.target){this.addListeners_(t),this.transientObservedNodes.push(t);var e=_.get(t);e||_.set(t,e=[]),e.push(this)}},removeTransientObservers:function(){var t=this.transientObservedNodes;this.transientObservedNodes=[],t.forEach(function(t){this.removeListeners_(t);for(var e=_.get(t),i=0;i<e.length;i++)if(e[i]===this){e.splice(i,1);break}},this)},handleEvent:function(t){switch(t.stopImmediatePropagation(),t.type){case"DOMAttrModified":var e=t.attrName,i=t.relatedNode.namespaceURI,n=t.target,r=new h("attributes",n);r.attributeName=e,r.attributeNamespace=i;var s=t.attrChange===MutationEvent.ADDITION?null:t.prevValue;o(n,function(t){if(t.attributes&&(!t.attributeFilter||!t.attributeFilter.length||t.attributeFilter.indexOf(e)!==-1||t.attributeFilter.indexOf(i)!==-1))return t.attributeOldValue?c(s):r});break;case"DOMCharacterDataModified":var n=t.target,r=h("characterData",n),s=t.prevValue;o(n,function(t){if(t.characterData)return t.characterDataOldValue?c(s):r});break;case"DOMNodeRemoved":this.addTransientObserver(t.target);case"DOMNodeInserted":var a,l,d=t.target;"DOMNodeInserted"===t.type?(a=[d],l=[]):(a=[],l=[d]);var f=d.previousSibling,p=d.nextSibling,r=h("childList",t.target.parentNode);r.addedNodes=a,r.removedNodes=l,r.previousSibling=f,r.nextSibling=p,o(t.relatedNode,function(t){if(t.childList)return r})}u()}},t.JsMutationObserver=s,t.MutationObserver||(t.MutationObserver=s,s._isPolyfilled=!0)}}(self),function(){function t(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case" ":return"&nbsp;"}}function e(e){return e.replace(u,t)}var i="undefined"==typeof HTMLTemplateElement;/Trident/.test(navigator.userAgent)&&!function(){var t=document.importNode;document.importNode=function(){var e=t.apply(document,arguments);if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var i=document.createDocumentFragment();return i.appendChild(e),i}return e}}();var n=function(){if(!i){var t=document.createElement("template"),e=document.createElement("template");e.content.appendChild(document.createElement("div")),t.content.appendChild(e);var n=t.cloneNode(!0);return 0===n.content.childNodes.length||0===n.content.firstChild.content.childNodes.length}}(),r="template",o=function(){};if(i){var s=document.implementation.createHTMLDocument("template"),a=!0,l=document.createElement("style");l.textContent=r+"{display:none;}";var h=document.head;h.insertBefore(l,h.firstElementChild),o.prototype=Object.create(HTMLElement.prototype),o.decorate=function(t){if(!t.content){t.content=s.createDocumentFragment();for(var i;i=t.firstChild;)t.content.appendChild(i);if(t.cloneNode=function(t){return o.cloneNode(this,t)},a)try{Object.defineProperty(t,"innerHTML",{get:function(){for(var t="",i=this.content.firstChild;i;i=i.nextSibling)t+=i.outerHTML||e(i.data);return t},set:function(t){for(s.body.innerHTML=t,o.bootstrap(s);this.content.firstChild;)this.content.removeChild(this.content.firstChild);for(;s.body.firstChild;)this.content.appendChild(s.body.firstChild)},configurable:!0})}catch(n){a=!1}o.bootstrap(t.content)}},o.bootstrap=function(t){for(var e,i=t.querySelectorAll(r),n=0,s=i.length;s>n&&(e=i[n]);n++)o.decorate(e)},document.addEventListener("DOMContentLoaded",function(){o.bootstrap(document)});var c=document.createElement;document.createElement=function(){"use strict";var t=c.apply(document,arguments);return"template"===t.localName&&o.decorate(t),t};var u=/[&\u00A0<>]/g}if(i||n){var d=Node.prototype.cloneNode;o.cloneNode=function(t,e){var i=d.call(t,!1);return this.decorate&&this.decorate(i),e&&(i.content.appendChild(d.call(t.content,!0)),this.fixClonedDom(i.content,t.content)),i},o.fixClonedDom=function(t,e){if(e.querySelectorAll)for(var i,n,o=e.querySelectorAll(r),s=t.querySelectorAll(r),a=0,l=s.length;l>a;a++)n=o[a],i=s[a],this.decorate&&this.decorate(n),i.parentNode.replaceChild(n.cloneNode(!0),i)};var f=document.importNode;Node.prototype.cloneNode=function(t){var e=d.call(this,t);return t&&o.fixClonedDom(e,this),e},document.importNode=function(t,e){if(t.localName===r)return o.cloneNode(t,e);var i=f.call(document,t,e);return e&&o.fixClonedDom(i,t),i},n&&(HTMLTemplateElement.prototype.cloneNode=function(t){return o.cloneNode(this,t)})}i&&(window.HTMLTemplateElement=o)}(),function(){"use strict";if(!window.performance||!window.performance.now){var t=Date.now();window.performance={now:function(){return Date.now()-t}}}if(window.requestAnimationFrame||(window.requestAnimationFrame=function(){var t=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame;return t?function(e){return t(function(){e(performance.now())})}:function(t){return window.setTimeout(t,1e3/60)}}()),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(){return window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(t){clearTimeout(t)}}()),!function(){var t=document.createEvent("Event");return t.initEvent("foo",!0,!0),t.preventDefault(),t.defaultPrevented}()){var e=Event.prototype.preventDefault;Event.prototype.preventDefault=function(){this.cancelable&&(e.call(this),Object.defineProperty(this,"defaultPrevented",{get:function(){return!0},configurable:!0}))}}var i=/Trident/.test(navigator.userAgent);if((!window.CustomEvent||i&&"function"!=typeof window.CustomEvent)&&(window.CustomEvent=function(t,e){e=e||{};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,!!e.bubbles,!!e.cancelable,e.detail),i},window.CustomEvent.prototype=window.Event.prototype),!window.Event||i&&"function"!=typeof window.Event){var n=window.Event;window.Event=function(t,e){e=e||{};var i=document.createEvent("Event");return i.initEvent(t,!!e.bubbles,!!e.cancelable),i},window.Event.prototype=n.prototype}}(window.WebComponents),window.HTMLImports=window.HTMLImports||{flags:{}},function(t){function e(t,e){e=e||p,n(function(){o(t,e)},e)}function i(t){return"complete"===t.readyState||t.readyState===y}function n(t,e){if(i(e))t&&t();else{var r=function(){"complete"!==e.readyState&&e.readyState!==y||(e.removeEventListener(v,r),n(t,e))};e.addEventListener(v,r)}}function r(t){t.target.__loaded=!0}function o(t,e){function i(){l==h&&t&&t({allImports:a,loadedImports:c,errorImports:u})}function n(t){r(t),c.push(this),l++,i()}function o(){u.push(this),l++,i()}var a=e.querySelectorAll("link[rel=import]"),l=0,h=a.length,c=[],u=[];if(h)for(var d,f=0;h>f&&(d=a[f]);f++)s(d)?(c.push(this),l++,i()):(d.addEventListener("load",n),d.addEventListener("error",o));else i()}function s(t){return u?t.__loaded||t["import"]&&"loading"!==t["import"].readyState:t.__importParsed}function a(t){for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)l(e)&&h(e)}function l(t){return"link"===t.localName&&"import"===t.rel}function h(t){t["import"]?r({target:t}):(t.addEventListener("load",r),t.addEventListener("error",r))}var c="import",u=!!(c in document.createElement("link")),d=!!window.ShadowDOMPolyfill,f=function(t){return d?window.ShadowDOMPolyfill.wrapIfNeeded(t):t},p=f(document),m={get:function(){return f(window.HTMLImports.currentScript||document.currentScript||("complete"!==document.readyState?document.scripts[document.scripts.length-1]:null))},configurable:!0};Object.defineProperty(document,"_currentScript",m),Object.defineProperty(p,"_currentScript",m);var _=/Trident/.test(navigator.userAgent),y=_?"complete":"interactive",v="readystatechange";u&&(new MutationObserver(function(t){for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)e.addedNodes&&a(e.addedNodes)}).observe(document.head,{childList:!0}),function(){if("loading"===document.readyState)for(var t,e=document.querySelectorAll("link[rel=import]"),i=0,n=e.length;n>i&&(t=e[i]);i++)h(t)}()),e(function(t){window.HTMLImports.ready=!0,window.HTMLImports.readyTime=(new Date).getTime();var e=p.createEvent("CustomEvent");e.initCustomEvent("HTMLImportsLoaded",!0,!0,t),p.dispatchEvent(e)}),t.IMPORT_LINK_TYPE=c,t.useNative=u,t.rootDocument=p,t.whenReady=e,t.isIE=_}(window.HTMLImports),function(t){var e=[],i=function(t){e.push(t)},n=function(){e.forEach(function(e){e(t)})};t.addModule=i,t.initializeModules=n}(window.HTMLImports),window.HTMLImports.addModule(function(t){var e=/(url\()([^)]*)(\))/g,i=/(@import[\s]+(?!url\())([^;]*)(;)/g,n={resolveUrlsInStyle:function(t,e){var i=t.ownerDocument,n=i.createElement("a");return t.textContent=this.resolveUrlsInCssText(t.textContent,e,n),t},resolveUrlsInCssText:function(t,n,r){var o=this.replaceUrls(t,r,n,e);return o=this.replaceUrls(o,r,n,i)},replaceUrls:function(t,e,i,n){return t.replace(n,function(t,n,r,o){var s=r.replace(/["']/g,"");return i&&(s=new URL(s,i).href),e.href=s,s=e.href,n+"'"+s+"'"+o})}};t.path=n}),window.HTMLImports.addModule(function(t){var e={async:!0,ok:function(t){return t.status>=200&&t.status<300||304===t.status||0===t.status},load:function(i,n,r){var o=new XMLHttpRequest;return(t.flags.debug||t.flags.bust)&&(i+="?"+Math.random()),o.open("GET",i,e.async),o.addEventListener("readystatechange",function(t){if(4===o.readyState){var i=null;try{var s=o.getResponseHeader("Location");s&&(i="/"===s.substr(0,1)?location.origin+s:s)}catch(t){}n.call(r,!e.ok(o)&&o,o.response||o.responseText,i)}}),o.send(),o},loadDocument:function(t,e,i){this.load(t,e,i).responseType="document"}};t.xhr=e}),window.HTMLImports.addModule(function(t){var e=t.xhr,i=t.flags,n=function(t,e){this.cache={},this.onload=t,this.oncomplete=e,this.inflight=0,this.pending={}};n.prototype={addNodes:function(t){this.inflight+=t.length;for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)this.require(e);this.checkDone()},addNode:function(t){this.inflight++,this.require(t),this.checkDone()},require:function(t){var e=t.src||t.href;t.__nodeUrl=e,this.dedupe(e,t)||this.fetch(e,t)},dedupe:function(t,e){return this.pending[t]?(this.pending[t].push(e),!0):this.cache[t]?(this.onload(t,e,this.cache[t]),this.tail(),!0):(this.pending[t]=[e],!1)},fetch:function(t,n){if(i.load&&void 0,t)if(t.match(/^data:/)){var r=t.split(","),o=r[0],s=r[1];s=o.indexOf(";base64")>-1?atob(s):decodeURIComponent(s),setTimeout(function(){this.receive(t,n,null,s)}.bind(this),0)}else{var a=function(e,i,r){this.receive(t,n,e,i,r)}.bind(this);e.load(t,a)}else setTimeout(function(){this.receive(t,n,{error:"href must be specified"},null)}.bind(this),0)},receive:function(t,e,i,n,r){this.cache[t]=n;for(var o,s=this.pending[t],a=0,l=s.length;l>a&&(o=s[a]);a++)this.onload(t,o,n,i,r),this.tail();this.pending[t]=null},tail:function(){--this.inflight,this.checkDone()},checkDone:function(){this.inflight||this.oncomplete()}},t.Loader=n}),window.HTMLImports.addModule(function(t){var e=function(t){this.addCallback=t,this.mo=new MutationObserver(this.handler.bind(this))};e.prototype={handler:function(t){for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)"childList"===e.type&&e.addedNodes.length&&this.addedNodes(e.addedNodes)},addedNodes:function(t){this.addCallback&&this.addCallback(t);for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)e.children&&e.children.length&&this.addedNodes(e.children)},observe:function(t){this.mo.observe(t,{childList:!0,subtree:!0})}},t.Observer=e}),window.HTMLImports.addModule(function(t){function e(t){return"link"===t.localName&&t.rel===c}function i(t){var e=n(t);return"data:text/javascript;charset=utf-8,"+encodeURIComponent(e)}function n(t){return t.textContent+r(t)}function r(t){var e=t.ownerDocument;e.__importedScripts=e.__importedScripts||0;var i=t.ownerDocument.baseURI,n=e.__importedScripts?"-"+e.__importedScripts:"";return e.__importedScripts++,"\n//# sourceURL="+i+n+".js\n"}function o(t){var e=t.ownerDocument.createElement("style");return e.textContent=t.textContent,s.resolveUrlsInStyle(e),e}var s=t.path,a=t.rootDocument,l=t.flags,h=t.isIE,c=t.IMPORT_LINK_TYPE,u="link[rel="+c+"]",d={documentSelectors:u,importsSelectors:[u,'link[rel=stylesheet]:not([type]),style:not([type]),script:not([type]),script[type="application/javascript"],script[type="text/javascript"]'].join(","),map:{link:"parseLink",script:"parseScript",style:"parseStyle"},dynamicElements:[],parseNext:function(){var t=this.nextToParse();t&&this.parse(t)},parse:function(t){if(this.isParsed(t))return void(l.parse&&void 0);var e=this[this.map[t.localName]];e&&(this.markParsing(t),e.call(this,t))},parseDynamic:function(t,e){this.dynamicElements.push(t),e||this.parseNext()},markParsing:function(t){l.parse&&void 0,this.parsingElement=t},markParsingComplete:function(t){t.__importParsed=!0,this.markDynamicParsingComplete(t),t.__importElement&&(t.__importElement.__importParsed=!0,this.markDynamicParsingComplete(t.__importElement)),this.parsingElement=null,l.parse&&void 0},markDynamicParsingComplete:function(t){var e=this.dynamicElements.indexOf(t);e>=0&&this.dynamicElements.splice(e,1)},parseImport:function(t){if(t["import"]=t.__doc,window.HTMLImports.__importsParsingHook&&window.HTMLImports.__importsParsingHook(t),t["import"]&&(t["import"].__importParsed=!0),this.markParsingComplete(t),t.__resource&&!t.__error?t.dispatchEvent(new CustomEvent("load",{bubbles:!1})):t.dispatchEvent(new CustomEvent("error",{bubbles:!1})),t.__pending)for(var e;t.__pending.length;)e=t.__pending.shift(),e&&e({target:t});this.parseNext()},parseLink:function(t){e(t)?this.parseImport(t):(t.href=t.href,this.parseGeneric(t))},parseStyle:function(t){var e=t;t=o(t),e.__appliedElement=t,t.__importElement=e,this.parseGeneric(t)},parseGeneric:function(t){this.trackElement(t),this.addElementToDocument(t)},rootImportForElement:function(t){for(var e=t;e.ownerDocument.__importLink;)e=e.ownerDocument.__importLink;return e},addElementToDocument:function(t){var e=this.rootImportForElement(t.__importElement||t);e.parentNode.insertBefore(t,e)},trackElement:function(t,e){var i=this,n=function(r){t.removeEventListener("load",n),t.removeEventListener("error",n),e&&e(r),i.markParsingComplete(t),i.parseNext()};if(t.addEventListener("load",n),t.addEventListener("error",n),h&&"style"===t.localName){var r=!1;if(t.textContent.indexOf("@import")==-1)r=!0;else if(t.sheet){r=!0;for(var o,s=t.sheet.cssRules,a=s?s.length:0,l=0;a>l&&(o=s[l]);l++)o.type===CSSRule.IMPORT_RULE&&(r=r&&!!o.styleSheet)}r&&setTimeout(function(){t.dispatchEvent(new CustomEvent("load",{bubbles:!1}))})}},parseScript:function(e){var n=document.createElement("script");n.__importElement=e,n.src=e.src?e.src:i(e),t.currentScript=e,this.trackElement(n,function(){n.parentNode&&n.parentNode.removeChild(n),t.currentScript=null}),this.addElementToDocument(n)},nextToParse:function(){return this._mayParse=[],!this.parsingElement&&(this.nextToParseInDoc(a)||this.nextToParseDynamic())},nextToParseInDoc:function(t,i){if(t&&this._mayParse.indexOf(t)<0){this._mayParse.push(t);for(var n,r=t.querySelectorAll(this.parseSelectorsForNode(t)),o=0,s=r.length;s>o&&(n=r[o]);o++)if(!this.isParsed(n))return this.hasResource(n)?e(n)?this.nextToParseInDoc(n.__doc,n):n:void 0}return i},nextToParseDynamic:function(){return this.dynamicElements[0]},parseSelectorsForNode:function(t){return(t.ownerDocument||t)===a?this.documentSelectors:this.importsSelectors},isParsed:function(t){return t.__importParsed},needsDynamicParsing:function(t){return this.dynamicElements.indexOf(t)>=0},hasResource:function(t){return!e(t)||void 0!==t.__doc}};t.parser=d,t.IMPORT_SELECTOR=u}),window.HTMLImports.addModule(function(t){function e(t){return i(t,s)}function i(t,e){return"link"===t.localName&&t.getAttribute("rel")===e}function n(t){return!!Object.getOwnPropertyDescriptor(t,"baseURI")}function r(t,e){var i=document.implementation.createHTMLDocument(s);i._URL=e;var r=i.createElement("base");r.setAttribute("href",e),i.baseURI||n(i)||Object.defineProperty(i,"baseURI",{value:e});var o=i.createElement("meta");
  return o.setAttribute("charset","utf-8"),i.head.appendChild(o),i.head.appendChild(r),i.body.innerHTML=t,window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(i),i}var o=t.flags,s=t.IMPORT_LINK_TYPE,a=t.IMPORT_SELECTOR,l=t.rootDocument,h=t.Loader,c=t.Observer,u=t.parser,d={documents:{},documentPreloadSelectors:a,importsPreloadSelectors:a,loadNode:function(t){f.addNode(t)},loadSubtree:function(t){var e=this.marshalNodes(t);f.addNodes(e)},marshalNodes:function(t){return t.querySelectorAll(this.loadSelectorsForNode(t))},loadSelectorsForNode:function(t){return(t.ownerDocument||t)===l?this.documentPreloadSelectors:this.importsPreloadSelectors},loaded:function(t,i,n,s,a){if(o.load&&void 0,i.__resource=n,i.__error=s,e(i)){var l=this.documents[t];void 0===l&&(l=s?null:r(n,a||t),l&&(l.__importLink=i,this.bootDocument(l)),this.documents[t]=l),i.__doc=l}u.parseNext()},bootDocument:function(t){this.loadSubtree(t),this.observer.observe(t),u.parseNext()},loadedAll:function(){u.parseNext()}},f=new h(d.loaded.bind(d),d.loadedAll.bind(d));if(d.observer=new c,!document.baseURI){var p={get:function(){var t=document.querySelector("base");return t?t.href:window.location.href},configurable:!0};Object.defineProperty(document,"baseURI",p),Object.defineProperty(l,"baseURI",p)}t.importer=d,t.importLoader=f}),window.HTMLImports.addModule(function(t){var e=t.parser,i=t.importer,n={added:function(t){for(var n,r,o,s,a=0,l=t.length;l>a&&(s=t[a]);a++)n||(n=s.ownerDocument,r=e.isParsed(n)),o=this.shouldLoadNode(s),o&&i.loadNode(s),this.shouldParseNode(s)&&r&&e.parseDynamic(s,o)},shouldLoadNode:function(t){return 1===t.nodeType&&r.call(t,i.loadSelectorsForNode(t))},shouldParseNode:function(t){return 1===t.nodeType&&r.call(t,e.parseSelectorsForNode(t))}};i.observer.addCallback=n.added.bind(n);var r=HTMLElement.prototype.matches||HTMLElement.prototype.matchesSelector||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector}),function(t){function e(){window.HTMLImports.importer.bootDocument(n)}var i=t.initializeModules;if(t.isIE,!t.useNative){i();var n=t.rootDocument;"complete"===document.readyState||"interactive"===document.readyState&&!window.attachEvent?e():document.addEventListener("DOMContentLoaded",e)}}(window.HTMLImports),window.CustomElements=window.CustomElements||{flags:{}},function(t){var e=t.flags,i=[],n=function(t){i.push(t)},r=function(){i.forEach(function(e){e(t)})};t.addModule=n,t.initializeModules=r,t.hasNative=!!document.registerElement,t.isIE=/Trident/.test(navigator.userAgent),t.useNative=!e.register&&t.hasNative&&!window.ShadowDOMPolyfill&&(!window.HTMLImports||window.HTMLImports.useNative)}(window.CustomElements),window.CustomElements.addModule(function(t){function e(t,e){i(t,function(t){return!!e(t)||void n(t,e)}),n(t,e)}function i(t,e,n){var r=t.firstElementChild;if(!r)for(r=t.firstChild;r&&r.nodeType!==Node.ELEMENT_NODE;)r=r.nextSibling;for(;r;)e(r,n)!==!0&&i(r,e,n),r=r.nextElementSibling;return null}function n(t,i){for(var n=t.shadowRoot;n;)e(n,i),n=n.olderShadowRoot}function r(t,e){o(t,e,[])}function o(t,e,i){if(t=window.wrap(t),!(i.indexOf(t)>=0)){i.push(t);for(var n,r=t.querySelectorAll("link[rel="+s+"]"),a=0,l=r.length;l>a&&(n=r[a]);a++)n["import"]&&o(n["import"],e,i);e(t)}}var s=window.HTMLImports?window.HTMLImports.IMPORT_LINK_TYPE:"none";t.forDocumentTree=r,t.forSubtree=e}),window.CustomElements.addModule(function(t){function e(t,e){return i(t,e)||n(t,e)}function i(e,i){return!!t.upgrade(e,i)||void(i&&s(e))}function n(t,e){g(t,function(t){if(i(t,e))return!0})}function r(t){C.push(t),w||(w=!0,setTimeout(o))}function o(){w=!1;for(var t,e=C,i=0,n=e.length;n>i&&(t=e[i]);i++)t();C=[]}function s(t){P?r(function(){a(t)}):a(t)}function a(t){t.__upgraded__&&!t.__attached&&(t.__attached=!0,t.attachedCallback&&t.attachedCallback())}function l(t){h(t),g(t,function(t){h(t)})}function h(t){P?r(function(){c(t)}):c(t)}function c(t){t.__upgraded__&&t.__attached&&(t.__attached=!1,t.detachedCallback&&t.detachedCallback())}function u(t){for(var e=t,i=window.wrap(document);e;){if(e==i)return!0;e=e.parentNode||e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host}}function d(t){if(t.shadowRoot&&!t.shadowRoot.__watched){v.dom&&void 0;for(var e=t.shadowRoot;e;)m(e),e=e.olderShadowRoot}}function f(t,i){if(v.dom){var n=i[0];if(n&&"childList"===n.type&&n.addedNodes&&n.addedNodes){for(var r=n.addedNodes[0];r&&r!==document&&!r.host;)r=r.parentNode;var o=r&&(r.URL||r._URL||r.host&&r.host.localName)||"";o=o.split("/?").shift().split("/").pop()}}var s=u(t);i.forEach(function(t){"childList"===t.type&&(S(t.addedNodes,function(t){t.localName&&e(t,s)}),S(t.removedNodes,function(t){t.localName&&l(t)}))}),v.dom&&void 0}function p(t){for(t=window.wrap(t),t||(t=window.wrap(document));t.parentNode;)t=t.parentNode;var e=t.__observer;e&&(f(t,e.takeRecords()),o())}function m(t){if(!t.__observer){var e=new MutationObserver(f.bind(this,t));e.observe(t,{childList:!0,subtree:!0}),t.__observer=e}}function _(t){t=window.wrap(t),v.dom&&void 0,e(t,t===window.wrap(document)),m(t),v.dom&&void 0}function y(t){b(t,_)}var v=t.flags,g=t.forSubtree,b=t.forDocumentTree,P=window.MutationObserver._isPolyfilled&&v["throttle-attached"];t.hasPolyfillMutations=P,t.hasThrottledAttached=P;var w=!1,C=[],S=Array.prototype.forEach.call.bind(Array.prototype.forEach),E=Element.prototype.createShadowRoot;E&&(Element.prototype.createShadowRoot=function(){var t=E.call(this);return window.CustomElements.watchShadow(this),t}),t.watchShadow=d,t.upgradeDocumentTree=y,t.upgradeDocument=_,t.upgradeSubtree=n,t.upgradeAll=e,t.attached=s,t.takeRecords=p}),window.CustomElements.addModule(function(t){function e(e,n){if("template"===e.localName&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(e),!e.__upgraded__&&e.nodeType===Node.ELEMENT_NODE){var r=e.getAttribute("is"),o=t.getRegisteredDefinition(e.localName)||t.getRegisteredDefinition(r);if(o&&(r&&o.tag==e.localName||!r&&!o["extends"]))return i(e,o,n)}}function i(e,i,r){return s.upgrade&&void 0,i.is&&e.setAttribute("is",i.is),n(e,i),e.__upgraded__=!0,o(e),r&&t.attached(e),t.upgradeSubtree(e,r),s.upgrade&&void 0,e}function n(t,e){Object.__proto__?t.__proto__=e.prototype:(r(t,e.prototype,e["native"]),t.__proto__=e.prototype)}function r(t,e,i){for(var n={},r=e;r!==i&&r!==HTMLElement.prototype;){for(var o,s=Object.getOwnPropertyNames(r),a=0;o=s[a];a++)n[o]||(Object.defineProperty(t,o,Object.getOwnPropertyDescriptor(r,o)),n[o]=1);r=Object.getPrototypeOf(r)}}function o(t){t.createdCallback&&t.createdCallback()}var s=t.flags;t.upgrade=e,t.upgradeWithDefinition=i,t.implementPrototype=n}),window.CustomElements.addModule(function(t){function e(e,n){var l=n||{};if(!e)throw Error("document.registerElement: first argument `name` must not be empty");if(e.indexOf("-")<0)throw Error("document.registerElement: first argument ('name') must contain a dash ('-'). Argument provided was '"+(e+"")+"'.");if(r(e))throw Error("Failed to execute 'registerElement' on 'Document': Registration failed for type '"+(e+"")+"'. The type name is invalid.");if(h(e))throw Error("DuplicateDefinitionError: a type with name '"+(e+"")+"' is already registered");return l.prototype||(l.prototype=Object.create(HTMLElement.prototype)),l.__name=e.toLowerCase(),l["extends"]&&(l["extends"]=l["extends"].toLowerCase()),l.lifecycle=l.lifecycle||{},l.ancestry=o(l["extends"]),s(l),a(l),i(l.prototype),c(l.__name,l),l.ctor=u(l),l.ctor.prototype=l.prototype,l.prototype.constructor=l.ctor,t.ready&&_(document),l.ctor}function i(t){if(!t.setAttribute._polyfilled){var e=t.setAttribute;t.setAttribute=function(t,i){n.call(this,t,i,e)};var i=t.removeAttribute;t.removeAttribute=function(t){n.call(this,t,null,i)},t.setAttribute._polyfilled=!0}}function n(t,e,i){t=t.toLowerCase();var n=this.getAttribute(t);i.apply(this,arguments);var r=this.getAttribute(t);this.attributeChangedCallback&&r!==n&&this.attributeChangedCallback(t,n,r)}function r(t){for(var e=0;e<P.length;e++)if(t===P[e])return!0}function o(t){var e=h(t);return e?o(e["extends"]).concat([e]):[]}function s(t){for(var e,i=t["extends"],n=0;e=t.ancestry[n];n++)i=e.is&&e.tag;t.tag=i||t.__name,i&&(t.is=t.__name)}function a(t){if(!Object.__proto__){var e=HTMLElement.prototype;if(t.is){var i=document.createElement(t.tag);e=Object.getPrototypeOf(i)}for(var n,r=t.prototype,o=!1;r;)r==e&&(o=!0),n=Object.getPrototypeOf(r),n&&(r.__proto__=n),r=n;t["native"]=e}}function l(t){return v(S(t.tag),t)}function h(t){if(t)return w[t.toLowerCase()]}function c(t,e){w[t]=e}function u(t){return function(){return l(t)}}function d(t,e,i){return t===C?f(e,i):E(t,e)}function f(t,e){t&&(t=t.toLowerCase()),e&&(e=e.toLowerCase());var i=h(e||t);if(i){if(t==i.tag&&e==i.is)return new i.ctor;if(!e&&!i.is)return new i.ctor}var n;return e?(n=f(t),n.setAttribute("is",e),n):(n=S(t),t.indexOf("-")>=0&&g(n,HTMLElement),n)}function p(t,e){var i=t[e];t[e]=function(){var t=i.apply(this,arguments);return y(t),t}}var m,_=(t.isIE,t.upgradeDocumentTree),y=t.upgradeAll,v=t.upgradeWithDefinition,g=t.implementPrototype,b=t.useNative,P=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"],w={},C="http://www.w3.org/1999/xhtml",S=document.createElement.bind(document),E=document.createElementNS.bind(document);m=Object.__proto__||b?function(t,e){return t instanceof e}:function(t,e){if(t instanceof e)return!0;for(var i=t;i;){if(i===e.prototype)return!0;i=i.__proto__}return!1},p(Node.prototype,"cloneNode"),p(document,"importNode"),document.registerElement=e,document.createElement=f,document.createElementNS=d,t.registry=w,t["instanceof"]=m,t.reservedTagList=P,t.getRegisteredDefinition=h,document.register=document.registerElement}),function(t){function e(){o(window.wrap(document)),window.CustomElements.ready=!0,(window.requestAnimationFrame||function(t){setTimeout(t,16)})(function(){setTimeout(function(){window.CustomElements.readyTime=Date.now(),window.HTMLImports&&(window.CustomElements.elapsed=window.CustomElements.readyTime-window.HTMLImports.readyTime),document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}))})})}var i=t.useNative,n=t.initializeModules;if(t.isIE,i){var r=function(){};t.watchShadow=r,t.upgrade=r,t.upgradeAll=r,t.upgradeDocumentTree=r,t.upgradeSubtree=r,t.takeRecords=r,t["instanceof"]=function(t,e){return t instanceof e}}else n();var o=t.upgradeDocumentTree,s=t.upgradeDocument;if(window.wrap||(window.ShadowDOMPolyfill?(window.wrap=window.ShadowDOMPolyfill.wrapIfNeeded,window.unwrap=window.ShadowDOMPolyfill.unwrapIfNeeded):window.wrap=window.unwrap=function(t){return t}),window.HTMLImports&&(window.HTMLImports.__importsParsingHook=function(t){t["import"]&&s(wrap(t["import"]))}),"complete"===document.readyState||t.flags.eager)e();else if("interactive"!==document.readyState||window.attachEvent||window.HTMLImports&&!window.HTMLImports.ready){var a=window.HTMLImports&&!window.HTMLImports.ready?"HTMLImportsLoaded":"DOMContentLoaded";window.addEventListener(a,e)}else e()}(window.CustomElements),function(){var t=document.createElement("style");t.textContent="body {transition: opacity ease-in 0.2s; } \nbody[unresolved] {opacity: 0; display: block; overflow: hidden; position: relative; } \n";var e=document.querySelector("head");e.insertBefore(t,e.firstChild)}(window.WebComponents),function(){function t(){document.body.removeAttribute("unresolved")}window.WebComponents?addEventListener("WebComponentsReady",t):"interactive"===document.readyState||"complete"===document.readyState?t():addEventListener("DOMContentLoaded",t)}(),window.Polymer={Settings:function(){var t=window.Polymer||{};if(!t.noUrlSettings)for(var e,i=location.search.slice(1).split("&"),n=0;n<i.length&&(e=i[n]);n++)e=e.split("="),e[0]&&(t[e[0]]=e[1]||!0);return t.wantShadow="shadow"===t.dom,t.hasShadow=!!Element.prototype.createShadowRoot,t.nativeShadow=t.hasShadow&&!window.ShadowDOMPolyfill,t.useShadow=t.wantShadow&&t.hasShadow,t.hasNativeImports=!!("import"in document.createElement("link")),t.useNativeImports=t.hasNativeImports,t.useNativeCustomElements=!window.CustomElements||window.CustomElements.useNative,t.useNativeShadow=t.useShadow&&t.nativeShadow,t.usePolyfillProto=!t.useNativeCustomElements&&!Object.__proto__,t.hasNativeCSSProperties=!navigator.userAgent.match("AppleWebKit/601")&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"),t.useNativeCSSProperties=t.hasNativeCSSProperties&&t.lazyRegister&&t.useNativeCSSProperties,t.isIE=navigator.userAgent.match("Trident"),t}()},function(){var t=window.Polymer;window.Polymer=function(t){"function"==typeof t&&(t=t.prototype),t||(t={}),t=e(t);var i=t===t.constructor.prototype?t.constructor:null,n={prototype:t};t["extends"]&&(n["extends"]=t["extends"]),Polymer.telemetry._registrate(t);var r=document.registerElement(t.is,n);return i||r};var e=function(t){var e=Polymer.Base;return t["extends"]&&(e=Polymer.Base._getExtendedPrototype(t["extends"])),t=Polymer.Base.chainObject(t,e),t.registerCallback(),t};if(t)for(var i in t)Polymer[i]=t[i];Polymer.Class=function(t){return t.factoryImpl||(t.factoryImpl=function(){}),e(t).constructor}}(),Polymer.telemetry={registrations:[],_regLog:function(t){},_registrate:function(t){this.registrations.push(t),Polymer.log&&this._regLog(t)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}},Object.defineProperty(window,"currentImport",{enumerable:!0,configurable:!0,get:function(){return(document._currentScript||document.currentScript||{}).ownerDocument}}),Polymer.RenderStatus={_ready:!1,_callbacks:[],whenReady:function(t){this._ready?t():this._callbacks.push(t)},_makeReady:function(){this._ready=!0;for(var t=0;t<this._callbacks.length;t++)this._callbacks[t]();this._callbacks=[]},_catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:!1,afterNextRender:function(t,e,i){this._watchNextRender(),this._afterNextRenderQueue.push([t,e,i])},hasRendered:function(){return this._ready},_watchNextRender:function(){if(!this._waitingNextRender){this._waitingNextRender=!0;var t=function(){Polymer.RenderStatus._flushNextRender()};this._ready?requestAnimationFrame(t):this.whenReady(t)}},_flushNextRender:function(){var t=this;setTimeout(function(){t._flushRenderCallbacks(t._afterNextRenderQueue),t._afterNextRenderQueue=[],t._waitingNextRender=!1})},_flushRenderCallbacks:function(t){for(var e,i=0;i<t.length;i++)e=t[i],e[1].apply(e[0],e[2]||Polymer.nar)}},window.HTMLImports?HTMLImports.whenReady(function(){Polymer.RenderStatus._catchFirstRender()}):Polymer.RenderStatus._catchFirstRender(),Polymer.ImportStatus=Polymer.RenderStatus,Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady,function(){"use strict";var t=Polymer.Settings;Polymer.Base={__isPolymerInstance__:!0,_addFeature:function(t){this.mixin(this,t)},registerCallback:function(){if("max"===t.lazyRegister)this.beforeRegister&&this.beforeRegister();else{this._desugarBehaviors();for(var e,i=0;i<this.behaviors.length;i++)e=this.behaviors[i],e.beforeRegister&&e.beforeRegister.call(this);this.beforeRegister&&this.beforeRegister()}this._registerFeatures(),t.lazyRegister||this.ensureRegisterFinished()},createdCallback:function(){if(t.disableUpgradeEnabled){if(this.hasAttribute("disable-upgrade"))return this._propertySetter=e,void(this.__data__={});this.__hasInitialized=!0}this.__initialize()},__initialize:function(){this.__hasRegisterFinished||this._ensureRegisterFinished(this.__proto__),Polymer.telemetry.instanceCount++,this.root=this;for(var t,e=0;e<this.behaviors.length;e++)t=this.behaviors[e],t.created&&t.created.call(this);this.created&&this.created(),this._initFeatures()},ensureRegisterFinished:function(){this._ensureRegisterFinished(this)},_ensureRegisterFinished:function(e){if(e.__hasRegisterFinished!==e.is||!e.is){if("max"===t.lazyRegister){e._desugarBehaviors();for(var i,n=0;n<e.behaviors.length;n++)i=e.behaviors[n],i.beforeRegister&&i.beforeRegister.call(e)}e.__hasRegisterFinished=e.is,e._finishRegisterFeatures&&e._finishRegisterFeatures();for(var r,o=0;o<e.behaviors.length;o++)r=e.behaviors[o],r.registered&&r.registered.call(e);e.registered&&e.registered(),t.usePolyfillProto&&e!==this&&e.extend(this,e)}},attachedCallback:function(){var t=this;Polymer.RenderStatus.whenReady(function(){t.isAttached=!0;for(var e,i=0;i<t.behaviors.length;i++)e=t.behaviors[i],e.attached&&e.attached.call(t);t.attached&&t.attached()})},detachedCallback:function(){var t=this;Polymer.RenderStatus.whenReady(function(){t.isAttached=!1;for(var e,i=0;i<t.behaviors.length;i++)e=t.behaviors[i],e.detached&&e.detached.call(t);t.detached&&t.detached()})},attributeChangedCallback:function(t,e,i){this._attributeChangedImpl(t);for(var n,r=0;r<this.behaviors.length;r++)n=this.behaviors[r],n.attributeChanged&&n.attributeChanged.call(this,t,e,i);this.attributeChanged&&this.attributeChanged(t,e,i)},_attributeChangedImpl:function(t){this._setAttributeToProperty(this,t)},extend:function(t,e){if(t&&e)for(var i,n=Object.getOwnPropertyNames(e),r=0;r<n.length&&(i=n[r]);r++)this.copyOwnProperty(i,e,t);return t||e},mixin:function(t,e){for(var i in e)t[i]=e[i];return t},copyOwnProperty:function(t,e,i){var n=Object.getOwnPropertyDescriptor(e,t);n&&Object.defineProperty(i,t,n)},_logger:function(t,e){switch(1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":}},_log:function(){var t=Array.prototype.slice.call(arguments,0);this._logger("log",t)},_warn:function(){var t=Array.prototype.slice.call(arguments,0);this._logger("warn",t)},_error:function(){var t=Array.prototype.slice.call(arguments,0);this._logger("error",t)},_logf:function(){return this._logPrefix.concat(this.is).concat(Array.prototype.slice.call(arguments,0))}},Polymer.Base._logPrefix=function(){return window.chrome&&!/edge/i.test(navigator.userAgent)||/firefox/i.test(navigator.userAgent)?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}(),Polymer.Base.chainObject=function(t,e){return t&&e&&t!==e&&(Object.__proto__||(t=Polymer.Base.extend(Object.create(e),t)),t.__proto__=e),t},Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype),Polymer.BaseDescriptors={};var e;if(t.disableUpgradeEnabled){e=function(t,e){this.__data__[t]=e};var i=Polymer.Base.attributeChangedCallback;Polymer.Base.attributeChangedCallback=function(t,e,n){this.__hasInitialized||"disable-upgrade"!==t||(this.__hasInitialized=!0,this._propertySetter=Polymer.Bind._modelApi._propertySetter,this.__initialize()),i.call(this,t,e,n)}}window.CustomElements?Polymer["instanceof"]=CustomElements["instanceof"]:Polymer["instanceof"]=function(t,e){return t instanceof e},Polymer.isInstance=function(t){return!(!t||!t.__isPolymerInstance__)},Polymer.telemetry.instanceCount=0}(),function(){function t(){if(o)for(var t,e=document._currentScript||document.currentScript,i=e&&e.ownerDocument||document,n=i.querySelectorAll("dom-module"),r=n.length-1;r>=0&&(t=n[r]);r--){if(t.__upgraded__)return;CustomElements.upgrade(t)}}var e={},i={},n=function(t){return e[t]||i[t.toLowerCase()]},r=function(){return document.createElement("dom-module")};r.prototype=Object.create(HTMLElement.prototype),Polymer.Base.mixin(r.prototype,{createdCallback:function(){this.register()},register:function(t){t=t||this.id||this.getAttribute("name")||this.getAttribute("is"),t&&(this.id=t,e[t]=this,i[t.toLowerCase()]=this)},"import":function(e,i){if(e){var r=n(e);return r||(t(),r=n(e)),r&&i&&(r=r.querySelector(i)),r}}}),Object.defineProperty(r.prototype,"constructor",{value:r,configurable:!0,writable:!0});var o=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",r)}(),Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var t=(document._currentScript||document.currentScript).parentNode;if("dom-module"===t.localName){var e=t.id||t.getAttribute("name")||t.getAttribute("is");this.is=e}}this.is&&(this.is=this.is.toLowerCase())}}),Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){this.behaviors.length&&(this.behaviors=this._desugarSomeBehaviors(this.behaviors))},_desugarSomeBehaviors:function(t){var e=[];t=this._flattenBehaviorsList(t);for(var i=t.length-1;i>=0;i--){var n=t[i];e.indexOf(n)===-1&&(this._mixinBehavior(n),e.unshift(n))}return e},_flattenBehaviorsList:function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n instanceof Array?e=e.concat(this._flattenBehaviorsList(n)):n?e.push(n):this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}return e},_mixinBehavior:function(t){for(var e,i=Object.getOwnPropertyNames(t),n=t._noAccessors,r=0;r<i.length&&(e=i[r]);r++)Polymer.Base._behaviorProperties[e]||this.hasOwnProperty(e)||(n?this[e]=t[e]:this.copyOwnProperty(e,t,this))},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(t){for(var e=0,i=t.length;i>e;e++)this._prepBehavior(t[e]);this._prepBehavior(this)},_marshalBehaviors:function(){for(var t=0;t<this.behaviors.length;t++)this._marshalBehavior(this.behaviors[t]);this._marshalBehavior(this)}}),Polymer.Base._behaviorProperties={hostAttributes:!0,beforeRegister:!0,registered:!0,properties:!0,observers:!0,listeners:!0,created:!0,attached:!0,detached:!0,attributeChanged:!0,ready:!0,_noAccessors:!0},Polymer.Base._addFeature({_getExtendedPrototype:function(t){return this._getExtendedNativePrototype(t)},_nativePrototypes:{},_getExtendedNativePrototype:function(t){var e=this._nativePrototypes[t];if(!e){e=Object.create(this.getNativePrototype(t));for(var i,n=Object.getOwnPropertyNames(Polymer.Base),r=0;r<n.length&&(i=n[r]);r++)Polymer.BaseDescriptors[i]||(e[i]=Polymer.Base[i]);Object.defineProperties(e,Polymer.BaseDescriptors),this._nativePrototypes[t]=e}return e},getNativePrototype:function(t){return Object.getPrototypeOf(document.createElement(t))}}),Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this["extends"]?[this["extends"],this.is]:[this.is];var t=function(){return this._factory(arguments)};this.hasOwnProperty("extends")&&(t["extends"]=this["extends"]),Object.defineProperty(this,"constructor",{value:t,writable:!0,configurable:!0}),t.prototype=this},_factory:function(t){var e=document.createElement.apply(document,this._factoryArgs);return this.factoryImpl&&this.factoryImpl.apply(e,t),e}}),Polymer.nob=Object.create(null),Polymer.Base._addFeature({getPropertyInfo:function(t){var e=this._getPropertyInfo(t,this.properties);if(!e)for(var i=0;i<this.behaviors.length;i++)if(e=this._getPropertyInfo(t,this.behaviors[i].properties))return e;return e||Polymer.nob},_getPropertyInfo:function(t,e){var i=e&&e[t];return"function"==typeof i&&(i=e[t]={type:i}),i&&(i.defined=!0),i},_prepPropertyInfo:function(){this._propertyInfo={};for(var t=0;t<this.behaviors.length;t++)this._addPropertyInfo(this._propertyInfo,this.behaviors[t].properties);this._addPropertyInfo(this._propertyInfo,this.properties),this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(t,e){if(e){var i,n;for(var r in e)i=t[r],n=e[r],("_"!==r[0]||n.readOnly)&&(t[r]?(i.type||(i.type=n.type),i.readOnly||(i.readOnly=n.readOnly)):t[r]={type:"function"==typeof n?n:n.type,readOnly:n.readOnly,attribute:Polymer.CaseMap.camelToDashCase(r)})}}}),function(){var t={configurable:!0,writable:!0,enumerable:!0,value:{}};Polymer.BaseDescriptors.properties=t,Object.defineProperty(Polymer.Base,"properties",t)}(),Polymer.CaseMap={_caseMap:{},_rx:{dashToCamel:/-[a-z]/g,camelToDash:/([A-Z])/g},dashToCamelCase:function(t){return this._caseMap[t]||(this._caseMap[t]=t.indexOf("-")<0?t:t.replace(this._rx.dashToCamel,function(t){return t[1].toUpperCase()}))},camelToDashCase:function(t){return this._caseMap[t]||(this._caseMap[t]=t.replace(this._rx.camelToDash,"-$1").toLowerCase())}},Polymer.Base._addFeature({_addHostAttributes:function(t){this._aggregatedAttributes||(this._aggregatedAttributes={}),t&&this.mixin(this._aggregatedAttributes,t)},_marshalHostAttributes:function(){this._aggregatedAttributes&&this._applyAttributes(this,this._aggregatedAttributes)},_applyAttributes:function(t,e){for(var i in e)if(!this.hasAttribute(i)&&"class"!==i){var n=e[i];this.serializeValueToAttribute(n,i,this)}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(t){if(this.hasAttributes())for(var e in this._propertyInfo){var i=this._propertyInfo[e];this.hasAttribute(i.attribute)&&this._setAttributeToProperty(t,i.attribute,e,i)}},_setAttributeToProperty:function(t,e,i,n){if(!this._serializing&&(i=i||Polymer.CaseMap.dashToCamelCase(e),n=n||this._propertyInfo&&this._propertyInfo[i],n&&!n.readOnly)){var r=this.getAttribute(e);t[i]=this.deserialize(r,n.type)}},_serializing:!1,reflectPropertyToAttribute:function(t,e,i){this._serializing=!0,i=void 0===i?this[t]:i,this.serializeValueToAttribute(i,e||Polymer.CaseMap.camelToDashCase(t)),this._serializing=!1},serializeValueToAttribute:function(t,e,i){var n=this.serialize(t);i=i||this,void 0===n?i.removeAttribute(e):i.setAttribute(e,n)},deserialize:function(t,e){switch(e){case Number:t=+t;break;case Boolean:t=null!=t;break;case Object:try{t=JSON.parse(t)}catch(i){}break;case Array:try{t=JSON.parse(t)}catch(i){t=null}break;case Date:t=new Date(t);break;case String:}return t},serialize:function(t){switch(typeof t){case"boolean":return t?"":void 0;case"object":if(t instanceof Date)return""+t;if(t)try{return JSON.stringify(t)}catch(e){return""}default:return null!=t?t:void 0}}}),Polymer.version="1.8.0",Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepPropertyInfo()},_prepBehavior:function(t){this._addHostAttributes(t.hostAttributes)},_marshalBehavior:function(){},_initFeatures:function(){this._marshalHostAttributes(),this._marshalBehaviors()}}),Polymer.Base._addFeature({_prepTemplate:function(){void 0===this._template&&(this._template=Polymer.DomModule["import"](this.is,"template")),this._template&&this._template.hasAttribute("is")&&this._warn(this._logf("_prepTemplate","top-level Polymer template must not be a type-extension, found",this._template,"Move inside simple <template>.")),this._template&&!this._template.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(this._template)},_stampTemplate:function(){this._template&&(this.root=this.instanceTemplate(this._template))},instanceTemplate:function(t){return document.importNode(t._content||t.content,!0)}}),function(){var t=Polymer.Base.attachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(t){this.dataHost=t=t||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1],t&&t._clients&&t._clients.push(this),this._clients=null,this._clientsReadied=!1},_beginHosting:function(){Polymer.Base._hostStack.push(this),this._clients||(this._clients=[])},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){this._readied=!1,this._canReady()&&this._ready()},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady(),this._template&&(this._setupRoot(),this._readyClients()),this._clientsReadied=!0,this._clients=null,this._afterClientsReady(),this._readySelf()},_readyClients:function(){this._beginDistribute();var t=this._clients;if(t)for(var e,i=0,n=t.length;n>i&&(e=t[i]);i++)e._ready();this._finishDistribute()},_readySelf:function(){for(var t,e=0;e<this.behaviors.length;e++)t=this.behaviors[e],t.ready&&t.ready.call(this);this.ready&&this.ready(),this._readied=!0,this._attachedPending&&(this._attachedPending=!1,this.attachedCallback())},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){this._readied?(this._beforeAttached(),t.call(this)):this._attachedPending=!0}})}(),Polymer.ArraySplice=function(){function t(t,e,i){return{index:t,removed:e,addedCount:i}}function e(){}var i=0,n=1,r=2,o=3;return e.prototype={calcEditDistances:function(t,e,i,n,r,o){for(var s=o-r+1,a=i-e+1,l=Array(s),h=0;s>h;h++)l[h]=Array(a),l[h][0]=h;for(var c=0;a>c;c++)l[0][c]=c;for(h=1;s>h;h++)for(c=1;a>c;c++)if(this.equals(t[e+c-1],n[r+h-1]))l[h][c]=l[h-1][c-1];else{var u=l[h-1][c]+1,d=l[h][c-1]+1;l[h][c]=d>u?u:d}return l},spliceOperationsFromEditDistances:function(t){for(var e=t.length-1,s=t[0].length-1,a=t[e][s],l=[];e>0||s>0;)if(0!=e)if(0!=s){var h,c=t[e-1][s-1],u=t[e-1][s],d=t[e][s-1];h=d>u?c>u?u:c:c>d?d:c,h==c?(c==a?l.push(i):(l.push(n),a=c),e--,s--):h==u?(l.push(o),e--,a=u):(l.push(r),s--,a=d)}else l.push(o),e--;else l.push(r),s--;return l.reverse(),l},calcSplices:function(e,s,a,l,h,c){var u=0,d=0,f=Math.min(a-s,c-h);if(0==s&&0==h&&(u=this.sharedPrefix(e,l,f)),a==e.length&&c==l.length&&(d=this.sharedSuffix(e,l,f-u)),s+=u,h+=u,a-=d,c-=d,a-s==0&&c-h==0)return[];if(s==a){for(var p=t(s,[],0);c>h;)p.removed.push(l[h++]);return[p]}if(h==c)return[t(s,[],a-s)];var m=this.spliceOperationsFromEditDistances(this.calcEditDistances(e,s,a,l,h,c));p=void 0;for(var _=[],y=s,v=h,g=0;g<m.length;g++)switch(m[g]){case i:p&&(_.push(p),p=void 0),y++,v++;break;case n:p||(p=t(y,[],0)),p.addedCount++,y++,p.removed.push(l[v]),v++;break;case r:p||(p=t(y,[],0)),p.addedCount++,y++;break;case o:p||(p=t(y,[],0)),p.removed.push(l[v]),v++}return p&&_.push(p),_},sharedPrefix:function(t,e,i){for(var n=0;i>n;n++)if(!this.equals(t[n],e[n]))return n;return i},sharedSuffix:function(t,e,i){for(var n=t.length,r=e.length,o=0;i>o&&this.equals(t[--n],e[--r]);)o++;return o},calculateSplices:function(t,e){return this.calcSplices(t,0,t.length,e,0,e.length)},equals:function(t,e){return t===e}},new e}(),Polymer.domInnerHTML=function(){function t(t){switch(t){case"&":return"&amp;";case"<":return"&lt;";case">":return"&gt;";case'"':return"&quot;";case" ":return"&nbsp;"}}function e(e){return e.replace(s,t)}function i(e){return e.replace(a,t)}function n(t){for(var e={},i=0;i<t.length;i++)e[t[i]]=!0;return e}function r(t,n,r){switch(t.nodeType){case Node.ELEMENT_NODE:for(var s,a=t.localName,c="<"+a,u=t.attributes,d=0;s=u[d];d++)c+=" "+s.name+'="'+e(s.value)+'"';return c+=">",l[a]?c:c+o(t,r)+"</"+a+">";case Node.TEXT_NODE:var f=t.data;return n&&h[n.localName]?f:i(f);case Node.COMMENT_NODE:return"<!--"+t.data+"-->";default:throw Error("not implemented")}}function o(t,e){t instanceof HTMLTemplateElement&&(t=t.content);for(var i,n="",o=Polymer.dom(t).childNodes,s=0,a=o.length;a>s&&(i=o[s]);s++)n+=r(i,t,e);return n}var s=/[&\u00A0"]/g,a=/[&\u00A0<>]/g,l=n(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),h=n(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);return{getInnerHTML:o}}(),function(){"use strict";var t=Element.prototype.insertBefore,e=Element.prototype.appendChild,i=Element.prototype.removeChild;Polymer.TreeApi={arrayCopyChildNodes:function(t){for(var e=[],i=0,n=t.firstChild;n;n=n.nextSibling)e[i++]=n;return e},arrayCopyChildren:function(t){for(var e=[],i=0,n=t.firstElementChild;n;n=n.nextElementSibling)e[i++]=n;return e},arrayCopy:function(t){for(var e=t.length,i=Array(e),n=0;e>n;n++)i[n]=t[n];return i}},Polymer.TreeApi.Logical={hasParentNode:function(t){return!(!t.__dom||!t.__dom.parentNode)},hasChildNodes:function(t){return!(!t.__dom||void 0===t.__dom.childNodes)},getChildNodes:function(t){return this.hasChildNodes(t)?this._getChildNodes(t):t.childNodes},_getChildNodes:function(t){if(!t.__dom.childNodes){t.__dom.childNodes=[];for(var e=t.__dom.firstChild;e;e=e.__dom.nextSibling)t.__dom.childNodes.push(e)}return t.__dom.childNodes},getParentNode:function(t){return t.__dom&&void 0!==t.__dom.parentNode?t.__dom.parentNode:t.parentNode},getFirstChild:function(t){return t.__dom&&void 0!==t.__dom.firstChild?t.__dom.firstChild:t.firstChild},getLastChild:function(t){
  return t.__dom&&void 0!==t.__dom.lastChild?t.__dom.lastChild:t.lastChild},getNextSibling:function(t){return t.__dom&&void 0!==t.__dom.nextSibling?t.__dom.nextSibling:t.nextSibling},getPreviousSibling:function(t){return t.__dom&&void 0!==t.__dom.previousSibling?t.__dom.previousSibling:t.previousSibling},getFirstElementChild:function(t){return t.__dom&&void 0!==t.__dom.firstChild?this._getFirstElementChild(t):t.firstElementChild},_getFirstElementChild:function(t){for(var e=t.__dom.firstChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__dom.nextSibling;return e},getLastElementChild:function(t){return t.__dom&&void 0!==t.__dom.lastChild?this._getLastElementChild(t):t.lastElementChild},_getLastElementChild:function(t){for(var e=t.__dom.lastChild;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__dom.previousSibling;return e},getNextElementSibling:function(t){return t.__dom&&void 0!==t.__dom.nextSibling?this._getNextElementSibling(t):t.nextElementSibling},_getNextElementSibling:function(t){for(var e=t.__dom.nextSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__dom.nextSibling;return e},getPreviousElementSibling:function(t){return t.__dom&&void 0!==t.__dom.previousSibling?this._getPreviousElementSibling(t):t.previousElementSibling},_getPreviousElementSibling:function(t){for(var e=t.__dom.previousSibling;e&&e.nodeType!==Node.ELEMENT_NODE;)e=e.__dom.previousSibling;return e},saveChildNodes:function(t){if(!this.hasChildNodes(t)){t.__dom=t.__dom||{},t.__dom.firstChild=t.firstChild,t.__dom.lastChild=t.lastChild,t.__dom.childNodes=[];for(var e=t.firstChild;e;e=e.nextSibling)e.__dom=e.__dom||{},e.__dom.parentNode=t,t.__dom.childNodes.push(e),e.__dom.nextSibling=e.nextSibling,e.__dom.previousSibling=e.previousSibling}},recordInsertBefore:function(t,e,i){if(e.__dom.childNodes=null,t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var n=t.firstChild;n;n=n.nextSibling)this._linkNode(n,e,i);else this._linkNode(t,e,i)},_linkNode:function(t,e,i){t.__dom=t.__dom||{},e.__dom=e.__dom||{},i&&(i.__dom=i.__dom||{}),t.__dom.previousSibling=i?i.__dom.previousSibling:e.__dom.lastChild,t.__dom.previousSibling&&(t.__dom.previousSibling.__dom.nextSibling=t),t.__dom.nextSibling=i||null,t.__dom.nextSibling&&(t.__dom.nextSibling.__dom.previousSibling=t),t.__dom.parentNode=e,i?i===e.__dom.firstChild&&(e.__dom.firstChild=t):(e.__dom.lastChild=t,e.__dom.firstChild||(e.__dom.firstChild=t)),e.__dom.childNodes=null},recordRemoveChild:function(t,e){t.__dom=t.__dom||{},e.__dom=e.__dom||{},t===e.__dom.firstChild&&(e.__dom.firstChild=t.__dom.nextSibling),t===e.__dom.lastChild&&(e.__dom.lastChild=t.__dom.previousSibling);var i=t.__dom.previousSibling,n=t.__dom.nextSibling;i&&(i.__dom.nextSibling=n),n&&(n.__dom.previousSibling=i),t.__dom.parentNode=t.__dom.previousSibling=t.__dom.nextSibling=void 0,e.__dom.childNodes=null}},Polymer.TreeApi.Composed={getChildNodes:function(t){return Polymer.TreeApi.arrayCopyChildNodes(t)},getParentNode:function(t){return t.parentNode},clearChildNodes:function(t){t.textContent=""},insertBefore:function(e,i,n){return t.call(e,i,n||null)},appendChild:function(t,i){return e.call(t,i)},removeChild:function(t,e){return i.call(t,e)}}}(),Polymer.DomApi=function(){"use strict";var t=Polymer.Settings,e=Polymer.TreeApi,i=function(t){this.node=n?i.wrap(t):t},n=t.hasShadow&&!t.nativeShadow;i.wrap=window.wrap?window.wrap:function(t){return t},i.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(t){if(this.node.contains(t))return!0;for(var e=t,i=t.ownerDocument;e&&e!==i&&e!==this.node;)e=Polymer.dom(e).parentNode||e.host;return e===this.node},queryDistributedElements:function(t){for(var e,n=this.getEffectiveChildNodes(),r=[],o=0,s=n.length;s>o&&(e=n[o]);o++)e.nodeType===Node.ELEMENT_NODE&&i.matchesSelector.call(e,t)&&r.push(e);return r},getEffectiveChildNodes:function(){for(var t,e=[],i=this.childNodes,n=0,s=i.length;s>n&&(t=i[n]);n++)if(t.localName===r)for(var a=o(t).getDistributedNodes(),l=0;l<a.length;l++)e.push(a[l]);else e.push(t);return e},observeNodes:function(t){if(t)return this.observer||(this.observer=this.node.localName===r?new i.DistributedNodesObserver(this):new i.EffectiveNodesObserver(this)),this.observer.addListener(t)},unobserveNodes:function(t){this.observer&&this.observer.removeListener(t)},notifyObserver:function(){this.observer&&this.observer.notify()},_query:function(t,i,n){i=i||this.node;var r=[];return this._queryElements(e.Logical.getChildNodes(i),t,n,r),r},_queryElements:function(t,e,i,n){for(var r,o=0,s=t.length;s>o&&(r=t[o]);o++)if(r.nodeType===Node.ELEMENT_NODE&&this._queryElement(r,e,i,n))return!0},_queryElement:function(t,i,n,r){var o=i(t);return o&&r.push(t),n&&n(o)?o:void this._queryElements(e.Logical.getChildNodes(t),i,n,r)}};var r=i.CONTENT="content",o=i.factory=function(t){return t=t||document,t.__domApi||(t.__domApi=new i.ctor(t)),t.__domApi};i.hasApi=function(t){return!!t.__domApi},i.ctor=i,Polymer.dom=function(t,e){return t instanceof Event?Polymer.EventApi.factory(t):i.factory(t,e)};var s=Element.prototype;return i.matchesSelector=s.matches||s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector,i}(),function(){"use strict";var t=Polymer.Settings,e=Polymer.DomApi,i=e.factory,n=Polymer.TreeApi,r=Polymer.domInnerHTML.getInnerHTML,o=e.CONTENT;if(!t.useShadow){var s=Element.prototype.cloneNode,a=Document.prototype.importNode;Polymer.Base.mixin(e.prototype,{_lazyDistribute:function(t){t.shadyRoot&&t.shadyRoot._distributionClean&&(t.shadyRoot._distributionClean=!1,Polymer.dom.addDebouncer(t.debounce("_distribute",t._distributeContent)))},appendChild:function(t){return this.insertBefore(t)},insertBefore:function(t,r){if(r&&n.Logical.getParentNode(r)!==this.node)throw Error("The ref_node to be inserted before is not a child of this node");if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var s=n.Logical.getParentNode(t);s?(e.hasApi(s)&&i(s).notifyObserver(),this._removeNode(t)):this._removeOwnerShadyRoot(t)}if(!this._addNode(t,r)){r&&(r=r.localName===o?this._firstComposedNode(r):r);var a=this.node._isShadyRoot?this.node.host:this.node;r?n.Composed.insertBefore(a,t,r):n.Composed.appendChild(a,t)}return this.notifyObserver(),t},_addNode:function(t,e){var i=this.getOwnerRoot();if(i){var r=this._maybeAddInsertionPoint(t,this.node);i._invalidInsertionPoints||(i._invalidInsertionPoints=r),this._addNodeToHost(i.host,t)}n.Logical.hasChildNodes(this.node)&&n.Logical.recordInsertBefore(t,this.node,e);var o=this._maybeDistribute(t)||this.node.shadyRoot;if(o)if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(;t.firstChild;)n.Composed.removeChild(t,t.firstChild);else{var s=n.Composed.getParentNode(t);s&&n.Composed.removeChild(s,t)}return o},removeChild:function(t){if(n.Logical.getParentNode(t)!==this.node)throw Error("The node to be removed is not a child of this node: "+t);if(!this._removeNode(t)){var e=this.node._isShadyRoot?this.node.host:this.node;e===n.Composed.getParentNode(t)&&n.Composed.removeChild(e,t)}return this.notifyObserver(),t},_removeNode:function(t){var e,r=n.Logical.hasParentNode(t)&&n.Logical.getParentNode(t),o=this._ownerShadyRootForNode(t);return r&&(e=i(t)._maybeDistributeParent(),n.Logical.recordRemoveChild(t,r),o&&this._removeDistributedChildren(o,t)&&(o._invalidInsertionPoints=!0,this._lazyDistribute(o.host))),this._removeOwnerShadyRoot(t),o&&this._removeNodeFromHost(o.host,t),e},replaceChild:function(t,e){return this.insertBefore(t,e),this.removeChild(e),t},_hasCachedOwnerRoot:function(t){return!(void 0===t._ownerShadyRoot)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(t){if(t){var e=t._ownerShadyRoot;if(void 0===e){if(t._isShadyRoot)e=t;else{var i=n.Logical.getParentNode(t);e=i?i._isShadyRoot?i:this._ownerShadyRootForNode(i):null}(e||document.documentElement.contains(t))&&(t._ownerShadyRoot=e)}return e}},_maybeDistribute:function(t){var e=t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!t.__noContent&&i(t).querySelector(o),r=e&&n.Logical.getParentNode(e).nodeType!==Node.DOCUMENT_FRAGMENT_NODE,s=e||t.localName===o;if(s){var a=this.getOwnerRoot();a&&this._lazyDistribute(a.host)}var l=this._nodeNeedsDistribution(this.node);return l&&this._lazyDistribute(this.node),l||s&&!r},_maybeAddInsertionPoint:function(t,e){var r;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE||t.__noContent)t.localName===o&&(n.Logical.saveChildNodes(e),n.Logical.saveChildNodes(t),r=!0);else for(var s,a,l,h=i(t).querySelectorAll(o),c=0;c<h.length&&(s=h[c]);c++)a=n.Logical.getParentNode(s),a===t&&(a=e),l=this._maybeAddInsertionPoint(s,a),r=r||l;return r},_updateInsertionPoints:function(t){for(var e,r=t.shadyRoot._insertionPoints=i(t.shadyRoot).querySelectorAll(o),s=0;s<r.length;s++)e=r[s],n.Logical.saveChildNodes(e),n.Logical.saveChildNodes(n.Logical.getParentNode(e))},_nodeNeedsDistribution:function(t){return t&&t.shadyRoot&&e.hasInsertionPoint(t.shadyRoot)},_addNodeToHost:function(t,e){t._elementAdd&&t._elementAdd(e)},_removeNodeFromHost:function(t,e){t._elementRemove&&t._elementRemove(e)},_removeDistributedChildren:function(t,e){for(var r,o=t._insertionPoints,s=0;s<o.length;s++){var a=o[s];if(this._contains(e,a))for(var l=i(a).getDistributedNodes(),h=0;h<l.length;h++){r=!0;var c=l[h],u=n.Composed.getParentNode(c);u&&n.Composed.removeChild(u,c)}}return r},_contains:function(t,e){for(;e;){if(e==t)return!0;e=n.Logical.getParentNode(e)}},_removeOwnerShadyRoot:function(t){if(this._hasCachedOwnerRoot(t))for(var e,i=n.Logical.getChildNodes(t),r=0,o=i.length;o>r&&(e=i[r]);r++)this._removeOwnerShadyRoot(e);t._ownerShadyRoot=void 0},_firstComposedNode:function(t){for(var e,n,r=i(t).getDistributedNodes(),o=0,s=r.length;s>o&&(e=r[o]);o++)if(n=i(e).getDestinationInsertionPoints(),n[n.length-1]===t)return e},querySelector:function(t){return this._query(function(i){return e.matchesSelector.call(i,t)},this.node,function(t){return!!t})[0]||null},querySelectorAll:function(t){return this._query(function(i){return e.matchesSelector.call(i,t)},this.node)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},_clear:function(){for(;this.childNodes.length;)this.removeChild(this.childNodes[0])},setAttribute:function(t,e){this.node.setAttribute(t,e),this._maybeDistributeParent()},removeAttribute:function(t){this.node.removeAttribute(t),this._maybeDistributeParent()},_maybeDistributeParent:function(){if(this._nodeNeedsDistribution(this.parentNode))return this._lazyDistribute(this.parentNode),!0},cloneNode:function(t){var e=s.call(this.node,!1);if(t)for(var n,r=this.childNodes,o=i(e),a=0;a<r.length;a++)n=i(r[a]).cloneNode(!0),o.appendChild(n);return e},importNode:function(t,e){var r=this.node instanceof Document?this.node:this.node.ownerDocument,o=a.call(r,t,!1);if(e)for(var s,l=n.Logical.getChildNodes(t),h=i(o),c=0;c<l.length;c++)s=i(r).importNode(l[c],!0),h.appendChild(s);return o},_getComposedInnerHTML:function(){return r(this.node,!0)}}),Object.defineProperties(e.prototype,{activeElement:{get:function(){var t=document.activeElement;if(!t)return null;var e=!!this.node._isShadyRoot;if(this.node!==document){if(!e)return null;if(this.node.host===t||!this.node.host.contains(t))return null}for(var n=i(t).getOwnerRoot();n&&n!==this.node;)t=n.host,n=i(t).getOwnerRoot();return this.node===document?n?null:t:n===this.node?t:null},configurable:!0},childNodes:{get:function(){var t=n.Logical.getChildNodes(this.node);return Array.isArray(t)?t:n.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return n.Logical.hasChildNodes(this.node)?Array.prototype.filter.call(this.childNodes,function(t){return t.nodeType===Node.ELEMENT_NODE}):n.arrayCopyChildren(this.node)},configurable:!0},parentNode:{get:function(){return n.Logical.getParentNode(this.node)},configurable:!0},firstChild:{get:function(){return n.Logical.getFirstChild(this.node)},configurable:!0},lastChild:{get:function(){return n.Logical.getLastChild(this.node)},configurable:!0},nextSibling:{get:function(){return n.Logical.getNextSibling(this.node)},configurable:!0},previousSibling:{get:function(){return n.Logical.getPreviousSibling(this.node)},configurable:!0},firstElementChild:{get:function(){return n.Logical.getFirstElementChild(this.node)},configurable:!0},lastElementChild:{get:function(){return n.Logical.getLastElementChild(this.node)},configurable:!0},nextElementSibling:{get:function(){return n.Logical.getNextElementSibling(this.node)},configurable:!0},previousElementSibling:{get:function(){return n.Logical.getPreviousElementSibling(this.node)},configurable:!0},textContent:{get:function(){var t=this.node.nodeType;if(t===Node.TEXT_NODE||t===Node.COMMENT_NODE)return this.node.textContent;for(var e,i=[],n=0,r=this.childNodes;e=r[n];n++)e.nodeType!==Node.COMMENT_NODE&&i.push(e.textContent);return i.join("")},set:function(t){var e=this.node.nodeType;e===Node.TEXT_NODE||e===Node.COMMENT_NODE?this.node.textContent=t:(this._clear(),t&&this.appendChild(document.createTextNode(t)))},configurable:!0},innerHTML:{get:function(){var t=this.node.nodeType;return t===Node.TEXT_NODE||t===Node.COMMENT_NODE?null:r(this.node)},set:function(t){var e=this.node.nodeType;if(e!==Node.TEXT_NODE||e!==Node.COMMENT_NODE){this._clear();var i=document.createElement("div");i.innerHTML=t;for(var r=n.arrayCopyChildNodes(i),o=0;o<r.length;o++)this.appendChild(r[o])}},configurable:!0}}),e.hasInsertionPoint=function(t){return!(!t||!t._insertionPoints.length)}}}(),function(){"use strict";var t=Polymer.Settings,e=Polymer.TreeApi,i=Polymer.DomApi;if(t.useShadow){Polymer.Base.mixin(i.prototype,{querySelectorAll:function(t){return e.arrayCopy(this.node.querySelectorAll(t))},getOwnerRoot:function(){for(var t=this.node;t;){if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host)return t;t=t.parentNode}},importNode:function(t,e){return(this.node instanceof Document?this.node:this.node.ownerDocument).importNode(t,e)},getDestinationInsertionPoints:function(){var t=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return t?e.arrayCopy(t):[]},getDistributedNodes:function(){var t=this.node.getDistributedNodes&&this.node.getDistributedNodes();return t?e.arrayCopy(t):[]}}),Object.defineProperties(i.prototype,{activeElement:{get:function(){var t=i.wrap(this.node),e=t.activeElement;return t.contains(e)?e:null},configurable:!0},childNodes:{get:function(){return e.arrayCopyChildNodes(this.node)},configurable:!0},children:{get:function(){return e.arrayCopyChildren(this.node)},configurable:!0},textContent:{get:function(){return this.node.textContent},set:function(t){return this.node.textContent=t},configurable:!0},innerHTML:{get:function(){return this.node.innerHTML},set:function(t){return this.node.innerHTML=t},configurable:!0}});var n=function(t){i.prototype[t]=function(){return this.node[t].apply(this.node,arguments)}};!function(t){for(var e=0;e<t.length;e++)n(t[e])}(["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector"]);var r=function(t){Object.defineProperty(i.prototype,t,{get:function(){return this.node[t]},configurable:!0})};!function(t){for(var e=0;e<t.length;e++)r(t[e])}(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}}(),Polymer.Base.mixin(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){for(this._flushGuard=0,this._prepareFlush();this._debouncers.length&&this._flushGuard<this._FLUSH_MAX;){for(;this._debouncers.length;)this._debouncers.shift().complete();this._finishDebouncer&&this._finishDebouncer.complete(),this._prepareFlush(),this._flushGuard++}this._flushGuard>=this._FLUSH_MAX},_prepareFlush:function(){this._needsTakeRecords&&CustomElements.takeRecords();for(var t=0;t<this._staticFlushList.length;t++)this._staticFlushList[t]()},addStaticFlush:function(t){this._staticFlushList.push(t)},removeStaticFlush:function(t){var e=this._staticFlushList.indexOf(t);0>e||this._staticFlushList.splice(e,1)},addDebouncer:function(t){this._debouncers.push(t),this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}}),Polymer.EventApi=function(){"use strict";var t=Polymer.DomApi.ctor,e=Polymer.Settings;return t.Event=function(t){this.event=t},e.useShadow?t.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){var t=this.event.path;return Array.isArray(t)||(t=Array.prototype.slice.call(t)),t}}:t.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){for(var t=this.event.currentTarget,e=t&&Polymer.dom(t).getOwnerRoot(),i=this.path,n=0;n<i.length;n++)if(Polymer.dom(i[n]).getOwnerRoot()===e)return i[n]},get path(){if(!this.event._path){for(var t=[],e=this.rootTarget;e;){t.push(e);var i=Polymer.dom(e).getDestinationInsertionPoints();if(i.length){for(var n=0;n<i.length-1;n++)t.push(i[n]);e=i[i.length-1]}else e=Polymer.dom(e).parentNode||e.host}t.push(window),this.event._path=t}return this.event._path}},{factory:function(e){return e.__eventApi||(e.__eventApi=new t.Event(e)),e.__eventApi}}}(),function(){"use strict";var t=Polymer.DomApi.ctor,e=Polymer.Settings.useShadow;Object.defineProperty(t.prototype,"classList",{get:function(){return this._classList||(this._classList=new t.ClassList(this)),this._classList},configurable:!0}),t.ClassList=function(t){this.domApi=t,this.node=t.node},t.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments),this._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments),this._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments),this._distributeParent()},_distributeParent:function(){e||this.domApi._maybeDistributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}}(),function(){"use strict";var t=Polymer.DomApi.ctor,e=Polymer.Settings;if(t.EffectiveNodesObserver=function(t){this.domApi=t,this.node=this.domApi.node,this._listeners=[]},t.EffectiveNodesObserver.prototype={addListener:function(t){this._isSetup||(this._setup(),this._isSetup=!0);var e={fn:t,_nodes:[]};return this._listeners.push(e),this._scheduleNotify(),e},removeListener:function(t){var e=this._listeners.indexOf(t);0>e||(this._listeners.splice(e,1),t._nodes=[]),this._hasListeners()||(this._cleanup(),this._isSetup=!1)},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return!!this._listeners.length},_scheduleNotify:function(){this._debouncer&&this._debouncer.stop(),this._debouncer=Polymer.Debounce(this._debouncer,this._notify),this._debouncer.context=this,Polymer.dom.addDebouncer(this._debouncer)},notify:function(){this._hasListeners()&&this._scheduleNotify()},_notify:function(){this._beforeCallListeners(),this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(t){for(var e,i=0;i<t.length&&(e=t[i]);i++)this._isContent(e)&&(e.__observeNodesMap=e.__observeNodesMap||new WeakMap,e.__observeNodesMap.has(this)||e.__observeNodesMap.set(this,this._observeContent(e)))},_observeContent:function(t){var e=this,i=Polymer.dom(t).observeNodes(function(){e._scheduleNotify()});return i._avoidChangeCalculation=!0,i},_unobserveContentElements:function(t){for(var e,i,n=0;n<t.length&&(e=t[n]);n++)this._isContent(e)&&(i=e.__observeNodesMap.get(this),i&&(Polymer.dom(e).unobserveNodes(i),e.__observeNodesMap["delete"](this)))},_isContent:function(t){return"content"===t.localName},_callListeners:function(){for(var t,e=this._listeners,i=this._getEffectiveNodes(),n=0;n<e.length&&(t=e[n]);n++){var r=this._generateListenerInfo(t,i);(r||t._alwaysNotify)&&this._callListener(t,r)}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(t,e){if(t._avoidChangeCalculation)return!0;for(var i,n=t._nodes,r={target:this.node,addedNodes:[],removedNodes:[]},o=Polymer.ArraySplice.calculateSplices(e,n),s=0;s<o.length&&(i=o[s]);s++)for(var a,l=0;l<i.removed.length&&(a=i.removed[l]);l++)r.removedNodes.push(a);for(s=0,i;s<o.length&&(i=o[s]);s++)for(l=i.index;l<i.index+i.addedCount;l++)r.addedNodes.push(e[l]);return t._nodes=e,r.addedNodes.length||r.removedNodes.length?r:void 0},_callListener:function(t,e){return t.fn.call(this.node,e)},enableShadowAttributeTracking:function(){}},e.useShadow){var i=t.EffectiveNodesObserver.prototype._setup,n=t.EffectiveNodesObserver.prototype._cleanup;Polymer.Base.mixin(t.EffectiveNodesObserver.prototype,{_setup:function(){if(!this._observer){var t=this;this._mutationHandler=function(e){e&&e.length&&t._scheduleNotify()},this._observer=new MutationObserver(this._mutationHandler),this._boundFlush=function(){t._flush()},Polymer.dom.addStaticFlush(this._boundFlush),this._observer.observe(this.node,{childList:!0})}i.call(this)},_cleanup:function(){this._observer.disconnect(),this._observer=null,this._mutationHandler=null,Polymer.dom.removeStaticFlush(this._boundFlush),n.call(this)},_flush:function(){this._observer&&this._mutationHandler(this._observer.takeRecords())},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify(),this._observer.disconnect(),this._observer.observe(this.node,{childList:!0,attributes:!0,subtree:!0});var t=this.domApi.getOwnerRoot(),e=t&&t.host;e&&Polymer.dom(e).observer&&Polymer.dom(e).observer.enableShadowAttributeTracking()}},_makeContentListenersAlwaysNotify:function(){for(var t,e=0;e<this._listeners.length;e++)t=this._listeners[e],t._alwaysNotify=t._isContentListener}})}}(),function(){"use strict";var t=Polymer.DomApi.ctor,e=Polymer.Settings;t.DistributedNodesObserver=function(e){t.EffectiveNodesObserver.call(this,e)},t.DistributedNodesObserver.prototype=Object.create(t.EffectiveNodesObserver.prototype),Polymer.Base.mixin(t.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}}),e.useShadow&&Polymer.Base.mixin(t.DistributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var t=this.domApi.getOwnerRoot(),e=t&&t.host;if(e){var i=this;this._observer=Polymer.dom(e).observeNodes(function(){i._scheduleNotify()}),this._observer._isContentListener=!0,this._hasAttrSelect()&&Polymer.dom(e).observer.enableShadowAttributeTracking()}}},_hasAttrSelect:function(){var t=this.node.getAttribute("select");return t&&t.match(/[[.]+/)},_cleanup:function(){var t=this.domApi.getOwnerRoot(),e=t&&t.host;e&&Polymer.dom(e).unobserveNodes(this._observer),this._observer=null}})}(),function(){function t(t,e){e._distributedNodes.push(t);var i=t._destinationInsertionPoints;i?i.push(e):t._destinationInsertionPoints=[e]}function e(t){var e=t._distributedNodes;if(e)for(var i=0;i<e.length;i++){var n=e[i]._destinationInsertionPoints;n&&n.splice(n.indexOf(t)+1,n.length)}}function i(t,e){var i=u.Logical.getParentNode(t);i&&i.shadyRoot&&c.hasInsertionPoint(i.shadyRoot)&&i.shadyRoot._distributionClean&&(i.shadyRoot._distributionClean=!1,e.shadyRoot._dirtyRoots.push(i))}function n(t,e){var i=e._destinationInsertionPoints;return i&&i[i.length-1]===t}function r(t){return"content"==t.localName}function o(t){for(;t&&s(t);)t=t.domHost;return t}function s(t){for(var e,i=u.Logical.getChildNodes(t),n=0;n<i.length;n++)if(e=i[n],e.localName&&"content"===e.localName)return t.domHost}function a(t){for(var e,i=0;i<t._insertionPoints.length;i++)e=t._insertionPoints[i],c.hasApi(e)&&Polymer.dom(e).notifyObserver()}function l(t){c.hasApi(t)&&Polymer.dom(t).notifyObserver()}function h(t){if(f&&t)for(var e=0;e<t.length;e++)CustomElements.upgrade(t[e])}var c=Polymer.DomApi,u=Polymer.TreeApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||!!this._template},_setupShady:function(){this.shadyRoot=null,this.__domApi||(this.__domApi=null),this.__dom||(this.__dom=null),this._ownerShadyRoot||(this._ownerShadyRoot=void 0)},_poolContent:function(){this._useContent&&u.Logical.saveChildNodes(this)},_setupRoot:function(){this._useContent&&(this._createLocalRoot(),this.dataHost||h(u.Logical.getChildNodes(this)))},_createLocalRoot:function(){this.shadyRoot=this.root,this.shadyRoot._distributionClean=!1,this.shadyRoot._hasDistributed=!1,this.shadyRoot._isShadyRoot=!0,this.shadyRoot._dirtyRoots=[];var t=this.shadyRoot._insertionPoints=!this._notes||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];u.Logical.saveChildNodes(this.shadyRoot);for(var e,i=0;i<t.length;i++)e=t[i],u.Logical.saveChildNodes(e),u.Logical.saveChildNodes(e.parentNode);this.shadyRoot.host=this},distributeContent:function(t){if(this.shadyRoot){this.shadyRoot._invalidInsertionPoints=this.shadyRoot._invalidInsertionPoints||t;var e=o(this);Polymer.dom(this)._lazyDistribute(e)}},_distributeContent:function(){this._useContent&&!this.shadyRoot._distributionClean&&(this.shadyRoot._invalidInsertionPoints&&(Polymer.dom(this)._updateInsertionPoints(this),this.shadyRoot._invalidInsertionPoints=!1),this._beginDistribute(),this._distributeDirtyRoots(),this._finishDistribute())},_beginDistribute:function(){this._useContent&&c.hasInsertionPoint(this.shadyRoot)&&(this._resetDistribution(),this._distributePool(this.shadyRoot,this._collectPool()))},_distributeDirtyRoots:function(){for(var t,e=this.shadyRoot._dirtyRoots,i=0,n=e.length;n>i&&(t=e[i]);i++)t._distributeContent();this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){if(this.shadyRoot._distributionClean=!0,c.hasInsertionPoint(this.shadyRoot))this._composeTree(),a(this.shadyRoot);else if(this.shadyRoot._hasDistributed){var t=this._composeNode(this);this._updateChildNodes(this,t)}else u.Composed.clearChildNodes(this),this.appendChild(this.shadyRoot);this.shadyRoot._hasDistributed||l(this),this.shadyRoot._hasDistributed=!0}},elementMatches:function(t,e){return e=e||this,c.matchesSelector.call(e,t)},_resetDistribution:function(){for(var t=u.Logical.getChildNodes(this),i=0;i<t.length;i++){var n=t[i];n._destinationInsertionPoints&&(n._destinationInsertionPoints=void 0),r(n)&&e(n)}for(var o=this.shadyRoot,s=o._insertionPoints,a=0;a<s.length;a++)s[a]._distributedNodes=[]},_collectPool:function(){for(var t=[],e=u.Logical.getChildNodes(this),i=0;i<e.length;i++){var n=e[i];r(n)?t.push.apply(t,n._distributedNodes):t.push(n)}return t},_distributePool:function(t,e){for(var n,r=t._insertionPoints,o=0,s=r.length;s>o&&(n=r[o]);o++)this._distributeInsertionPoint(n,e),i(n,this)},_distributeInsertionPoint:function(e,i){for(var n,r=!1,o=0,s=i.length;s>o;o++)n=i[o],n&&this._matchesContentSelect(n,e)&&(t(n,e),i[o]=void 0,r=!0);if(!r)for(var a=u.Logical.getChildNodes(e),l=0;l<a.length;l++)t(a[l],e)},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));for(var t,e,i=this.shadyRoot._insertionPoints,n=0,r=i.length;r>n&&(t=i[n]);n++)e=u.Logical.getParentNode(t),e._useContent||e===this||e===this.shadyRoot||this._updateChildNodes(e,this._composeNode(e))},_composeNode:function(t){for(var e=[],i=u.Logical.getChildNodes(t.shadyRoot||t),o=0;o<i.length;o++){var s=i[o];if(r(s))for(var a=s._distributedNodes,l=0;l<a.length;l++){var h=a[l];n(s,h)&&e.push(h)}else e.push(s)}return e},_updateChildNodes:function(t,e){for(var i,n=u.Composed.getChildNodes(t),r=Polymer.ArraySplice.calculateSplices(e,n),o=0,s=0;o<r.length&&(i=r[o]);o++){for(var a,l=0;l<i.removed.length&&(a=i.removed[l]);l++)u.Composed.getParentNode(a)===t&&u.Composed.removeChild(t,a),n.splice(i.index+s,1);s-=i.addedCount}for(var i,h,o=0;o<r.length&&(i=r[o]);o++)for(h=n[i.index],l=i.index,a;l<i.index+i.addedCount;l++)a=e[l],u.Composed.insertBefore(t,a,h),n.splice(l,0,a)},_matchesContentSelect:function(t,e){var i=e.getAttribute("select");return!i||!(i=i.trim())||t instanceof Element&&!!/^(:not\()?[*.#[a-zA-Z_|]/.test(i)&&this.elementMatches(i,t)},_elementAdd:function(){},_elementRemove:function(){}});var d={get:function(){var t=Polymer.dom(this).getOwnerRoot();return t&&t.host},configurable:!0};Object.defineProperty(Polymer.Base,"domHost",d),Polymer.BaseDescriptors.domHost=d;var f=window.CustomElements&&!CustomElements.useNative}(),Polymer.Settings.useShadow&&Polymer.Base._addFeature({_poolContent:function(){},_beginDistribute:function(){},distributeContent:function(){},_distributeContent:function(){},_finishDistribute:function(){},_createLocalRoot:function(){this.createShadowRoot(),this.shadowRoot.appendChild(this.root),this.root=this.shadowRoot}}),Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(t,e){return e>0?~setTimeout(t,e):(this._twiddle.textContent=this._twiddleContent++,this._callbacks.push(t),this._currVal++)},cancel:function(t){if(0>t)clearTimeout(~t);else{var e=t-this._lastVal;if(e>=0){if(!this._callbacks[e])throw"invalid async handle: "+t;this._callbacks[e]=null}}},_atEndOfMicrotask:function(){for(var t=this._callbacks.length,e=0;t>e;e++){var i=this._callbacks[e];if(i)try{i()}catch(n){throw e++,this._callbacks.splice(0,e),this._lastVal+=e,this._twiddle.textContent=this._twiddleContent++,n}}this._callbacks.splice(0,t),this._lastVal+=t}},new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:!0}),Polymer.Debounce=function(){function t(t,e,n){return t?t.stop():t=new i(this),t.go(e,n),t}var e=Polymer.Async,i=function(t){this.context=t;var e=this;this.boundComplete=function(){e.complete()}};return i.prototype={go:function(t,i){var n;this.finish=function(){e.cancel(n)},n=e.run(this.boundComplete,i),this.callback=t},stop:function(){this.finish&&(this.finish(),this.finish=null,this.callback=null)},complete:function(){if(this.finish){var t=this.callback;this.stop(),t.call(this.context)}}},t}(),Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(t,e,i){return this._debouncers[t]=Polymer.Debounce.call(this,this._debouncers[t],e,i)},isDebouncerActive:function(t){var e=this._debouncers[t];return!(!e||!e.finish)},flushDebouncer:function(t){var e=this._debouncers[t];e&&e.complete()},cancelDebouncer:function(t){var e=this._debouncers[t];e&&e.stop()}}),Polymer.DomModule=document.createElement("dom-module"),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this._prepBehaviors(),this._prepConstructor(),this._prepTemplate(),this._prepShady(),this._prepPropertyInfo()},_prepBehavior:function(t){this._addHostAttributes(t.hostAttributes)},_initFeatures:function(){this._registerHost(),this._template&&(this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting()),this._marshalHostAttributes(),this._setupDebouncers(),this._marshalBehaviors(),this._tryReady()},_marshalBehavior:function(){}}),function(){Polymer.nar=[];var t=Polymer.Settings.disableUpgradeEnabled;Polymer.Annotations={parseAnnotations:function(t,e){var i=[],n=t._content||t.content;return this._parseNodeAnnotations(n,i,e||t.hasAttribute("strip-whitespace")),i},_parseNodeAnnotations:function(t,e,i){return t.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(t,e):this._parseElementAnnotations(t,e,i)},_bindingRegex:function(){var t="(?:[a-zA-Z_$][\\w.:$\\-*]*)",e="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",i="(?:'(?:[^'\\\\]|\\\\.)*')",n='(?:"(?:[^"\\\\]|\\\\.)*")',r="(?:"+i+"|"+n+")",o="(?:"+t+"|"+e+"|"+r+"\\s*)",s="(?:"+o+"(?:,\\s*"+o+")*)",a="(?:\\(\\s*(?:"+s+"?)\\)\\s*)",l="("+t+"\\s*"+a+"?)",h="(\\[\\[|{{)\\s*",c="(?:]]|}})",u="(?:(!)\\s*)?",d=h+u+l+c;
  return RegExp(d,"g")}(),_parseBindings:function(t){for(var e,i=this._bindingRegex,n=[],r=0;null!==(e=i.exec(t));){e.index>r&&n.push({literal:t.slice(r,e.index)});var o,s,a,l=e[1][0],h=!!e[2],c=e[3].trim();"{"==l&&(a=c.indexOf("::"))>0&&(s=c.substring(a+2),c=c.substring(0,a),o=!0),n.push({compoundIndex:n.length,value:c,mode:l,negate:h,event:s,customEvent:o}),r=i.lastIndex}if(r&&r<t.length){var u=t.substring(r);u&&n.push({literal:u})}if(n.length)return n},_literalFromParts:function(t){for(var e="",i=0;i<t.length;i++)e+=t[i].literal||"";return e},_parseTextNodeAnnotation:function(t,e){var i=this._parseBindings(t.textContent);if(i){t.textContent=this._literalFromParts(i)||" ";var n={bindings:[{kind:"text",name:"textContent",parts:i,isCompound:1!==i.length}]};return e.push(n),n}},_parseElementAnnotations:function(t,e,i){var n={bindings:[],events:[]};return"content"===t.localName&&(e._hasContent=!0),this._parseChildNodesAnnotations(t,n,e,i),t.attributes&&(this._parseNodeAttributeAnnotations(t,n,e),this.prepElement&&this.prepElement(t)),(n.bindings.length||n.events.length||n.id)&&e.push(n),n},_parseChildNodesAnnotations:function(t,e,i,n){if(t.firstChild)for(var r=t.firstChild,o=0;r;){var s=r.nextSibling;if("template"!==r.localName||r.hasAttribute("preserve-content")||this._parseTemplate(r,o,i,e,n),"slot"==r.localName&&(r=this._replaceSlotWithContent(r)),r.nodeType===Node.TEXT_NODE){for(var a=s;a&&a.nodeType===Node.TEXT_NODE;)r.textContent+=a.textContent,s=a.nextSibling,t.removeChild(a),a=s;n&&!r.textContent.trim()&&(t.removeChild(r),o--)}if(r.parentNode){var l=this._parseNodeAnnotations(r,i,n);l&&(l.parent=e,l.index=o)}r=s,o++}},_replaceSlotWithContent:function(t){for(var e=t.ownerDocument.createElement("content");t.firstChild;)e.appendChild(t.firstChild);for(var i=t.attributes,n=0;n<i.length;n++){var r=i[n];e.setAttribute(r.name,r.value)}var o=t.getAttribute("name");return o&&e.setAttribute("select","[slot='"+o+"']"),t.parentNode.replaceChild(e,t),e},_parseTemplate:function(t,e,i,n,r){var o=document.createDocumentFragment();o._notes=this.parseAnnotations(t,r),o.appendChild(t.content),i.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:o,parent:n,index:e})},_parseNodeAttributeAnnotations:function(t,e){for(var i,n=Array.prototype.slice.call(t.attributes),r=n.length-1;i=n[r];r--){var o,s=i.name,a=i.value;"on-"===s.slice(0,3)?(t.removeAttribute(s),e.events.push({name:s.slice(3),value:a})):(o=this._parseNodeAttributeAnnotation(t,s,a))?e.bindings.push(o):"id"===s&&(e.id=a)}},_parseNodeAttributeAnnotation:function(e,i,n){var r=this._parseBindings(n);if(r){var o=i,s="property";"$"==i[i.length-1]&&(i=i.slice(0,-1),s="attribute");var a=this._literalFromParts(r);a&&"attribute"==s&&e.setAttribute(i,a),"input"===e.localName&&"value"===o&&e.setAttribute(o,""),t&&"disable-upgrade$"===o&&e.setAttribute(i,""),e.removeAttribute(o);var l=Polymer.CaseMap.dashToCamelCase(i);return"property"===s&&(i=l),{kind:s,name:i,propertyName:l,parts:r,literal:a,isCompound:1!==r.length}}},findAnnotatedNode:function(t,e){var i=e.parent&&Polymer.Annotations.findAnnotatedNode(t,e.parent);if(!i)return t;for(var n=i.firstChild,r=0;n;n=n.nextSibling)if(e.index===r++)return n}}}(),function(){function t(t,e){return t.replace(a,function(t,n,r,o){return n+"'"+i(r.replace(/["']/g,""),e)+"'"+o})}function e(e,n){for(var r in l)for(var o,s,a,h=l[r],u=0,d=h.length;d>u&&(o=h[u]);u++)"*"!==r&&e.localName!==r||(s=e.attributes[o],a=s&&s.value,a&&a.search(c)<0&&(s.value="style"===o?t(a,n):i(a,n)))}function i(t,e){if(t&&h.test(t))return t;var i=r(e);return i.href=t,i.href||t}function n(t,e){return o||(o=document.implementation.createHTMLDocument("temp"),s=o.createElement("base"),o.head.appendChild(s)),s.href=e,i(t,o)}function r(t){return t.body.__urlResolver||(t.body.__urlResolver=t.createElement("a"))}var o,s,a=/(url\()([^)]*)(\))/g,l={"*":["href","src","style","url"],form:["action"]},h=/(^\/)|(^#)|(^[\w-\d]*:)/,c=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:t,resolveAttrs:e,resolveUrl:n}}(),Polymer.Path={root:function(t){var e=t.indexOf(".");return e===-1?t:t.slice(0,e)},isDeep:function(t){return t.indexOf(".")!==-1},isAncestor:function(t,e){return 0===t.indexOf(e+".")},isDescendant:function(t,e){return 0===e.indexOf(t+".")},translate:function(t,e,i){return e+i.slice(t.length)},matches:function(t,e,i){return t===i||this.isAncestor(t,i)||!!e&&this.isDescendant(t,i)}},Polymer.Base._addFeature({_prepAnnotations:function(){if(this._template){var t=this;Polymer.Annotations.prepElement=function(e){t._prepElement(e)},this._template._content&&this._template._content._notes?this._notes=this._template._content._notes:(this._notes=Polymer.Annotations.parseAnnotations(this._template),this._processAnnotations(this._notes)),Polymer.Annotations.prepElement=null}else this._notes=[]},_processAnnotations:function(t){for(var e=0;e<t.length;e++){for(var i=t[e],n=0;n<i.bindings.length;n++)for(var r=i.bindings[n],o=0;o<r.parts.length;o++){var s=r.parts[o];if(!s.literal){var a=this._parseMethod(s.value);a?s.signature=a:s.model=Polymer.Path.root(s.value)}}if(i.templateContent){this._processAnnotations(i.templateContent._notes);var l=i.templateContent._parentProps=this._discoverTemplateParentProps(i.templateContent._notes),h=[];for(var c in l){var u="_parent_"+c;h.push({index:i.index,kind:"property",name:u,propertyName:u,parts:[{mode:"{",model:c,value:c}]})}i.bindings=i.bindings.concat(h)}}},_discoverTemplateParentProps:function(t){for(var e,i={},n=0;n<t.length&&(e=t[n]);n++){for(var r,o=0,s=e.bindings;o<s.length&&(r=s[o]);o++)for(var a,l=0,h=r.parts;l<h.length&&(a=h[l]);l++)if(a.signature){for(var c=a.signature.args,u=0;u<c.length;u++){var d=c[u].model;d&&(i[d]=!0)}a.signature.dynamicFn&&(i[a.signature.method]=!0)}else a.model&&(i[a.model]=!0);if(e.templateContent){var f=e.templateContent._parentProps;Polymer.Base.mixin(i,f)}}return i},_prepElement:function(t){Polymer.ResolveUrl.resolveAttrs(t,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){this._template&&(this._marshalIdNodes(),this._marshalAnnotatedNodes(),this._marshalAnnotatedListeners())},_configureAnnotationReferences:function(){for(var t=this._notes,e=this._nodes,i=0;i<t.length;i++){var n=t[i],r=e[i];this._configureTemplateContent(n,r),this._configureCompoundBindings(n,r)}},_configureTemplateContent:function(t,e){t.templateContent&&(e._content=t.templateContent)},_configureCompoundBindings:function(t,e){for(var i=t.bindings,n=0;n<i.length;n++){var r=i[n];if(r.isCompound){for(var o=e.__compoundStorage__||(e.__compoundStorage__={}),s=r.parts,a=Array(s.length),l=0;l<s.length;l++)a[l]=s[l].literal;var h=r.name;o[h]=a,r.literal&&"property"==r.kind&&(e._configValue?e._configValue(h,r.literal):e[h]=r.literal)}}},_marshalIdNodes:function(){this.$={};for(var t,e=0,i=this._notes.length;i>e&&(t=this._notes[e]);e++)t.id&&(this.$[t.id]=this._findAnnotatedNode(this.root,t))},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){for(var t=Array(this._notes.length),e=0;e<this._notes.length;e++)t[e]=this._findAnnotatedNode(this.root,this._notes[e]);this._nodes=t}},_marshalAnnotatedListeners:function(){for(var t,e=0,i=this._notes.length;i>e&&(t=this._notes[e]);e++)if(t.events&&t.events.length)for(var n,r=this._findAnnotatedNode(this.root,t),o=0,s=t.events;o<s.length&&(n=s[o]);o++)this.listen(r,n.name,n.value)}}),Polymer.Base._addFeature({listeners:{},_listenListeners:function(t){var e,i,n;for(n in t)n.indexOf(".")<0?(e=this,i=n):(i=n.split("."),e=this.$[i[0]],i=i[1]),this.listen(e,i,t[n])},listen:function(t,e,i){var n=this._recallEventHandler(this,e,t,i);n||(n=this._createEventHandler(t,e,i)),n._listening||(this._listen(t,e,n),n._listening=!0)},_boundListenerKey:function(t,e){return t+":"+e},_recordEventHandler:function(t,e,i,n,r){var o=t.__boundListeners;o||(o=t.__boundListeners=new WeakMap);var s=o.get(i);s||(s={},Polymer.Settings.isIE&&i==window||o.set(i,s)),s[this._boundListenerKey(e,n)]=r},_recallEventHandler:function(t,e,i,n){var r=t.__boundListeners;if(r){var o=r.get(i);if(o)return o[this._boundListenerKey(e,n)]}},_createEventHandler:function(t,e,i){var n=this,r=function(t){n[i]?n[i](t,t.detail):n._warn(n._logf("_createEventHandler","listener method `"+i+"` not defined"))};return r._listening=!1,this._recordEventHandler(n,e,t,i,r),r},unlisten:function(t,e,i){var n=this._recallEventHandler(this,e,t,i);n&&(this._unlisten(t,e,n),n._listening=!1)},_listen:function(t,e,i){t.addEventListener(e,i)},_unlisten:function(t,e,i){t.removeEventListener(e,i)}}),function(){"use strict";function t(t){for(var e,i=b?["click"]:_,n=0;n<i.length;n++)e=i[n],t?document.addEventListener(e,P,!0):document.removeEventListener(e,P,!0)}function e(e){w.mouse.mouseIgnoreJob||t(!0);var i=function(){t(),w.mouse.target=null,w.mouse.mouseIgnoreJob=null};w.mouse.target=Polymer.dom(e).rootTarget,w.mouse.mouseIgnoreJob=Polymer.Debounce(w.mouse.mouseIgnoreJob,i,m)}function i(t){var e=t.type;if(_.indexOf(e)===-1)return!1;if("mousemove"===e){var i=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!v&&(i=y[t.which]||0),!!(1&i)}return 0===(void 0===t.button?0:t.button)}function n(t){if("click"===t.type){if(0===t.detail)return!0;var e=C.findOriginalTarget(t),i=e.getBoundingClientRect(),n=t.pageX,r=t.pageY;return!!(n<i.left||n>i.right||r<i.top||r>i.bottom)}return!1}function r(t){for(var e,i=Polymer.dom(t).path,n="auto",r=0;r<i.length;r++)if(e=i[r],e[u]){n=e[u];break}return n}function o(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function s(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}var a=Polymer.DomApi.wrap,l="string"==typeof document.head.style.touchAction,h="__polymerGestures",c="__polymerGesturesHandled",u="__polymerGesturesTouchAction",d=25,f=5,p=2,m=2500,_=["mousedown","mousemove","mouseup","click"],y=[0,1,4,2],v=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}(),g=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){g=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(e){}}();var b=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),P=function(t){var e=t.sourceCapabilities;if((!e||e.firesTouchEvents)&&(t[c]={skip:!0},"click"===t.type)){for(var i=Polymer.dom(t).path,n=0;n<i.length;n++)if(i[n]===w.mouse.target)return;t.preventDefault(),t.stopPropagation()}},w={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};document.addEventListener("touchend",e,!!g&&{passive:!0});var C={gestures:{},recognizers:[],deepTargetFind:function(t,e){for(var i=document.elementFromPoint(t,e),n=i;n&&n.shadowRoot;)n=n.shadowRoot.elementFromPoint(t,e),n&&(i=n);return i},findOriginalTarget:function(t){return t.path?t.path[0]:t.target},handleNative:function(t){var e,i=t.type,n=a(t.currentTarget),r=n[h];if(r){var o=r[i];if(o){if(!t[c]&&(t[c]={},"touch"===i.slice(0,5))){var s=t.changedTouches[0];if("touchstart"===i&&1===t.touches.length&&(w.touch.id=s.identifier),w.touch.id!==s.identifier)return;l||"touchstart"!==i&&"touchmove"!==i||C.handleTouchAction(t)}if(e=t[c],!e.skip){for(var u,d=C.recognizers,f=0;f<d.length;f++)u=d[f],o[u.name]&&!e[u.name]&&u.flow&&u.flow.start.indexOf(t.type)>-1&&u.reset&&u.reset();for(f=0,u;f<d.length;f++)u=d[f],o[u.name]&&!e[u.name]&&(e[u.name]=!0,u[i](t))}}}},handleTouchAction:function(t){var e=t.changedTouches[0],i=t.type;if("touchstart"===i)w.touch.x=e.clientX,w.touch.y=e.clientY,w.touch.scrollDecided=!1;else if("touchmove"===i){if(w.touch.scrollDecided)return;w.touch.scrollDecided=!0;var n=r(t),o=!1,s=Math.abs(w.touch.x-e.clientX),a=Math.abs(w.touch.y-e.clientY);t.cancelable&&("none"===n?o=!0:"pan-x"===n?o=a>s:"pan-y"===n&&(o=s>a)),o?t.preventDefault():C.prevent("track")}},add:function(t,e,i){t=a(t);var n=this.gestures[e],r=n.deps,o=n.name,s=t[h];s||(t[h]=s={});for(var l,c,u=0;u<r.length;u++)l=r[u],b&&_.indexOf(l)>-1&&"click"!==l||(c=s[l],c||(s[l]=c={_count:0}),0===c._count&&t.addEventListener(l,this.handleNative),c[o]=(c[o]||0)+1,c._count=(c._count||0)+1);t.addEventListener(e,i),n.touchAction&&this.setTouchAction(t,n.touchAction)},remove:function(t,e,i){t=a(t);var n=this.gestures[e],r=n.deps,o=n.name,s=t[h];if(s)for(var l,c,u=0;u<r.length;u++)l=r[u],c=s[l],c&&c[o]&&(c[o]=(c[o]||1)-1,c._count=(c._count||1)-1,0===c._count&&t.removeEventListener(l,this.handleNative));t.removeEventListener(e,i)},register:function(t){this.recognizers.push(t);for(var e=0;e<t.emits.length;e++)this.gestures[t.emits[e]]=t},findRecognizerByEvent:function(t){for(var e,i=0;i<this.recognizers.length;i++){e=this.recognizers[i];for(var n,r=0;r<e.emits.length;r++)if(n=e.emits[r],n===t)return e}return null},setTouchAction:function(t,e){l&&(t.style.touchAction=e),t[u]=e},fire:function(t,e,i){if(Polymer.Base.fire(e,i,{node:t,bubbles:!0,cancelable:!0}).defaultPrevented){var n=i.preventer||i.sourceEvent;n&&n.preventDefault&&n.preventDefault()}},prevent:function(t){var e=this.findRecognizerByEvent(t);e.info&&(e.info.prevent=!0)},resetMouseCanceller:function(){w.mouse.mouseIgnoreJob&&w.mouse.mouseIgnoreJob.complete()}};C.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){s(this.info)},mousedown:function(t){if(i(t)){var e=C.findOriginalTarget(t),n=this,r=function(t){i(t)||(n.fire("up",e,t),s(n.info))},a=function(t){i(t)&&n.fire("up",e,t),s(n.info)};o(this.info,r,a),this.fire("down",e,t)}},touchstart:function(t){this.fire("down",C.findOriginalTarget(t),t.changedTouches[0],t)},touchend:function(t){this.fire("up",C.findOriginalTarget(t),t.changedTouches[0],t)},fire:function(t,e,i,n){C.fire(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:n,prevent:function(t){return C.prevent(t)}})}}),C.register({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>p&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,s(this.info)},hasMovedEnough:function(t,e){if(this.info.prevent)return!1;if(this.info.started)return!0;var i=Math.abs(this.info.x-t),n=Math.abs(this.info.y-e);return i>=f||n>=f},mousedown:function(t){if(i(t)){var e=C.findOriginalTarget(t),n=this,r=function(t){var r=t.clientX,o=t.clientY;n.hasMovedEnough(r,o)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&C.prevent("tap"),n.info.addMove({x:r,y:o}),i(t)||(n.info.state="end",s(n.info)),n.fire(e,t),n.info.started=!0)},a=function(t){n.info.started&&r(t),s(n.info)};o(this.info,r,a),this.info.x=t.clientX,this.info.y=t.clientY}},touchstart:function(t){var e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){var e=C.findOriginalTarget(t),i=t.changedTouches[0],n=i.clientX,r=i.clientY;this.hasMovedEnough(n,r)&&("start"===this.info.state&&C.prevent("tap"),this.info.addMove({x:n,y:r}),this.fire(e,i),this.info.state="track",this.info.started=!0)},touchend:function(t){var e=C.findOriginalTarget(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),this.fire(e,i,t))},fire:function(t,e,i){var n,r=this.info.moves[this.info.moves.length-2],o=this.info.moves[this.info.moves.length-1],s=o.x-this.info.x,a=o.y-this.info.y,l=0;return r&&(n=o.x-r.x,l=o.y-r.y),C.fire(t,"track",{state:this.info.state,x:e.clientX,y:e.clientY,dx:s,dy:a,ddx:n,ddy:l,sourceEvent:e,preventer:i,hover:function(){return C.deepTargetFind(e.clientX,e.clientY)}})}}),C.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},save:function(t){this.info.x=t.clientX,this.info.y=t.clientY},mousedown:function(t){i(t)&&this.save(t)},click:function(t){i(t)&&this.forward(t)},touchstart:function(t){this.save(t.changedTouches[0],t)},touchend:function(t){this.forward(t.changedTouches[0],t)},forward:function(t,e){var i=Math.abs(t.clientX-this.info.x),r=Math.abs(t.clientY-this.info.y),o=C.findOriginalTarget(t);(isNaN(i)||isNaN(r)||d>=i&&d>=r||n(t))&&(this.info.prevent||C.fire(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}))}});var S={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_setupGestures:function(){this.__polymerGestures=null},_listen:function(t,e,i){C.gestures[e]?C.add(t,e,i):t.addEventListener(e,i)},_unlisten:function(t,e,i){C.gestures[e]?C.remove(t,e,i):t.removeEventListener(e,i)},setScrollDirection:function(t,e){e=e||this,C.setTouchAction(e,S[t]||"auto")}}),Polymer.Gestures=C}(),function(){"use strict";if(Polymer.Base._addFeature({$$:function(t){return Polymer.dom(this.root).querySelector(t)},toggleClass:function(t,e,i){i=i||this,1==arguments.length&&(e=!i.classList.contains(t)),e?Polymer.dom(i).classList.add(t):Polymer.dom(i).classList.remove(t)},toggleAttribute:function(t,e,i){i=i||this,1==arguments.length&&(e=!i.hasAttribute(t)),e?Polymer.dom(i).setAttribute(t,""):Polymer.dom(i).removeAttribute(t)},classFollows:function(t,e,i){i&&Polymer.dom(i).classList.remove(t),e&&Polymer.dom(e).classList.add(t)},attributeFollows:function(t,e,i){i&&Polymer.dom(i).removeAttribute(t),e&&Polymer.dom(e).setAttribute(t,"")},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){return Polymer.dom(this).getEffectiveChildNodes().filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){for(var t,e=this.getEffectiveChildNodes(),i=[],n=0;t=e[n];n++)t.nodeType!==Node.COMMENT_NODE&&i.push(Polymer.dom(t).textContent);return i.join("")},queryEffectiveChildren:function(t){var e=Polymer.dom(this).queryDistributedElements(t);return e&&e[0]},queryAllEffectiveChildren:function(t){return Polymer.dom(this).queryDistributedElements(t)},getContentChildNodes:function(t){var e=Polymer.dom(this.root).querySelector(t||"content");return e?Polymer.dom(e).getDistributedNodes():[]},getContentChildren:function(t){return this.getContentChildNodes(t).filter(function(t){return t.nodeType===Node.ELEMENT_NODE})},fire:function(t,e,i){i=i||Polymer.nob;var n=i.node||this;e=null===e||void 0===e?{}:e;var r=void 0===i.bubbles||i.bubbles,o=!!i.cancelable,s=i._useCache,a=this._getEvent(t,r,o,s);return a.detail=e,s&&(this.__eventCache[t]=null),n.dispatchEvent(a),s&&(this.__eventCache[t]=a),a},__eventCache:{},_getEvent:function(t,e,i,n){var r=n&&this.__eventCache[t];return r&&r.bubbles==e&&r.cancelable==i||(r=new Event(t,{bubbles:!!e,cancelable:i})),r},async:function(t,e){var i=this;return Polymer.Async.run(function(){t.call(i)},e)},cancelAsync:function(t){Polymer.Async.cancel(t)},arrayDelete:function(t,e){var i;if(Array.isArray(t)){if(i=t.indexOf(e),i>=0)return t.splice(i,1)}else if(i=this._get(t).indexOf(e),i>=0)return this.splice(t,i,1)},transform:function(t,e){e=e||this,e.style.webkitTransform=t,e.style.transform=t},translate3d:function(t,e,i,n){n=n||this,this.transform("translate3d("+t+","+e+","+i+")",n)},importHref:function(t,e,i,n){var r=document.createElement("link");r.rel="import",r.href=t;var o=Polymer.Base.importHref.imported=Polymer.Base.importHref.imported||{},s=o[r.href],a=s||r,l=this,h=function(t){return t.target.__firedLoad=!0,t.target.removeEventListener("load",h),t.target.removeEventListener("error",c),e.call(l,t)},c=function(t){return t.target.__firedError=!0,t.target.removeEventListener("load",h),t.target.removeEventListener("error",c),i.call(l,t)};return e&&a.addEventListener("load",h),i&&a.addEventListener("error",c),s?(s.__firedLoad&&s.dispatchEvent(new Event("load")),s.__firedError&&s.dispatchEvent(new Event("error"))):(o[r.href]=r,n=!!n,n&&r.setAttribute("async",""),document.head.appendChild(r)),a},create:function(t,e){var i=document.createElement(t);if(e)for(var n in e)i[n]=e[n];return i},isLightDescendant:function(t){return this!==t&&this.contains(t)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(t).getOwnerRoot()},isLocalDescendant:function(t){return this.root===Polymer.dom(t).getOwnerRoot()}}),!Polymer.Settings.useNativeCustomElements){var t=Polymer.Base.importHref;Polymer.Base.importHref=function(e,i,n,r){CustomElements.ready=!1;var o=function(t){if(CustomElements.upgradeDocumentTree(document),CustomElements.ready=!0,i)return i.call(this,t)};return t.call(this,e,o,n,r)}}}(),Polymer.Bind={prepareModel:function(t){Polymer.Base.mixin(t,this._modelApi)},_modelApi:{_notifyChange:function(t,e,i){i=void 0===i?this[t]:i,e=e||Polymer.CaseMap.camelToDashCase(t)+"-changed",this.fire(e,{value:i},{bubbles:!1,cancelable:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_propertySetter:function(t,e,i,n){var r=this.__data__[t];return r===e||r!==r&&e!==e||(this.__data__[t]=e,"object"==typeof e&&this._clearPath(t),this._propertyChanged&&this._propertyChanged(t,e,r),i&&this._effectEffects(t,e,i,r,n)),r},__setProperty:function(t,e,i,n){n=n||this;var r=n._propertyEffects&&n._propertyEffects[t];r?n._propertySetter(t,e,r,i):n[t]!==e&&(n[t]=e)},_effectEffects:function(t,e,i,n,r){for(var o,s=0,a=i.length;a>s&&(o=i[s]);s++)o.fn.call(this,t,this[t],o.effect,n,r)},_clearPath:function(t){for(var e in this.__data__)Polymer.Path.isDescendant(t,e)&&(this.__data__[e]=void 0)}},ensurePropertyEffects:function(t,e){t._propertyEffects||(t._propertyEffects={});var i=t._propertyEffects[e];return i||(i=t._propertyEffects[e]=[]),i},addPropertyEffect:function(t,e,i,n){var r=this.ensurePropertyEffects(t,e),o={kind:i,effect:n,fn:Polymer.Bind["_"+i+"Effect"]};return r.push(o),o},createBindings:function(t){var e=t._propertyEffects;if(e)for(var i in e){var n=e[i];n.sort(this._sortPropertyEffects),this._createAccessors(t,i,n)}},_sortPropertyEffects:function(){var t={compute:0,annotation:1,annotatedComputation:2,reflect:3,notify:4,observer:5,complexObserver:6,"function":7};return function(e,i){return t[e.kind]-t[i.kind]}}(),_createAccessors:function(t,e,i){var n={get:function(){return this.__data__[e]}},r=function(t){this._propertySetter(e,t,i)},o=t.getPropertyInfo&&t.getPropertyInfo(e);o&&o.readOnly?o.computed||(t["_set"+this.upper(e)]=r):n.set=r,Object.defineProperty(t,e,n)},upper:function(t){return t[0].toUpperCase()+t.substring(1)},_addAnnotatedListener:function(t,e,i,n,r,o){t._bindListeners||(t._bindListeners=[]);var s=this._notedListenerFactory(i,n,Polymer.Path.isDeep(n),o),a=r||Polymer.CaseMap.camelToDashCase(i)+"-changed";t._bindListeners.push({index:e,property:i,path:n,changedFn:s,event:a})},_isEventBogus:function(t,e){return t.path&&t.path[0]!==e},_notedListenerFactory:function(t,e,i,n){return function(r,o,s){if(s){var a=Polymer.Path.translate(t,e,s);this._notifyPath(a,o)}else o=r[t],n&&(o=!o),i?this.__data__[e]!=o&&this.set(e,o):this[e]=o}},prepareInstance:function(t){t.__data__=Object.create(null)},setupBindListeners:function(t){for(var e,i=t._bindListeners,n=0,r=i.length;r>n&&(e=i[n]);n++){var o=t._nodes[e.index];this._addNotifyListener(o,t,e.event,e.changedFn)}},_addNotifyListener:function(t,e,i,n){t.addEventListener(i,function(t){return e._notifyListener(n,t)})}},Polymer.Base.mixin(Polymer.Bind,{_shouldAddListener:function(t){return t.name&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode},_annotationEffect:function(t,e,i){t!=i.value&&(e=this._get(i.value),this.__data__[i.value]=e),this._applyEffectValue(i,e)},_reflectEffect:function(t,e,i){this.reflectPropertyToAttribute(t,i.attribute,e)},_notifyEffect:function(t,e,i,n,r){r||this._notifyChange(t,i.event,e)},_functionEffect:function(t,e,i,n,r){i.call(this,t,e,n,r)},_observerEffect:function(t,e,i,n){var r=this[i.method];r?r.call(this,e,n):this._warn(this._logf("_observerEffect","observer method `"+i.method+"` not defined"))},_complexObserverEffect:function(t,e,i){var n=this[i.method];if(n){var r=Polymer.Bind._marshalArgs(this.__data__,i,t,e);r&&n.apply(this,r)}else i.dynamicFn||this._warn(this._logf("_complexObserverEffect","observer method `"+i.method+"` not defined"))},_computeEffect:function(t,e,i){var n=this[i.method];if(n){var r=Polymer.Bind._marshalArgs(this.__data__,i,t,e);if(r){var o=n.apply(this,r);this.__setProperty(i.name,o)}}else i.dynamicFn||this._warn(this._logf("_computeEffect","compute method `"+i.method+"` not defined"))},_annotatedComputationEffect:function(t,e,i){var n=this._rootDataHost||this,r=n[i.method];if(r){var o=Polymer.Bind._marshalArgs(this.__data__,i,t,e);if(o){var s=r.apply(n,o);this._applyEffectValue(i,s)}}else i.dynamicFn||n._warn(n._logf("_annotatedComputationEffect","compute method `"+i.method+"` not defined"))},_marshalArgs:function(t,e,i,n){for(var r=[],o=e.args,s=o.length>1||e.dynamicFn,a=0,l=o.length;l>a;a++){var h,c=o[a],u=c.name;if(c.literal?h=c.value:i===u?h=n:(h=t[u],void 0===h&&c.structured&&(h=Polymer.Base._get(u,t))),s&&void 0===h)return;if(c.wildcard){var d=Polymer.Path.isAncestor(i,u);r[a]={path:d?i:u,value:d?n:h,base:h}}else r[a]=h}return r}}),Polymer.Base._addFeature({_addPropertyEffect:function(t,e,i){var n=Polymer.Bind.addPropertyEffect(this,t,e,i);n.pathFn=this["_"+n.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this),this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(t){if(t)for(var e in t){var i=t[e];if(i.observer&&this._addObserverEffect(e,i.observer),i.computed&&(i.readOnly=!0,this._addComputedEffect(e,i.computed)),i.notify&&this._addPropertyEffect(e,"notify",{event:Polymer.CaseMap.camelToDashCase(e)+"-changed"}),i.reflectToAttribute){var n=Polymer.CaseMap.camelToDashCase(e);"-"===n[0]?this._warn(this._logf("_addPropertyEffects","Property "+e+" cannot be reflected to attribute "+n+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.')):this._addPropertyEffect(e,"reflect",{attribute:n})}i.readOnly&&Polymer.Bind.ensurePropertyEffects(this,e)}},_addComputedEffect:function(t,e){for(var i,n=this._parseMethod(e),r=n.dynamicFn,o=0;o<n.args.length&&(i=n.args[o]);o++)this._addPropertyEffect(i.model,"compute",{method:n.method,args:n.args,trigger:i,name:t,dynamicFn:r});r&&this._addPropertyEffect(n.method,"compute",{method:n.method,args:n.args,trigger:null,name:t,dynamicFn:r})},_addObserverEffect:function(t,e){this._addPropertyEffect(t,"observer",{method:e,property:t})},_addComplexObserverEffects:function(t){if(t)for(var e,i=0;i<t.length&&(e=t[i]);i++)this._addComplexObserverEffect(e)},_addComplexObserverEffect:function(t){var e=this._parseMethod(t);if(!e)throw Error("Malformed observer expression '"+t+"'");for(var i,n=e.dynamicFn,r=0;r<e.args.length&&(i=e.args[r]);r++)this._addPropertyEffect(i.model,"complexObserver",{method:e.method,args:e.args,trigger:i,dynamicFn:n});n&&this._addPropertyEffect(e.method,"complexObserver",{method:e.method,args:e.args,trigger:null,dynamicFn:n})},_addAnnotationEffects:function(t){for(var e,i=0;i<t.length&&(e=t[i]);i++)for(var n,r=e.bindings,o=0;o<r.length&&(n=r[o]);o++)this._addAnnotationEffect(n,i)},_addAnnotationEffect:function(t,e){Polymer.Bind._shouldAddListener(t)&&Polymer.Bind._addAnnotatedListener(this,e,t.name,t.parts[0].value,t.parts[0].event,t.parts[0].negate);for(var i=0;i<t.parts.length;i++){var n=t.parts[i];n.signature?this._addAnnotatedComputationEffect(t,n,e):n.literal||("attribute"===t.kind&&"-"===t.name[0]?this._warn(this._logf("_addAnnotationEffect","Cannot set attribute "+t.name+' because "-" is not a valid attribute starting character')):this._addPropertyEffect(n.model,"annotation",{kind:t.kind,index:e,name:t.name,propertyName:t.propertyName,value:n.value,isCompound:t.isCompound,compoundIndex:n.compoundIndex,event:n.event,customEvent:n.customEvent,negate:n.negate}))}},_addAnnotatedComputationEffect:function(t,e,i){var n=e.signature;if(n["static"])this.__addAnnotatedComputationEffect("__static__",i,t,e,null);else{for(var r,o=0;o<n.args.length&&(r=n.args[o]);o++)r.literal||this.__addAnnotatedComputationEffect(r.model,i,t,e,r);n.dynamicFn&&this.__addAnnotatedComputationEffect(n.method,i,t,e,null)}},__addAnnotatedComputationEffect:function(t,e,i,n,r){this._addPropertyEffect(t,"annotatedComputation",{index:e,isCompound:i.isCompound,compoundIndex:n.compoundIndex,kind:i.kind,name:i.name,negate:n.negate,method:n.signature.method,args:n.signature.args,trigger:r,dynamicFn:n.signature.dynamicFn})},_parseMethod:function(t){var e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){var i={method:e[1],"static":!0};if(this.getPropertyInfo(i.method)!==Polymer.nob&&(i["static"]=!1,i.dynamicFn=!0),e[2].trim()){var n=e[2].replace(/\\,/g,"&comma;").split(",");return this._parseArgs(n,i)}return i.args=Polymer.nar,i}},_parseArgs:function(t,e){return e.args=t.map(function(t){var i=this._parseArg(t);return i.literal||(e["static"]=!1),i},this),e},_parseArg:function(t){var e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e},n=e[0];switch("-"===n&&(n=e[1]),"0">n||n>"9"||(n="#"),n){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=+e,i.literal=!0}return i.literal||(i.model=Polymer.Path.root(e),i.structured=Polymer.Path.isDeep(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this),this._bindListeners&&Polymer.Bind.setupBindListeners(this)},_applyEffectValue:function(t,e){var i=this._nodes[t.index],n=t.name;if(e=this._computeFinalAnnotationValue(i,n,e,t),"attribute"==t.kind)this.serializeValueToAttribute(e,n,i);else{var r=i._propertyInfo&&i._propertyInfo[n];if(r&&r.readOnly)return;this.__setProperty(n,e,Polymer.Settings.suppressBindingNotifications,i)}},_computeFinalAnnotationValue:function(t,e,i,n){if(n.negate&&(i=!i),n.isCompound){var r=t.__compoundStorage__[e];r[n.compoundIndex]=i,i=r.join("")}return"attribute"!==n.kind&&("className"===e&&(i=this._scopeElementClass(t,i)),("textContent"===e||"input"==t.localName&&"value"==e)&&(i=void 0==i?"":i)),i},_executeStaticEffects:function(){this._propertyEffects&&this._propertyEffects.__static__&&this._effectEffects("__static__",null,this._propertyEffects.__static__)}}),function(){var t=Polymer.Settings.usePolyfillProto;Polymer.Base._addFeature({_setupConfigure:function(t){if(this._config={},this._handlers=[],this._aboveConfig=null,t)for(var e in t)void 0!==t[e]&&(this._config[e]=t[e])},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(t){var e=this._clientsReadied?this:this._config;this._setAttributeToProperty(e,t)},_configValue:function(t,e){var i=this._propertyInfo[t];i&&i.readOnly||(this._config[t]=e)},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences(),this._configureInstanceProperties(),this._aboveConfig=this.mixin({},this._config);for(var t={},e=0;e<this.behaviors.length;e++)this._configureProperties(this.behaviors[e].properties,t);this._configureProperties(this.properties,t),this.mixin(t,this._aboveConfig),this._config=t,this._clients&&this._clients.length&&this._distributeConfig(this._config)},_configureInstanceProperties:function(){for(var e in this._propertyEffects)!t&&this.hasOwnProperty(e)&&(this._configValue(e,this[e]),delete this[e])},_configureProperties:function(t,e){for(var i in t){var n=t[i];if(void 0!==n.value){var r=n.value;"function"==typeof r&&(r=r.call(this,this._config)),e[i]=r}}},_distributeConfig:function(t){var e=this._propertyEffects;if(e)for(var i in t){var n=e[i];if(n)for(var r,o=0,s=n.length;s>o&&(r=n[o]);o++)if("annotation"===r.kind){
  var a=this._nodes[r.effect.index],l=r.effect.propertyName,h="attribute"==r.effect.kind,c=a._propertyEffects&&a._propertyEffects[l];if(a._configValue&&(c||!h)){var u=i===r.effect.value?t[i]:this._get(r.effect.value,t);u=this._computeFinalAnnotationValue(a,l,u,r.effect),h&&(u=a.deserialize(this.serialize(u),a._propertyInfo[l].type)),a._configValue(l,u)}}}},_afterClientsReady:function(){this._executeStaticEffects(),this._applyConfig(this._config,this._aboveConfig),this._flushHandlers()},_applyConfig:function(t,e){for(var i in t)void 0===this[i]&&this.__setProperty(i,t[i],i in e)},_notifyListener:function(t,e){if(!Polymer.Bind._isEventBogus(e,e.target)){var i,n;if(e.detail&&(i=e.detail.value,n=e.detail.path),this._clientsReadied)return t.call(this,e.target,i,n);this._queueHandler([t,e.target,i,n])}},_queueHandler:function(t){this._handlers.push(t)},_flushHandlers:function(){for(var t,e=this._handlers,i=0,n=e.length;n>i&&(t=e[i]);i++)t[0].call(this,t[1],t[2],t[3]);this._handlers=[]}})}(),function(){"use strict";var t=Polymer.Path;Polymer.Base._addFeature({notifyPath:function(t,e,i){var n={},r=this._get(t,this,n);1===arguments.length&&(e=r),n.path&&this._notifyPath(n.path,e,i)},_notifyPath:function(t,e,i){var n=this._propertySetter(t,e);if(n!==e&&(n===n||e===e))return this._pathEffector(t,e),i||this._notifyPathUp(t,e),!0},_getPathParts:function(t){if(Array.isArray(t)){for(var e=[],i=0;i<t.length;i++)for(var n=(""+t[i]).split("."),r=0;r<n.length;r++)e.push(n[r]);return e}return(""+t).split(".")},set:function(t,e,i){var n,r=i||this,o=this._getPathParts(t),s=o[o.length-1];if(o.length>1){for(var a=0;a<o.length-1;a++){var l=o[a];if(n&&"#"==l[0]?r=Polymer.Collection.get(n).getItem(l):(r=r[l],n&&parseInt(l,10)==l&&(o[a]=Polymer.Collection.get(n).getKey(r))),!r)return;n=Array.isArray(r)?r:null}if(n){var h,c,u=Polymer.Collection.get(n);"#"==s[0]?(c=s,h=u.getItem(c),s=n.indexOf(h),u.setItem(c,e)):parseInt(s,10)==s&&(h=r[s],c=u.getKey(h),o[a]=c,u.setItem(c,e))}r[s]=e,i||this._notifyPath(o.join("."),e)}else r[t]=e},get:function(t,e){return this._get(t,e)},_get:function(t,e,i){for(var n,r=e||this,o=this._getPathParts(t),s=0;s<o.length;s++){if(!r)return;var a=o[s];n&&"#"==a[0]?r=Polymer.Collection.get(n).getItem(a):(r=r[a],i&&n&&parseInt(a,10)==a&&(o[s]=Polymer.Collection.get(n).getKey(r))),n=Array.isArray(r)?r:null}return i&&(i.path=o.join(".")),r},_pathEffector:function(e,i){var n=t.root(e),r=this._propertyEffects&&this._propertyEffects[n];if(r)for(var o,s=0;s<r.length&&(o=r[s]);s++){var a=o.pathFn;a&&a.call(this,e,i,o.effect)}this._boundPaths&&this._notifyBoundPaths(e,i)},_annotationPathEffect:function(e,i,n){if(t.matches(n.value,!1,e))Polymer.Bind._annotationEffect.call(this,e,i,n);else if(!n.negate&&t.isDescendant(n.value,e)){var r=this._nodes[n.index];if(r&&r._notifyPath){var o=t.translate(n.value,n.name,e);r._notifyPath(o,i,!0)}}},_complexObserverPathEffect:function(e,i,n){t.matches(n.trigger.name,n.trigger.wildcard,e)&&Polymer.Bind._complexObserverEffect.call(this,e,i,n)},_computePathEffect:function(e,i,n){t.matches(n.trigger.name,n.trigger.wildcard,e)&&Polymer.Bind._computeEffect.call(this,e,i,n)},_annotatedComputationPathEffect:function(e,i,n){t.matches(n.trigger.name,n.trigger.wildcard,e)&&Polymer.Bind._annotatedComputationEffect.call(this,e,i,n)},linkPaths:function(t,e){this._boundPaths=this._boundPaths||{},e?this._boundPaths[t]=e:this.unlinkPaths(t)},unlinkPaths:function(t){this._boundPaths&&delete this._boundPaths[t]},_notifyBoundPaths:function(e,i){for(var n in this._boundPaths){var r=this._boundPaths[n];t.isDescendant(n,e)?this._notifyPath(t.translate(n,r,e),i):t.isDescendant(r,e)&&this._notifyPath(t.translate(r,n,e),i)}},_notifyPathUp:function(e,i){var n=t.root(e),r=Polymer.CaseMap.camelToDashCase(n),o=r+this._EVENT_CHANGED;this.fire(o,{path:e,value:i},{bubbles:!1,_useCache:Polymer.Settings.eventDataCache||!Polymer.Settings.isIE})},_EVENT_CHANGED:"-changed",notifySplices:function(t,e){var i={},n=this._get(t,this,i);this._notifySplices(n,i.path,e)},_notifySplices:function(t,e,i){var n={keySplices:Polymer.Collection.applySplices(t,i),indexSplices:i},r=e+".splices";this._notifyPath(r,n),this._notifyPath(e+".length",t.length),this.__data__[r]={keySplices:null,indexSplices:null}},_notifySplice:function(t,e,i,n,r){this._notifySplices(t,e,[{index:i,addedCount:n,removed:r,object:t,type:"splice"}])},push:function(t){var e={},i=this._get(t,this,e),n=Array.prototype.slice.call(arguments,1),r=i.length,o=i.push.apply(i,n);return n.length&&this._notifySplice(i,e.path,r,n.length,[]),o},pop:function(t){var e={},i=this._get(t,this,e),n=!!i.length,r=Array.prototype.slice.call(arguments,1),o=i.pop.apply(i,r);return n&&this._notifySplice(i,e.path,i.length,0,[o]),o},splice:function(t,e){var i={},n=this._get(t,this,i);e=0>e?n.length-Math.floor(-e):Math.floor(e),e||(e=0);var r=Array.prototype.slice.call(arguments,1),o=n.splice.apply(n,r),s=Math.max(r.length-2,0);return(s||o.length)&&this._notifySplice(n,i.path,e,s,o),o},shift:function(t){var e={},i=this._get(t,this,e),n=!!i.length,r=Array.prototype.slice.call(arguments,1),o=i.shift.apply(i,r);return n&&this._notifySplice(i,e.path,0,0,[o]),o},unshift:function(t){var e={},i=this._get(t,this,e),n=Array.prototype.slice.call(arguments,1),r=i.unshift.apply(i,n);return n.length&&this._notifySplice(i,e.path,0,n.length,[]),r},prepareModelNotifyPath:function(t){this.mixin(t,{fire:Polymer.Base.fire,_getEvent:Polymer.Base._getEvent,__eventCache:Polymer.Base.__eventCache,notifyPath:Polymer.Base.notifyPath,_get:Polymer.Base._get,_EVENT_CHANGED:Polymer.Base._EVENT_CHANGED,_notifyPath:Polymer.Base._notifyPath,_notifyPathUp:Polymer.Base._notifyPathUp,_pathEffector:Polymer.Base._pathEffector,_annotationPathEffect:Polymer.Base._annotationPathEffect,_complexObserverPathEffect:Polymer.Base._complexObserverPathEffect,_annotatedComputationPathEffect:Polymer.Base._annotatedComputationPathEffect,_computePathEffect:Polymer.Base._computePathEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})}(),Polymer.Base._addFeature({resolveUrl:function(t){var e=Polymer.DomModule["import"](this.is),i="";if(e){var n=e.getAttribute("assetpath")||"";i=Polymer.ResolveUrl.resolveUrl(n,e.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(t,i)}}),Polymer.CssParse=function(){return{parse:function(t){return t=this._clean(t),this._parseCss(this._lex(t),t)},_clean:function(t){return t.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(t){for(var e={start:0,end:t.length},i=e,n=0,r=t.length;r>n;n++)switch(t[n]){case this.OPEN_BRACE:i.rules||(i.rules=[]);var o=i;i={start:n+1,parent:o,previous:o.rules[o.rules.length-1]},o.rules.push(i);break;case this.CLOSE_BRACE:i.end=n+1,i=i.parent||e}return e},_parseCss:function(t,e){var i=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=i.trim(),t.parent){var n=t.previous?t.previous.end:t.parent.start;i=e.substring(n,t.start-1),i=this._expandUnicodeEscapes(i),i=i.replace(this._rx.multipleSpaces," "),i=i.substring(i.lastIndexOf(";")+1);var r=t.parsedSelector=t.selector=i.trim();t.atRule=0===r.indexOf(this.AT_START),t.atRule?0===r.indexOf(this.MEDIA_START)?t.type=this.types.MEDIA_RULE:r.match(this._rx.keyframesRule)&&(t.type=this.types.KEYFRAMES_RULE,t.keyframesName=t.selector.split(this._rx.multipleSpaces).pop()):0===r.indexOf(this.VAR_START)?t.type=this.types.MIXIN_RULE:t.type=this.types.STYLE_RULE}var o=t.rules;if(o)for(var s,a=0,l=o.length;l>a&&(s=o[a]);a++)this._parseCss(s,e);return t},_expandUnicodeEscapes:function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,function(){for(var t=arguments[1],e=6-t.length;e--;)t="0"+t;return"\\"+t})},stringify:function(t,e,i){i=i||"";var n="";if(t.cssText||t.rules){var r=t.rules;if(r&&!this._hasMixinRules(r))for(var o,s=0,a=r.length;a>s&&(o=r[s]);s++)n=this.stringify(o,e,n);else n=e?t.cssText:this.removeCustomProps(t.cssText),n=n.trim(),n&&(n="  "+n+"\n")}return n&&(t.selector&&(i+=t.selector+" "+this.OPEN_BRACE+"\n"),i+=n,t.selector&&(i+=this.CLOSE_BRACE+"\n\n")),i},_hasMixinRules:function(t){return 0===t[0].selector.indexOf(this.VAR_START)},removeCustomProps:function(t){return t=this.removeCustomPropAssignment(t),this.removeCustomPropApply(t)},removeCustomPropAssignment:function(t){return t.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(t){return t.replace(this._rx.mixinApply,"").replace(this._rx.varApply,"")},types:{STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE:"{",CLOSE_BRACE:"}",_rx:{comments:/\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START:"--",MEDIA_START:"@media",AT_START:"@"}}(),Polymer.StyleUtil=function(){var t=Polymer.Settings;return{NATIVE_VARIABLES:Polymer.Settings.useNativeCSSProperties,MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(t,e){return"string"==typeof t&&(t=this.parser.parse(t)),e&&this.forEachRule(t,e),this.parser.stringify(t,this.NATIVE_VARIABLES)},forRulesInStyles:function(t,e,i){if(t)for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)this.forEachRuleInStyle(n,e,i)},forActiveRulesInStyles:function(t,e,i){if(t)for(var n,r=0,o=t.length;o>r&&(n=t[r]);r++)this.forEachRuleInStyle(n,e,i,!0)},rulesForStyle:function(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=this.parser.parse(t.textContent)),t.__cssRules},isKeyframesSelector:function(t){return t.parent&&t.parent.type===this.ruleTypes.KEYFRAMES_RULE},forEachRuleInStyle:function(t,e,i,n){var r,o,s=this.rulesForStyle(t);e&&(r=function(i){e(i,t)}),i&&(o=function(e){i(e,t)}),this.forEachRule(s,r,o,n)},forEachRule:function(t,e,i,n){if(t){var r=!1;if(n&&t.type===this.ruleTypes.MEDIA_RULE){var o=t.selector.match(this.rx.MEDIA_MATCH);o&&(window.matchMedia(o[1]).matches||(r=!0))}t.type===this.ruleTypes.STYLE_RULE?e(t):i&&t.type===this.ruleTypes.KEYFRAMES_RULE?i(t):t.type===this.ruleTypes.MIXIN_RULE&&(r=!0);var s=t.rules;if(s&&!r)for(var a,l=0,h=s.length;h>l&&(a=s[l]);l++)this.forEachRule(a,e,i,n)}},applyCss:function(t,e,i,n){var r=this.createScopeStyle(t,e);return this.applyStyle(r,i,n)},applyStyle:function(t,e,i){e=e||document.head;var n=i&&i.nextSibling||e.firstChild;return this.__lastHeadApplyNode=t,e.insertBefore(t,n)},createScopeStyle:function(t,e){var i=document.createElement("style");return e&&i.setAttribute("scope",e),i.textContent=t,i},__lastHeadApplyNode:null,applyStylePlaceHolder:function(t){var e=document.createComment(" Shady DOM styles for "+t+" "),i=this.__lastHeadApplyNode?this.__lastHeadApplyNode.nextSibling:null,n=document.head;return n.insertBefore(e,i||n.firstChild),this.__lastHeadApplyNode=e,e},cssFromModules:function(t,e){for(var i=t.trim().split(" "),n="",r=0;r<i.length;r++)n+=this.cssFromModule(i[r],e);return n},cssFromModule:function(t,e){var i=Polymer.DomModule["import"](t);return i&&!i._cssText&&(i._cssText=this.cssFromElement(i)),i&&i._cssText||""},cssFromElement:function(t){for(var e,i="",n=t.content||t,r=Polymer.TreeApi.arrayCopy(n.querySelectorAll(this.MODULE_STYLES_SELECTOR)),o=0;o<r.length;o++)if(e=r[o],"template"===e.localName)e.hasAttribute("preserve-content")||(i+=this.cssFromElement(e));else if("style"===e.localName){var s=e.getAttribute(this.INCLUDE_ATTR);s&&(i+=this.cssFromModules(s,!0)),e=e.__appliedElement||e,e.parentNode.removeChild(e),i+=this.resolveCss(e.textContent,t.ownerDocument)}else e["import"]&&e["import"].body&&(i+=this.resolveCss(e["import"].body.textContent,e["import"]));return i},isTargetedBuild:function(e){return t.useNativeShadow?"shadow"===e:"shady"===e},cssBuildTypeForModule:function(t){var e=Polymer.DomModule["import"](t);if(e)return this.getCssBuildType(e)},getCssBuildType:function(t){return t.getAttribute("css-build")},_findMatchingParen:function(t,e){for(var i=0,n=e,r=t.length;r>n;n++)switch(t[n]){case"(":i++;break;case")":if(0===--i)return n}return-1},processVariableAndFallback:function(t,e){var i=t.indexOf("var(");if(i===-1)return e(t,"","","");var n=this._findMatchingParen(t,i+3),r=t.substring(i+4,n),o=t.substring(0,i),s=this.processVariableAndFallback(t.substring(n+1),e),a=r.indexOf(",");return a===-1?e(o,r.trim(),"",s):e(o,r.substring(0,a).trim(),r.substring(a+1).trim(),s)},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,VAR_CONSUMED:/(--[\w-]+)\s*([:,;)]|$)/gi,ANIMATION_MATCH:/(animation\s*:)|(animation-name\s*:)/,MEDIA_MATCH:/@media[^(]*(\([^)]*\))/,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}(),Polymer.StyleTransformer=function(){var t=Polymer.StyleUtil,e=Polymer.Settings,i={dom:function(t,e,i,n){this._transformDom(t,e||"",i,n)},_transformDom:function(t,e,i,n){t.setAttribute&&this.element(t,e,i,n);for(var r=Polymer.dom(t).childNodes,o=0;o<r.length;o++)this._transformDom(r[o],e,i,n)},element:function(t,e,i,r){if(i)r?t.removeAttribute(n):t.setAttribute(n,e);else if(e)if(t.classList)r?(t.classList.remove(n),t.classList.remove(e)):(t.classList.add(n),t.classList.add(e));else if(t.getAttribute){var o=t.getAttribute(g);r?o&&t.setAttribute(g,o.replace(n,"").replace(e,"")):t.setAttribute(g,(o?o+" ":"")+n+" "+e)}},elementStyles:function(i,n){var r,o=i._styles,s="",a=i.__cssBuild,l=e.useNativeShadow||"shady"===a;if(l){var c=this;r=function(t){t.selector=c._slottedToContent(t.selector),t.selector=t.selector.replace(h,":host > *"),n&&n(t)}}for(var u,d=0,f=o.length;f>d&&(u=o[d]);d++){var p=t.rulesForStyle(u);s+=l?t.toCssText(p,r):this.css(p,i.is,i["extends"],n,i._scopeCssViaAttr)+"\n\n"}return s.trim()},css:function(e,i,n,r,o){var s=this._calcHostScope(i,n);i=this._calcElementScope(i,o);var a=this;return t.toCssText(e,function(t){t.isScoped||(a.rule(t,i,s),t.isScoped=!0),r&&r(t,i,s)})},_calcElementScope:function(t,e){return t?e?_+t+y:m+t:""},_calcHostScope:function(t,e){return e?"[is="+t+"]":t},rule:function(t,e,i){this._transformRule(t,this._transformComplexSelector,e,i)},_transformRule:function(t,e,i,n){t.selector=t.transformedSelector=this._transformRuleCss(t,e,i,n)},_transformRuleCss:function(e,i,n,r){var s=e.selector.split(o);if(!t.isKeyframesSelector(e))for(var a,l=0,h=s.length;h>l&&(a=s[l]);l++)s[l]=i.call(this,a,n,r);return s.join(o)},_transformComplexSelector:function(t,e,i){var n=!1,r=!1,a=this;return t=t.trim(),t=this._slottedToContent(t),t=t.replace(h,":host > *"),t=t.replace(b,l+" $1"),t=t.replace(s,function(t,o,s){if(n)s=s.replace(p," ");else{var l=a._transformCompoundSelector(s,o,e,i);n=n||l.stop,r=r||l.hostContext,o=l.combinator,s=l.value}return o+s}),r&&(t=t.replace(d,function(t,e,n,r){return e+n+" "+i+r+o+" "+e+i+n+r})),t},_transformCompoundSelector:function(t,e,i,n){var r=t.search(p),o=!1;t.indexOf(u)<0?t.indexOf(l)<0?0!==r&&(t=i?this._transformSimpleSelector(t,i):t):t=this._transformHostSelector(t,n):o=!0,t.indexOf(f)<0||(e="");var s;return 0>r||(t=t.replace(p," "),s=!0),{value:t,combinator:e,stop:s,hostContext:o}},_transformSimpleSelector:function(t,e){var i=t.split(v);return i[0]+=e,i.join(v)},_transformHostSelector:function(t,e){var i=t.match(c),n=i&&i[2].trim()||"";return n?n[0].match(a)?t.replace(c,function(t,i,n){return e+n}):n.split(a)[0]===e?n:P:t.replace(l,e)},documentRule:function(t){t.selector=t.parsedSelector,this.normalizeRootSelector(t),e.useNativeShadow||this._transformRule(t,this._transformDocumentSelector)},normalizeRootSelector:function(t){t.selector=t.selector.replace(h,"html")},_transformDocumentSelector:function(t){return t.match(p)?this._transformComplexSelector(t,r):this._transformSimpleSelector(t.trim(),r)},_slottedToContent:function(t){return t.replace(w,f+"> $1")},SCOPE_NAME:"style-scope"},n=i.SCOPE_NAME,r=":not(["+n+"]):not(."+n+")",o=",",s=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=\[])+)/g,a=/[[.:#*]/,l=":host",h=":root",c=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,u=":host-context",d=/(.*)(?::host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/,f="::content",p=/::content|::shadow|\/deep\//,m=".",_="["+n+"~=",y="]",v=":",g="class",b=RegExp("^("+f+")"),P="should_not_match",w=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;return i}(),Polymer.StyleExtends=function(){var t=Polymer.StyleUtil;return{hasExtends:function(t){return!!t.match(this.rx.EXTEND)},transform:function(e){var i=t.rulesForStyle(e),n=this;return t.forEachRule(i,function(t){if(n._mapRuleOntoParent(t),t.parent)for(var e;e=n.rx.EXTEND.exec(t.cssText);){var i=e[1],r=n._findExtendor(i,t);r&&n._extendRule(t,r)}t.cssText=t.cssText.replace(n.rx.EXTEND,"")}),t.toCssText(i,function(t){t.selector.match(n.rx.STRIP)&&(t.cssText="")},!0)},_mapRuleOntoParent:function(t){if(t.parent){for(var e,i=t.parent.map||(t.parent.map={}),n=t.selector.split(","),r=0;r<n.length;r++)e=n[r],i[e.trim()]=t;return i}},_findExtendor:function(t,e){return e.parent&&e.parent.map&&e.parent.map[t]||this._findExtendor(t,e.parent)},_extendRule:function(t,e){t.parent!==e.parent&&this._cloneAndAddRuleToParent(e,t.parent),t["extends"]=t["extends"]||[],t["extends"].push(e),e.selector=e.selector.replace(this.rx.STRIP,""),e.selector=(e.selector&&e.selector+",\n")+t.selector,e["extends"]&&e["extends"].forEach(function(e){this._extendRule(t,e)},this)},_cloneAndAddRuleToParent:function(t,e){t=Object.create(t),t.parent=e,t["extends"]&&(t["extends"]=t["extends"].slice()),e.rules.push(t)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}(),Polymer.ApplyShim=function(){"use strict";function t(t,e){t=t.trim(),_[t]={properties:e,dependants:{}}}function e(t){return t=t.trim(),_[t]}function i(t,e){var i=p.exec(e);return i&&(e=i[1]?y._getInitialValueForProperty(t):"apply-shim-inherit"),e}function n(t){for(var e,n,r,o,s=t.split(";"),a={},l=0;l<s.length;l++)r=s[l],r&&(o=r.split(":"),o.length>1&&(e=o[0].trim(),n=i(e,o.slice(1).join(":")),a[e]=n));return a}function r(t){var e=y.__currentElementProto,i=e&&e.is;for(var n in t.dependants)n!==i&&(t.dependants[n].__applyShimInvalid=!0)}function o(i,o,s,a){if(s&&h.processVariableAndFallback(s,function(t,i){i&&e(i)&&(a="@apply "+i+";")}),!a)return i;var c=l(a),u=i.slice(0,i.indexOf("--")),d=n(c),f=d,p=e(o),_=p&&p.properties;_?(f=Object.create(_),f=Polymer.Base.mixin(f,d)):t(o,f);var y,v,g=[],b=!1;for(y in f)v=d[y],void 0===v&&(v="initial"),!_||y in _||(b=!0),g.push(o+m+y+": "+v);return b&&r(p),p&&(p.properties=f),s&&(u=i+";"+u),u+g.join("; ")+";"}function s(t,e,i){return"var("+e+",var("+i+"))"}function a(i,n){i=i.replace(f,"");var r=[],o=e(i);if(o||(t(i,{}),o=e(i)),o){var s=y.__currentElementProto;s&&(o.dependants[s.is]=s);var a,l,h;for(a in o.properties)h=n&&n[a],l=[a,": var(",i,m,a],h&&l.push(",",h),l.push(")"),r.push(l.join(""))}return r.join("; ")}function l(t){for(var e;e=c.exec(t);){var i=e[0],r=e[1],o=e.index,s=o+i.indexOf("@apply"),l=o+i.length,h=t.slice(0,s),u=t.slice(l),d=n(h),f=a(r,d);t=""+h+f+u,c.lastIndex=o+f.length}return t}var h=Polymer.StyleUtil,c=h.rx.MIXIN_MATCH,u=h.rx.VAR_ASSIGN,d=/var\(\s*(--[^,]*),\s*(--[^)]*)\)/g,f=/;\s*/m,p=/^\s*(initial)|(inherit)\s*$/,m="_-_",_={},y={_measureElement:null,_map:_,_separator:m,transform:function(t,e){this.__currentElementProto=e,h.forRulesInStyles(t,this._boundFindDefinitions),h.forRulesInStyles(t,this._boundFindApplications),e&&(e.__applyShimInvalid=!1),this.__currentElementProto=null},_findDefinitions:function(t){var e=t.parsedCssText;e=e.replace(d,s),e=e.replace(u,o),t.cssText=e,":root"===t.selector&&(t.selector=":host > *")},_findApplications:function(t){t.cssText=l(t.cssText)},transformRule:function(t){this._findDefinitions(t),this._findApplications(t)},_getInitialValueForProperty:function(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}};return y._boundTransformRule=y.transformRule.bind(y),y._boundFindDefinitions=y._findDefinitions.bind(y),y._boundFindApplications=y._findApplications.bind(y),y}(),function(){var t=Polymer.Base._prepElement,e=Polymer.Settings.useNativeShadow,i=Polymer.StyleUtil,n=Polymer.StyleTransformer,r=Polymer.StyleExtends,o=Polymer.ApplyShim,s=Polymer.Settings;Polymer.Base._addFeature({_prepElement:function(e){this._encapsulateStyle&&"shady"!==this.__cssBuild&&n.element(e,this.is,this._scopeCssViaAttr),t.call(this,e)},_prepStyles:function(){void 0===this._encapsulateStyle&&(this._encapsulateStyle=!e),e||(this._scopeStyle=i.applyStylePlaceHolder(this.is)),this.__cssBuild=i.cssBuildTypeForModule(this.is)},_prepShimStyles:function(){if(this._template){var t=i.isTargetedBuild(this.__cssBuild);if(s.useNativeCSSProperties&&"shadow"===this.__cssBuild&&t)return;this._styles=this._styles||this._collectStyles(),s.useNativeCSSProperties&&!this.__cssBuild&&o.transform(this._styles,this);var r=s.useNativeCSSProperties&&t?this._styles.length&&this._styles[0].textContent.trim():n.elementStyles(this);this._prepStyleProperties(),!this._needsStyleProperties()&&r&&i.applyCss(r,this.is,e?this._template.content:null,this._scopeStyle)}else this._styles=[]},_collectStyles:function(){var t=[],e="",n=this.styleModules;if(n)for(var o,s=0,a=n.length;a>s&&(o=n[s]);s++)e+=i.cssFromModule(o);e+=i.cssFromModule(this.is);var l=this._template&&this._template.parentNode;if(!this._template||l&&l.id.toLowerCase()===this.is||(e+=i.cssFromElement(this._template)),e){var h=document.createElement("style");h.textContent=e,r.hasExtends(h.textContent)&&(e=r.transform(h)),t.push(h)}return t},_elementAdd:function(t){this._encapsulateStyle&&(t.__styleScoped?t.__styleScoped=!1:n.dom(t,this.is,this._scopeCssViaAttr))},_elementRemove:function(t){this._encapsulateStyle&&n.dom(t,this.is,this._scopeCssViaAttr,!0)},scopeSubtree:function(t,i){if(!e){var n=this,r=function(t){if(t.nodeType===Node.ELEMENT_NODE){var e=t.getAttribute("class");t.setAttribute("class",n._scopeElementClass(t,e));for(var i,r=t.querySelectorAll("*"),o=0;o<r.length&&(i=r[o]);o++)e=i.getAttribute("class"),i.setAttribute("class",n._scopeElementClass(i,e))}};if(r(t),i){var o=new MutationObserver(function(t){for(var e,i=0;i<t.length&&(e=t[i]);i++)if(e.addedNodes)for(var n=0;n<e.addedNodes.length;n++)r(e.addedNodes[n])});return o.observe(t,{childList:!0,subtree:!0}),o}}}})}(),Polymer.StyleProperties=function(){"use strict";function t(t,e){var i=parseInt(t/32),n=1<<t%32;e[i]=(e[i]||0)|n}var e=Polymer.DomApi.matchesSelector,i=Polymer.StyleUtil,n=Polymer.StyleTransformer,r=navigator.userAgent.match("Trident"),o=Polymer.Settings;return{decorateStyles:function(t,e){var r=this,o={},s=[],a=0,l=n._calcHostScope(e.is,e["extends"]);i.forRulesInStyles(t,function(t,n){r.decorateRule(t),t.index=a++,r.whenHostOrRootRule(e,t,n,function(n){if(t.parent.type===i.ruleTypes.MEDIA_RULE&&(e.__notStyleScopeCacheable=!0),n.isHost){var r=n.selector.split(" ").some(function(t){return 0===t.indexOf(l)&&t.length!==l.length});e.__notStyleScopeCacheable=e.__notStyleScopeCacheable||r}}),r.collectPropertiesInCssText(t.propertyInfo.cssText,o)},function(t){s.push(t)}),t._keyframes=s;var h=[];for(var c in o)h.push(c);return h},decorateRule:function(t){if(t.propertyInfo)return t.propertyInfo;var e={},i={};return this.collectProperties(t,i)&&(e.properties=i,t.rules=null),e.cssText=this.collectCssText(t),t.propertyInfo=e,e},collectProperties:function(t,e){var i=t.propertyInfo;if(!i){for(var n,r,o,s=this.rx.VAR_ASSIGN,a=t.parsedCssText;n=s.exec(a);)r=(n[2]||n[3]).trim(),"inherit"!==r&&(e[n[1].trim()]=r),o=!0;return o}if(i.properties)return Polymer.Base.mixin(e,i.properties),!0},collectCssText:function(t){return this.collectConsumingCssText(t.parsedCssText)},collectConsumingCssText:function(t){return t.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"")},collectPropertiesInCssText:function(t,e){for(var i;i=this.rx.VAR_CONSUMED.exec(t);){var n=i[1];":"!==i[2]&&(e[n]=!0)}},reify:function(t){for(var e,i=Object.getOwnPropertyNames(t),n=0;n<i.length;n++)e=i[n],t[e]=this.valueForProperty(t[e],t)},valueForProperty:function(t,e){if(t)if(t.indexOf(";")<0){var n=this,r=function(t,i,r,o){var s=n.valueForProperty(e[i],e);return s&&"initial"!==s?"apply-shim-inherit"===s&&(s="inherit"):s=n.valueForProperty(e[r]||r,e)||r,t+(s||"")+o};t=i.processVariableAndFallback(t,r)}else t=this.valueForProperties(t,e);return t&&t.trim()||""},valueForProperties:function(t,e){for(var i,n,r=t.split(";"),o=0;o<r.length;o++)if(i=r[o]){if(this.rx.MIXIN_MATCH.lastIndex=0,n=this.rx.MIXIN_MATCH.exec(i))i=this.valueForProperty(e[n[1]],e);else{var s=i.indexOf(":");if(s!==-1){var a=i.substring(s);a=a.trim(),a=this.valueForProperty(a,e)||a,i=i.substring(0,s)+a}}r[o]=i&&i.lastIndexOf(";")===i.length-1?i.slice(0,-1):i||""}return r.join(";")},applyProperties:function(t,e){var i="";t.propertyInfo||this.decorateRule(t),t.propertyInfo.cssText&&(i=this.valueForProperties(t.propertyInfo.cssText,e)),t.cssText=i},applyKeyframeTransforms:function(t,e){var i=t.cssText,n=t.cssText;if(null==t.hasAnimations&&(t.hasAnimations=this.rx.ANIMATION_MATCH.test(i)),t.hasAnimations){var r;if(null==t.keyframeNamesToTransform){t.keyframeNamesToTransform=[];for(var o in e)r=e[o],n=r(i),i!==n&&(i=n,t.keyframeNamesToTransform.push(o))}else{for(var s=0;s<t.keyframeNamesToTransform.length;++s)r=e[t.keyframeNamesToTransform[s]],i=r(i);n=i}}t.cssText=n},propertyDataFromStyles:function(n,r){var o={},s=this,a=[];return i.forActiveRulesInStyles(n,function(i){i.propertyInfo||s.decorateRule(i);var n=i.transformedSelector||i.parsedSelector;r&&i.propertyInfo.properties&&n&&e.call(r,n)&&(s.collectProperties(i,o),t(i.index,a))}),{properties:o,key:a}},_rootSelector:/:root|:host\s*>\s*\*/,_checkRoot:function(t,e){return!!e.match(this._rootSelector)||"html"===t&&e.indexOf("html")>-1},whenHostOrRootRule:function(t,e,i,r){if(e.propertyInfo||self.decorateRule(e),e.propertyInfo.properties){var s=t.is?n._calcHostScope(t.is,t["extends"]):"html",a=e.parsedSelector,l=this._checkRoot(s,a),h=!l&&0===a.indexOf(":host");if("shady"===(t.__cssBuild||i.__cssBuild)&&(l=a===s+" > *."+s||a.indexOf("html")>-1,h=!l&&0===a.indexOf(s)),l||h){var c=s;h&&(o.useNativeShadow&&!e.transformedSelector&&(e.transformedSelector=n._transformRuleCss(e,n._transformComplexSelector,t.is,s)),c=e.transformedSelector||e.parsedSelector),l&&"html"===s&&(c=e.transformedSelector||e.parsedSelector),r({selector:c,isHost:h,isRoot:l})}}},hostAndRootPropertiesForScope:function(t){var n={},r={},o=this;return i.forActiveRulesInStyles(t._styles,function(i,s){o.whenHostOrRootRule(t,i,s,function(s){var a=t._element||t;e.call(a,s.selector)&&(s.isHost?o.collectProperties(i,n):o.collectProperties(i,r))})}),{rootProps:r,hostProps:n}},transformStyles:function(t,e,i){var r=this,s=n._calcHostScope(t.is,t["extends"]),a=t["extends"]?"\\"+s.slice(0,-1)+"\\]":s,l=RegExp(this.rx.HOST_PREFIX+a+this.rx.HOST_SUFFIX),h=this._elementKeyframeTransforms(t,i);return n.elementStyles(t,function(n){r.applyProperties(n,e),o.useNativeShadow||Polymer.StyleUtil.isKeyframesSelector(n)||!n.cssText||(r.applyKeyframeTransforms(n,h),r._scopeSelector(n,l,s,t._scopeCssViaAttr,i))})},_elementKeyframeTransforms:function(t,e){var i=t._styles._keyframes,n={};if(!o.useNativeShadow&&i)for(var r=0,s=i[r];r<i.length;s=i[++r])this._scopeKeyframes(s,e),n[s.keyframesName]=this._keyframesRuleTransformer(s);return n},_keyframesRuleTransformer:function(t){return function(e){return e.replace(t.keyframesNameRx,t.transformedKeyframesName)}},_scopeKeyframes:function(t,e){t.keyframesNameRx=RegExp(t.keyframesName,"g"),t.transformedKeyframesName=t.keyframesName+"-"+e,t.transformedSelector=t.transformedSelector||t.selector,t.selector=t.transformedSelector.replace(t.keyframesName,t.transformedKeyframesName)},_scopeSelector:function(t,e,i,r,o){t.transformedSelector=t.transformedSelector||t.selector;for(var s,a=t.transformedSelector,l=r?"["+n.SCOPE_NAME+"~="+o+"]":"."+o,h=a.split(","),c=0,u=h.length;u>c&&(s=h[c]);c++)h[c]=s.match(e)?s.replace(i,l):l+" "+s;t.selector=h.join(",")},applyElementScopeSelector:function(t,e,i,r){var o=r?t.getAttribute(n.SCOPE_NAME):t.getAttribute("class")||"",s=i?o.replace(i,e):(o?o+" ":"")+this.XSCOPE_NAME+" "+e;o!==s&&(r?t.setAttribute(n.SCOPE_NAME,s):t.setAttribute("class",s))},applyElementStyle:function(t,e,n,s){var a=s?s.textContent||"":this.transformStyles(t,e,n),l=t._customStyle;return l&&!o.useNativeShadow&&l!==s&&(l._useCount--,l._useCount<=0&&l.parentNode&&l.parentNode.removeChild(l)),o.useNativeShadow?t._customStyle?(t._customStyle.textContent=a,s=t._customStyle):a&&(s=i.applyCss(a,n,t.root,t._scopeStyle)):s?s.parentNode||(r&&a.indexOf("@media")>-1&&(s.textContent=a),i.applyStyle(s,null,t._scopeStyle)):a&&(s=i.applyCss(a,n,null,t._scopeStyle)),s&&(s._useCount=s._useCount||0,t._customStyle!=s&&s._useCount++,t._customStyle=s),s},mixinCustomStyle:function(t,e){var i;for(var n in e)i=e[n],(i||0===i)&&(t[n]=i)},updateNativeStyleProperties:function(t,e){var i=t.__customStyleProperties;if(i)for(var n=0;n<i.length;n++)t.style.removeProperty(i[n]);var r=[];for(var o in e)null!==e[o]&&(t.style.setProperty(o,e[o]),r.push(o));t.__customStyleProperties=r},rx:i.rx,XSCOPE_NAME:"x-scope"}}(),function(){Polymer.StyleCache=function(){this.cache={}},Polymer.StyleCache.prototype={MAX:100,store:function(t,e,i,n){e.keyValues=i,e.styles=n;var r=this.cache[t]=this.cache[t]||[];r.push(e),r.length>this.MAX&&r.shift()},retrieve:function(t,e,i){var n=this.cache[t];if(n)for(var r,o=n.length-1;o>=0;o--)if(r=n[o],i===r.styles&&this._objectsEqual(e,r.keyValues))return r},clear:function(){this.cache={}},_objectsEqual:function(t,e){var i,n;for(var r in t)if(i=t[r],n=e[r],!("object"==typeof i&&i?this._objectsStrictlyEqual(i,n):i===n))return!1;return!Array.isArray(t)||t.length===e.length},_objectsStrictlyEqual:function(t,e){return this._objectsEqual(t,e)&&this._objectsEqual(e,t)}}}(),Polymer.StyleDefaults=function(){var t=Polymer.StyleProperties,e=Polymer.StyleCache,i=Polymer.Settings.useNativeCSSProperties;return{_styles:[],_properties:null,customStyle:{},_styleCache:new e,_element:Polymer.DomApi.wrap(document.documentElement),addStyle:function(t){this._styles.push(t),this._properties=null},get _styleProperties(){return this._properties||(t.decorateStyles(this._styles,this),this._styles._scopeStyleProperties=null,this._properties=t.hostAndRootPropertiesForScope(this).rootProps,t.mixinCustomStyle(this._properties,this.customStyle),t.reify(this._properties)),this._properties},hasStyleProperties:function(){return!!this._properties},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(e){this._properties=null,e&&Polymer.Base.mixin(this.customStyle,e),this._styleCache.clear();for(var n,r=0;r<this._styles.length;r++)n=this._styles[r],n=n.__importElement||n,n._apply();i&&t.updateNativeStyleProperties(document.documentElement,this.customStyle)}}}(),function(){"use strict";var t=Polymer.Base.serializeValueToAttribute,e=Polymer.StyleProperties,i=Polymer.StyleTransformer,n=Polymer.StyleDefaults,r=Polymer.Settings.useNativeShadow,o=Polymer.Settings.useNativeCSSProperties;Polymer.Base._addFeature({_prepStyleProperties:function(){o||(this._ownStylePropertyNames=this._styles&&this._styles.length?e.decorateStyles(this._styles,this):null)},customStyle:null,getComputedStyleValue:function(t){return o||this._styleProperties||this._computeStyleProperties(),!o&&this._styleProperties&&this._styleProperties[t]||getComputedStyle(this).getPropertyValue(t)},_setupStyleProperties:function(){this.customStyle={},this._styleCache=null,this._styleProperties=null,this._scopeSelector=null,this._ownStyleProperties=null,this._customStyle=null},_needsStyleProperties:function(){
  return!(o||!this._ownStylePropertyNames||!this._ownStylePropertyNames.length)},_validateApplyShim:function(){if(this.__applyShimInvalid){Polymer.ApplyShim.transform(this._styles,this.__proto__);var t=i.elementStyles(this);if(r){var e=this._template.content.querySelector("style");e&&(e.textContent=t)}else{var n=this._scopeStyle&&this._scopeStyle.nextSibling;n&&(n.textContent=t)}}},_beforeAttached:function(){this._scopeSelector&&!this.__stylePropertiesInvalid||!this._needsStyleProperties()||(this.__stylePropertiesInvalid=!1,this._updateStyleProperties())},_findStyleHost:function(){for(var t,e=this;t=Polymer.dom(e).getOwnerRoot();){if(Polymer.isInstance(t.host))return t.host;e=t.host}return n},_updateStyleProperties:function(){var t,i=this._findStyleHost();i._styleProperties||i._computeStyleProperties(),i._styleCache||(i._styleCache=new Polymer.StyleCache);var n=e.propertyDataFromStyles(i._styles,this),o=!this.__notStyleScopeCacheable;o&&(n.key.customStyle=this.customStyle,t=i._styleCache.retrieve(this.is,n.key,this._styles));var a=!!t;a?this._styleProperties=t._styleProperties:this._computeStyleProperties(n.properties),this._computeOwnStyleProperties(),a||(t=s.retrieve(this.is,this._ownStyleProperties,this._styles));var l=!!t&&!a,h=this._applyStyleProperties(t);a||(h=h&&r?h.cloneNode(!0):h,t={style:h,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties},o&&(n.key.customStyle={},this.mixin(n.key.customStyle,this.customStyle),i._styleCache.store(this.is,t,n.key,this._styles)),l||s.store(this.is,Object.create(t),this._ownStyleProperties,this._styles))},_computeStyleProperties:function(t){var i=this._findStyleHost();i._styleProperties||i._computeStyleProperties();var n=Object.create(i._styleProperties),r=e.hostAndRootPropertiesForScope(this);this.mixin(n,r.hostProps),t=t||e.propertyDataFromStyles(i._styles,this).properties,this.mixin(n,t),this.mixin(n,r.rootProps),e.mixinCustomStyle(n,this.customStyle),e.reify(n),this._styleProperties=n},_computeOwnStyleProperties:function(){for(var t,e={},i=0;i<this._ownStylePropertyNames.length;i++)t=this._ownStylePropertyNames[i],e[t]=this._styleProperties[t];this._ownStyleProperties=e},_scopeCount:0,_applyStyleProperties:function(t){var i=this._scopeSelector;this._scopeSelector=t?t._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var n=e.applyElementStyle(this,this._styleProperties,this._scopeSelector,t&&t.style);return r||e.applyElementScopeSelector(this,this._scopeSelector,i,this._scopeCssViaAttr),n},serializeValueToAttribute:function(e,i,n){if(n=n||this,"class"===i&&!r){var o=n===this?this.domHost||this.dataHost:this;o&&(e=o._scopeElementClass(n,e))}n=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(n):n,t.call(this,e,i,n)},_scopeElementClass:function(t,e){return r||this._scopeCssViaAttr||(e=(e?e+" ":"")+a+" "+this.is+(t._scopeSelector?" "+l+" "+t._scopeSelector:"")),e},updateStyles:function(t){t&&this.mixin(this.customStyle,t),o?e.updateNativeStyleProperties(this,this.customStyle):(this.isAttached?this._needsStyleProperties()?this._updateStyleProperties():this._styleProperties=null:this.__stylePropertiesInvalid=!0,this._styleCache&&this._styleCache.clear(),this._updateRootStyles())},_updateRootStyles:function(t){t=t||this.root;for(var e,i=Polymer.dom(t)._query(function(t){return t.shadyRoot||t.shadowRoot}),n=0,r=i.length;r>n&&(e=i[n]);n++)e.updateStyles&&e.updateStyles()}}),Polymer.updateStyles=function(t){n.updateStyles(t),Polymer.Base._updateRootStyles(document)};var s=new Polymer.StyleCache;Polymer.customStyleCache=s;var a=i.SCOPE_NAME,l=e.XSCOPE_NAME}(),Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs(),this.factoryImpl&&this._prepConstructor(),this._prepStyles()},_finishRegisterFeatures:function(){this._prepTemplate(),this._prepShimStyles(),this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepPropertyInfo(),this._prepBindings(),this._prepShady()},_prepBehavior:function(t){this._addPropertyEffects(t.properties),this._addComplexObserverEffects(t.observers),this._addHostAttributes(t.hostAttributes)},_initFeatures:function(){this._setupGestures(),this._setupConfigure(this.__data__),this._setupStyleProperties(),this._setupDebouncers(),this._setupShady(),this._registerHost(),this._template&&(this._validateApplyShim(),this._poolContent(),this._beginHosting(),this._stampTemplate(),this._endHosting(),this._marshalAnnotationReferences()),this._marshalInstanceEffects(),this._marshalBehaviors(),this._marshalHostAttributes(),this._marshalAttributes(),this._tryReady()},_marshalBehavior:function(t){t.listeners&&this._listenListeners(t.listeners)}}),function(){var t,e=Polymer.StyleProperties,i=Polymer.StyleUtil,n=Polymer.CssParse,r=Polymer.StyleDefaults,o=Polymer.StyleTransformer,s=Polymer.ApplyShim,a=Polymer.Debounce,l=Polymer.Settings;Polymer({is:"custom-style","extends":"style",_template:null,properties:{include:String},ready:function(){this.__appliedElement=this.__appliedElement||this,this.__cssBuild=i.getCssBuildType(this),this.__appliedElement!==this&&(this.__appliedElement.__cssBuild=this.__cssBuild),this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument&&this.parentNode&&"dom-module"!==this.parentNode.localName){this._appliesToDocument=!0;var t=this.__appliedElement;if(l.useNativeCSSProperties||(this.__needsUpdateStyles=r.hasStyleProperties(),r.addStyle(t)),t.textContent||this.include)this._apply(!0);else{var e=this,i=new MutationObserver(function(){i.disconnect(),e._apply(!0)});i.observe(t,{childList:!0})}}},_updateStyles:function(){Polymer.updateStyles()},_apply:function(t){var e=this.__appliedElement;if(this.include&&(e.textContent=i.cssFromModules(this.include,!0)+e.textContent),e.textContent){var n=this.__cssBuild,r=i.isTargetedBuild(n);if(!l.useNativeCSSProperties||!r){var a=i.rulesForStyle(e);if(r||(i.forEachRule(a,function(t){o.documentRule(t)}),l.useNativeCSSProperties&&!n&&s.transform([e])),l.useNativeCSSProperties)e.textContent=i.toCssText(a);else{var h=this,c=function(){h._flushCustomProperties()};t?Polymer.RenderStatus.whenReady(c):c()}}}},_flushCustomProperties:function(){this.__needsUpdateStyles?(this.__needsUpdateStyles=!1,t=a(t,this._updateStyles)):this._applyCustomProperties()},_applyCustomProperties:function(){var t=this.__appliedElement;this._computeStyleProperties();var r=this._styleProperties,o=i.rulesForStyle(t);o&&(t.textContent=i.toCssText(o,function(t){var i=t.cssText=t.parsedCssText;t.propertyInfo&&t.propertyInfo.cssText&&(i=n.removeCustomPropAssignment(i),t.cssText=e.valueForProperties(i,r))}))}})}(),Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(t){if(this._templatized=t,t._content||(t._content=t.content),t._content._ctor)return this.ctor=t._content._ctor,void this._prepParentProperties(this.ctor.prototype,t);var e=Object.create(Polymer.Base);this._customPrepAnnotations(e,t),this._prepParentProperties(e,t),e._prepEffects(),this._customPrepEffects(e),e._prepBehaviors(),e._prepPropertyInfo(),e._prepBindings(),e._notifyPathUp=this._notifyPathUpImpl,e._scopeElementClass=this._scopeElementClassImpl,e.listen=this._listenImpl,e._showHideChildren=this._showHideChildrenImpl,e.__setPropertyOrig=this.__setProperty,e.__setProperty=this.__setPropertyImpl;var i=this._constructorImpl,n=function(t,e){i.call(this,t,e)};n.prototype=e,e.constructor=n,t._content._ctor=n,this.ctor=n},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(t){for(var e=this._children,i=0;i<e.length;i++){var n=e[i];!!t!=!!n.__hideTemplateChildren__&&(n.nodeType===Node.TEXT_NODE?t?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__:n.style&&(t?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__)),n.__hideTemplateChildren__=t}},__setPropertyImpl:function(t,e,i,n){n&&n.__hideTemplateChildren__&&"textContent"==t&&(t="__polymerTextContent__"),this.__setPropertyOrig(t,e,i,n)},_debounceTemplate:function(t){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",t))},_flushTemplates:function(){Polymer.dom.flush()},_customPrepEffects:function(t){var e=t._parentProps;for(var i in e)t._addPropertyEffect(i,"function",this._createHostPropEffector(i));for(i in this._instanceProps)t._addPropertyEffect(i,"function",this._createInstancePropEffector(i))},_customPrepAnnotations:function(t,e){t._template=e;var i=e._content;if(!i._notes){var n=t._rootDataHost;n&&(Polymer.Annotations.prepElement=function(){n._prepElement()}),i._notes=Polymer.Annotations.parseAnnotations(e),Polymer.Annotations.prepElement=null,this._processAnnotations(i._notes)}t._notes=i._notes,t._parentProps=i._parentProps},_prepParentProperties:function(t,e){var i=this._parentProps=t._parentProps;if(this._forwardParentProp&&i){var n,r=t._parentPropProto;if(!r){for(n in this._instanceProps)delete i[n];r=t._parentPropProto=Object.create(null),e!=this&&(Polymer.Bind.prepareModel(r),Polymer.Base.prepareModelNotifyPath(r));for(n in i){var o=this._parentPropPrefix+n,s=[{kind:"function",effect:this._createForwardPropEffector(n),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(o)+"-changed"}}];r._propertyEffects=r._propertyEffects||{},r._propertyEffects[o]=s,Polymer.Bind._createAccessors(r,o,s)}}var a=this;e!=this&&(Polymer.Bind.prepareInstance(e),e._forwardParentProp=function(t,e){a._forwardParentProp(t,e)}),this._extendTemplate(e,r),e._pathEffector=function(t,e,i){return a._pathEffectorImpl(t,e,i)}}},_createForwardPropEffector:function(t){return function(e,i){this._forwardParentProp(t,i)}},_createHostPropEffector:function(t){var e=this._parentPropPrefix;return function(i,n){this.dataHost._templatized[e+t]=n}},_createInstancePropEffector:function(t){return function(e,i,n,r){r||this.dataHost._forwardInstanceProp(this,t,i)}},_extendTemplate:function(t,e){var i=Object.getOwnPropertyNames(e);e._propertySetter&&(t._propertySetter=e._propertySetter);for(var n,r=0;r<i.length&&(n=i[r]);r++){var o=t[n];if(o&&"_propertyEffects"==n){var s=Polymer.Base.mixin({},o);t._propertyEffects=Polymer.Base.mixin(s,e._propertyEffects)}else{var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a),void 0!==o&&t._propertySetter(n,o)}}},_showHideChildren:function(){},_forwardInstancePath:function(){},_forwardInstanceProp:function(){},_notifyPathUpImpl:function(t,e){var i=this.dataHost,n=Polymer.Path.root(t);i._forwardInstancePath.call(i,this,t,e),n in i._parentProps&&i._templatized._notifyPath(i._parentPropPrefix+t,e)},_pathEffectorImpl:function(t,e,i){if(this._forwardParentPath&&0===t.indexOf(this._parentPropPrefix)){var n=t.substring(this._parentPropPrefix.length);Polymer.Path.root(n)in this._parentProps&&this._forwardParentPath(n,e)}Polymer.Base._pathEffector.call(this._templatized,t,e,i)},_constructorImpl:function(t,e){this._rootDataHost=e._getRootDataHost(),this._setupConfigure(t),this._registerHost(e),this._beginHosting(),this.root=this.instanceTemplate(this._template),this.root.__noContent=!this._notes._hasContent,this.root.__styleScoped=!0,this._endHosting(),this._marshalAnnotatedNodes(),this._marshalInstanceEffects(),this._marshalAnnotatedListeners();for(var i=[],n=this.root.firstChild;n;n=n.nextSibling)i.push(n),n._templateInstance=this;this._children=i,e.__hideTemplateChildren__&&this._showHideChildren(!0),this._tryReady()},_listenImpl:function(t,e,i){var n=this,r=this._rootDataHost,o=r._createEventHandler(t,e,i),s=function(t){t.model=n,o(t)};r._listen(t,e,s)},_scopeElementClassImpl:function(t,e){var i=this._rootDataHost;return i?i._scopeElementClass(t,e):e},stamp:function(t){if(t=t||{},this._parentProps){var e=this._templatized;for(var i in this._parentProps)void 0===t[i]&&(t[i]=e[this._parentPropPrefix+i])}return new this.ctor(t,this)},modelForElement:function(t){for(var e;t;)if(e=t._templateInstance){if(e.dataHost==this)return e;t=e.dataHost}else t=t.parentNode}},Polymer({is:"dom-template","extends":"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}}),Polymer._collections=new WeakMap,Polymer.Collection=function(t){Polymer._collections.set(t,this),this.userArray=t,this.store=t.slice(),this.initMap()},Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){for(var t=this.omap=new WeakMap,e=this.pmap={},i=this.store,n=0;n<i.length;n++){var r=i[n];r&&"object"==typeof r?t.set(r,n):e[r]=n}},add:function(t){var e=this.store.push(t)-1;return t&&"object"==typeof t?this.omap.set(t,e):this.pmap[t]=e,"#"+e},removeKey:function(t){(t=this._parseKey(t))&&(this._removeFromMap(this.store[t]),delete this.store[t])},_removeFromMap:function(t){t&&"object"==typeof t?this.omap["delete"](t):delete this.pmap[t]},remove:function(t){var e=this.getKey(t);return this.removeKey(e),e},getKey:function(t){var e;if(e=t&&"object"==typeof t?this.omap.get(t):this.pmap[t],void 0!=e)return"#"+e},getKeys:function(){return Object.keys(this.store).map(function(t){return"#"+t})},_parseKey:function(t){if(t&&"#"==t[0])return t.slice(1)},setItem:function(t,e){if(t=this._parseKey(t)){var i=this.store[t];i&&this._removeFromMap(i),e&&"object"==typeof e?this.omap.set(e,t):this.pmap[e]=t,this.store[t]=e}},getItem:function(t){if(t=this._parseKey(t))return this.store[t]},getItems:function(){var t=[],e=this.store;for(var i in e)t.push(e[i]);return t},_applySplices:function(t){for(var e,i,n={},r=0;r<t.length&&(i=t[r]);r++){i.addedKeys=[];for(var o=0;o<i.removed.length;o++)e=this.getKey(i.removed[o]),n[e]=n[e]?null:-1;for(o=0;o<i.addedCount;o++){var s=this.userArray[i.index+o];e=this.getKey(s),e=void 0===e?this.add(s):e,n[e]=n[e]?null:1,i.addedKeys.push(e)}}var a=[],l=[];for(e in n)n[e]<0&&(this.removeKey(e),a.push(e)),n[e]>0&&l.push(e);return[{removed:a,added:l}]}},Polymer.Collection.get=function(t){return Polymer._collections.get(t)||new Polymer.Collection(t)},Polymer.Collection.applySplices=function(t,e){var i=Polymer._collections.get(t);return i?i._applySplices(e):null},Polymer({is:"dom-repeat","extends":"template",_template:null,properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},sort:{type:Function,observer:"_sortChanged"},filter:{type:Function,observer:"_filterChanged"},observe:{type:String,observer:"_observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Polymer.Settings.suppressTemplateNotifications,readOnly:!0},initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},notifyDomChange:{type:Boolean},_targetFrameTime:{type:Number,computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[],this._pool=[],this._limit=1/0;var t=this;this._boundRenderChunk=function(){t._renderChunk()}},detached:function(){this.__isDetached=!0;for(var t=0;t<this._instances.length;t++)this._detachInstance(t)},attached:function(){if(this.__isDetached){this.__isDetached=!1;for(var t=Polymer.dom(Polymer.dom(this).parentNode),e=0;e<this._instances.length;e++)this._attachInstance(e,t)}},ready:function(){this._instanceProps={__key__:!0},this._instanceProps[this.as]=!0,this._instanceProps[this.indexAs]=!0,this.ctor||this.templatize(this)},_sortChanged:function(t){var e=this._getRootDataHost();this._sortFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_filterChanged:function(t){var e=this._getRootDataHost();this._filterFn=t&&("function"==typeof t?t:function(){return e[t].apply(e,arguments)}),this._needFullRefresh=!0,this.items&&this._debounceTemplate(this._render)},_computeFrameTime:function(t){return Math.ceil(1e3/t)},_initializeChunking:function(){this.initialCount&&(this._limit=this.initialCount,this._chunkCount=this.initialCount,this._lastChunkTime=performance.now())},_tryRenderChunk:function(){this.items&&this._limit<this.items.length&&this.debounce("renderChunk",this._requestRenderChunk)},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var t=performance.now(),e=this._targetFrameTime/(t-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*e)||1,this._limit+=this._chunkCount,this._lastChunkTime=t,this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(t){if("items"==t.path)Array.isArray(this.items)?this.collection=Polymer.Collection.get(this.items):this.items?this._error(this._logf("dom-repeat","expected array for `items`, found",this.items)):this.collection=null,this._keySplices=[],this._indexSplices=[],this._needFullRefresh=!0,this._initializeChunking(),this._debounceTemplate(this._render);else if("items.splices"==t.path)this._keySplices=this._keySplices.concat(t.value.keySplices),this._indexSplices=this._indexSplices.concat(t.value.indexSplices),this._debounceTemplate(this._render);else{var e=t.path.slice(6);this._forwardItemPath(e,t.value),this._checkObservedPaths(e)}},_checkObservedPaths:function(t){if(this._observePaths){t=t.substring(t.indexOf(".")+1);for(var e=this._observePaths,i=0;i<e.length;i++)if(0===t.indexOf(e[i]))return this._needFullRefresh=!0,void(this.delay?this.debounce("render",this._render,this.delay):this._debounceTemplate(this._render))}},render:function(){this._needFullRefresh=!0,this._debounceTemplate(this._render),this._flushTemplates()},_render:function(){this._needFullRefresh?(this._applyFullRefresh(),this._needFullRefresh=!1):this._keySplices.length&&(this._sortFn?this._applySplicesUserSort(this._keySplices):this._filterFn?this._applyFullRefresh():this._applySplicesArrayOrder(this._indexSplices)),this._keySplices=[],this._indexSplices=[];for(var t=this._keyToInstIdx={},e=this._instances.length-1;e>=0;e--){var i=this._instances[e];i.isPlaceholder&&e<this._limit?i=this._insertInstance(e,i.__key__):i.isPlaceholder||e<this._limit||(i=this._downgradeInstance(e,i.__key__)),t[i.__key__]=e,i.isPlaceholder||i.__setProperty(this.indexAs,e,!0)}this._pool.length=0,this._setRenderedItemCount(this._instances.length),Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change"),this._tryRenderChunk()},_applyFullRefresh:function(){var t,e=this.collection;if(this._sortFn)t=e?e.getKeys():[];else{t=[];var i=this.items;if(i)for(var n=0;n<i.length;n++)t.push(e.getKey(i[n]))}var r=this;for(this._filterFn&&(t=t.filter(function(t){return r._filterFn(e.getItem(t))})),this._sortFn&&t.sort(function(t,i){return r._sortFn(e.getItem(t),e.getItem(i))}),n=0;n<t.length;n++){var o=t[n],s=this._instances[n];s?(s.__key__=o,!s.isPlaceholder&&n<this._limit&&s.__setProperty(this.as,e.getItem(o),!0)):n<this._limit?this._insertInstance(n,o):this._insertPlaceholder(n,o)}for(var a=this._instances.length-1;a>=n;a--)this._detachAndRemoveInstance(a)},_numericSort:function(t,e){return t-e},_applySplicesUserSort:function(t){for(var e,i,n=this.collection,r={},o=0;o<t.length&&(i=t[o]);o++){for(var s=0;s<i.removed.length;s++)e=i.removed[s],r[e]=r[e]?null:-1;for(s=0;s<i.added.length;s++)e=i.added[s],r[e]=r[e]?null:1}var a=[],l=[];for(e in r)r[e]===-1&&a.push(this._keyToInstIdx[e]),1===r[e]&&l.push(e);if(a.length)for(a.sort(this._numericSort),o=a.length-1;o>=0;o--){var h=a[o];void 0!==h&&this._detachAndRemoveInstance(h)}var c=this;if(l.length){this._filterFn&&(l=l.filter(function(t){return c._filterFn(n.getItem(t))})),l.sort(function(t,e){return c._sortFn(n.getItem(t),n.getItem(e))});var u=0;for(o=0;o<l.length;o++)u=this._insertRowUserSort(u,l[o])}},_insertRowUserSort:function(t,e){for(var i=this.collection,n=i.getItem(e),r=this._instances.length-1,o=-1;r>=t;){var s=t+r>>1,a=this._instances[s].__key__,l=this._sortFn(i.getItem(a),n);if(0>l)t=s+1;else{if(0>=l){o=s;break}r=s-1}}return 0>o&&(o=r+1),this._insertPlaceholder(o,e),o},_applySplicesArrayOrder:function(t){for(var e,i=0;i<t.length&&(e=t[i]);i++){for(var n=0;n<e.removed.length;n++)this._detachAndRemoveInstance(e.index);for(n=0;n<e.addedKeys.length;n++)this._insertPlaceholder(e.index+n,e.addedKeys[n])}},_detachInstance:function(t){var e=this._instances[t];if(!e.isPlaceholder){for(var i=0;i<e._children.length;i++){var n=e._children[i];Polymer.dom(e.root).appendChild(n)}return e}},_attachInstance:function(t,e){var i=this._instances[t];i.isPlaceholder||e.insertBefore(i.root,this)},_detachAndRemoveInstance:function(t){var e=this._detachInstance(t);e&&this._pool.push(e),this._instances.splice(t,1)},_insertPlaceholder:function(t,e){this._instances.splice(t,0,{isPlaceholder:!0,__key__:e})},_stampInstance:function(t,e){var i={__key__:e};return i[this.as]=this.collection.getItem(e),i[this.indexAs]=t,this.stamp(i)},_insertInstance:function(t,e){var i=this._pool.pop();i?(i.__setProperty(this.as,this.collection.getItem(e),!0),i.__setProperty("__key__",e,!0)):i=this._stampInstance(t,e);var n=this._instances[t+1],r=n&&!n.isPlaceholder?n._children[0]:this,o=Polymer.dom(this).parentNode;return Polymer.dom(o).insertBefore(i.root,r),this._instances[t]=i,i},_downgradeInstance:function(t,e){var i=this._detachInstance(t);return i&&this._pool.push(i),i={isPlaceholder:!0,__key__:e},this._instances[t]=i,i},_showHideChildren:function(t){for(var e=0;e<this._instances.length;e++)this._instances[e].isPlaceholder||this._instances[e]._showHideChildren(t)},_forwardInstanceProp:function(t,e,i){if(e==this.as){var n;n=this._sortFn||this._filterFn?this.items.indexOf(this.collection.getItem(t.__key__)):t[this.indexAs],this.set("items."+n,i)}},_forwardInstancePath:function(t,e,i){0===e.indexOf(this.as+".")&&this._notifyPath("items."+t.__key__+"."+e.slice(this.as.length+1),i)},_forwardParentProp:function(t,e){for(var i,n=this._instances,r=0;r<n.length&&(i=n[r]);r++)i.isPlaceholder||i.__setProperty(t,e,!0)},_forwardParentPath:function(t,e){for(var i,n=this._instances,r=0;r<n.length&&(i=n[r]);r++)i.isPlaceholder||i._notifyPath(t,e,!0)},_forwardItemPath:function(t,e){if(this._keyToInstIdx){var i=t.indexOf("."),n=t.substring(0,0>i?t.length:i),r=this._keyToInstIdx[n],o=this._instances[r];o&&!o.isPlaceholder&&(0>i?o.__setProperty(this.as,e,!0):(t=this.as+"."+t.substring(i+1),o._notifyPath(t,e,!0)))}},itemForElement:function(t){var e=this.modelForElement(t);return e&&e[this.as]},keyForElement:function(t){var e=this.modelForElement(t);return e&&e.__key__},indexForElement:function(t){var e=this.modelForElement(t);return e&&e[this.indexAs]}}),Polymer({is:"array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:!1,observer:"clearSelection"},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}},clearSelection:function(){if(Array.isArray(this.selected))for(var t=0;t<this.selected.length;t++)this.unlinkPaths("selected."+t);else this.unlinkPaths("selected"),this.unlinkPaths("selectedItem");this.multi?this.selected&&!this.selected.length||(this.selected=[],this._selectedColl=Polymer.Collection.get(this.selected)):(this.selected=null,this._selectedColl=null),this.selectedItem=null},isSelected:function(t){return this.multi?void 0!==this._selectedColl.getKey(t):this.selected==t},deselect:function(t){if(this.multi){if(this.isSelected(t)){var e=this._selectedColl.getKey(t);this.arrayDelete("selected",t),this.unlinkPaths("selected."+e)}}else this.selected=null,this.selectedItem=null,this.unlinkPaths("selected"),this.unlinkPaths("selectedItem")},select:function(t){var e=Polymer.Collection.get(this.items),i=e.getKey(t);if(this.multi)if(this.isSelected(t))this.toggle&&this.deselect(t);else{this.push("selected",t);var n=this._selectedColl.getKey(t);this.linkPaths("selected."+n,"items."+i)}else this.toggle&&t==this.selected?this.deselect():(this.selected=t,this.selectedItem=t,this.linkPaths("selected","items."+i),this.linkPaths("selectedItem","items."+i))}}),Polymer({is:"dom-if","extends":"template",_template:null,properties:{"if":{type:Boolean,value:!1,observer:"_queueRender"},restamp:{type:Boolean,value:!1,observer:"_queueRender"},notifyDomChange:{type:Boolean}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){this.parentNode&&(this.parentNode.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||Polymer.Settings.hasShadow&&this.parentNode instanceof ShadowRoot)||this._teardownInstance()},attached:function(){this["if"]&&this.ctor&&this.async(this._ensureInstance)},render:function(){this._flushTemplates()},_render:function(){this["if"]?(this.ctor||this.templatize(this),this._ensureInstance(),this._showHideChildren()):this.restamp&&this._teardownInstance(),!this.restamp&&this._instance&&this._showHideChildren(),this["if"]!=this._lastIf&&(Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change"),this._lastIf=this["if"])},_ensureInstance:function(){var t=Polymer.dom(this).parentNode;if(t){var e=Polymer.dom(t);if(this._instance){var i=this._instance._children;if(i&&i.length&&Polymer.dom(this).previousSibling!==i[i.length-1])for(var n,r=0;r<i.length&&(n=i[r]);r++)e.insertBefore(n,this)}else{this._instance=this.stamp();var o=this._instance.root;e.insertBefore(o,this)}}},_teardownInstance:function(){if(this._instance){var t=this._instance._children;if(t&&t.length)for(var e,i=Polymer.dom(Polymer.dom(t[0]).parentNode),n=0;n<t.length&&(e=t[n]);n++)i.removeChild(e);this._instance=null}},_showHideChildren:function(){var t=this.__hideTemplateChildren__||!this["if"];this._instance&&this._instance._showHideChildren(t)},_forwardParentProp:function(t,e){this._instance&&this._instance.__setProperty(t,e,!0)},_forwardParentPath:function(t,e){this._instance&&this._instance._notifyPath(t,e,!0)}}),Polymer({is:"dom-bind",properties:{notifyDomChange:{type:Boolean}},"extends":"template",_template:null,created:function(){var t=this;Polymer.RenderStatus.whenReady(function(){"loading"==document.readyState?document.addEventListener("DOMContentLoaded",function(){t._markImportsReady()}):t._markImportsReady()})},_ensureReady:function(){this._readied||this._readySelf()},_markImportsReady:function(){this._importsReady=!0,this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){Polymer.dom(Polymer.dom(this).parentNode).insertBefore(this.root,this)},_removeChildren:function(){if(this._children)for(var t=0;t<this._children.length;t++)this.root.appendChild(this._children[t])},_initFeatures:function(){},_scopeElementClass:function(t,e){return this.dataHost?this.dataHost._scopeElementClass(t,e):e},_configureInstanceProperties:function(){},_prepConfigure:function(){var t={};for(var e in this._propertyEffects)t[e]=this[e];var i=this._setupConfigure;this._setupConfigure=function(){i.call(this,t)}},attached:function(){this._importsReady&&this.render()},detached:function(){this._removeChildren()},render:function(){this._ensureReady(),this._children||(this._template=this,this._prepAnnotations(),this._prepEffects(),this._prepBehaviors(),this._prepConfigure(),this._prepBindings(),this._prepPropertyInfo(),Polymer.Base._initFeatures.call(this),this._children=Polymer.TreeApi.arrayCopyChildNodes(this.root)),this._insertChildren(),Polymer.Settings.suppressTemplateNotifications&&!this.notifyDomChange||this.fire("dom-change")}}),Polymer.AppLayout=Polymer.AppLayout||{},Polymer.AppLayout._scrollEffects=Polymer.AppLayout._scrollEffects||{},Polymer.AppLayout.scrollTimingFunction=function(t,e,i,n){return t/=n,-i*t*(t-2)+e},Polymer.AppLayout.registerEffect=function(t,e){if(null!=Polymer.AppLayout._scrollEffects[t])throw Error("effect `"+t+"` is already registered.");Polymer.AppLayout._scrollEffects[t]=e},Polymer.AppLayout.scroll=function(t){t=t||{};var e=document.documentElement,i=t.target||e,n="scrollBehavior"in i.style&&i.scroll,r="app-layout-silent-scroll",o=t.top||0,s=t.left||0,a=i===e?window.scrollTo:function(t,e){i.scrollLeft=t,i.scrollTop=e};if("smooth"===t.behavior)if(n)i.scroll(t);else{var l=Polymer.AppLayout.scrollTimingFunction,h=Date.now(),c=i===e?window.pageYOffset:i.scrollTop,u=i===e?window.pageXOffset:i.scrollLeft,d=o-c,f=s-u,p=300,m=function _(){var t=Date.now(),e=t-h;p>e?(a(l(e,u,f,p),l(e,c,d,p)),requestAnimationFrame(_)):a(s,o)}.bind(this);m()}else"silent"===t.behavior?(e.classList.add(r),clearInterval(Polymer.AppLayout._scrollTimer),Polymer.AppLayout._scrollTimer=setTimeout(function(){e.classList.remove(r),Polymer.AppLayout._scrollTimer=null},100),a(s,o)):a(s,o)},Polymer({is:"app-drawer",properties:{opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},persistent:{type:Boolean,value:!1,reflectToAttribute:!0},transitionDuration:{type:Number,value:200},align:{type:String,value:"left"},position:{type:String,readOnly:!0,reflectToAttribute:!0},swipeOpen:{type:Boolean,value:!1,reflectToAttribute:!0},noFocusTrap:{type:Boolean,value:!1},disableSwipe:{type:Boolean,value:!1}},observers:["resetLayout(position, isAttached)","_resetPosition(align, isAttached)","_styleTransitionDuration(transitionDuration)","_openedPersistentChanged(opened, persistent)"],_translateOffset:0,_trackDetails:null,_drawerState:0,_boundEscKeydownHandler:null,_firstTabStop:null,_lastTabStop:null,attached:function(){this._styleTransitionDuration(0),Polymer.RenderStatus.afterNextRender(this,function(){this._styleTransitionDuration(this.transitionDuration),this._boundEscKeydownHandler=this._escKeydownHandler.bind(this),this._resetDrawerState(),this.$.scrim.addEventListener("transitionend",this._transitionend.bind(this)),this.$.contentContainer.addEventListener("transitionend",this._transitionend.bind(this)),this.addEventListener("keydown",this._tabKeydownHandler.bind(this)),this.listen(this,"track","_track"),this.setScrollDirection("y")}),this.fire("app-drawer-attached")},detached:function(){document.removeEventListener("keydown",this._boundEscKeydownHandler)},open:function(){this.opened=!0},close:function(){this.opened=!1},toggle:function(){this.opened=!this.opened},getWidth:function(){return this.$.contentContainer.offsetWidth},resetLayout:function(){this.fire("app-drawer-reset-layout")},_isRTL:function(){return"rtl"===window.getComputedStyle(this).direction},_resetPosition:function(){switch(this.align){case"start":return void this._setPosition(this._isRTL()?"right":"left");case"end":return void this._setPosition(this._isRTL()?"left":"right")}this._setPosition(this.align)},_escKeydownHandler:function(t){27===t.keyCode&&(t.preventDefault(),this.close())},_track:function(t){if(!this.persistent&&!this.disableSwipe)switch(t.preventDefault(),t.detail.state){case"start":this._trackStart(t);break;case"track":this._trackMove(t);break;case"end":this._trackEnd(t)}},_trackStart:function(){this._drawerState=this._DRAWER_STATE.TRACKING,this._styleTransitionDuration(0),this.style.visibility="visible";var t=this.$.contentContainer.getBoundingClientRect();"left"===this.position?this._translateOffset=t.left:this._translateOffset=t.right-window.innerWidth,this._trackDetails=[]},_trackMove:function(t){this._translateDrawer(t.detail.dx+this._translateOffset),this._trackDetails.push({dx:t.detail.dx,timeStamp:Date.now()})},_trackEnd:function(t){var e=t.detail.dx+this._translateOffset,i=this.getWidth(),n="left"===this.position,r=n?e>=0||-i>=e:0>=e||e>=i;if(!r){var o=this._trackDetails;if(this._trackDetails=null,this._flingDrawer(t,o),this._drawerState===this._DRAWER_STATE.FLINGING)return}var s=i/2;t.detail.dx<-s?this.opened="right"===this.position:t.detail.dx>s&&(this.opened="left"===this.position),r&&this._resetDrawerState(),this._styleTransitionDuration(this.transitionDuration),this._resetDrawerTranslate(),this.style.visibility=""},_calculateVelocity:function(t,e){for(var i,n=Date.now(),r=n-100,o=0,s=e.length-1;s>=o;){var a=o+s>>1,l=e[a];l.timeStamp<r?o=a+1:(i=l,
  s=a-1)}return i?(t.detail.dx-i.dx)/(n-i.timeStamp||1):0},_flingDrawer:function(t,e){var i=this._calculateVelocity(t,e);if(Math.abs(i)>=this._MIN_FLING_THRESHOLD){this._drawerState=this._DRAWER_STATE.FLINGING;var n,r=t.detail.dx+this._translateOffset,o=this.getWidth(),s="left"===this.position,a=i>0,l=!a&&s,h=a&&!s;n=l?-(r+o):h?o-r:-r,a?(i=Math.max(i,this._MIN_TRANSITION_VELOCITY),this.opened="left"===this.position):(i=Math.min(i,-this._MIN_TRANSITION_VELOCITY),this.opened="right"===this.position),this._styleTransitionDuration(this._FLING_INITIAL_SLOPE*n/i),this._styleTransitionTimingFunction(this._FLING_TIMING_FUNCTION),this._resetDrawerTranslate()}},_transitionend:function(){this._drawerState===this._DRAWER_STATE.FLINGING&&(this._styleTransitionDuration(this.transitionDuration),this._styleTransitionTimingFunction(""),this.style.visibility=""),this._resetDrawerState()},_styleTransitionDuration:function(t){this.style.transitionDuration=t+"ms",this.$.contentContainer.style.transitionDuration=t+"ms",this.$.scrim.style.transitionDuration=t+"ms"},_styleTransitionTimingFunction:function(t){this.$.contentContainer.style.transitionTimingFunction=t,this.$.scrim.style.transitionTimingFunction=t},_translateDrawer:function(t){var e=this.getWidth();"left"===this.position?(t=Math.max(-e,Math.min(t,0)),this.$.scrim.style.opacity=1+t/e):(t=Math.max(0,Math.min(t,e)),this.$.scrim.style.opacity=1-t/e),this.translate3d(t+"px","0","0",this.$.contentContainer)},_resetDrawerTranslate:function(){this.$.scrim.style.opacity="",this.transform("",this.$.contentContainer)},_resetDrawerState:function(){var t=this._drawerState;this.opened?this._drawerState=this.persistent?this._DRAWER_STATE.OPENED_PERSISTENT:this._DRAWER_STATE.OPENED:this._drawerState=this._DRAWER_STATE.CLOSED,t!==this._drawerState&&(this._drawerState===this._DRAWER_STATE.OPENED?(this._setKeyboardFocusTrap(),document.addEventListener("keydown",this._boundEscKeydownHandler),document.body.style.overflow="hidden"):(document.removeEventListener("keydown",this._boundEscKeydownHandler),document.body.style.overflow=""),t!==this._DRAWER_STATE.INIT&&this.fire("app-drawer-transitioned"))},_setKeyboardFocusTrap:function(){if(!this.noFocusTrap){var t='a[href]:not([tabindex="-1"]),area[href]:not([tabindex="-1"]),input:not([disabled]):not([tabindex="-1"]),select:not([disabled]):not([tabindex="-1"]),textarea:not([disabled]):not([tabindex="-1"]),button:not([disabled]):not([tabindex="-1"]),iframe:not([tabindex="-1"]),[tabindex]:not([tabindex="-1"]),[contentEditable=true]:not([tabindex="-1"])',e=Polymer.dom(this).querySelectorAll(t);e.length>0?(this._firstTabStop=e[0],this._lastTabStop=e[e.length-1]):(this._firstTabStop=null,this._lastTabStop=null);var i=this.getAttribute("tabindex");i&&parseInt(i,10)>-1?this.focus():this._firstTabStop&&this._firstTabStop.focus()}},_tabKeydownHandler:function(t){this.noFocusTrap||this._drawerState===this._DRAWER_STATE.OPENED&&9===t.keyCode&&(t.shiftKey?this._firstTabStop&&Polymer.dom(t).localTarget===this._firstTabStop&&(t.preventDefault(),this._lastTabStop.focus()):this._lastTabStop&&Polymer.dom(t).localTarget===this._lastTabStop&&(t.preventDefault(),this._firstTabStop.focus()))},_openedPersistentChanged:function(){0===this.transitionDuration&&this._resetDrawerState()},_MIN_FLING_THRESHOLD:.2,_MIN_TRANSITION_VELOCITY:1.2,_FLING_TIMING_FUNCTION:"cubic-bezier(0.667, 1, 0.667, 1)",_FLING_INITIAL_SLOPE:1.5,_DRAWER_STATE:{INIT:0,OPENED:1,OPENED_PERSISTENT:2,CLOSED:3,TRACKING:4,FLINGING:5}}),Polymer({is:"iron-media-query",properties:{queryMatches:{type:Boolean,value:!1,readOnly:!0,notify:!0},query:{type:String,observer:"queryChanged"},full:{type:Boolean,value:!1},_boundMQHandler:{value:function(){return this.queryHandler.bind(this)}},_mq:{value:null}},attached:function(){this.style.display="none",this.queryChanged()},detached:function(){this._remove()},_add:function(){this._mq&&this._mq.addListener(this._boundMQHandler)},_remove:function(){this._mq&&this._mq.removeListener(this._boundMQHandler),this._mq=null},queryChanged:function(){this._remove();var t=this.query;t&&(this.full||"("===t[0]||(t="("+t+")"),this._mq=window.matchMedia(t),this._add(),this.queryHandler(this._mq))},queryHandler:function(t){this._setQueryMatches(t.matches)}}),Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this)},attached:function(){this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable||(window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):window.removeEventListener("resize",this._boundNotifyResize),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach(function(t){this.resizerShouldNotify(t)&&this._notifyDescendant(t)},this),this._fireResize())},assignParentResizable:function(t){this._parentResizable=t},stopResizeNotificationsFor:function(t){var e=this._interestedResizables.indexOf(t);e>-1&&(this._interestedResizables.splice(e,1),this.unlisten(t,"iron-resize","_onDescendantIronResize"))},resizerShouldNotify:function(){return!0},_onDescendantIronResize:function(t){return this._notifyingDescendant?void t.stopPropagation():void(Polymer.Settings.useShadow||this._fireResize())},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(t){var e=t.path?t.path[0]:t.target;e!==this&&(this._interestedResizables.indexOf(e)===-1&&(this._interestedResizables.push(e),this.listen(e,"iron-resize","_onDescendantIronResize")),e.assignParentResizable(this),this._notifyDescendant(e),t.stopPropagation())},_parentResizableChanged:function(t){t&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(t){this.isAttached&&(this._notifyingDescendant=!0,t.notifyResize(),this._notifyingDescendant=!1)}},Polymer({is:"app-drawer-layout",behaviors:[Polymer.IronResizableBehavior],properties:{forceNarrow:{type:Boolean,value:!1},responsiveWidth:{type:String,value:"640px"},narrow:{type:Boolean,readOnly:!0,notify:!0},openedWhenNarrow:{type:Boolean,value:!1}},listeners:{tap:"_tapHandler","app-drawer-attached":"_resetDrawerState","app-drawer-reset-layout":"resetLayout","iron-resize":"resetLayout"},observers:["resetLayout(narrow, isAttached)","_narrowChanged(narrow, isAttached)"],get drawer(){return Polymer.dom(this.$.drawerContent).getDistributedNodes()[0]},_tapHandler:function(t){var e=Polymer.dom(t).localTarget;if(e&&e.hasAttribute("drawer-toggle")){var i=this.drawer;i&&!i.persistent&&i.toggle()}},resetLayout:function(){this.debounce("_resetLayout",function(){var t=this.drawer,e=this.$.contentContainer;if(this.narrow||!t)e.style.marginLeft="",e.style.marginRight="";else{var i=t.getWidth();"right"==t.position?(e.style.marginLeft="",e.style.marginRight=i+"px"):(e.style.marginLeft=i+"px",e.style.marginRight="")}})},_resetDrawerState:function(){this.debounce("_resetDrawerState",function(){var t=this.drawer;t&&(this.narrow?(t.opened=this.openedWhenNarrow,t.persistent=!1):t.opened=t.persistent=!0)})},_narrowChanged:function(t){this.toggleClass("narrow",t,this.$.contentContainer),this._resetDrawerState(),this.notifyResize()},_onQueryMatchesChanged:function(t){this._setNarrow(t.detail.value)},_computeMediaQuery:function(t,e){return t?"(min-width: 0px)":"(max-width: "+e+")"}}),Polymer.IronScrollTargetBehavior={properties:{scrollTarget:{type:Object,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(t,e){this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),e&&("document"===t?this.scrollTarget=this._doc:"string"==typeof t?this.scrollTarget=this.domHost?this.domHost.$[t]:Polymer.dom(this.ownerDocument).querySelector("#"+t):this._isValidScrollTarget()&&(this._boundScrollHandler=this._boundScrollHandler||this._scrollHandler.bind(this),this._oldScrollTarget=t,this._toggleScrollListener(this._shouldHaveListener,t)))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(t){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=t)},set _scrollLeft(t){this.scrollTarget===this._doc?window.scrollTo(t,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t)},scroll:function(t,e){this.scrollTarget===this._doc?window.scrollTo(t,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=t,this.scrollTarget.scrollTop=e)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(t,e){if(this._boundScrollHandler){var i=e===this._doc?window:e;t?i.addEventListener("scroll",this._boundScrollHandler):i.removeEventListener("scroll",this._boundScrollHandler)}},toggleScrollListener:function(t){this._shouldHaveListener=t,this._toggleScrollListener(t,this.scrollTarget)}},Polymer.AppScrollEffectsBehavior=[Polymer.IronScrollTargetBehavior,{properties:{effects:{type:String},effectsConfig:{type:Object,value:function(){return{}}},disabled:{type:Boolean,reflectToAttribute:!0,value:!1},threshold:{type:Number,value:0},thresholdTriggered:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_effectsChanged(effects, effectsConfig, isAttached)"],_updateScrollState:function(){},isOnScreen:function(){return!1},isContentBelow:function(){return!1},_effectsRunFn:null,_effects:null,get _clampedScrollTop(){return Math.max(0,this._scrollTop)},detached:function(){this._tearDownEffects()},createEffect:function(t,e){var i=Polymer.AppLayout._scrollEffects[t];if(!i)throw new ReferenceError(this._getUndefinedMsg(t));var n=this._boundEffect(i,e||{});return n.setUp(),n},_effectsChanged:function(t,e,i){this._tearDownEffects(),""!==t&&i&&(t.split(" ").forEach(function(t){var i;""!==t&&(i=Polymer.AppLayout._scrollEffects[t])&&this._effects.push(this._boundEffect(i,e[t]))},this),this._setUpEffect())},_layoutIfDirty:function(){return this.offsetWidth},_boundEffect:function(t,e){e=e||{};var i=parseFloat(e.startsAt||0),n=parseFloat(e.endsAt||1),r=n-i,o=function(){},s=0===i&&1===n?t.run:function(e,n){t.run.call(this,Math.max(0,(e-i)/r),n)};return{setUp:t.setUp?t.setUp.bind(this,e):o,run:t.run?s.bind(this):o,tearDown:t.tearDown?t.tearDown.bind(this):o}},_setUpEffect:function(){this.isAttached&&this._effects&&(this._effectsRunFn=[],this._effects.forEach(function(t){t.setUp()!==!1&&this._effectsRunFn.push(t.run)},this))},_tearDownEffects:function(){this._effects&&this._effects.forEach(function(t){t.tearDown()}),this._effectsRunFn=[],this._effects=[]},_runEffects:function(t,e){this._effectsRunFn&&this._effectsRunFn.forEach(function(i){i(t,e)})},_scrollHandler:function(){if(!this.disabled){var t=this._clampedScrollTop;this._updateScrollState(t),this.threshold>0&&this._setThresholdTriggered(t>=this.threshold)}},_getDOMRef:function(t){},_getUndefinedMsg:function(t){return"Scroll effect `"+t+"` is undefined. Did you forget to import app-layout/app-scroll-effects/effects/"+t+".html ?"}}],Polymer({is:"app-header",behaviors:[Polymer.AppScrollEffectsBehavior,Polymer.IronResizableBehavior],properties:{condenses:{type:Boolean,value:!1},fixed:{type:Boolean,value:!1},reveals:{type:Boolean,value:!1},shadow:{type:Boolean,reflectToAttribute:!0,value:!1}},observers:["resetLayout(isAttached, condenses, fixed)"],listeners:{"iron-resize":"_resizeHandler"},_height:0,_dHeight:0,_stickyElTop:0,_stickyEl:null,_top:0,_progress:0,_wasScrollingDown:!1,_initScrollTop:0,_initTimestamp:0,_lastTimestamp:0,_lastScrollTop:0,get _maxHeaderTop(){return this.fixed?this._dHeight:this._height+5},_getStickyEl:function(){for(var t,e=Polymer.dom(this.$.content).getDistributedNodes(),i=0;i<e.length;i++)if(e[i].nodeType===Node.ELEMENT_NODE){var n=e[i];if(n.hasAttribute("sticky")){t=n;break}t||(t=n)}return t},resetLayout:function(){this.debounce("_resetLayout",function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var t=this._clampedScrollTop,e=0===this._height||0===t,i=this.disabled;this._height=this.offsetHeight,this._stickyEl=this._getStickyEl(),this.disabled=!0,e||this._updateScrollState(0,!0),this._mayMove()?this._dHeight=this._stickyEl?this._height-this._stickyEl.offsetHeight:0:this._dHeight=0,this._stickyElTop=this._stickyEl?this._stickyEl.offsetTop:0,this._setUpEffect(),e?this._updateScrollState(t,!0):(this._updateScrollState(this._lastScrollTop,!0),this._layoutIfDirty()),this.disabled=i,this.fire("app-header-reset-layout")}})},_updateScrollState:function(t,e){if(0!==this._height){var i=0,n=0,r=this._top,o=(this._lastScrollTop,this._maxHeaderTop),s=t-this._lastScrollTop,a=Math.abs(s),l=t>this._lastScrollTop,h=Date.now();if(this._mayMove()&&(n=this._clamp(this.reveals?r+s:t,0,o)),t<this._dHeight||(n=this.condenses&&!this.fixed?Math.max(this._dHeight,n):n,this.style.transitionDuration="0ms"),this.reveals&&!this.disabled&&100>a&&((h-this._initTimestamp>300||this._wasScrollingDown!==l)&&(this._initScrollTop=t,this._initTimestamp=h),t>=o))if(Math.abs(this._initScrollTop-t)>30||a>10){l&&t>=o?n=o:l||t<this._dHeight||(n=this.condenses&&!this.fixed?this._dHeight:0);var c=s/(h-this._lastTimestamp);this.style.transitionDuration=this._clamp((n-r)/c,0,300)+"ms"}else n=this._top;i=0===this._dHeight?t>0?1:0:n/this._dHeight,e||(this._lastScrollTop=t,this._top=n,this._wasScrollingDown=l,this._lastTimestamp=h),(e||i!==this._progress||r!==n||0===t)&&(this._progress=i,this._runEffects(i,n),this._transformHeader(n))}},_mayMove:function(){return this.condenses||!this.fixed},willCondense:function(){return this._dHeight>0&&this.condenses},isOnScreen:function(){return 0!==this._height&&this._top<this._height},isContentBelow:function(){return 0===this._top?this._clampedScrollTop>0:this._clampedScrollTop-this._maxHeaderTop>=0},_transformHeader:function(t){this.translate3d(0,-t+"px",0),this._stickyEl&&this.translate3d(0,this.condenses&&t>=this._stickyElTop?Math.min(t,this._dHeight)-this._stickyElTop+"px":0,0,this._stickyEl)},_resizeHandler:function(){this.resetLayout()},_clamp:function(t,e,i){return Math.min(i,Math.max(e,t))},_ensureBgContainers:function(){this._bgContainer||(this._bgContainer=document.createElement("div"),this._bgContainer.id="background",this._bgRear=document.createElement("div"),this._bgRear.id="backgroundRearLayer",this._bgContainer.appendChild(this._bgRear),this._bgFront=document.createElement("div"),this._bgFront.id="backgroundFrontLayer",this._bgContainer.appendChild(this._bgFront),Polymer.dom(this.root).insertBefore(this._bgContainer,this.$.contentContainer))},_getDOMRef:function(t){switch(t){case"backgroundFrontLayer":return this._ensureBgContainers(),this._bgFront;case"backgroundRearLayer":return this._ensureBgContainers(),this._bgRear;case"background":return this._ensureBgContainers(),this._bgContainer;case"mainTitle":return Polymer.dom(this).querySelector("[main-title]");case"condensedTitle":return Polymer.dom(this).querySelector("[condensed-title]")}return null},getScrollState:function(){return{progress:this._progress,top:this._top}}}),Polymer({is:"app-header-layout",behaviors:[Polymer.IronResizableBehavior],properties:{hasScrollingRegion:{type:Boolean,value:!1,reflectToAttribute:!0}},listeners:{"iron-resize":"_resizeHandler","app-header-reset-layout":"_resetLayoutHandler"},observers:["resetLayout(isAttached, hasScrollingRegion)"],get header(){return Polymer.dom(this.$.header).getDistributedNodes()[0]},resetLayout:function(){this._updateScroller(),this.debounce("_resetLayout",this._updateContentPosition)},_updateContentPosition:function(){var t=this.header;if(this.isAttached&&t){var e=t.offsetHeight;if(this.hasScrollingRegion)t.style.left="",t.style.right="";else{var i=this.getBoundingClientRect(),n=document.documentElement.clientWidth-i.right;t.style.left=i.left+"px",t.style.right=n+"px"}var r=this.$.contentContainer.style;t.fixed&&!t.willCondense()&&this.hasScrollingRegion?(r.marginTop=e+"px",r.paddingTop=""):(r.paddingTop=e+"px",r.marginTop="")}},_updateScroller:function(){if(this.isAttached){var t=this.header;t&&(t.scrollTarget=this.hasScrollingRegion?this.$.contentContainer:this.ownerDocument.documentElement)}},_resizeHandler:function(){this.resetLayout()},_resetLayoutHandler:function(t){this.resetLayout(),t.stopPropagation()}}),Polymer({is:"app-scrollpos-control",behaviors:[Polymer.IronScrollTargetBehavior],properties:{selected:{type:String,observer:"_selectedChanged"},reset:{type:Boolean,value:!1}},observers:["_updateScrollPos(selected, reset)"],created:function(){this._scrollposMap={}},_selectedChanged:function(t,e){null!=e&&(this._scrollposMap[e]={x:this._scrollLeft,y:this._scrollTop})},_updateScrollPos:function(){this.debounce("_updateScrollPos",function(){var t=this._scrollposMap[this.selected];null==t||this.reset?this.scroll(0,0):this.scroll(t.x,t.y)})}}),Polymer({is:"app-toolbar"}),Polymer({is:"app-box",behaviors:[Polymer.AppScrollEffectsBehavior,Polymer.IronResizableBehavior],listeners:{"iron-resize":"_resizeHandler"},_progress:0,attached:function(){this.resetLayout()},resetLayout:function(){this.debounce("_resetLayout",function(){if(0!==this.offsetWidth||0!==this.offsetHeight){var t=this._clampedScrollTop,e=this.disabled;this.disabled=!0,this._elementTop=this._getElementTop(),this._elementHeight=this.offsetHeight,this._cachedScrollTargetHeight=this._scrollTargetHeight,this._setUpEffect(),this._updateScrollState(t),this.disabled=e}},1)},_getElementTop:function(){for(var t=this,e=0;t&&t!==this.scrollTarget;)e+=t.offsetTop,t=t.offsetParent;return e},_updateScrollState:function(t){if(this.isOnScreen()){var e=this._elementTop-t;this._progress=1-(e+this._elementHeight)/this._cachedScrollTargetHeight,this._runEffects(this._progress,t)}},isOnScreen:function(){return this._elementTop<this._scrollTop+this._cachedScrollTargetHeight&&this._elementTop+this._elementHeight>this._scrollTop},_resizeHandler:function(){this.resetLayout()},_getDOMRef:function(t){return"background"===t?this.$.background:"backgroundFrontLayer"===t?this.$.backgroundFrontLayer:void 0},getScrollState:function(){return{progress:this._progress}}}),function(){var t={},e={},i=null;Polymer.IronMeta=Polymer({is:"iron-meta",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,observer:"_valueChanged"},self:{type:Boolean,observer:"_selfChanged"},list:{type:Array,notify:!0}},hostAttributes:{hidden:!0},factoryImpl:function(t){if(t)for(var e in t)switch(e){case"type":case"key":case"value":this[e]=t[e]}},created:function(){this._metaDatas=t,this._metaArrays=e},_keyChanged:function(t,e){this._resetRegistration(e)},_valueChanged:function(){this._resetRegistration(this.key)},_selfChanged:function(t){t&&(this.value=this)},_typeChanged:function(i){this._unregisterKey(this.key),t[i]||(t[i]={}),this._metaData=t[i],e[i]||(e[i]=[]),this.list=e[i],this._registerKeyValue(this.key,this.value)},byKey:function(t){return this._metaData&&this._metaData[t]},_resetRegistration:function(t){this._unregisterKey(t),this._registerKeyValue(this.key,this.value)},_unregisterKey:function(t){this._unregister(t,this._metaData,this.list)},_registerKeyValue:function(t,e){this._register(t,e,this._metaData,this.list)},_register:function(t,e,i,n){t&&i&&void 0!==e&&(i[t]=e,n.push(e))},_unregister:function(t,e,i){if(t&&e&&t in e){var n=e[t];delete e[t],this.arrayDelete(i,n)}}}),Polymer.IronMeta.getIronMeta=function(){return null===i&&(i=new Polymer.IronMeta),i},Polymer.IronMetaQuery=Polymer({is:"iron-meta-query",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:!0,readOnly:!0},list:{type:Array,notify:!0}},factoryImpl:function(t){if(t)for(var e in t)switch(e){case"type":case"key":this[e]=t[e]}},created:function(){this._metaDatas=t,this._metaArrays=e},_keyChanged:function(t){this._setValue(this._metaData&&this._metaData[t])},_typeChanged:function(i){this._metaData=t[i],this.list=e[i],this.key&&this._keyChanged(this.key)},byKey:function(t){return this._metaData&&this._metaData[t]}})}(),Polymer.NeonAnimationBehavior={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,timingFromConfig:function(t){if(t.timing)for(var e in t.timing)this.animationTiming[e]=t.timing[e];return this.animationTiming},setPrefixedProperty:function(t,e,i){for(var n,r={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]},o=r[e],s=0;n=o[s];s++)t.style[n]=i;t.style[e]=i},complete:function(){}},!function(a,b){var c={},d={},e={},f=null;!function(t){function e(t){if("number"==typeof t)return t;var e={};for(var i in t)e[i]=t[i];return e}function i(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=w}function n(){return t.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function r(e,n){var r=new i;return n&&(r.fill="both",r.duration="auto"),"number"!=typeof e||isNaN(e)?void 0!==e&&Object.getOwnPropertyNames(e).forEach(function(i){if("auto"!=e[i]){if(("number"==typeof r[i]||"duration"==i)&&("number"!=typeof e[i]||isNaN(e[i])))return;if("fill"==i&&b.indexOf(e[i])==-1)return;if("direction"==i&&P.indexOf(e[i])==-1)return;if("playbackRate"==i&&1!==e[i]&&t.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;r[i]=e[i]}}):r.duration=e,r}function o(t){return"number"==typeof t&&(t=isNaN(t)?{duration:0}:{duration:t}),t}function s(e,i){return e=t.numericTimingToObject(e),r(e,i)}function a(t,e,i,n){return 0>t||t>1||0>i||i>1?w:function(r){function o(t,e,i){return 3*t*(1-i)*(1-i)*i+3*e*(1-i)*i*i+i*i*i}if(0>=r){var s=0;return t>0?s=e/t:!e&&i>0&&(s=n/i),s*r}if(r>=1){var a=0;return 1>i?a=(n-1)/(i-1):1==i&&1>t&&(a=(e-1)/(t-1)),1+a*(r-1)}for(var l=0,h=1;h>l;){var c=(l+h)/2,u=o(t,i,c);if(Math.abs(r-u)<1e-5)return o(e,n,c);r>u?l=c:h=c}return o(e,n,c)}}function l(t,e){return function(i){if(i>=1)return 1;var n=1/t;return i+=e*n,i-i%n}}function h(t){x||(x=document.createElement("div").style),x.animationTimingFunction="",x.animationTimingFunction=t;var e=x.animationTimingFunction;if(""==e&&n())throw new TypeError(t+" is not a valid value for easing");return e}function c(t){if("linear"==t)return w;var e=I.exec(t);if(e)return a.apply(this,e.slice(1).map(Number));var i=N.exec(t);if(i)return l(+i[1],{start:C,middle:S,end:E}[i[2]]);var n=T[t];return n?n:w}function u(t){return Math.abs(d(t)/t.playbackRate)}function d(t){return 0===t.duration||0===t.iterations?0:t.duration*t.iterations}function f(t,e,i){if(null==e)return O;var n=i.delay+t+i.endDelay;return e<Math.min(i.delay,n)?R:e<Math.min(i.delay+t,n)?B:k}function p(t,e,i,n,r){switch(n){case R:return"backwards"==e||"both"==e?0:null;case B:return i-r;case k:return"forwards"==e||"both"==e?t:null;case O:return null}}function m(t,e,i,n,r){var o=r;return 0===t?e!==R&&(o+=i):o+=n/t,o}function _(t,e,i,n,r,o){var s=t===1/0?e%1:t%1;return 0!==s||i!==k||0===n||0===r&&0!==o||(s=1),s}function y(t,e,i,n){return t===k&&e===1/0?1/0:1===i?Math.floor(n)-1:Math.floor(n)}function v(t,e,i){var n=t;if("normal"!==t&&"reverse"!==t){var r=e;"alternate-reverse"===t&&(r+=1),n="normal",r!==1/0&&r%2!==0&&(n="reverse")}return"normal"===n?i:1-i}function g(t,e,i){var n=f(t,e,i),r=p(t,i.fill,e,n,i.delay);if(null===r)return null;var o=m(i.duration,n,i.iterations,r,i.iterationStart),s=_(o,i.iterationStart,n,i.iterations,r,i.duration),a=y(n,i.iterations,s,o),l=v(i.direction,a,s);return i._easingFunction(l)}var b="backwards|forwards|both|none".split("|"),P="reverse|alternate|alternate-reverse".split("|"),w=function(t){return t};i.prototype={_setMember:function(e,i){this["_"+e]=i,this._effect&&(this._effect._timingInput[e]=i,this._effect._timing=t.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=t.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(t){this._setMember("delay",t)},get delay(){return this._delay},set endDelay(t){this._setMember("endDelay",t)},get endDelay(){return this._endDelay},set fill(t){this._setMember("fill",t)},get fill(){return this._fill},set iterationStart(t){if((isNaN(t)||0>t)&&n())throw new TypeError("iterationStart must be a non-negative number, received: "+timing.iterationStart);this._setMember("iterationStart",t)},get iterationStart(){return this._iterationStart},set duration(t){if("auto"!=t&&(isNaN(t)||0>t)&&n())throw new TypeError("duration must be non-negative or auto, received: "+t);this._setMember("duration",t)},get duration(){return this._duration},set direction(t){this._setMember("direction",t)},get direction(){return this._direction},set easing(t){this._easingFunction=c(h(t)),this._setMember("easing",t)},get easing(){return this._easing},set iterations(t){if((isNaN(t)||0>t)&&n())throw new TypeError("iterations must be non-negative, received: "+t);this._setMember("iterations",t)},get iterations(){return this._iterations}};var C=1,S=.5,E=0,T={ease:a(.25,.1,.25,1),"ease-in":a(.42,0,1,1),"ease-out":a(0,0,.58,1),"ease-in-out":a(.42,0,.58,1),"step-start":l(1,C),"step-middle":l(1,S),"step-end":l(1,E)},x=null,A="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",I=RegExp("cubic-bezier\\("+A+","+A+","+A+","+A+"\\)"),N=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,O=0,R=1,k=2,B=3;t.cloneTimingInput=e,t.makeTiming=r,t.numericTimingToObject=o,t.normalizeTimingInput=s,t.calculateActiveDuration=u,t.calculateIterationProgress=g,t.calculatePhase=f,t.normalizeEasing=h,t.parseEasingFunction=c}(c,f),function(t){function e(t,e){return t in h?h[t][e]||e:e}function i(t){return"display"===t||0===t.lastIndexOf("animation",0)||0===t.lastIndexOf("transition",0)}function n(t,n,r){if(!i(t)){var o=s[t];if(o){a.style[t]=n;for(var l in o){var h=o[l],c=a.style[h];r[h]=e(h,c)}}else r[t]=e(t,n)}}function r(t){var e=[];for(var i in t)if(!(i in["easing","offset","composite"])){var n=t[i];Array.isArray(n)||(n=[n]);for(var r,o=n.length,s=0;o>s;s++)r={},"offset"in t?r.offset=t.offset:1==o?r.offset=1:r.offset=s/(o-1),"easing"in t&&(r.easing=t.easing),"composite"in t&&(r.composite=t.composite),r[i]=n[s],e.push(r)}return e.sort(function(t,e){return t.offset-e.offset}),e}function o(e){function i(){var t=o.length;null==o[t-1].offset&&(o[t-1].offset=1),t>1&&null==o[0].offset&&(o[0].offset=0);for(var e=0,i=o[0].offset,n=1;t>n;n++){var r=o[n].offset;if(null!=r){for(var s=1;n-e>s;s++)o[e+s].offset=i+(r-i)*s/(n-e);e=n,i=r}}}if(null==e)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||(e=r(e));for(var o=e.map(function(e){var i={};for(var r in e){var o=e[r];if("offset"==r){if(null!=o){if(o=+o,!isFinite(o))throw new TypeError("Keyframe offsets must be numbers.");if(0>o||o>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==r){if("add"==o||"accumulate"==o)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=o)throw new TypeError("Invalid composite mode "+o+".")}else o="easing"==r?t.normalizeEasing(o):""+o;n(r,o,i)}return void 0==i.offset&&(i.offset=null),void 0==i.easing&&(i.easing="linear"),i}),s=!0,a=-(1/0),l=0;l<o.length;l++){var h=o[l].offset;if(null!=h){if(a>h)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");a=h}else s=!1}return o=o.filter(function(t){return t.offset>=0&&t.offset<=1}),s||i(),o}var s={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},a=document.createElementNS("http://www.w3.org/1999/xhtml","div"),l={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:l,borderLeftWidth:l,borderRightWidth:l,borderTopWidth:l,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:l,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};t.convertToArrayForm=r,t.normalizeKeyframes=o}(c,f),function(t){var e={};t.isDeprecated=function(t,i,n,r){var o=new Date,s=new Date(i);return s.setMonth(s.getMonth()+3),!(s>o&&(e[t]=!0,1))},t.deprecated=function(e,i,n,r){var o=r?"are":"is";if(t.isDeprecated(e,i,n,r))throw Error(e+" "+o+" no longer supported. "+n)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(t){void 0===a[t]&&(b=!0)})),!b)return}!function(t,e){function i(t){for(var e={},i=0;i<t.length;i++)for(var n in t[i])if("offset"!=n&&"easing"!=n&&"composite"!=n){var r={offset:t[i].offset,easing:t[i].easing,value:t[i][n]};e[n]=e[n]||[],e[n].push(r)}for(var o in e){var s=e[o];if(0!=s[0].offset||1!=s[s.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return e}function n(i){var n=[];for(var r in i)for(var o=i[r],s=0;s<o.length-1;s++){var a=s,l=s+1,h=o[a].offset,c=o[l].offset,u=h,d=c;0==s&&(u=-(1/0),0==c&&(l=a)),s==o.length-2&&(d=1/0,1==h&&(a=l)),n.push({applyFrom:u,applyTo:d,startOffset:o[a].offset,endOffset:o[l].offset,easingFunction:t.parseEasingFunction(o[a].easing),property:r,interpolation:e.propertyInterpolation(r,o[a].value,o[l].value)})}return n.sort(function(t,e){return t.startOffset-e.startOffset}),n}e.convertEffectInput=function(r){var o=t.normalizeKeyframes(r),s=i(o),a=n(s);
  return function(t,i){if(null!=i)a.filter(function(t){return i>=t.applyFrom&&i<t.applyTo}).forEach(function(n){var r=i-n.startOffset,o=n.endOffset-n.startOffset,s=0==o?0:n.easingFunction(r/o);e.apply(t,n.property,n.interpolation(s))});else for(var n in s)"offset"!=n&&"easing"!=n&&"composite"!=n&&e.clear(t,n)}}}(c,d,f),function(t,e){function i(t){return t.replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function n(t,e,i){s[i]=s[i]||[],s[i].push([t,e])}function r(t,e,r){for(var o=0;o<r.length;o++)n(t,e,i(r[o]))}function o(n,r,o){var l=n;/-/.test(n)&&!t.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(l=i(n)),"initial"!=r&&"initial"!=o||("initial"==r&&(r=a[l]),"initial"==o&&(o=a[l]));for(var h=r==o?[]:s[l],c=0;h&&c<h.length;c++){var u=h[c][0](r),d=h[c][0](o);if(void 0!==u&&void 0!==d){var f=h[c][1](u,d);if(f){var p=e.Interpolation.apply(null,f);return function(t){return 0==t?r:1==t?o:p(t)}}}}return e.Interpolation(!1,!0,function(t){return t?o:r})}var s={};e.addPropertiesHandler=r;var a={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};e.propertyInterpolation=o}(c,d,f),function(t,e){function i(e){var i=t.calculateActiveDuration(e),n=function(n){return t.calculateIterationProgress(i,n,e)};return n._totalDuration=e.delay+i+e.endDelay,n}e.KeyframeEffect=function(n,r,o,s){var a,l=i(t.normalizeTimingInput(o)),h=e.convertEffectInput(r),c=function(){h(n,a)};return c._update=function(t){return a=l(t),null!==a},c._clear=function(){h(n,null)},c._hasSameTarget=function(t){return n===t},c._target=n,c._totalDuration=l._totalDuration,c._id=s,c},e.NullEffect=function(t){var e=function(){t&&(t(),t=null)};return e._update=function(){return null},e._totalDuration=0,e._hasSameTarget=function(){return!1},e}}(c,d,f),function(t){t.apply=function(e,i,n){e.style[t.propertyName(i)]=n},t.clear=function(e,i){e.style[t.propertyName(i)]=""}}(d,f),function(t){window.Element.prototype.animate=function(e,i){var n="";return i&&i.id&&(n=i.id),t.timeline._play(t.KeyframeEffect(this,e,i,n))}}(d),function(t){function e(t,i,n){if("number"==typeof t&&"number"==typeof i)return t*(1-n)+i*n;if("boolean"==typeof t&&"boolean"==typeof i)return.5>n?t:i;if(t.length==i.length){for(var r=[],o=0;o<t.length;o++)r.push(e(t[o],i[o],n));return r}throw"Mismatched interpolation arguments "+t+":"+i}t.Interpolation=function(t,i,n){return function(r){return n(e(t,i,r))}}}(d,f),function(t,e){t.sequenceNumber=0;var i=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};e.Animation=function(e){this.id="",e&&e._id&&(this.id=e._id),this._sequenceNumber=t.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=e,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},e.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,e.timeline._animations.push(this))},_tickCurrentTime:function(t,e){t!=this._currentTime&&(this._currentTime=t,this._isFinished&&!e&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(t){t=+t,isNaN(t)||(e.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-t/this._playbackRate),this._currentTimePending=!1,this._currentTime!=t&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(t,!0),e.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(t){t=+t,isNaN(t)||this._paused||this._idle||(this._startTime=t,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),e.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(t){if(t!=this._playbackRate){var i=this.currentTime;this._playbackRate=t,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)),null!=i&&(this.currentTime=i)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate<0){if(this._totalDuration>=1/0)throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}else this._currentTime=0},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),e.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,e.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._isFinished=!0,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),e.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(t,e){"function"==typeof e&&"finish"==t&&this._finishHandlers.push(e)},removeEventListener:function(t,e){if("finish"==t){var i=this._finishHandlers.indexOf(e);i>=0&&this._finishHandlers.splice(i,1)}},_fireEvents:function(t){if(this._isFinished){if(!this._finishedFlag){var e=new i(this,this._currentTime,t),n=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){n.forEach(function(t){t.call(e.target,e)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(t,e){this._idle||this._paused||(null==this._startTime?e&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((t-this._startTime)*this.playbackRate)),e&&(this._currentTimePending=!1,this._fireEvents(t))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var t=this._effect._target;return t._activeAnimations||(t._activeAnimations=[]),t._activeAnimations},_markTarget:function(){var t=this._targetAnimations();t.indexOf(this)===-1&&t.push(this)},_unmarkTarget:function(){var t=this._targetAnimations(),e=t.indexOf(this);e!==-1&&t.splice(e,1)}}}(c,d,f),function(t,e){function i(t){var e=l;l=[],t<m.currentTime&&(t=m.currentTime),m._animations.sort(n),m._animations=s(t,!0,m._animations)[0],e.forEach(function(e){e[1](t)}),o(),c=void 0}function n(t,e){return t._sequenceNumber-e._sequenceNumber}function r(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function o(){f.forEach(function(t){t()}),f.length=0}function s(t,i,n){p=!0,d=!1,e.timeline.currentTime=t,u=!1;var r=[],o=[],s=[],a=[];return n.forEach(function(e){e._tick(t,i),e._inEffect?(o.push(e._effect),e._markTarget()):(r.push(e._effect),e._unmarkTarget()),e._needsTick&&(u=!0);var n=e._inEffect||e._needsTick;e._inTimeline=n,n?s.push(e):a.push(e)}),f.push.apply(f,r),f.push.apply(f,o),u&&requestAnimationFrame(function(){}),p=!1,[s,a]}var a=window.requestAnimationFrame,l=[],h=0;window.requestAnimationFrame=function(t){var e=h++;return 0==l.length&&a(i),l.push([e,t]),e},window.cancelAnimationFrame=function(t){l.forEach(function(e){e[0]==t&&(e[1]=function(){})})},r.prototype={_play:function(i){i._timing=t.normalizeTimingInput(i.timing);var n=new e.Animation(i);return n._idle=!1,n._timeline=this,this._animations.push(n),e.restart(),e.applyDirtiedAnimation(n),n}};var c=void 0,u=!1,d=!1;e.restart=function(){return u||(u=!0,requestAnimationFrame(function(){}),d=!0),d},e.applyDirtiedAnimation=function(t){if(!p){t._markTarget();var i=t._targetAnimations();i.sort(n),s(e.timeline.currentTime,!1,i.slice())[1].forEach(function(t){var e=m._animations.indexOf(t);e!==-1&&m._animations.splice(e,1)}),o()}};var f=[],p=!1,m=new r;e.timeline=m}(c,d,f),function(t){function e(t,e){var i=t.exec(e);if(i)return i=t.ignoreCase?i[0].toLowerCase():i[0],[i,e.substr(i.length)]}function i(t,e){e=e.replace(/^\s*/,"");var i=t(e);if(i)return[i[0],i[1].replace(/^\s*/,"")]}function n(t,n,r){t=i.bind(null,t);for(var o=[];;){var s=t(r);if(!s)return[o,r];if(o.push(s[0]),r=s[1],s=e(n,r),!s||""==s[1])return[o,r];r=s[1]}}function r(t,e){for(var i=0,n=0;n<e.length&&(!/\s|,/.test(e[n])||0!=i);n++)if("("==e[n])i++;else if(")"==e[n]&&(i--,0==i&&n++,0>=i))break;var r=t(e.substr(0,n));return void 0==r?void 0:[r,e.substr(n)]}function o(t,e){for(var i=t,n=e;i&&n;)i>n?i%=n:n%=i;return i=t*e/(i+n)}function s(t){return function(e){var i=t(e);return i&&(i[0]=void 0),i}}function a(t,e){return function(i){var n=t(i);return n?n:[e,i]}}function l(e,i){for(var n=[],r=0;r<e.length;r++){var o=t.consumeTrimmed(e[r],i);if(!o||""==o[0])return;void 0!==o[0]&&n.push(o[0]),i=o[1]}if(""==i)return n}function h(t,e,i,n,r){for(var s=[],a=[],l=[],h=o(n.length,r.length),c=0;h>c;c++){var u=e(n[c%n.length],r[c%r.length]);if(!u)return;s.push(u[0]),a.push(u[1]),l.push(u[2])}return[s,a,function(e){var n=e.map(function(t,e){return l[e](t)}).join(i);return t?t(n):n}]}function c(t,e,i){for(var n=[],r=[],o=[],s=0,a=0;a<i.length;a++)if("function"==typeof i[a]){var l=i[a](t[s],e[s++]);n.push(l[0]),r.push(l[1]),o.push(l[2])}else!function(t){n.push(!1),r.push(!1),o.push(function(){return i[t]})}(a);return[n,r,function(t){for(var e="",i=0;i<t.length;i++)e+=o[i](t[i]);return e}]}t.consumeToken=e,t.consumeTrimmed=i,t.consumeRepeated=n,t.consumeParenthesised=r,t.ignore=s,t.optional=a,t.consumeList=l,t.mergeNestedRepeated=h.bind(null,null),t.mergeWrappedNestedRepeated=h,t.mergeList=c}(d),function(t){function e(e){function i(e){var i=t.consumeToken(/^inset/i,e);if(i)return n.inset=!0,i;var i=t.consumeLengthOrPercent(e);if(i)return n.lengths.push(i[0]),i;var i=t.consumeColor(e);return i?(n.color=i[0],i):void 0}var n={inset:!1,lengths:[],color:null},r=t.consumeRepeated(i,/^/,e);if(r&&r[0].length)return[n,r[1]]}function i(i){var n=t.consumeRepeated(e,/^,/,i);if(n&&""==n[1])return n[0]}function n(e,i){for(;e.lengths.length<Math.max(e.lengths.length,i.lengths.length);)e.lengths.push({px:0});for(;i.lengths.length<Math.max(e.lengths.length,i.lengths.length);)i.lengths.push({px:0});if(e.inset==i.inset&&!!e.color==!!i.color){for(var n,r=[],o=[[],0],s=[[],0],a=0;a<e.lengths.length;a++){var l=t.mergeDimensions(e.lengths[a],i.lengths[a],2==a);o[0].push(l[0]),s[0].push(l[1]),r.push(l[2])}if(e.color&&i.color){var h=t.mergeColors(e.color,i.color);o[1]=h[0],s[1]=h[1],n=h[2]}return[o,s,function(t){for(var i=e.inset?"inset ":" ",o=0;o<r.length;o++)i+=r[o](t[0][o])+" ";return n&&(i+=n(t[1])),i}]}}function r(e,i,n,r){function o(t){return{inset:t,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var s=[],a=[],l=0;l<n.length||l<r.length;l++){var h=n[l]||o(r[l].inset),c=r[l]||o(n[l].inset);s.push(h),a.push(c)}return t.mergeNestedRepeated(e,i,s,a)}var o=r.bind(null,n,", ");t.addPropertiesHandler(i,o,["box-shadow","text-shadow"])}(d),function(t){function e(t){return t.toFixed(3).replace(".000","")}function i(t,e,i){return Math.min(e,Math.max(t,i))}function n(t){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t))return+t}function r(t,i){return[t,i,e]}function o(t,e){if(0!=t)return a(0,1/0)(t,e)}function s(t,e){return[t,e,function(t){return Math.round(i(1,1/0,t))}]}function a(t,n){return function(r,o){return[r,o,function(r){return e(i(t,n,r))}]}}function l(t,e){return[t,e,Math.round]}t.clamp=i,t.addPropertiesHandler(n,a(0,1/0),["border-image-width","line-height"]),t.addPropertiesHandler(n,a(0,1),["opacity","shape-image-threshold"]),t.addPropertiesHandler(n,o,["flex-grow","flex-shrink"]),t.addPropertiesHandler(n,s,["orphans","widows"]),t.addPropertiesHandler(n,l,["z-index"]),t.parseNumber=n,t.mergeNumbers=r,t.numberToString=e}(d,f),function(t){function e(t,e){if("visible"==t||"visible"==e)return[0,1,function(i){return i>0?1>i?"visible":e:t}]}t.addPropertiesHandler(String,e,["visibility"])}(d),function(t){function e(t){t=t.trim(),r.fillStyle="#000",r.fillStyle=t;var e=r.fillStyle;if(r.fillStyle="#fff",r.fillStyle=t,e==r.fillStyle){r.fillRect(0,0,1,1);var i=r.getImageData(0,0,1,1).data;r.clearRect(0,0,1,1);var n=i[3]/255;return[i[0]*n,i[1]*n,i[2]*n,n]}}function i(e,i){return[e,i,function(e){function i(t){return Math.max(0,Math.min(255,t))}if(e[3])for(var n=0;3>n;n++)e[n]=Math.round(i(e[n]/e[3]));return e[3]=t.numberToString(t.clamp(0,1,e[3])),"rgba("+e.join(",")+")"}]}var n=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");n.width=n.height=1;var r=n.getContext("2d");t.addPropertiesHandler(e,i,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),t.consumeColor=t.consumeParenthesised.bind(null,e),t.mergeColors=i}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(t){return c[t]=null,"U"+t});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g<f.length;)f[g].test(e)?(e=e.replace(f[g],"$1"),g=0):g++;if("D"==e){for(var h in c){var i=eval(b.replace(RegExp("U"+h,"g"),"").replace(RegExp(d,"g"),"*0"));if(!isFinite(i))return;c[h]=i}return c}}}function d(t,i){return e(t,i,!0)}function e(t,e,i){var n,r=[];for(n in t)r.push(n);for(n in e)r.indexOf(n)<0&&r.push(n);return t=r.map(function(e){return t[e]||0}),e=r.map(function(t){return e[t]||0}),[t,e,function(t){var e=t.map(function(e,n){return 1==t.length&&i&&(e=Math.max(e,0)),a.numberToString(e)+r[n]}).join(" + ");return t.length>1?"calc("+e+")":e}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,RegExp(f,"g")),h=c.bind(null,RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(t){var e=l(t);if(e&&""==e[1])return e[0]},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(t){function e(e){return t.consumeLengthOrPercent(e)||t.consumeToken(/^auto/,e)}function i(i){var n=t.consumeList([t.ignore(t.consumeToken.bind(null,/^rect/)),t.ignore(t.consumeToken.bind(null,/^\(/)),t.consumeRepeated.bind(null,e,/^,/),t.ignore(t.consumeToken.bind(null,/^\)/))],i);if(n&&4==n[0].length)return n[0]}function n(e,i){return"auto"==e||"auto"==i?[!0,!1,function(n){var r=n?e:i;if("auto"==r)return"auto";var o=t.mergeDimensions(r,r);return o[2](o[0])}]:t.mergeDimensions(e,i)}function r(t){return"rect("+t+")"}var o=t.mergeWrappedNestedRepeated.bind(null,r,n,", ");t.parseBox=i,t.mergeBoxes=o,t.addPropertiesHandler(i,o,["clip"])}(d,f),function(t){function e(t){return function(e){var i=0;return t.map(function(t){return t===h?e[i++]:t})}}function i(t){return t}function n(e){if(e=e.toLowerCase().trim(),"none"==e)return[];for(var i,n=/\s*(\w+)\(([^)]*)\)/g,r=[],o=0;i=n.exec(e);){if(i.index!=o)return;o=i.index+i[0].length;var s=i[1],a=d[s];if(!a)return;var l=i[2].split(","),h=a[0];if(h.length<l.length)return;for(var f=[],p=0;p<h.length;p++){var m,_=l[p],y=h[p];if(m=_?{A:function(e){return"0"==e.trim()?u:t.parseAngle(e)},N:t.parseNumber,T:t.parseLengthOrPercent,L:t.parseLength}[y.toUpperCase()](_):{a:u,n:f[0],t:c}[y],void 0===m)return;f.push(m)}if(r.push({t:s,d:f}),n.lastIndex==e.length)return r}}function r(t){return t.toFixed(6).replace(".000000","")}function o(e,i){if(e.decompositionPair!==i){e.decompositionPair=i;var n=t.makeMatrixDecomposition(e)}if(i.decompositionPair!==e){i.decompositionPair=e;var o=t.makeMatrixDecomposition(i)}return null==n[0]||null==o[0]?[[!1],[!0],function(t){return t?i[0].d:e[0].d}]:(n[0].push(0),o[0].push(1),[n,o,function(e){var i=t.quat(n[0][3],o[0][3],e[5]);return t.composeMatrix(e[0],e[1],e[2],i,e[4]).map(r).join(",")}])}function s(t){return t.replace(/[xy]/,"")}function a(t){return t.replace(/(x|y|z|3d)?$/,"3d")}function l(e,i){var n=t.makeMatrixDecomposition&&!0,r=!1;if(!e.length||!i.length){e.length||(r=!0,e=i,i=[]);for(var l=0;l<e.length;l++){var h=e[l].t,c=e[l].d,u="scale"==h.substr(0,5)?1:0;i.push({t:h,d:c.map(function(t){if("number"==typeof t)return u;var e={};for(var i in t)e[i]=u;return e})})}}var f=function(t,e){return"perspective"==t&&"perspective"==e||("matrix"==t||"matrix3d"==t)&&("matrix"==e||"matrix3d"==e)},p=[],m=[],_=[];if(e.length!=i.length){if(!n)return;var y=o(e,i);p=[y[0]],m=[y[1]],_=[["matrix",[y[2]]]]}else for(var l=0;l<e.length;l++){var h,v=e[l].t,g=i[l].t,b=e[l].d,P=i[l].d,w=d[v],C=d[g];if(f(v,g)){if(!n)return;var y=o([e[l]],[i[l]]);p.push(y[0]),m.push(y[1]),_.push(["matrix",[y[2]]])}else{if(v==g)h=v;else if(w[2]&&C[2]&&s(v)==s(g))h=s(v),b=w[2](b),P=C[2](P);else{if(!w[1]||!C[1]||a(v)!=a(g)){if(!n)return;var y=o(e,i);p=[y[0]],m=[y[1]],_=[["matrix",[y[2]]]];break}h=a(v),b=w[1](b),P=C[1](P)}for(var S=[],E=[],T=[],x=0;x<b.length;x++){var A="number"==typeof b[x]?t.mergeNumbers:t.mergeDimensions,y=A(b[x],P[x]);S[x]=y[0],E[x]=y[1],T.push(y[2])}p.push(S),m.push(E),_.push([h,T])}}if(r){var I=p;p=m,m=I}return[p,m,function(t){return t.map(function(t,e){var i=t.map(function(t,i){return _[e][1][i](t)}).join(",");return"matrix"==_[e][0]&&16==i.split(",").length&&(_[e][0]="matrix3d"),_[e][0]+"("+i+")"}).join(" ")}]}var h=null,c={px:0},u={deg:0},d={matrix:["NNNNNN",[h,h,0,0,h,h,0,0,0,0,1,0,h,h,0,1],i],matrix3d:["NNNNNNNNNNNNNNNN",i],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",e([h,h,1]),i],scalex:["N",e([h,1,1]),e([h,1])],scaley:["N",e([1,h,1]),e([1,h])],scalez:["N",e([1,1,h])],scale3d:["NNN",i],skew:["Aa",null,i],skewx:["A",null,e([h,u])],skewy:["A",null,e([u,h])],translate:["Tt",e([h,h,c]),i],translatex:["T",e([h,c,c]),e([h,c])],translatey:["T",e([c,h,c]),e([c,h])],translatez:["L",e([c,c,h])],translate3d:["TTL",i]};t.addPropertiesHandler(n,l,["transform"])}(d,f),function(t){function e(t,e){e.concat([t]).forEach(function(e){e in document.documentElement.style&&(i[t]=e)})}var i={};e("transform",["webkitTransform","msTransform"]),e("transformOrigin",["webkitTransformOrigin"]),e("perspective",["webkitPerspective"]),e("perspectiveOrigin",["webkitPerspectiveOrigin"]),t.propertyName=function(t){return i[t]||t}}(d,f)}(),!function(){if(void 0===document.createElement("div").animate([]).oncancel){var t;if(window.performance&&performance.now)var t=function(){return performance.now()};else var t=function(){return Date.now()};var e=function(t,e,i){this.target=t,this.currentTime=e,this.timelineTime=i,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=t,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},i=window.Element.prototype.animate;window.Element.prototype.animate=function(n,r){var o=i.call(this,n,r);o._cancelHandlers=[],o.oncancel=null;var s=o.cancel;o.cancel=function(){s.call(this);var i=new e(this,null,t()),n=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){n.forEach(function(t){t.call(i.target,i)})},0)};var a=o.addEventListener;o.addEventListener=function(t,e){"function"==typeof e&&"cancel"==t?this._cancelHandlers.push(e):a.call(this,t,e)};var l=o.removeEventListener;return o.removeEventListener=function(t,e){if("cancel"==t){var i=this._cancelHandlers.indexOf(e);i>=0&&this._cancelHandlers.splice(i,1)}else l.call(this,t,e)},o}}}(),function(t){var e=document.documentElement,i=null,n=!1;try{var r=getComputedStyle(e).getPropertyValue("opacity"),o="0"==r?"1":"0";i=e.animate({opacity:[o,o]},{duration:1}),i.currentTime=0,n=getComputedStyle(e).getPropertyValue("opacity")==o}catch(t){}finally{i&&i.cancel()}if(!n){var s=window.Element.prototype.animate;window.Element.prototype.animate=function(e,i){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&e[Symbol.iterator]&&(e=Array.from(e)),Array.isArray(e)||null===e||(e=t.convertToArrayForm(e)),s.call(this,e,i)}}}(c),!function(t,e){function i(t){var n=e.timeline;n.currentTime=t,n._discardAnimations(),0==n._animations.length?r=!1:requestAnimationFrame(i)}var n=window.requestAnimationFrame;window.requestAnimationFrame=function(t){return n(function(i){e.timeline._updateAnimationsPromises(),t(i),e.timeline._updateAnimationsPromises()})},e.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},e.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){e.animationsWithPromises=e.animationsWithPromises.filter(function(t){return t._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(t){return"finished"!=t.playState&&"idle"!=t.playState})},_play:function(t){var i=new e.Animation(t,this);return this._animations.push(i),e.restartWebAnimationsNextTick(),i._updatePromises(),i._animation.play(),i._updatePromises(),i},play:function(t){return t&&t.remove(),this._play(t)}};var r=!1;e.restartWebAnimationsNextTick=function(){r||(r=!0,requestAnimationFrame(i))};var o=new e.AnimationTimeline;e.timeline=o;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return o}})}catch(t){}try{window.document.timeline=o}catch(t){}}(c,e,f),function(t,e){e.animationsWithPromises=[],e.Animation=function(e,i){if(this.id="",e&&e._id&&(this.id=e._id),this.effect=e,e&&(e._animation=this),!i)throw Error("Animation with null timeline is not supported");this._timeline=i,this._sequenceNumber=t.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},e.Animation.prototype={_updatePromises:function(){var t=this._oldPlayState,e=this.playState;return this._readyPromise&&e!==t&&("idle"==e?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==t?this._resolveReadyPromise():"pending"==e&&(this._readyPromise=void 0)),this._finishedPromise&&e!==t&&("idle"==e?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==e?this._resolveFinishedPromise():"finished"==t&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var t,i,n,r,o=!!this._animation;o&&(t=this.playbackRate,i=this._paused,n=this.startTime,r=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=e.newUnderlyingAnimationForKeyframeEffect(this.effect),e.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=e.newUnderlyingAnimationForGroup(this.effect),e.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&e.bindAnimationForCustomEffect(this),o&&(1!=t&&(this.playbackRate=t),null!==n?this.startTime=n:null!==r?this.currentTime=r:null!==this._holdTime&&(this.currentTime=this._holdTime),i&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var t=this.effect._timing.delay;this._childAnimations.forEach(function(i){this._arrangeChildren(i,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i.effect))}.bind(this))}},_setExternalAnimation:function(t){if(this.effect&&this._isGroup)for(var e=0;e<this.effect.children.length;e++)this.effect.children[e]._animation=t,this._childAnimations[e]._setExternalAnimation(t)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var t=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(i){var n=e.timeline._play(i);this._childAnimations.push(n),n.playbackRate=this.playbackRate,this._paused&&n.pause(),i._animation=this.effect._animation,this._arrangeChildren(n,t),this.effect instanceof window.SequenceEffect&&(t+=e.groupChildDuration(i))}.bind(this))}},_arrangeChildren:function(t,e){null===this.startTime?t.currentTime=this.currentTime-e/this.playbackRate:t.startTime!==this.startTime+e/this.playbackRate&&(t.startTime=this.startTime+e/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(e.animationsWithPromises.indexOf(this)==-1&&e.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(t,e){this._resolveFinishedPromise=function(){t(this)},this._rejectFinishedPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):null},get ready(){return window.Promise?(this._readyPromise||(e.animationsWithPromises.indexOf(this)==-1&&e.animationsWithPromises.push(this),this._readyPromise=new Promise(function(t,e){this._resolveReadyPromise=function(){t(this)},this._rejectReadyPromise=function(){e({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):null},get onfinish(){return this._animation.onfinish},set onfinish(t){"function"==typeof t?this._animation.onfinish=function(e){e.target=this,t.call(this,e)}.bind(this):this._animation.onfinish=t},get oncancel(){return this._animation.oncancel},set oncancel(t){"function"==typeof t?this._animation.oncancel=function(e){e.target=this,t.call(this,e)}.bind(this):this._animation.oncancel=t},get currentTime(){this._updatePromises();var t=this._animation.currentTime;return this._updatePromises(),t},set currentTime(t){this._updatePromises(),this._animation.currentTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.currentTime=t-i}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(t){this._updatePromises(),this._animation.startTime=isFinite(t)?t:Math.sign(t)*Number.MAX_VALUE,this._register(),this._forEachChild(function(e,i){e.startTime=t+i}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(t){this._updatePromises();var e=this.currentTime;this._animation.playbackRate=t,this._forEachChild(function(e){e.playbackRate=t}),null!==e&&(this.currentTime=e),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),this._timeline._animations.indexOf(this)==-1&&this._timeline._animations.push(this),this._register(),e.awaitStartTime(this),this._forEachChild(function(t){var e=t.currentTime;t.play(),t.currentTime=e}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(t){t.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var t=this.currentTime;this._animation.reverse(),this._forEachChild(function(t){t.reverse()}),null!==t&&(this.currentTime=t),this._updatePromises()},addEventListener:function(t,e){var i=e;"function"==typeof e&&(i=function(t){t.target=this,e.call(this,t)}.bind(this),e._wrapper=i),this._animation.addEventListener(t,i)},removeEventListener:function(t,e){this._animation.removeEventListener(t,e&&e._wrapper||e)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(e){var i=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(t){e.call(this,t,i),this.effect instanceof window.SequenceEffect&&(i+=t.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var n=this.effect._timing,r=this.currentTime;null!==r&&(r=t.calculateIterationProgress(t.calculateActiveDuration(n),r,n)),(null==r||isNaN(r))&&this._removeChildAnimations()}}},window.Animation=e.Animation}(c,e,f),function(t,e){function i(e){this._frames=t.normalizeKeyframes(e)}function n(){for(var t=!1;a.length;)a.shift()._updateChildren(),t=!0;return t}var r=function(t){if(t._animation=void 0,t instanceof window.SequenceEffect||t instanceof window.GroupEffect)for(var e=0;e<t.children.length;e++)r(t.children[e])};e.removeMulti=function(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];n._parent?(e.indexOf(n._parent)==-1&&e.push(n._parent),n._parent.children.splice(n._parent.children.indexOf(n),1),n._parent=null,r(n)):n._animation&&n._animation.effect==n&&(n._animation.cancel(),n._animation.effect=new KeyframeEffect(null,[]),n._animation._callback&&(n._animation._callback._animation=null),n._animation._rebuildUnderlyingAnimation(),r(n))}for(i=0;i<e.length;i++)e[i]._rebuild()},e.KeyframeEffect=function(e,n,r,o){return this.target=e,this._parent=null,r=t.numericTimingToObject(r),this._timingInput=t.cloneTimingInput(r),
  this._timing=t.normalizeTimingInput(r),this.timing=t.makeTiming(r,!1,this),this.timing._effect=this,"function"==typeof n?(t.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=n):this._normalizedKeyframes=new i(n),this._keyframes=n,this.activeDuration=t.calculateActiveDuration(this._timing),this._id=o,this},e.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(t){if("function"==typeof this.getFrames())throw Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=t,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw Error("Cloning custom effects is not supported.");var e=new KeyframeEffect(this.target,[],t.cloneTimingInput(this._timingInput),this._id);return e._normalizedKeyframes=this._normalizedKeyframes,e._keyframes=this._keyframes,e},remove:function(){e.removeMulti([this])}};var o=Element.prototype.animate;Element.prototype.animate=function(t,i){var n="";return i&&i.id&&(n=i.id),e.timeline._play(new e.KeyframeEffect(this,t,i,n))};var s=document.createElementNS("http://www.w3.org/1999/xhtml","div");e.newUnderlyingAnimationForKeyframeEffect=function(t){if(t){var e=t.target||s,i=t._keyframes;"function"==typeof i&&(i=[]);var n=t._timingInput;n.id=t._id}else var e=s,i=[],n=0;return o.apply(e,[i,n])},e.bindAnimationForKeyframeEffect=function(t){t.effect&&"function"==typeof t.effect._normalizedKeyframes&&e.bindAnimationForCustomEffect(t)};var a=[];e.awaitStartTime=function(t){null===t.startTime&&t._isGroup&&(0==a.length&&requestAnimationFrame(n),a.push(t))};var l=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){e.timeline._updateAnimationsPromises();var t=l.apply(this,arguments);return n()&&(t=l.apply(this,arguments)),e.timeline._updateAnimationsPromises(),t}}),window.KeyframeEffect=e.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(t){return null!==t.effect&&t.effect.target==this}.bind(this))}}(c,e,f),function(t,e){function i(t){t._registered||(t._registered=!0,o.push(t),s||(s=!0,requestAnimationFrame(n)))}function n(){var t=o;o=[],t.sort(function(t,e){return t._sequenceNumber-e._sequenceNumber}),t=t.filter(function(t){t();var e=t._animation?t._animation.playState:"idle";return"running"!=e&&"pending"!=e&&(t._registered=!1),t._registered}),o.push.apply(o,t),o.length?(s=!0,requestAnimationFrame(n)):s=!1}var r=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);e.bindAnimationForCustomEffect=function(e){var n,o=e.effect.target,s="function"==typeof e.effect.getFrames();n=s?e.effect.getFrames():e.effect._onsample;var a=e.effect.timing,l=null;a=t.normalizeTimingInput(a);var h=function(){var i=h._animation?h._animation.currentTime:null;null!==i&&(i=t.calculateIterationProgress(t.calculateActiveDuration(a),i,a),isNaN(i)&&(i=null)),i!==l&&(s?n(i,o,e.effect):n(i,e.effect,e.effect._animation)),l=i};h._animation=e,h._registered=!1,h._sequenceNumber=r++,e._callback=h,i(h)};var o=[],s=!1;e.Animation.prototype._register=function(){this._callback&&i(this._callback)}}(c,e,f),function(t,e){function i(t){return t._timing.delay+t.activeDuration+t._timing.endDelay}function n(e,i,n){this._id=n,this._parent=null,this.children=e||[],this._reparent(this.children),i=t.numericTimingToObject(i),this._timingInput=t.cloneTimingInput(i),this._timing=t.normalizeTimingInput(i,!0),this.timing=t.makeTiming(i,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){n.apply(this,arguments)},window.GroupEffect=function(){n.apply(this,arguments)},n.prototype={_isAncestor:function(t){for(var e=this;null!==e;){if(e==t)return!0;e=e._parent}return!1},_rebuild:function(){for(var t=this;t;)"auto"===t.timing.duration&&(t._timing.duration=t.activeDuration),t=t._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(t){e.removeMulti(t);for(var i=0;i<t.length;i++)t[i]._parent=this},_putChild:function(t,e){for(var i=e?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",n=0;n<t.length;n++)if(this._isAncestor(t[n]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:i};for(var n=0;n<t.length;n++)e?this.children.push(t[n]):this.children.unshift(t[n]);this._reparent(t),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var e=t.cloneTimingInput(this._timingInput),i=[],n=0;n<this.children.length;n++)i.push(this.children[n].clone());return this instanceof GroupEffect?new GroupEffect(i,e):new SequenceEffect(i,e)},remove:function(){e.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(n.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t+=i(e)}),Math.max(t,0)}}),window.GroupEffect.prototype=Object.create(n.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var t=0;return this.children.forEach(function(e){t=Math.max(t,i(e))}),t}}),e.newUnderlyingAnimationForGroup=function(i){var n,r=null,o=function(e){var i=n._wrapper;if(i&&"pending"!=i.playState&&i.effect)return null==e?void i._removeChildAnimations():0==e&&i.playbackRate<0&&(r||(r=t.normalizeTimingInput(i.effect.timing)),e=t.calculateIterationProgress(t.calculateActiveDuration(r),-1,r),isNaN(e)||null==e)?(i._forEachChild(function(t){t.currentTime=-1}),void i._removeChildAnimations()):void 0},s=new KeyframeEffect(null,[],i._timing,i._id);return s.onsample=o,n=e.timeline._play(s)},e.bindAnimationForGroup=function(t){t._animation._wrapper=t,t._isGroup=!0,e.awaitStartTime(t),t._constructChildAnimations(),t._setExternalAnimation(t)},e.groupChildDuration=i}(c,e,f),b["true"]=a}({},function(){return this}()),Polymer({is:"cascaded-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){this._animations=[];var e=t.nodes,i=[],n=t.nodeDelay||50;t.timing=t.timing||{},t.timing.delay=t.timing.delay||0;for(var r,o,s=t.timing.delay,a=0;o=e[a];a++){t.timing.delay+=n,t.node=o;var l=document.createElement(t.animation);if(!l.isNeonAnimation){r=!0;break}var h=l.configure(t);this._animations.push(l),i.push(h)}if(t.timing.delay=s,t.node=null,!r)return this._effect=new GroupEffect(i),this._effect},complete:function(){for(var t,e=0;t=this._animations[e];e++)t.complete(t.config)}}),Polymer({is:"fade-in-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(t)),this._effect}}),Polymer({is:"fade-out-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(t)),this._effect}}),Polymer.NeonSharedElementAnimationBehaviorImpl={properties:{sharedElements:{type:Object}},findSharedElements:function(t){var e=t.fromPage,i=t.toPage;if(!e||!i)return null;if(!e.sharedElements||!i.sharedElements)return null;var n=e.sharedElements[t.id],r=i.sharedElements[t.id];return n&&r?(this.sharedElements={from:n,to:r},this.sharedElements):null}},Polymer.NeonSharedElementAnimationBehavior=[Polymer.NeonAnimationBehavior,Polymer.NeonSharedElementAnimationBehaviorImpl],Polymer({is:"hero-animation",behaviors:[Polymer.NeonSharedElementAnimationBehavior],configure:function(t){var e=this.findSharedElements(t);if(e){var i=e.from.getBoundingClientRect(),n=e.to.getBoundingClientRect(),r=i.left-n.left,o=i.top-n.top,s=i.width/n.width,a=i.height/n.height;return this._effect=new KeyframeEffect(e.to,[{transform:"translate("+r+"px,"+o+"px) scale("+s+","+a+")"},{transform:"none"}],this.timingFromConfig(t)),this.setPrefixedProperty(e.to,"transformOrigin","0 0"),e.to.style.zIndex=1e4,e.from.style.visibility="hidden",this._effect}},complete:function(t){var e=this.findSharedElements(t);return e?(e.to.style.zIndex="",void(e.from.style.visibility="")):null}}),Polymer({is:"opaque-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{opacity:"1"},{opacity:"1"}],this.timingFromConfig(t)),e.style.opacity="0",this._effect},complete:function(t){t.node.style.opacity=""}}),Polymer({is:"ripple-animation",behaviors:[Polymer.NeonSharedElementAnimationBehavior],configure:function(t){var e=this.findSharedElements(t);if(!e)return null;var i,n,r=e.to.getBoundingClientRect();if(t.gesture)i=t.gesture.x-(r.left+r.width/2),n=t.gesture.y-(r.top+r.height/2);else{var o=e.from.getBoundingClientRect();i=o.left+o.width/2-(r.left+r.width/2),n=o.top+o.height/2-(r.top+r.height/2)}var s="translate("+i+"px,"+n+"px)",a=Math.max(r.width+2*Math.abs(i),r.height+2*Math.abs(n)),l=Math.sqrt(2*a*a),h=l/r.width,c=l/r.height,u="scale("+h+","+c+")";return this._effect=new KeyframeEffect(e.to,[{transform:s+" scale(0)"},{transform:s+" "+u}],this.timingFromConfig(t)),this.setPrefixedProperty(e.to,"transformOrigin","50% 50%"),e.to.style.borderRadius="50%",this._effect},complete:function(){this.sharedElements&&(this.setPrefixedProperty(this.sharedElements.to,"transformOrigin",""),this.sharedElements.to.style.borderRadius="")}}),Polymer({is:"reverse-ripple-animation",behaviors:[Polymer.NeonSharedElementAnimationBehavior],configure:function(t){var e=this.findSharedElements(t);if(!e)return null;var i,n,r=e.from.getBoundingClientRect();if(t.gesture)i=t.gesture.x-(r.left+r.width/2),n=t.gesture.y-(r.top+r.height/2);else{var o=e.to.getBoundingClientRect();i=o.left+o.width/2-(r.left+r.width/2),n=o.top+o.height/2-(r.top+r.height/2)}var s="translate("+i+"px,"+n+"px)",a=Math.max(r.width+2*Math.abs(i),r.height+2*Math.abs(n)),l=Math.sqrt(2*a*a),h=l/r.width,c=l/r.height,u="scale("+h+","+c+")";return this._effect=new KeyframeEffect(e.from,[{transform:s+" "+u},{transform:s+" scale(0)"}],this.timingFromConfig(t)),this.setPrefixedProperty(e.from,"transformOrigin","50% 50%"),e.from.style.borderRadius="50%",this._effect},complete:function(){this.sharedElements&&(this.setPrefixedProperty(this.sharedElements.from,"transformOrigin",""),this.sharedElements.from.style.borderRadius="")}}),Polymer({is:"scale-down-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node,i="scale(0, 0)";return"x"===t.axis?i="scale(0, 1)":"y"===t.axis&&(i="scale(1, 0)"),this._effect=new KeyframeEffect(e,[{transform:"scale(1,1)"},{transform:i}],this.timingFromConfig(t)),t.transformOrigin&&this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin),this._effect}}),Polymer({is:"scale-up-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node,i="scale(0)";return"x"===t.axis?i="scale(0, 1)":"y"===t.axis&&(i="scale(1, 0)"),this._effect=new KeyframeEffect(e,[{transform:i},{transform:"scale(1, 1)"}],this.timingFromConfig(t)),t.transformOrigin&&this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin),this._effect}}),Polymer({is:"slide-from-left-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translateX(-100%)"},{transform:"none"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","0 50%"),this._effect}}),Polymer({is:"slide-from-right-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translateX(100%)"},{transform:"none"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","0 50%"),this._effect}}),Polymer({is:"slide-from-top-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translateY(-100%)"},{transform:"translateY(0%)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","50% 0"),this._effect}}),Polymer({is:"slide-from-bottom-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translateY(100%)"},{transform:"translateY(0)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","50% 0"),this._effect}}),Polymer({is:"slide-left-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"none"},{transform:"translateX(-100%)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","0 50%"),this._effect}}),Polymer({is:"slide-right-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"none"},{transform:"translateX(100%)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","0 50%"),this._effect}}),Polymer({is:"slide-up-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translate(0)"},{transform:"translateY(-100%)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","50% 0"),this._effect}}),Polymer({is:"slide-down-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node;return this._effect=new KeyframeEffect(e,[{transform:"translateY(0%)"},{transform:"translateY(100%)"}],this.timingFromConfig(t)),t.transformOrigin?this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin):this.setPrefixedProperty(e,"transformOrigin","50% 0"),this._effect}}),Polymer({is:"transform-animation",behaviors:[Polymer.NeonAnimationBehavior],configure:function(t){var e=t.node,i=t.transformFrom||"none",n=t.transformTo||"none";return this._effect=new KeyframeEffect(e,[{transform:i},{transform:n}],this.timingFromConfig(t)),t.transformOrigin&&this.setPrefixedProperty(e,"transformOrigin",t.transformOrigin),this._effect}}),Polymer.NeonAnimatableBehavior={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(t,e){for(var i in e)t[i]=e[i]},_cloneConfig:function(t){var e={isClone:!0};return this._copyProperties(e,t),e},_getAnimationConfigRecursive:function(t,e,i){if(this.animationConfig){if(this.animationConfig.value&&"function"==typeof this.animationConfig.value)return void this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));var n;if(n=t?this.animationConfig[t]:this.animationConfig,Array.isArray(n)||(n=[n]),n)for(var r,o=0;r=n[o];o++)if(r.animatable)r.animatable._getAnimationConfigRecursive(r.type||t,e,i);else if(r.id){var s=e[r.id];s?(s.isClone||(e[r.id]=this._cloneConfig(s),s=e[r.id]),this._copyProperties(s,r)):e[r.id]=r}else i.push(r)}},getAnimationConfig:function(t){var e={},i=[];this._getAnimationConfigRecursive(t,e,i);for(var n in e)i.push(e[n]);return i}},Polymer.NeonAnimationRunnerBehaviorImpl={_configureAnimations:function(t){var e=[];if(t.length>0)for(var i,n=0;i=t[n];n++){var r=document.createElement(i.name);if(r.isNeonAnimation){var o=null;try{o=r.configure(i),"function"!=typeof o.cancel&&(o=document.timeline.play(o))}catch(s){o=null}o&&e.push({neonAnimation:r,config:i,animation:o})}}return e},_shouldComplete:function(t){for(var e=!0,i=0;i<t.length;i++)if("finished"!=t[i].animation.playState){e=!1;break}return e},_complete:function(t){for(var e=0;e<t.length;e++)t[e].neonAnimation.complete(t[e].config);for(var e=0;e<t.length;e++)t[e].animation.cancel()},playAnimation:function(t,e){var i=this.getAnimationConfig(t);if(i){this._active=this._active||{},this._active[t]&&(this._complete(this._active[t]),delete this._active[t]);var n=this._configureAnimations(i);if(0==n.length)return void this.fire("neon-animation-finish",e,{bubbles:!1});this._active[t]=n;for(var r=0;r<n.length;r++)n[r].animation.onfinish=function(){this._shouldComplete(n)&&(this._complete(n),delete this._active[t],this.fire("neon-animation-finish",e,{bubbles:!1}))}.bind(this)}},cancelAnimation:function(){for(var t in this._animations)this._animations[t].cancel();this._animations={}}},Polymer.NeonAnimationRunnerBehavior=[Polymer.NeonAnimatableBehavior,Polymer.NeonAnimationRunnerBehaviorImpl],Polymer({is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Polymer.Base.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(t){var e=(t||"").split(":");this._iconName=e.pop(),this._iconsetName=e.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&Polymer.dom(this.root).removeChild(this._img),""===this._iconName?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,Polymer.dom(this.root).appendChild(this._img))}}),Polymer({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1}},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(t){return this.name+":"+t},this)},applyIcon:function(t,e){t=t.root||t,this.removeIcon(t);var i=this._cloneIcon(e,this.rtlMirroring&&this._targetIsRTL(t));if(i){var n=Polymer.dom(t);return n.insertBefore(i,n.childNodes[0]),t._svgIcon=i}return null},removeIcon:function(t){t=t.root||t,t._svgIcon&&(Polymer.dom(t).removeChild(t._svgIcon),t._svgIcon=null)},_targetIsRTL:function(t){return null==this.__targetIsRTL&&(t&&t.nodeType!==Node.ELEMENT_NODE&&(t=t.host),this.__targetIsRTL=t&&"rtl"===window.getComputedStyle(t).direction),this.__targetIsRTL},_nameChanged:function(){new Polymer.IronMeta({type:"iconset",key:this.name,value:this}),this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var t=Object.create(null);return Polymer.dom(this).querySelectorAll("[id]").forEach(function(e){t[e.id]=e}),t},_cloneIcon:function(t,e){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[t],this.size,e)},_prepareSvgClone:function(t,e,i){if(t){var n=t.cloneNode(!0),r=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=n.getAttribute("viewBox")||"0 0 "+e+" "+e,s="pointer-events: none; display: block; width: 100%; height: 100%;";return i&&n.hasAttribute("mirror-in-rtl")&&(s+="-webkit-transform:scale(-1,1);transform:scale(-1,1);"),r.setAttribute("viewBox",o),r.setAttribute("preserveAspectRatio","xMidYMid meet"),r.style.cssText=s,r.appendChild(n).removeAttribute("id"),r}return null}}),"undefined"!=typeof module&&(module.exports=MakePromise),window.Promise||(window.Promise=MakePromise(Polymer.Base.async)),Polymer({is:"iron-request",hostAttributes:{hidden:!0},properties:{xhr:{type:Object,notify:!0,readOnly:!0,value:function(){return new XMLHttpRequest}},response:{type:Object,notify:!0,readOnly:!0,value:function(){return null}},status:{type:Number,notify:!0,readOnly:!0,value:0},statusText:{type:String,notify:!0,readOnly:!0,value:""},completes:{type:Object,readOnly:!0,notify:!0,value:function(){return new Promise(function(t,e){this.resolveCompletes=t,this.rejectCompletes=e}.bind(this))}},progress:{type:Object,notify:!0,readOnly:!0,value:function(){return{}}},aborted:{type:Boolean,notify:!0,readOnly:!0,value:!1},errored:{type:Boolean,notify:!0,readOnly:!0,value:!1},timedOut:{type:Boolean,notify:!0,readOnly:!0,value:!1}},get succeeded(){if(this.errored||this.aborted||this.timedOut)return!1;var t=this.xhr.status||0;return 0===t||t>=200&&300>t},send:function(t){var e=this.xhr;if(e.readyState>0)return null;e.addEventListener("progress",function(t){this._setProgress({lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total})}.bind(this)),e.addEventListener("error",function(t){this._setErrored(!0),this._updateStatus(),this.rejectCompletes(t)}.bind(this)),e.addEventListener("timeout",function(t){this._setTimedOut(!0),this._updateStatus(),this.rejectCompletes(t)}.bind(this)),e.addEventListener("abort",function(){this._updateStatus(),this.rejectCompletes(Error("Request aborted."))}.bind(this)),e.addEventListener("loadend",function(){return this._updateStatus(),this._setResponse(this.parseResponse()),this.succeeded?void this.resolveCompletes(this):void this.rejectCompletes(Error("The request failed with status code: "+this.xhr.status))}.bind(this)),this.url=t.url,e.open(t.method||"GET",t.url,t.async!==!1);var i={json:"application/json",text:"text/plain",html:"text/html",xml:"application/xml",arraybuffer:"application/octet-stream"}[t.handleAs],n=t.headers||Object.create(null),r=Object.create(null);for(var o in n)r[o.toLowerCase()]=n[o];if(n=r,i&&!n.accept&&(n.accept=i),Object.keys(n).forEach(function(t){/[A-Z]/.test(t)&&Polymer.Base._error("Headers must be lower case, got",t),e.setRequestHeader(t,n[t])},this),t.async!==!1){t.async&&(e.timeout=t.timeout);var s=t.handleAs;!t.jsonPrefix&&s||(s="text"),e.responseType=e._responseType=s,t.jsonPrefix&&(e._jsonPrefix=t.jsonPrefix)}e.withCredentials=!!t.withCredentials;var a=this._encodeBodyObject(t.body,n["content-type"]);return e.send(a),this.completes},parseResponse:function(){var t=this.xhr,e=t.responseType||t._responseType,i=!this.xhr.responseType,n=t._jsonPrefix&&t._jsonPrefix.length||0;try{switch(e){case"json":if(i||void 0===t.response)try{return JSON.parse(t.responseText)}catch(r){return null}return t.response;case"xml":return t.responseXML;case"blob":case"document":case"arraybuffer":return t.response;case"text":default:if(n)try{return JSON.parse(t.responseText.substring(n))}catch(r){return null}return t.responseText}}catch(o){this.rejectCompletes(Error("Could not parse response. "+o.message))}},abort:function(){this._setAborted(!0),this.xhr.abort()},_encodeBodyObject:function(t,e){if("string"==typeof t)return t;var i=t;switch(e){case"application/json":return JSON.stringify(i);case"application/x-www-form-urlencoded":return this._wwwFormUrlEncode(i)}return t},_wwwFormUrlEncode:function(t){if(!t)return"";var e=[];return Object.keys(t).forEach(function(i){e.push(this._wwwFormUrlEncodePiece(i)+"="+this._wwwFormUrlEncodePiece(t[i]))},this),e.join("&")},_wwwFormUrlEncodePiece:function(t){return null===t?"":encodeURIComponent((""+t).replace(/\r?\n/g,"\r\n")).replace(/%20/g,"+")},_updateStatus:function(){this._setStatus(this.xhr.status),this._setStatusText(void 0===this.xhr.statusText?"":this.xhr.statusText)}}),Polymer({is:"iron-ajax",hostAttributes:{hidden:!0},properties:{url:{type:String},params:{type:Object,value:function(){return{}}},method:{type:String,value:"GET"},headers:{type:Object,value:function(){return{}}},contentType:{type:String,value:null},body:{type:Object,value:null},sync:{type:Boolean,value:!1},handleAs:{type:String,value:"json"},withCredentials:{type:Boolean,value:!1},timeout:{type:Number,value:0},auto:{type:Boolean,value:!1},verbose:{type:Boolean,value:!1},lastRequest:{type:Object,notify:!0,readOnly:!0},loading:{type:Boolean,notify:!0,readOnly:!0},lastResponse:{type:Object,notify:!0,readOnly:!0},lastError:{type:Object,notify:!0,readOnly:!0},activeRequests:{type:Array,notify:!0,readOnly:!0,value:function(){return[]}},debounceDuration:{type:Number,value:0,notify:!0},jsonPrefix:{type:String,value:""},bubbles:{type:Boolean,value:!1},_boundHandleResponse:{type:Function,value:function(){return this._handleResponse.bind(this)}}},observers:["_requestOptionsChanged(url, method, params.*, headers, contentType, body, sync, handleAs, jsonPrefix, withCredentials, timeout, auto)"],get queryString(){var t,e,i=[];for(t in this.params)if(e=this.params[t],t=window.encodeURIComponent(t),Array.isArray(e))for(var n=0;n<e.length;n++)i.push(t+"="+window.encodeURIComponent(e[n]));else null!==e?i.push(t+"="+window.encodeURIComponent(e)):i.push(t);return i.join("&")},get requestUrl(){var t=this.queryString,e=this.url||"";return t?e+(e.indexOf("?")<0?"?":"&")+t:e},get requestHeaders(){var t={},e=this.contentType;null==e&&"string"==typeof this.body&&(e="application/x-www-form-urlencoded"),e&&(t["content-type"]=e);var i;if(this.headers instanceof Object)for(i in this.headers)t[i]=""+this.headers[i];return t},toRequestOptions:function(){return{url:this.requestUrl||"",method:this.method,headers:this.requestHeaders,body:this.body,async:!this.sync,handleAs:this.handleAs,jsonPrefix:this.jsonPrefix,withCredentials:this.withCredentials,timeout:this.timeout}},generateRequest:function(){var t=document.createElement("iron-request"),e=this.toRequestOptions();return this.push("activeRequests",t),t.completes.then(this._boundHandleResponse)["catch"](this._handleError.bind(this,t)).then(this._discardRequest.bind(this,t)),t.send(e),this._setLastRequest(t),this._setLoading(!0),this.fire("request",{request:t,options:e},{bubbles:this.bubbles}),this.fire("iron-ajax-request",{request:t,options:e},{bubbles:this.bubbles}),t},_handleResponse:function(t){t===this.lastRequest&&(this._setLastResponse(t.response),this._setLastError(null),this._setLoading(!1)),this.fire("response",t,{bubbles:this.bubbles}),this.fire("iron-ajax-response",t,{bubbles:this.bubbles})},_handleError:function(t,e){this.verbose&&Polymer.Base._error(e),t===this.lastRequest&&(this._setLastError({request:t,error:e,status:t.xhr.status,statusText:t.xhr.statusText,response:t.xhr.response}),this._setLastResponse(null),this._setLoading(!1)),this.fire("iron-ajax-error",{request:t,error:e},{bubbles:this.bubbles}),this.fire("error",{request:t,error:e},{bubbles:this.bubbles})},_discardRequest:function(t){var e=this.activeRequests.indexOf(t);e>-1&&this.splice("activeRequests",e,1)},_requestOptionsChanged:function(){this.debounce("generate-request",function(){null!=this.url&&this.auto&&this.generateRequest()},this.debounceDuration)}}),function(){"use strict";function t(t,e){var i="";if(t){var n=t.toLowerCase();" "===n||f.test(n)?i="space":p.test(n)?i="esc":1==n.length?e&&!c.test(n)||(i=n):i=d.test(n)?n.replace("arrow",""):"multiply"==n?"*":n}return i}function e(t){var e="";return t&&(t in a?e=a[t]:u.test(t)?(t=parseInt(t.replace("U+","0x"),16),e=String.fromCharCode(t).toLowerCase()):e=t.toLowerCase()),e}function i(t){var e="";return+t&&(e=65>t||t>90?112>t||t>123?48>t||t>57?96>t||t>105?l[t]:t-96+"":t-48+"":"f"+(t-112):String.fromCharCode(32+t)),e}function n(n,r){return n.key?t(n.key,r):n.detail&&n.detail.key?t(n.detail.key,r):e(n.keyIdentifier)||i(n.keyCode)||""}function r(t,e){return n(e,t.hasModifiers)===t.key&&(!t.hasModifiers||!!e.shiftKey==!!t.shiftKey&&!!e.ctrlKey==!!t.ctrlKey&&!!e.altKey==!!t.altKey&&!!e.metaKey==!!t.metaKey)}function o(t){return 1===t.length?{combo:t,key:t,event:"keydown"}:t.split("+").reduce(function(t,e){var i=e.split(":"),n=i[0],r=i[1];return n in h?(t[h[n]]=!0,t.hasModifiers=!0):(t.key=n,t.event=r||"keydown"),t},{combo:t.split(":").shift()})}function s(t){return t.trim().split(" ").map(function(t){return o(t)})}var a={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},l={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},h={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},c=/[a-z0-9*]/,u=/U\+/,d=/^arrow/,f=/^space(bar)?/,p=/^escape$/;Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(t,e){this._imperativeKeyBindings[t]=e,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(t,e){for(var i=s(e),n=0;n<i.length;++n)if(r(i[n],t))return!0;return!1},_collectKeyBindings:function(){var t=this.behaviors.map(function(t){return t.keyBindings});return t.indexOf(this.keyBindings)===-1&&t.push(this.keyBindings),t},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(t){for(var e in t)this._addKeyBinding(e,t[e])},this);for(var t in this._imperativeKeyBindings)this._addKeyBinding(t,this._imperativeKeyBindings[t]);for(var e in this._keyBindings)this._keyBindings[e].sort(function(t,e){var i=t[0].hasModifiers;return i===e[0].hasModifiers?0:i?-1:1})},_addKeyBinding:function(t,e){s(t).forEach(function(t){this._keyBindings[t.event]=this._keyBindings[t.event]||[],this._keyBindings[t.event].push([t,e])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach(function(t){var e=this._keyBindings[t],i=this._onKeyBindingEvent.bind(this,e);this._boundKeyHandlers.push([this.keyEventTarget,t,i]),this.keyEventTarget.addEventListener(t,i)},this)},_unlistenKeyEventListeners:function(){for(var t,e,i,n;this._boundKeyHandlers.length;)t=this._boundKeyHandlers.pop(),e=t[0],i=t[1],n=t[2],e.removeEventListener(i,n)},_onKeyBindingEvent:function(t,e){if(this.stopKeyboardEventPropagation&&e.stopPropagation(),!e.defaultPrevented)for(var i=0;i<t.length;i++){var n=t[i][0],o=t[i][1];if(r(n,e)&&(this._triggerKeyHandler(n,o,e),e.defaultPrevented))return}},_triggerKeyHandler:function(t,e,i){var n=Object.create(t);n.keyboardEvent=i;var r=new CustomEvent(t.event,{detail:n,cancelable:!0});this[e].call(this,r),r.defaultPrevented&&i.preventDefault()}}}(),function(){var t=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),e=t&&t[1]>=8,i=3,n="-10000px",r=-100;
  Polymer({is:"iron-list",properties:{items:{type:Array},maxPhysicalCount:{type:Number,value:500},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[Polymer.Templatizer,Polymer.IronResizableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronScrollTargetBehavior],keyBindings:{up:"_didMoveUp",down:"_didMoveDown",enter:"_didEnter"},_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_physicalIndexForKey:null,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_collection:null,_maxPages:2,_focusedItem:null,_focusedIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return(this.grid?this._physicalRows*this._rowHeight:this._physicalSize)-this._viewportHeight},get _itemsParent(){return Polymer.dom(Polymer.dom(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},_minVirtualStart:0,get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},_virtualStartVal:0,set _virtualStart(t){this._virtualStartVal=Math.min(this._maxVirtualStart,Math.max(this._minVirtualStart,t))},get _virtualStart(){return this._virtualStartVal||0},_physicalStartVal:0,set _physicalStart(t){this._physicalStartVal=t%this._physicalCount,this._physicalStartVal<0&&(this._physicalStartVal=this._physicalCount+this._physicalStartVal),this._physicalEnd=(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalStart(){return this._physicalStartVal||0},_physicalCountVal:0,set _physicalCount(t){this._physicalCountVal=t,this._physicalEnd=(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal},_physicalEnd:0,get _optPhysicalSize(){return this.grid?this._estRowsInView*this._rowHeight*this._maxPages:0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return!(!this.offsetWidth&&!this.offsetHeight)},get firstVisibleIndex(){var t=this._firstVisibleIndexVal;if(null==t){var e=this._physicalTop+this._scrollOffset;t=this._iterateItems(function(t,i){return e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition?this.grid?i-i%this._itemsPerRow:i:this.grid&&this._virtualCount-1===i?i-i%this._itemsPerRow:void 0})||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){var t=this._lastVisibleIndexVal;if(null==t){if(this.grid)t=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var e=this._physicalTop+this._scrollOffset;this._iterateItems(function(i,n){e<this._scrollBottom&&(t=n),e+=this._getPhysicalSizeIncrement(i)})}this._lastVisibleIndexVal=t}return t},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){0===this._physicalCount&&this._debounceTemplate(this._render),this.listen(this,"iron-resize","_resizeHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler")},_setOverflow:function(t){this.style.webkitOverflowScrolling=t===this?"touch":"",this.style.overflow=t===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounceTemplate(this._render)},updateViewportBoundaries:function(){var t=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=!("rtl"!==t.direction),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),e=t-this._scrollPosition,i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize){e-=this._scrollOffset;var n=Math.round(e/this._physicalAverage)*this._itemsPerRow;this._physicalTop=this._physicalTop+e,this._virtualStart=this._virtualStart+n,this._physicalStart=this._physicalStart+n,this._update()}else{var r=this._getReusables(i);i?(this._physicalTop=r.physicalTop,this._virtualStart=this._virtualStart+r.indexes.length,this._physicalStart=this._physicalStart+r.indexes.length):(this._virtualStart=this._virtualStart-r.indexes.length,this._physicalStart=this._physicalStart-r.indexes.length),0===r.indexes.length?this._increasePoolIfNeeded():this._update(r.indexes,i?null:r.indexes)}},_getReusables:function(t){var e,i,n,r,o=[],s=this._hiddenContentSize*this._ratio,a=this._virtualStart,l=this._virtualEnd,h=this._physicalCount,c=this._physicalTop+this._scrollOffset,u=this._physicalBottom+this._scrollOffset,d=this._scrollTop,f=this._scrollBottom;for(t?(e=this._physicalStart,i=this._physicalEnd,n=d-c):(e=this._physicalEnd,i=this._physicalStart,n=u-f);r=this._getPhysicalSizeIncrement(e),n-=r,o.length<h&&n>s;)if(t){if(l+o.length+1>=this._virtualCount)break;if(c+r>=d-this._scrollOffset)break;o.push(e),c+=r,e=(e+1)%h}else{if(a-o.length<=0)break;if(c+this._physicalSize-r<=f)break;o.push(e),c-=r,e=0===e?h-1:e-1}return{indexes:o,physicalTop:c-this._scrollOffset}},_update:function(t,e){if(!t||0!==t.length){if(this._manageFocus(),this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){var i=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(i)}this._positionItems(),this._updateScrollerSize(),this._increasePoolIfNeeded()}},_createPool:function(t){var e=Array(t);this._ensureTemplatized();for(var i=0;t>i;i++){var n=this.stamp(null);e[i]=n.root.querySelector("*"),this._itemsParent.appendChild(n.root)}return e},_increasePoolIfNeeded:function(){var t=this,e=this._physicalBottom+this._scrollOffset>=this._scrollBottom&&this._physicalTop-this._scrollOffset<=this._scrollPosition;if(this._physicalSize>=this._optPhysicalSize&&e)return!1;var i=Math.round(.5*this._physicalCount);return e?(this._yield(function(){t._increasePool(Math.min(i,Math.max(1,Math.round(50/t._templateCost))))}),!0):(this._debounceTemplate(this._increasePool.bind(this,i)),!0)},_yield:function(t){var e=window,i=e.requestIdleCallback?e.requestIdleCallback(t):e.setTimeout(t,16);Polymer.dom.addDebouncer({complete:function(){e.cancelIdleCallback?e.cancelIdleCallback(i):e.clearTimeout(i),t()}})},_increasePool:function(t){var e=Math.min(this._physicalCount+t,this._virtualCount-this._virtualStart,Math.max(this.maxPhysicalCount,i)),n=this._physicalCount,r=e-n,o=window.performance.now();r>0&&([].push.apply(this._physicalItems,this._createPool(r)),[].push.apply(this._physicalSizes,Array(r)),this._physicalCount=n+r,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedIndex)&&this._getPhysicalIndex(this._focusedIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+r),this._update(),this._templateCost=(window.performance.now()-o)/r)},_render:function(){if(this.isAttached&&this._isVisible)if(0===this._physicalCount)this.updateViewportBoundaries(),this._increasePool(i);else{var t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart=this._virtualStart+t.indexes.length,this._physicalStart=this._physicalStart+t.indexes.length,this._update(t.indexes),this._update()}},_ensureTemplatized:function(){if(!this.ctor){var t={};t.__key__=!0,t[this.as]=!0,t[this.indexAs]=!0,t[this.selectedAs]=!0,t.tabIndex=!0,this._instanceProps=t,this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate&&this.templatize(this._userTemplate)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(t,e,i){0===e.indexOf(this.as+".")&&this.notifyPath("items."+t.__key__+"."+e.slice(this.as.length+1),i)},_forwardParentProp:function(t,e){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(i){i&&(i._templateInstance[t]=e)})},_forwardParentPath:function(t,e){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(i){i&&i._templateInstance.notifyPath(t,e,!0)})},_forwardItemPath:function(t,e){if(this._physicalIndexForKey){var i=t.indexOf("."),n=t.substring(0,0>i?t.length:i),r=this._physicalIndexForKey[n],o=this._offscreenFocusedItem,s=o&&o._templateInstance.__key__===n?o:this._physicalItems[r];if(s&&s._templateInstance.__key__===n)if(0>i){var a=s._templateInstance[this.as];if(Array.isArray(this.selectedItems)){for(var l=0;l<this.selectedItems.length;l++)if(this.selectedItems[l]===a){this.set("selectedItems."+l,e);break}}else this.selectedItem===a&&this.set("selectedItem",e);s._templateInstance[this.as]=e}else t=this.as+"."+t.substring(i+1),s._templateInstance.notifyPath(t,e,!0)}},_itemsChanged:function(t){"items"===t.path?(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._collection=this.items?Polymer.Collection.get(this.items):null,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounceTemplate(this._render)):"items.splices"===t.path?(this._adjustVirtualIndex(t.value.indexSplices),this._virtualCount=this.items?this.items.length:0,this._debounceTemplate(this._render)):this._forwardItemPath(t.path.split(".").slice(1).join("."),t.value)},_adjustVirtualIndex:function(t){t.forEach(function(t){if(t.removed.forEach(this._removeItem,this),t.index<this._virtualStart){var e=Math.max(t.addedCount-t.removed.length,t.index-this._virtualStart);this._virtualStart=this._virtualStart+e,this._focusedIndex<0||(this._focusedIndex=this._focusedIndex+e)}},this)},_removeItem:function(t){this.$.selector.deselect(t),this._focusedItem&&this._focusedItem._templateInstance[this.as]===t&&this._removeFocusedItem()},_iterateItems:function(t,e){var i,n,r,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],n=this._computeVidx(i),null!=(r=t.call(this,i,n)))return r}else{for(i=this._physicalStart,n=this._virtualStart;i<this._physicalCount;i++,n++)if(null!=(r=t.call(this,i,n)))return r;for(i=0;i<this._physicalStart;i++,n++)if(null!=(r=t.call(this,i,n)))return r}},_computeVidx:function(t){return t<this._physicalStart?this._virtualStart+(this._physicalCount-this._physicalStart)+t:this._virtualStart+(t-this._physicalStart)},_assignModels:function(t){this._iterateItems(function(t,e){var i=this._physicalItems[t],n=i._templateInstance,r=this.items&&this.items[e];null!=r?(n[this.as]=r,n.__key__=this._collection.getKey(r),n[this.selectedAs]=this.$.selector.isSelected(r),n[this.indexAs]=e,n.tabIndex=this._focusedIndex===e?0:-1,this._physicalIndexForKey[n.__key__]=t,i.removeAttribute("hidden")):(n.__key__=null,i.setAttribute("hidden",""))},t)},_updateMetrics:function(t){Polymer.dom.flush();var e=0,i=0,n=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems(function(t){i+=this._physicalSizes[t]||0,this._physicalSizes[t]=this._physicalItems[t].offsetHeight,e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0},t),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==n&&(this._physicalAverage=Math.round((r*n+e)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var t=this._physicalTop;if(this.grid){var e=this._itemsPerRow*this._itemWidth,i=(this._viewportWidth-e)/2;this._iterateItems(function(e,n){var r=n%this._itemsPerRow,o=Math.floor(r*this._itemWidth+i);this._isRTL&&(o*=-1),this.translate3d(o+"px",t+"px",0,this._physicalItems[e]),this._shouldRenderNextRow(n)&&(t+=this._rowHeight)})}else this._iterateItems(function(e){this.translate3d(0,t+"px",0,this._physicalItems[e]),t+=this._physicalSizes[e]})},_getPhysicalSizeIncrement:function(t){return this.grid?this._computeVidx(t)%this._itemsPerRow!==this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[t]},_shouldRenderNextRow:function(t){return t%this._itemsPerRow===this._itemsPerRow-1},_adjustScrollPosition:function(){var t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);t&&(this._physicalTop=this._physicalTop-t,e||0===this._physicalTop||this._resetScrollPosition(this._scrollTop-t))},_resetScrollPosition:function(t){this.scrollTarget&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(t){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,t=t||0===this._scrollHeight,t=t||this._scrollPosition>=this._estScrollHeight-this._physicalSize,t=t||this.grid&&this.$.items.style.height<this._estScrollHeight,!t&&Math.abs(this._estScrollHeight-this._scrollHeight)<this._optPhysicalSize||(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(t){return this.scrollToIndex(this.items.indexOf(t))},scrollToIndex:function(t){if("number"==typeof t&&t>=0&&t<=this.items.length-1&&(Polymer.dom.flush(),0!==this._physicalCount)){t=Math.min(Math.max(t,0),this._virtualCount-1),this._isIndexRendered(t)&&t<this._maxVirtualStart||(this._virtualStart=this.grid?t-2*this._itemsPerRow:t-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var e=this._physicalStart,i=this._virtualStart,n=0,r=this._hiddenContentSize;t>i&&r>=n;)n+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+n),this._increasePoolIfNeeded(),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounceTemplate(function(){var t=Math.abs(this._viewportHeight-this._scrollTargetHeight);this.updateViewportBoundaries(),("ontouchstart"in window||navigator.maxTouchPoints>0)&&t>0&&100>t||(this._isVisible?(this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1))}.bind(this))},_getModelFromItem:function(t){var e=this._collection.getKey(t),i=this._physicalIndexForKey[e];return null!=i?this._physicalItems[i]._templateInstance:null},_getNormalizedItem:function(t){if(void 0===this._collection.getKey(t)){if("number"==typeof t){if(t=this.items[t],!t)throw new RangeError("<item> not found");return t}throw new TypeError("<item> should be a valid item")}return t},selectItem:function(t){t=this._getNormalizedItem(t);var e=this._getModelFromItem(t);!this.multiSelection&&this.selectedItem&&this.deselectItem(this.selectedItem),e&&(e[this.selectedAs]=!0),this.$.selector.select(t),this.updateSizeForItem(t)},deselectItem:function(t){t=this._getNormalizedItem(t);var e=this._getModelFromItem(t);e&&(e[this.selectedAs]=!1),this.$.selector.deselect(t),this.updateSizeForItem(t)},toggleSelectionForItem:function(t){t=this._getNormalizedItem(t),this.$.selector.isSelected(t)?this.deselectItem(t):this.selectItem(t)},clearSelection:function(){function t(t){var e=this._getModelFromItem(t);e&&(e[this.selectedAs]=!1)}Array.isArray(this.selectedItems)?this.selectedItems.forEach(t,this):this.selectedItem&&t.call(this,this.selectedItem),this.$.selector.clearSelection()},_selectionEnabledChanged:function(t){(t?this.listen:this.unlisten).call(this,this,"tap","_selectionHandler")},_selectionHandler:function(t){var e=this.modelForElement(t.target);if(e){var i,n,o=Polymer.dom(t).path[0],s=this._itemsParent.node.domHost,a=Polymer.dom(s?s.root:document).activeElement,l=this._physicalItems[this._getPhysicalIndex(e[this.indexAs])];"input"!==o.localName&&"button"!==o.localName&&"select"!==o.localName&&(i=e.tabIndex,e.tabIndex=r,n=a?a.tabIndex:-1,e.tabIndex=i,a&&l!==a&&l.contains(a)&&n!==r||this.toggleSelectionForItem(e[this.as]))}},_multiSelectionChanged:function(t){this.clearSelection(),this.$.selector.multi=t},updateSizeForItem:function(t){t=this._getNormalizedItem(t);var e=this._collection.getKey(t),i=this._physicalIndexForKey[e];null!=i&&(this._updateMetrics([i]),this._positionItems())},_manageFocus:function(){var t=this._focusedIndex;t>=0&&t<this._virtualCount?this._isIndexRendered(t)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_isIndexRendered:function(t){return t>=this._virtualStart&&t<=this._virtualEnd},_isIndexVisible:function(t){return t>=this.firstVisibleIndex&&t<=this.lastVisibleIndex},_getPhysicalIndex:function(t){return this._physicalIndexForKey[this._collection.getKey(this._getNormalizedItem(t))]},_focusPhysicalItem:function(t){if(t>=0&&t<this._virtualCount){this._restoreFocusedItem(),this._isIndexRendered(t)||this.scrollToIndex(t);var e,i=this._physicalItems[this._getPhysicalIndex(t)],n=i._templateInstance;n.tabIndex=r,i.tabIndex===r&&(e=i),e||(e=Polymer.dom(i).querySelector('[tabindex="'+r+'"]')),n.tabIndex=0,this._focusedIndex=t,e&&e.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedIndex=-1},_createFocusBackfillItem:function(){var t=this._focusedIndex,e=this._getPhysicalIndex(t);if(!this._offscreenFocusedItem&&null!=e&&t>=0){if(!this._focusBackfillItem){var i=this.stamp(null);this._focusBackfillItem=i.root.querySelector("*"),this._itemsParent.appendChild(i.root)}this._offscreenFocusedItem=this._physicalItems[e],this._offscreenFocusedItem._templateInstance.tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this.translate3d(0,n,0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){var t,e=this._focusedIndex;this._offscreenFocusedItem&&this._focusedIndex>=0&&(this._assignModels(),t=this._getPhysicalIndex(e),null!=t&&(this._focusBackfillItem=this._physicalItems[t],this._focusBackfillItem._templateInstance.tabIndex=-1,this._physicalItems[t]=this._offscreenFocusedItem,this._offscreenFocusedItem=null,this.translate3d(0,n,0,this._focusBackfillItem)))},_didFocus:function(t){var e=this.modelForElement(t.target),i=this._focusedItem?this._focusedItem._templateInstance:null,n=null!==this._offscreenFocusedItem,r=this._focusedIndex;e&&i&&(i===e?this._isIndexVisible(r)||this.scrollToIndex(r):(this._restoreFocusedItem(),i.tabIndex=-1,e.tabIndex=0,r=e[this.indexAs],this._focusedIndex=r,this._focusedItem=this._physicalItems[this._getPhysicalIndex(r)],n&&!this._offscreenFocusedItem&&this._update()))},_didMoveUp:function(){this._focusPhysicalItem(this._focusedIndex-1)},_didMoveDown:function(t){t.detail.keyboardEvent.preventDefault(),this._focusPhysicalItem(this._focusedIndex+1)},_didEnter:function(t){this._focusPhysicalItem(this._focusedIndex),this._selectionHandler(t.detail.keyboardEvent)}})}(),Polymer.IronControlState={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(t){if(t.target===this)this._setFocused("focus"===t.type);else if(!this.shadowRoot){var e=Polymer.dom(t).localTarget;this.isLightDescendant(e)||this.fire(t.type,{sourceEvent:t},{node:this,bubbles:t.bubbles,cancelable:t.cancelable})}},_disabledChanged:function(t){this.setAttribute("aria-disabled",t?"true":"false"),this.style.pointerEvents=t?"none":"",t?(this._oldTabIndex=this.tabIndex,this._setFocused(!1),this.tabIndex=-1,this.blur()):void 0!==this._oldTabIndex&&(this.tabIndex=this._oldTabIndex)},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}},Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_detectKeyboardFocus(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_detectKeyboardFocus:function(t){this._setReceivedFocusFromKeyboard(!this.pointerDown&&t)},_userActivate:function(t){this.active!==t&&(this.active=t,this.fire("change"))},_downHandler:function(){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(t){var e=t.detail.keyboardEvent,i=Polymer.dom(e).localTarget;this.isLightDescendant(i)||(e.preventDefault(),e.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(t){var e=t.detail.keyboardEvent,i=Polymer.dom(e).localTarget;this.isLightDescendant(i)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(){this._changedButtonState()},_ariaActiveAttributeChanged:function(t,e){e&&e!=t&&this.hasAttribute(e)&&this.removeAttribute(e)},_activeChanged:function(t){this.toggles?this.setAttribute(this.ariaActiveAttribute,t?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl],function(){function t(t){this.element=t,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}function e(t){this.element=t,this.color=window.getComputedStyle(t).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),Polymer.dom(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}var i={distance:function(t,e,i,n){var r=t-i,o=e-n;return Math.sqrt(r*r+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(t,e){var n=i.distance(t,e,0,0),r=i.distance(t,e,this.width,0),o=i.distance(t,e,0,this.height),s=i.distance(t,e,this.width,this.height);return Math.max(n,r,o,s)}},e.MAX_RADIUS=300,e.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var t;return this.mouseDownStart?(t=i.now()-this.mouseDownStart,this.mouseUpStart&&(t-=this.mouseUpElapsed),t):0},get mouseUpElapsed(){return this.mouseUpStart?i.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var t=this.containerMetrics.width*this.containerMetrics.width,i=this.containerMetrics.height*this.containerMetrics.height,n=1.1*Math.min(Math.sqrt(t+i),e.MAX_RADIUS)+5,r=1.1-.2*(n/e.MAX_RADIUS),o=this.mouseInteractionSeconds/r,s=n*(1-Math.pow(80,-o));return Math.abs(s)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var t=.3*this.mouseUpElapsedSeconds,e=this.opacity;return Math.max(0,Math.min(t,e))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,e.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,e.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new t(this.element)},draw:function(){var t,e,i;this.wave.style.opacity=this.opacity,t=this.radius/(this.containerMetrics.size/2),e=this.xNow-this.containerMetrics.width/2,i=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+e+"px, "+i+"px)",this.waveContainer.style.transform="translate3d("+e+"px, "+i+"px, 0)",this.wave.style.webkitTransform="scale("+t+","+t+")",this.wave.style.transform="scale3d("+t+","+t+",1)"},downAction:function(t){var e=this.containerMetrics.width/2,n=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=i.now(),this.center?(this.xStart=e,this.yStart=n,this.slideDistance=i.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=t?t.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=t?t.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=e,this.yEnd=n,this.slideDistance=i.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(){this.isMouseDown&&(this.mouseUpStart=i.now())},remove:function(){Polymer.dom(this.waveContainer.parentNode).removeChild(this.waveContainer)}},Polymer({is:"paper-ripple",behaviors:[Polymer.IronA11yKeysBehavior],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){11==this.parentNode.nodeType?this.keyEventTarget=Polymer.dom(this).getOwnerRoot().host:this.keyEventTarget=this.parentNode;var t=this.keyEventTarget;this.listen(t,"up","uiUpAction"),this.listen(t,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var t=0;t<this.ripples.length;++t)if(!this.ripples[t].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(t){this.noink||this.downAction(t)},downAction:function(t){this.holdDown&&this.ripples.length>0||(this.addRipple().downAction(t),this._animating||(this._animating=!0,this.animate()))},uiUpAction:function(t){this.noink||this.upAction(t)},upAction:function(t){this.holdDown||(this.ripples.forEach(function(e){e.upAction(t)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor=null,this.fire("transitionend")},addRipple:function(){var t=new e(this);return Polymer.dom(this.$.waves).appendChild(t.waveContainer),this.$.background.style.backgroundColor=t.color,this.ripples.push(t),this._setAnimating(!0),t},removeRipple:function(t){var e=this.ripples.indexOf(t);0>e||(this.ripples.splice(e,1),t.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(this._animating){var t,e;for(t=0;t<this.ripples.length;++t)e=this.ripples[t],e.draw(),this.$.background.style.opacity=e.outerOpacity,e.isOpacityFullyDecayed&&!e.isRestingAtMaxRadius&&this.removeRipple(e);this.shouldKeepAnimating||0!==this.ripples.length?window.requestAnimationFrame(this._boundAnimate):this.onAnimationComplete()}},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(t,e){void 0!==e&&(t?this.downAction():this.upAction())}})}(),Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(t){Polymer.IronButtonStateImpl._downHandler.call(this,t),this.pressed&&this.ensureRipple(t)},ensureRipple:function(t){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var e=this._rippleContainer||this.root;if(e&&Polymer.dom(e).appendChild(this._ripple),t){var i=Polymer.dom(this._rippleContainer||this),n=Polymer.dom(t).rootTarget;i.deepContains(n)&&this._ripple.uiDownAction(t);
  }}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return!!this._ripple},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(t){this.hasRipple()&&(this._ripple.noink=t)}},Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(t){t&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=t)},_createRipple:function(){var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("center",""),t.classList.add("circle"),t}},Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl],Polymer({is:"paper-icon-button",hostAttributes:{role:"button",tabindex:"0"},behaviors:[Polymer.PaperInkyFocusBehavior],properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(t,e){var i=this.getAttribute("aria-label");i&&e!=i||this.setAttribute("aria-label",t)}}),Polymer({is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}}),Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var t=1;this.disabled?t=0:this.active||this.pressed?t=4:this.receivedFocusFromKeyboard&&(t=3),this._setElevation(t)},_computeKeyboardClass:function(t){this.toggleClass("keyboard-focus",t)},_spaceKeyDownHandler:function(t){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,t),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(t){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,t),this.hasRipple()&&this._ripple.uiUpAction()}},Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl],Polymer({is:"paper-button",behaviors:[Polymer.PaperButtonBehavior],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?Polymer.PaperButtonBehaviorImpl._calculateElevation.apply(this):this._setElevation(0)}}),Polymer.IronSelection=function(t){this.selection=[],this.selectCallback=t},Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(t){this.selection.slice().forEach(function(e){t&&t.indexOf(e)>=0||this.setItemSelected(e,!1)},this)},isSelected:function(t){return this.selection.indexOf(t)>=0},setItemSelected:function(t,e){if(null!=t&&e!==this.isSelected(t)){if(e)this.selection.push(t);else{var i=this.selection.indexOf(t);0>i||this.selection.splice(i,1)}this.selectCallback&&this.selectCallback(t,e)}},select:function(t){this.multi?this.toggle(t):this.get()!==t&&(this.setItemSelected(this.get(),!1),this.setItemSelected(t,!0))},toggle:function(t){this.setItemSelected(t,!this.isSelected(t))}},Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new Polymer.IronSelection(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._updateItems(),this._shouldUpdateSelection||this._updateSelected(),this._addListener(this.activateEvent)},detached:function(){this._observer&&Polymer.dom(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(t){return this.items.indexOf(t)},select:function(t){this.selected=t},selectPrevious:function(){var t=this.items.length,e=(+this._valueToIndex(this.selected)-1+t)%t;this.selected=this._indexToValue(e)},selectNext:function(){var t=(+this._valueToIndex(this.selected)+1)%this.items.length;this.selected=this._indexToValue(t)},selectIndex:function(t){this.select(this._indexToValue(t))},forceSynchronousItemUpdate:function(){this._updateItems()},get _shouldUpdateSelection(){return null!=this.selected},_checkFallback:function(){this._shouldUpdateSelection&&this._updateSelected()},_addListener:function(t){this.listen(this,t,"_activateHandler")},_removeListener:function(t){this.unlisten(this,t,"_activateHandler")},_activateEventChanged:function(t,e){this._removeListener(e),this._addListener(t)},_updateItems:function(){var t=Polymer.dom(this).queryDistributedElements(this.selectable||"*");t=Array.prototype.filter.call(t,this._bindFilterItem),this._setItems(t)},_updateAttrForSelected:function(){this._shouldUpdateSelection&&(this.selected=this._indexToValue(this.indexOf(this.selectedItem)))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(){this._selection.select(this._valueToItem(this.selected)),this.fallbackSelection&&this.items.length&&void 0===this._selection.get()&&(this.selected=this.fallbackSelection)},_filterItem:function(t){return!this._excludedLocalNames[t.localName]},_valueToItem:function(t){return null==t?null:this.items[this._valueToIndex(t)]},_valueToIndex:function(t){if(!this.attrForSelected)return+t;for(var e,i=0;e=this.items[i];i++)if(this._valueForItem(e)==t)return i},_indexToValue:function(t){if(!this.attrForSelected)return t;var e=this.items[t];return e?this._valueForItem(e):void 0},_valueForItem:function(t){var e=t[Polymer.CaseMap.dashToCamelCase(this.attrForSelected)];return void 0!=e?e:t.getAttribute(this.attrForSelected)},_applySelection:function(t,e){this.selectedClass&&this.toggleClass(this.selectedClass,e,t),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,e,t),this._selectionChange(),this.fire("iron-"+(e?"select":"deselect"),{item:t})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(t){return Polymer.dom(t).observeNodes(function(t){this._updateItems(),this._shouldUpdateSelection&&this._updateSelected(),this.fire("iron-items-changed",t,{bubbles:!1,cancelable:!1})})},_activateHandler:function(t){for(var e=t.target,i=this.items;e&&e!=this;){var n=i.indexOf(e);if(n>=0){var r=this._indexToValue(n);return void this._itemActivate(r,e)}e=e.parentNode}},_itemActivate:function(t,e){this.fire("iron-activate",{selected:t,item:e},{cancelable:!0}).defaultPrevented||this.select(t)}},Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0},selectedItems:{type:Array,readOnly:!0,notify:!0}},observers:["_updateSelected(selectedValues.splices)"],select:function(t){this.multi?this.selectedValues?this._toggleSelected(t):this.selectedValues=[t]:this.selected=t},multiChanged:function(t){this._selection.multi=t},get _shouldUpdateSelection(){return null!=this.selected||null!=this.selectedValues&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this._shouldUpdateSelection&&(this.selectedValues=this.selectedItems.map(function(t){return this._indexToValue(this.indexOf(t))},this).filter(function(t){return null!=t},this)):Polymer.IronSelectableBehavior._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(t){if(t){var e=this._valuesToItems(t);this._selection.clear(e);for(var i=0;i<e.length;i++)this._selection.setItemSelected(e[i],!0);this.fallbackSelection&&this.items.length&&!this._selection.get().length&&this._valueToItem(this.fallbackSelection)&&(this.selectedValues=[this.fallbackSelection])}else this._selection.clear()},_selectionChange:function(){var t=this._selection.get();this.multi?this._setSelectedItems(t):(this._setSelectedItems([t]),this._setSelectedItem(t))},_toggleSelected:function(t){var e=this.selectedValues.indexOf(t);0>e?this.push("selectedValues",t):this.splice("selectedValues",e,1)},_valuesToItems:function(t){return null==t?null:t.map(function(t){return this._valueToItem(t)},this)}},Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl],Polymer.IronMenuBehaviorImpl={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String}},_SEARCH_RESET_TIMEOUT_MS:1e3,hostAttributes:{role:"menu",tabindex:"0"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(t){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var e=this._valueToItem(t);e&&e.hasAttribute("disabled")||(this._setFocusedItem(e),Polymer.IronMultiSelectableBehaviorImpl.select.apply(this,arguments))},_resetTabindices:function(){var t=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(e){e.setAttribute("tabindex",e===t?"0":"-1")},this)},_updateMultiselectable:function(t){t?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(t){this.cancelDebouncer("_clearSearchText");var e=this._searchText||"";e+=(t.key&&1==t.key.length?t.key:String.fromCharCode(t.keyCode)).toLocaleLowerCase();for(var i,n=e.length,r=0;i=this.items[r];r++)if(!i.hasAttribute("disabled")){var o=this.attrForItemTitle||"textContent",s=(i[o]||i.getAttribute(o)||"").trim();if(s.length>=n&&s.slice(0,n).toLocaleLowerCase()==e){this._setFocusedItem(i);break}}this._searchText=e,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var t=this.items.length,e=+this.indexOf(this.focusedItem),i=1;t+1>i;i++){var n=this.items[(e-i+t)%t];if(!n.hasAttribute("disabled")){var r=Polymer.dom(n).getOwnerRoot()||document;if(this._setFocusedItem(n),Polymer.dom(r).activeElement==n)return}}},_focusNext:function(){for(var t=this.items.length,e=+this.indexOf(this.focusedItem),i=1;t+1>i;i++){var n=this.items[(e+i)%t];if(!n.hasAttribute("disabled")){var r=Polymer.dom(n).getOwnerRoot()||document;if(this._setFocusedItem(n),Polymer.dom(r).activeElement==n)return}}},_applySelection:function(t,e){e?t.setAttribute("aria-selected","true"):t.removeAttribute("aria-selected"),Polymer.IronSelectableBehavior._applySelection.apply(this,arguments)},_focusedItemChanged:function(t,e){e&&e.setAttribute("tabindex","-1"),t&&(t.setAttribute("tabindex","0"),t.focus())},_onIronItemsChanged:function(t){t.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(){var t=this.getAttribute("tabindex");Polymer.IronMenuBehaviorImpl._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1},1)},_onFocus:function(t){if(!Polymer.IronMenuBehaviorImpl._shiftTabPressed){var e=Polymer.dom(t).rootTarget;(e===this||void 0===e.tabIndex||this.isLightDescendant(e))&&(this._defaultFocusAsync=this.async(function(){var t=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),t?this._setFocusedItem(t):this.items[0]&&this._focusNext()}))}},_onUpKey:function(t){this._focusPrevious(),t.detail.keyboardEvent.preventDefault()},_onDownKey:function(t){this._focusNext(),t.detail.keyboardEvent.preventDefault()},_onEscKey:function(){this.focusedItem.blur()},_onKeydown:function(t){this.keyboardEventMatchesKeys(t,"up down esc")||this._focusWithKeyboardEvent(t),t.stopPropagation()},_activateHandler:function(t){Polymer.IronSelectableBehavior._activateHandler.call(this,t),t.stopPropagation()}},Polymer.IronMenuBehaviorImpl._shiftTabPressed=!1,Polymer.IronMenuBehavior=[Polymer.IronMultiSelectableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronMenuBehaviorImpl],function(){Polymer({is:"paper-menu",behaviors:[Polymer.IronMenuBehavior]})}(),Polymer.PaperItemBehaviorImpl={hostAttributes:{role:"option",tabindex:"0"}},Polymer.PaperItemBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperItemBehaviorImpl],Polymer({is:"paper-icon-item",behaviors:[Polymer.PaperItemBehavior]}),function(){"use strict";Polymer.IronA11yAnnouncer=Polymer({is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},_text:{type:String,value:""}},created:function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=this),document.body.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(t){this._text="",this.async(function(){this._text=t},100)},_onIronAnnounce:function(t){t.detail&&t.detail.text&&this.announce(t.detail.text)}}),Polymer.IronA11yAnnouncer.instance=null,Polymer.IronA11yAnnouncer.requestAvailability=function(){Polymer.IronA11yAnnouncer.instance||(Polymer.IronA11yAnnouncer.instance=document.createElement("iron-a11y-announcer")),document.body.appendChild(Polymer.IronA11yAnnouncer.instance)}}(),Polymer.IronFitBehavior={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){var t;return t=this.fitInto===window?this.fitInto.innerWidth:this.fitInto.getBoundingClientRect().width},get _fitHeight(){var t;return t=this.fitInto===window?this.fitInto.innerHeight:this.fitInto.getBoundingClientRect().height},get _fitLeft(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().left},get _fitTop(){var t;return t=this.fitInto===window?0:this.fitInto.getBoundingClientRect().top},get _defaultPositionTarget(){var t=Polymer.dom(this).parentNode;return t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(t=t.host),t},get _localeHorizontalAlign(){if(this._isRTL){if("right"===this.horizontalAlign)return"left";if("left"===this.horizontalAlign)return"right"}return this.horizontalAlign},attached:function(){this._isRTL="rtl"==window.getComputedStyle(this).direction,this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&("none"===window.getComputedStyle(this).display?setTimeout(function(){this.fit()}.bind(this)):this.fit())},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var t=window.getComputedStyle(this),e=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:"auto"!==t.top?"top":"auto"!==t.bottom?"bottom":null,horizontally:"auto"!==t.left?"left":"auto"!==t.right?"right":null},sizedBy:{height:"none"!==e.maxHeight,width:"none"!==e.maxWidth,minWidth:parseInt(e.minWidth,10)||0,minHeight:parseInt(e.minHeight,10)||0},margin:{top:parseInt(t.marginTop,10)||0,right:parseInt(t.marginRight,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0}},this.verticalOffset&&(this._fitInfo.margin.top=this._fitInfo.margin.bottom=this.verticalOffset,this._fitInfo.inlineStyle.marginTop=this.style.marginTop||"",this._fitInfo.inlineStyle.marginBottom=this.style.marginBottom||"",this.style.marginTop=this.style.marginBottom=this.verticalOffset+"px"),this.horizontalOffset&&(this._fitInfo.margin.left=this._fitInfo.margin.right=this.horizontalOffset,this._fitInfo.inlineStyle.marginLeft=this.style.marginLeft||"",this._fitInfo.inlineStyle.marginRight=this.style.marginRight||"",this.style.marginLeft=this.style.marginRight=this.horizontalOffset+"px")}},resetFit:function(){var t=this._fitInfo||{};for(var e in t.sizerInlineStyle)this.sizingTarget.style[e]=t.sizerInlineStyle[e];for(var e in t.inlineStyle)this.style[e]=t.inlineStyle[e];this._fitInfo=null},refit:function(){var t=this.sizingTarget.scrollLeft,e=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=t,this.sizingTarget.scrollTop=e},position:function(){if(this.horizontalAlign||this.verticalAlign){this._discoverInfo(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var t=this.getBoundingClientRect(),e=this.__getNormalizedRect(this.positionTarget),i=this.__getNormalizedRect(this.fitInto),n=this._fitInfo.margin,r={width:t.width+n.left+n.right,height:t.height+n.top+n.bottom},o=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,r,e,i),s=o.left+n.left,a=o.top+n.top,l=Math.min(i.right-n.right,s+t.width),h=Math.min(i.bottom-n.bottom,a+t.height),c=this._fitInfo.sizedBy.minWidth,u=this._fitInfo.sizedBy.minHeight;s<n.left&&(s=n.left,c>l-s&&(s=l-c)),a<n.top&&(a=n.top,u>h-a&&(a=h-u)),this.sizingTarget.style.maxWidth=l-s+"px",this.sizingTarget.style.maxHeight=h-a+"px",this.style.left=s-t.left+"px",this.style.top=a-t.top+"px"}},constrain:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo;t.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),t.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var e=this.getBoundingClientRect();t.sizedBy.height||this.__sizeDimension(e,t.positionedBy.vertically,"top","bottom","Height"),t.sizedBy.width||this.__sizeDimension(e,t.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(t,e,i,n,r){this.__sizeDimension(t,e,i,n,r)},__sizeDimension:function(t,e,i,n,r){var o=this._fitInfo,s=this.__getNormalizedRect(this.fitInto),a="Width"===r?s.width:s.height,l=e===n,h=l?a-t[n]:t[i],c=o.margin[l?i:n],u="offset"+r,d=this[u]-this.sizingTarget[u];this.sizingTarget.style["max"+r]=a-c-h-d+"px"},center:function(){if(!this.horizontalAlign&&!this.verticalAlign){this._discoverInfo();var t=this._fitInfo.positionedBy;if(!t.vertically||!t.horizontally){this.style.position="fixed",t.vertically||(this.style.top="0px"),t.horizontally||(this.style.left="0px");var e=this.getBoundingClientRect(),i=this.__getNormalizedRect(this.fitInto);if(!t.vertically){var n=i.top-e.top+(i.height-e.height)/2;this.style.top=n+"px"}if(!t.horizontally){var r=i.left-e.left+(i.width-e.width)/2;this.style.left=r+"px"}}}},__getNormalizedRect:function(t){return t===document.documentElement||t===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:t.getBoundingClientRect()},__getCroppedArea:function(t,e,i){var n=Math.min(0,t.top)+Math.min(0,i.bottom-(t.top+e.height)),r=Math.min(0,t.left)+Math.min(0,i.right-(t.left+e.width));return Math.abs(n)*e.width+Math.abs(r)*e.height},__getPosition:function(t,e,i,n,r){var o=[{verticalAlign:"top",horizontalAlign:"left",top:n.top,left:n.left},{verticalAlign:"top",horizontalAlign:"right",top:n.top,left:n.right-i.width},{verticalAlign:"bottom",horizontalAlign:"left",top:n.bottom-i.height,left:n.left},{verticalAlign:"bottom",horizontalAlign:"right",top:n.bottom-i.height,left:n.right-i.width}];if(this.noOverlap){for(var s=0,a=o.length;a>s;s++){var l={};for(var h in o[s])l[h]=o[s][h];o.push(l)}o[0].top=o[1].top+=n.height,o[2].top=o[3].top-=n.height,o[4].left=o[6].left+=n.width,o[5].left=o[7].left-=n.width}e="auto"===e?null:e,t="auto"===t?null:t;for(var c,s=0;s<o.length;s++){var u=o[s];if(!this.dynamicAlign&&!this.noOverlap&&u.verticalAlign===e&&u.horizontalAlign===t){c=u;break}var d=!(e&&u.verticalAlign!==e||t&&u.horizontalAlign!==t);if(this.dynamicAlign||d){c=c||u,u.croppedArea=this.__getCroppedArea(u,i,r);var f=u.croppedArea-c.croppedArea;if((0>f||0===f&&d)&&(c=u),0===c.croppedArea&&d)break}}return c}},function(){"use strict";Polymer({is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&Polymer.dom(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){this.opened||this.parentNode!==document.body||Polymer.dom(this.parentNode).removeChild(this)},_onTransitionend:function(t){t&&t.target===this&&this.complete()},_openedChanged:function(t){if(t)this.prepare();else{var e=window.getComputedStyle(this);"0s"!==e.transitionDuration&&0!=e.opacity||this.complete()}this.isAttached&&(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}})}(),Polymer.IronOverlayManagerClass=function(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Polymer.Gestures.add(document,"tap",this._onCaptureClick.bind(this)),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)},Polymer.IronOverlayManagerClass.prototype={constructor:Polymer.IronOverlayManagerClass,get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement},get deepActiveElement(){for(var t=document.activeElement||document.body;t.root&&Polymer.dom(t.root).activeElement;)t=Polymer.dom(t.root).activeElement;return t},_bringOverlayAtIndexToFront:function(t){var e=this._overlays[t];if(e){var i=this._overlays.length-1,n=this._overlays[i];if(n&&this._shouldBeBehindOverlay(e,n)&&i--,i>t){var r=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(e)>r||this._applyOverlayZ(e,r);i>t;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[i]=e}}},addOrRemoveOverlay:function(t){t.opened?this.addOverlay(t):this.removeOverlay(t)},addOverlay:function(t){var e=this._overlays.indexOf(t);if(e>=0)return this._bringOverlayAtIndexToFront(e),void this.trackBackdrop();var i=this._overlays.length,n=this._overlays[i-1],r=Math.max(this._getZ(n),this._minimumZ),o=this._getZ(t);if(n&&this._shouldBeBehindOverlay(t,n)){this._applyOverlayZ(n,r),i--;var s=this._overlays[i-1];r=Math.max(this._getZ(s),this._minimumZ)}o>r||this._applyOverlayZ(t,r),this._overlays.splice(i,0,t),this.trackBackdrop()},removeOverlay:function(t){var e=this._overlays.indexOf(t);e!==-1&&(this._overlays.splice(e,1),this.trackBackdrop())},currentOverlay:function(){var t=this._overlays.length-1;return this._overlays[t]},currentOverlayZ:function(){return this._getZ(this.currentOverlay())},ensureMinimumZ:function(t){this._minimumZ=Math.max(this._minimumZ,t)},focusOverlay:function(){var t=this.currentOverlay();t&&t._applyFocus()},trackBackdrop:function(){var t=this._overlayWithBackdrop();(t||this._backdropElement)&&(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t)},getBackdrops:function(){for(var t=[],e=0;e<this._overlays.length;e++)this._overlays[e].withBackdrop&&t.push(this._overlays[e]);return t},backdropZ:function(){return this._getZ(this._overlayWithBackdrop())-1},_overlayWithBackdrop:function(){for(var t=0;t<this._overlays.length;t++)if(this._overlays[t].withBackdrop)return this._overlays[t]},_getZ:function(t){var e=this._minimumZ;if(t){var i=+(t.style.zIndex||window.getComputedStyle(t).zIndex);i===i&&(e=i)}return e},_setZ:function(t,e){t.style.zIndex=e},_applyOverlayZ:function(t,e){this._setZ(t,e+2)},_overlayInPath:function(t){t=t||[];for(var e=0;e<t.length;e++)if(t[e]._manager===this)return t[e]},_onCaptureClick:function(t){var e=this.currentOverlay();e&&this._overlayInPath(Polymer.dom(t).path)!==e&&e._onCaptureClick(t)},_onCaptureFocus:function(t){var e=this.currentOverlay();e&&e._onCaptureFocus(t)},_onCaptureKeyDown:function(t){var e=this.currentOverlay();e&&(Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(t,"esc")?e._onCaptureEsc(t):Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(t,"tab")&&e._onCaptureTab(t))},_shouldBeBehindOverlay:function(t,e){return!t.alwaysOnTop&&e.alwaysOnTop}},Polymer.IronOverlayManager=new Polymer.IronOverlayManagerClass,function(){"use strict";var t=Element.prototype,e=t.matches||t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;Polymer.IronFocusablesHelper={getTabbableNodes:function(t){var e=[];return this._collectTabbableNodes(t,e)?this._sortByTabIndex(e):e},isFocusable:function(t){return e.call(t,"input, select, textarea, button, object")?e.call(t,":not([disabled])"):e.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")},isTabbable:function(t){return this.isFocusable(t)&&e.call(t,':not([tabindex="-1"])')&&this._isVisible(t)},_normalizedTabIndex:function(t){return this.isFocusable(t)?+(t.getAttribute("tabindex")||0):-1},_collectTabbableNodes:function(t,e){if(t.nodeType!==Node.ELEMENT_NODE||!this._isVisible(t))return!1;var i=t,n=this._normalizedTabIndex(i),r=n>0;0>n||e.push(i);var o;o="content"===i.localName?Polymer.dom(i).getDistributedNodes():Polymer.dom(i.root||i).children;for(var s=0;s<o.length;s++){var a=this._collectTabbableNodes(o[s],e);r=r||a}return r},_isVisible:function(t){var e=t.style;return"hidden"!==e.visibility&&"none"!==e.display&&(e=window.getComputedStyle(t),"hidden"!==e.visibility&&"none"!==e.display)},_sortByTabIndex:function(t){var e=t.length;if(2>e)return t;var i=Math.ceil(e/2),n=this._sortByTabIndex(t.slice(0,i)),r=this._sortByTabIndex(t.slice(i));return this._mergeSortByTabIndex(n,r)},_mergeSortByTabIndex:function(t,e){for(var i=[];t.length>0&&e.length>0;)this._hasLowerTabOrder(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)},_hasLowerTabOrder:function(t,e){var i=Math.max(t.tabIndex,0),n=Math.max(e.tabIndex,0);return 0===i||0===n?n>i:i>n}}}(),function(){"use strict";Polymer.IronOverlayBehaviorImpl={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},alwaysOnTop:{type:Boolean},_manager:{type:Object,value:Polymer.IronOverlayManager},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||Polymer.dom(this).querySelector("[autofocus]")||this},get _focusableNodes(){return Polymer.IronFocusablesHelper.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__raf=null,this.__restoreFocusNode=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=Polymer.dom(this).observeNodes(this._onNodesChange)},detached:function(){Polymer.dom(this).unobserveNodes(this._observer),this._observer=null,this.__raf&&(window.cancelAnimationFrame(this.__raf),this.__raf=null),this._manager.removeOverlay(this)},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(t){this.fire("iron-overlay-canceled",t,{cancelable:!0}).defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(t){t?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__onNextAnimationFrame(this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{this._focusNode.blur(),this._focusedChild=null,this.restoreFocusOnClose&&this.__restoreFocusNode&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null;var t=this._manager.currentOverlay();t&&this!==t&&t._applyFocus()}},_onCaptureClick:function(t){this.noCancelOnOutsideClick||this.cancel(t)},_onCaptureFocus:function(t){if(this.withBackdrop){var e=Polymer.dom(t).path;e.indexOf(this)===-1?(t.stopPropagation(),this._applyFocus()):this._focusedChild=e[0]}},_onCaptureEsc:function(t){this.noCancelOnEscKey||this.cancel(t)},_onCaptureTab:function(t){if(this.withBackdrop){this.__ensureFirstLastFocusables();var e=t.shiftKey,i=e?this.__firstFocusableNode:this.__lastFocusableNode,n=e?this.__lastFocusableNode:this.__firstFocusableNode,r=!1;if(i===n)r=!0;else{var o=this._manager.deepActiveElement;r=o===i||o===this}r&&(t.preventDefault(),this._focusedChild=n,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__onNextAnimationFrame(this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){if(!this.__firstFocusableNode||!this.__lastFocusableNode){var t=this._focusableNodes;this.__firstFocusableNode=t[0],this.__lastFocusableNode=t[t.length-1]}},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),
  this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__onNextAnimationFrame:function(t){this.__raf&&window.cancelAnimationFrame(this.__raf);var e=this;this.__raf=window.requestAnimationFrame(function(){e.__raf=null,t.call(e)})}},Polymer.IronOverlayBehavior=[Polymer.IronFitBehavior,Polymer.IronResizableBehavior,Polymer.IronOverlayBehaviorImpl]}(),function(){var t=null;Polymer({is:"paper-toast",behaviors:[Polymer.IronOverlayBehavior],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Polymer.Base._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,Polymer.IronA11yAnnouncer.requestAvailability()},show:function(t){"string"==typeof t&&(t={text:t});for(var e in t)0===e.indexOf("_")?Polymer.Base._warn('The property "'+e+'" is private and was not set.'):e in this?this[e]=t[e]:Polymer.Base._warn('The property "'+e+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(t){t&&t.target===this&&"opacity"===t.propertyName&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){null!==this._autoClose&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(t&&t!==this&&t.close(),t=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):t===this&&(t=null),Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(t){this.positionTarget=t}})}(),Polymer({is:"paper-fab",behaviors:[Polymer.PaperButtonBehavior],properties:{src:{type:String,value:""},icon:{type:String,value:""},mini:{type:Boolean,value:!1,reflectToAttribute:!0},label:{type:String,observer:"_labelChanged"}},_labelChanged:function(){this.setAttribute("aria-label",this.label)},_computeIsIconFab:function(t,e){return t.length>0||e.length>0}}),Polymer.IronMenubarBehaviorImpl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(t){this.focusedItem.click(),t.detail.keyboardEvent.preventDefault()},_onDownKey:function(t){this.focusedItem.click(),t.detail.keyboardEvent.preventDefault()},get _isRTL(){return"rtl"===window.getComputedStyle(this).direction},_onLeftKey:function(t){this._isRTL?this._focusNext():this._focusPrevious(),t.detail.keyboardEvent.preventDefault()},_onRightKey:function(t){this._isRTL?this._focusPrevious():this._focusNext(),t.detail.keyboardEvent.preventDefault()},_onKeydown:function(t){this.keyboardEventMatchesKeys(t,"up down left right esc")||this._focusWithKeyboardEvent(t)}},Polymer.IronMenubarBehavior=[Polymer.IronMenuBehavior,Polymer.IronMenubarBehaviorImpl],Polymer({is:"paper-tab",behaviors:[Polymer.IronControlState,Polymer.IronButtonState,Polymer.PaperRippleBehavior],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var t=Polymer.dom(this).parentNode;return!!t&&!!t.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(t){if(this.link){var e=this.queryEffectiveChildren("a");if(!e)return;if(t.target===e)return;e.click()}}}),Polymer({is:"paper-tabs",behaviors:[Polymer.IronResizableBehavior,Polymer.IronMenubarBehavior],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(t){Polymer.dom(this).querySelectorAll("paper-tab").forEach(t?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(t){t.setAttribute("noink","")},_removeNoinkAttribute:function(t){t.removeAttribute("noink")},_computeScrollButtonClass:function(t,e,i){return!e||i?"hidden":t?"not-visible":""},_computeTabsContentClass:function(t,e){return t?"scrollable"+(e?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(t,e){return t?"hidden":e?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(t){this._tabChanged(t.detail.item,this._previousTab),this._previousTab=t.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),Polymer.IronMenuBehaviorImpl._activateHandler.apply(this,arguments)},_scheduleActivation:function(t,e){this._pendingActivationItem=t,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,e)},_delayedActivationHandler:function(){var t=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,t.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){void 0!==this._pendingActivationTimeout&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(t){t.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(t,e){if(this.scrollable){var i=e&&-e.ddx||0;this._affectScroll(i)}},_down:function(){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(t){this.$.tabsContainer.scrollLeft+=t;var e=this.$.tabsContainer.scrollLeft;this._leftHidden=0===e,this._rightHidden=e===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(t,e){if(!t)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(0,0);var i=this.$.tabsContent.getBoundingClientRect(),n=i.width,r=t.getBoundingClientRect(),o=r.left-i.left;if(this._pos={width:this._calcPercent(r.width,n),left:this._calcPercent(o,n)},this.noSlide||null==e)return this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),void this._positionBar(this._pos.width,this._pos.left);var s=e.getBoundingClientRect(),a=this.items.indexOf(e),l=this.items.indexOf(t),h=5;this.$.selectionBar.classList.add("expand");var c=l>a;this._isRTL&&(c=!c),c?this._positionBar(this._calcPercent(r.left+r.width-s.left,n)-h,this._left):this._positionBar(this._calcPercent(s.left+s.width-r.left,n)-h,this._calcPercent(o,n)+h),this.scrollable&&this._scrollToSelectedIfNeeded(r.width,o)},_scrollToSelectedIfNeeded:function(t,e){var i=e-this.$.tabsContainer.scrollLeft;0>i?this.$.tabsContainer.scrollLeft+=i:(i+=t-this.$.tabsContainer.offsetWidth,i>0&&(this.$.tabsContainer.scrollLeft+=i))},_calcPercent:function(t,e){return 100*t/e},_positionBar:function(t,e){t=t||0,e=e||0,this._width=t,this._left=e,this.transform("translateX("+e+"%) scaleX("+t/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(){var t=this.$.selectionBar.classList;t.contains("expand")?(t.remove("expand"),t.add("contract"),this._positionBar(this._pos.width,this._pos.left)):t.contains("contract")&&t.remove("contract")}}),Polymer.IronRangeBehavior={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(t){return(this._clampValue(t)-this.min)/(this.max-this.min)},_clampValue:function(t){return Math.min(this.max,Math.max(this.min,this._calcStep(t)))},_calcStep:function(t){if(t=parseFloat(t),!this.step)return t;var e=Math.round((t-this.min)/this.step);return this.step<1?e/(1/this.step)+this.min:e*this.step+this.min},_validateValue:function(){var t=this._clampValue(this.value);return this.value=this.oldValue=isNaN(t)?this.oldValue:t,this.value!==t},_update:function(){this._validateValue(),this._setRatio(100*this._calcRatio(this.value))}},Polymer({is:"paper-progress",behaviors:[Polymer.IronRangeBehavior],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(t){this.toggleClass("indeterminate",t,this.$.primaryProgress)},_transformProgress:function(t,e){var i="scaleX("+e/100+")";t.style.transform=t.style.webkitTransform=i},_mainRatioChanged:function(t){this._transformProgress(this.$.primaryProgress,t)},_progressChanged:function(t,e,i,n){t=this._clampValue(t),e=this._clampValue(e);var r=100*this._calcRatio(t),o=100*this._calcRatio(e);this._setSecondaryRatio(r),this._transformProgress(this.$.secondaryProgress,r),this._transformProgress(this.$.primaryProgress,o),this.secondaryProgress=t,this.setAttribute("aria-valuenow",e),this.setAttribute("aria-valuemin",i),this.setAttribute("aria-valuemax",n)},_disabledChanged:function(t){this.setAttribute("aria-disabled",t?"true":"false")},_hideSecondaryProgress:function(t){return 0===t}}),Polymer({is:"iron-pages",behaviors:[Polymer.IronResizableBehavior,Polymer.IronSelectableBehavior],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(){this.async(this.notifyResize)}}),Polymer.PaperDialogBehaviorImpl={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1}},observers:["_modalChanged(modal, _readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop},_modalChanged:function(t,e){e&&(t?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(t){this.closingReason=this.closingReason||{},this.closingReason.confirmed=t},_onDialogClick:function(t){for(var e=Polymer.dom(t).path,i=0;i<e.indexOf(this);i++){var n=e[i];if(n.hasAttribute&&(n.hasAttribute("dialog-dismiss")||n.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(n.hasAttribute("dialog-confirm")),this.close(),t.stopPropagation();break}}}},Polymer.PaperDialogBehavior=[Polymer.IronOverlayBehavior,Polymer.PaperDialogBehaviorImpl],function(){Polymer({is:"paper-dialog",behaviors:[Polymer.PaperDialogBehavior,Polymer.NeonAnimationRunnerBehavior],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}})}(),Polymer({is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},listeners:{"scrollable.scroll":"_scroll"},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget()},attached:function(){this.classList.add("no-padding"),this._ensureTarget(),requestAnimationFrame(this._scroll.bind(this))},_scroll:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||Polymer.dom(this).parentNode,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(Polymer.PaperDialogBehaviorImpl)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}}),Polymer.IronValidatableBehaviorMeta=null,Polymer.IronValidatableBehavior={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1},_validatorMeta:{type:Object},validatorType:{type:String,value:"validator"},_validator:{type:Object,computed:"__computeValidator(validator)"}},observers:["_invalidChanged(invalid)"],registered:function(){Polymer.IronValidatableBehaviorMeta=new Polymer.IronMeta({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},hasValidator:function(){return null!=this._validator},validate:function(t){return this.invalid=!this._getValidity(t),!this.invalid},_getValidity:function(t){return!this.hasValidator()||this._validator.validate(t)},__computeValidator:function(){return Polymer.IronValidatableBehaviorMeta&&Polymer.IronValidatableBehaviorMeta.byKey(this.validator)}},Polymer.IronFormElementBehavior={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1},_parentForm:{type:Object}},attached:function(){this.fire("iron-form-element-register")},detached:function(){this._parentForm&&this._parentForm.fire("iron-form-element-unregister",{target:this})}},Polymer.IronCheckedElementBehaviorImpl={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){void 0!==this.value&&null!==this.value||(this.value="on")}},Polymer.IronCheckedElementBehavior=[Polymer.IronFormElementBehavior,Polymer.IronValidatableBehavior,Polymer.IronCheckedElementBehaviorImpl],Polymer.PaperCheckedElementBehaviorImpl={_checkedChanged:function(){Polymer.IronCheckedElementBehaviorImpl._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){Polymer.PaperRippleBehavior._buttonStateChanged.call(this),this.disabled||this.isAttached&&(this.checked=this.active)}},Polymer.PaperCheckedElementBehavior=[Polymer.PaperInkyFocusBehavior,Polymer.IronCheckedElementBehavior,Polymer.PaperCheckedElementBehaviorImpl],Polymer({is:"paper-toggle-button",behaviors:[Polymer.PaperCheckedElementBehavior],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Polymer.RenderStatus.afterNextRender(this,function(){this.setScrollDirection("y")})},_ontrack:function(t){var e=t.detail;"start"===e.state?this._trackStart(e):"track"===e.state?this._trackMove(e):"end"===e.state&&this._trackEnd(e)},_trackStart:function(){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(t){var e=t.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+e:e)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var t=Polymer.PaperRippleBehavior._createRipple();return t.id="ink",t.setAttribute("recenters",""),t.classList.add("circle","toggle-ink"),t}}),Polymer({is:"user-login",properties:{url:{type:String,value:projectHostName+"/apis/user/isLoggedIn"},authchecked:{type:Boolean,notify:!0},loggedin:{type:Boolean,notify:!0},userdata:{type:Object,notify:!0}},attached:function(){this.listen(this.$.ajaxbaba,"error","onErrorBuddy"),this.listen(this.$.ajaxbaba,"response","onSuccessBuddy")},detached:function(){this.unlisten(this.$.ajaxbaba,"error","onErrorBuddy"),this.unlisten(this.$.ajaxbaba,"response","onSuccessBuddy")},onErrorBuddy:function(){this.authchecked=!0,this.loggedin=!1},onSuccessBuddy:function(){this.userdata.hasOwnProperty("error")?this.userdata.error&&(this.loggedin=!1):this.loggedin=!0,this.authchecked=!0}}),!function(t){var e=/iPhone/i,i=/iPod/i,n=/iPad/i,r=/(?=.*\bAndroid\b)(?=.*\bMobile\b)/i,o=/Android/i,s=/(?=.*\bAndroid\b)(?=.*\bSD4930UR\b)/i,a=/(?=.*\bAndroid\b)(?=.*\b(?:KFOT|KFTT|KFJWI|KFJWA|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|KFARWI|KFASWI|KFSAWI|KFSAWA)\b)/i,l=/IEMobile/i,h=/(?=.*\bWindows\b)(?=.*\bARM\b)/i,c=/BlackBerry/i,u=/BB10/i,d=/Opera Mini/i,f=/(CriOS|Chrome)(?=.*\bMobile\b)/i,p=/(?=.*\bFirefox\b)(?=.*\bMobile\b)/i,m=RegExp("(?:Nexus 7|BNTV250|Kindle Fire|Silk|GT-P1000)","i"),_=function(t,e){return t.test(e)},y=function(t){var y=t||navigator.userAgent,v=y.split("[FBAN");return void 0!==v[1]&&(y=v[0]),v=y.split("Twitter"),void 0!==v[1]&&(y=v[0]),this.apple={phone:_(e,y),ipod:_(i,y),tablet:!_(e,y)&&_(n,y),device:_(e,y)||_(i,y)||_(n,y)},this.amazon={phone:_(s,y),tablet:!_(s,y)&&_(a,y),device:_(s,y)||_(a,y)},this.android={phone:_(s,y)||_(r,y),tablet:!_(s,y)&&!_(r,y)&&(_(a,y)||_(o,y)),device:_(s,y)||_(a,y)||_(r,y)||_(o,y)},this.windows={phone:_(l,y),tablet:_(h,y),device:_(l,y)||_(h,y)},this.other={blackberry:_(c,y),blackberry10:_(u,y),opera:_(d,y),firefox:_(p,y),chrome:_(f,y),device:_(c,y)||_(u,y)||_(d,y)||_(p,y)||_(f,y)},this.seven_inch=_(m,y),this.any=this.apple.device||this.android.device||this.windows.device||this.other.device||this.seven_inch,this.phone=this.apple.phone||this.android.phone||this.windows.phone,this.tablet=this.apple.tablet||this.android.tablet||this.windows.tablet,"undefined"==typeof window?this:void 0},v=function(){var t=new y;return t.Class=y,t};"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=y:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?module.exports=v():"function"==typeof define&&define.amd?define("isMobile",[],t.isMobile=v()):t.isMobile=v()}(this),Polymer({is:"push-crew",properties:{url:{type:String,value:projectHostName+"/crons/pushnotification/upsertNotificationUser"},authchecked:{type:Boolean},loggedin:{type:Boolean},subscribe:{type:Boolean},subscribechecked:{type:Boolean,notify:!0},issubscribed:{type:Boolean,notify:!0},ajaxsendrequest:{type:Object},ajaxerror:{type:Object},rsp:{type:String},isMobile:{type:Number}},observers:["_onCheckedLogin(authchecked, loggedin)"],attached:function(){this.listen(this.$.ajaxbaba,"error","onErrorBuddy"),this.listen(this.$.ajaxbaba,"response","onSuccessBuddy")},detached:function(){this.unlisten(this.$.ajaxbaba,"error","onErrorBuddy"),this.unlisten(this.$.ajaxbaba,"response","onSuccessBuddy")},ready:function(){isMobile.any?this.isMobile=1:this.isMobile=0},onErrorBuddy:function(){},onSuccessBuddy:function(){},onSubscribe:function(){pushcrew.subscriberId&&pushcrew.subscriberId!=-1&&(crew_ref.ajaxsendrequest={subid:pushcrew.subscriberId,d_type:crew_ref.isMobile},crew_ref.$.ajaxbaba.generateRequest())},_onPushcrewready:function(){crew_ref.subscribechecked=!0,crew_ref.onSubscribe(),pushcrew.subscriberId==-1?crew_ref.issubscribed=!1:crew_ref.issubscribed=!!pushcrew.subscriberId},_onPushcrewerror:function(){},_onCheckedLogin:function(t,e){t&&e&&(!function(t,e,i,n){t._pcq=t._pcq||[],t._pcq.push(["_currentTime",Date.now()]),i=e.createElement("script"),i.type="text/javascript",i.async=!0,i.src="https://cdn.pushcrew.com/js/2af3528e08af3f47d8eedf0b5be2ac28.js",n=e.getElementsByTagName("script")[0],n.parentNode.insertBefore(i,n)}(window,document),crew_ref=this,_pcq.push(["APIReady",crew_ref._onPushcrewready,crew_ref._onPushcrewerror]))}}),Polymer({is:"menu-element",properties:{url:{type:String,value:projectHostName+"/signout"},showlistener:{type:Boolean,value:!1},authchecked:{type:Boolean,notify:!0},loggedin:{type:Boolean,notify:!0,observer:"_onLoggedIn"},userdata:{type:Object,notify:!0},subscribechecked:{type:Boolean},issubscribed:{type:Boolean},subscribeoriginal:{type:Boolean},subscribetoggle:{type:Boolean,observer:"_onSubscribeToggleChanged"},subscribe:{type:Boolean},userlogout:{type:Object}},observers:["_onNotificationsChecked(subscribechecked, issubscribed)"],attached:function(){this.listen(this.$.athButton,"tap","onAthButtonTap"),this.listen(this.$.ajaxbaba,"response","onLogoutComplete")},detached:function(){this.unlisten(this.$.athButton,"tap","onAthButtonTap"),this.unlisten(this.$.ajaxbaba,"response","onLogoutComplete"),this.$$("#logout")&&this.unlisten(this.$$("#logout"),"tap","onLogout")},onAthButtonTap:function(){Polymer.dom(this).getOwnerRoot().host.$.drawer.close(),Polymer.dom(this).getOwnerRoot().host.$.ath.open()},capitalize:function(t){return t.charAt(0).toUpperCase()+t.slice(1)},_onSubscribeToggleChanged:function(){!this.subscribeoriginal&&this.subscribechecked&&this.subscribetoggle&&(this.subscribe=!0)},_onNotificationsChecked:function(t,e){t&&(this.subscribetoggle=e,this.subscribeoriginal=e)},_onLoggedIn:function(){this.loggedin&&this.async(function(){this.listen(this.$$("#logout"),"tap","onLogout")})},onMenuItemTap:function(t){window.location.href=t.target.getAttribute("href")},onLogout:function(){this.$.ajaxbaba.generateRequest()},onLogoutComplete:function(){this.userlogout.hasOwnProperty("error")&&(window.location.href="/")}}),!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.page=t()}}(function(){return function t(e,i,n){function r(s,a){if(!i[s]){if(!e[s]){var l="function"==typeof require&&require;if(!a&&l)return l(s,!0);if(o)return o(s,!0);var h=Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var c=i[s]={exports:{}};e[s][0].call(c.exports,function(t){var i=e[s][1][t];return r(i?i:t)},c,c.exports,t,e,i,n)}return i[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)r(n[s]);return r}({1:[function(t,e){(function(i){"use strict";function n(t,e){if("function"==typeof t)return n("*",t);if("function"==typeof e)for(var i=new a(t),r=1;r<arguments.length;++r)n.callbacks.push(i.middleware(arguments[r]));else"string"==typeof t?n["string"==typeof e?"redirect":"show"](t,e):n.start(t)}function r(t){if(!t.handled){var e;e=g?v+m.hash.replace("#!",""):m.pathname+m.search,e!==t.canonicalPath&&(n.stop(),t.handled=!1,m.href=t.canonicalPath)}}function o(t){return"string"!=typeof t?t:y?decodeURIComponent(t.replace(/\+/g," ")):t}function s(t,e){"/"===t[0]&&0!==t.indexOf(v)&&(t=v+(g?"#!":"")+t);var i=t.indexOf("?");if(this.canonicalPath=t,this.path=t.replace(v,"")||"/",g&&(this.path=this.path.replace("#!","")||"/"),this.title=document.title,this.state=e||{},this.state.path=t,this.querystring=~i?o(t.slice(i+1)):"",this.pathname=o(~i?t.slice(0,i):t),this.params={},this.hash="",!g){if(!~this.path.indexOf("#"))return;var n=this.path.split("#");this.path=n[0],this.hash=o(n[1])||"",this.querystring=this.querystring.split("#")[0]}}function a(t,e){e=e||{},this.path="*"===t?"(.*)":t,this.method="GET",this.regexp=u(this.path,this.keys=[],e)}function l(t){if(1===h(t)&&!(t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented)){for(var e=t.path?t.path[0]:t.target;e&&"A"!==e.nodeName;)e=e.parentNode;if(e&&"A"===e.nodeName&&!e.hasAttribute("download")&&"external"!==e.getAttribute("rel")){var r=e.getAttribute("href");if((g||e.pathname!==m.pathname||!e.hash&&"#"!==r)&&(!r||r.indexOf("mailto:")<=-1)&&!e.target&&c(e.href)){var o=e.pathname+e.search+(e.hash||"");void 0!==i&&o.match(/^\/[a-zA-Z]:\//)&&(o=o.replace(/^\/[a-zA-Z]:\//,"/"));var s=o;0===o.indexOf(v)&&(o=o.substr(v.length)),g&&(o=o.replace("#!","")),v&&s===o||(t.preventDefault(),n.show(s))}}}}function h(t){return t=t||window.event,null===t.which?t.button:t.which}function c(t){var e=m.protocol+"//"+m.hostname;return m.port&&(e+=":"+m.port),t&&0===t.indexOf(e)}var u=t("path-to-regexp");e.exports=n;var d,f,p="undefined"!=typeof document&&document.ontouchstart?"touchstart":"click",m="undefined"!=typeof window&&(window.history.location||window.location),_=!0,y=!0,v="",g=!1;n.callbacks=[],n.exits=[],n.current="",n.len=0,n.base=function(t){return 0===arguments.length?v:void(v=t)},n.start=function(t){if(t=t||{},!d&&(d=!0,!1===t.dispatch&&(_=!1),!1===t.decodeURLComponents&&(y=!1),!1!==t.popstate&&window.addEventListener("popstate",b,!1),!1!==t.click&&document.addEventListener(p,l,!1),!0===t.hashbang&&(g=!0),_)){var e=g&&~m.hash.indexOf("#!")?m.hash.substr(2)+m.search:m.pathname+m.search+m.hash;n.replace(e,null,!0,_)}},n.stop=function(){d&&(n.current="",n.len=0,d=!1,document.removeEventListener(p,l,!1),window.removeEventListener("popstate",b,!1))},n.show=function(t,e,i,r){var o=new s(t,e);return n.current=o.path,!1!==i&&n.dispatch(o),!1!==o.handled&&!1!==r&&o.pushState(),o},n.back=function(t,e){n.len>0?(history.back(),n.len--):t?setTimeout(function(){n.show(t,e)}):setTimeout(function(){n.show(v,e)})},n.redirect=function(t,e){"string"==typeof t&&"string"==typeof e&&n(t,function(){setTimeout(function(){n.replace(e)},0)}),"string"==typeof t&&void 0===e&&setTimeout(function(){n.replace(t)},0)},n.replace=function(t,e,i,r){var o=new s(t,e);return n.current=o.path,o.init=i,o.save(),!1!==r&&n.dispatch(o),o},n.dispatch=function(t){function e(){var t=n.exits[a++];return t?void t(o,e):i()}function i(){var e=n.callbacks[s++];return t.path!==n.current?void(t.handled=!1):e?void e(t,i):r(t)}var o=f,s=0,a=0;f=t,o?e():i()},n.exit=function(t){if("function"==typeof t)return n.exit("*",t);for(var e=new a(t),i=1;i<arguments.length;++i)n.exits.push(e.middleware(arguments[i]))},n.Context=s,s.prototype.pushState=function(){n.len++,history.pushState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},s.prototype.save=function(){history.replaceState(this.state,this.title,g&&"/"!==this.path?"#!"+this.path:this.canonicalPath)},n.Route=a,a.prototype.middleware=function(t){var e=this;return function(i,n){return e.match(i.path,i.params)?t(i,n):void n()}},a.prototype.match=function(t,e){var i=this.keys,n=t.indexOf("?"),r=~n?t.slice(0,n):t,s=this.regexp.exec(decodeURIComponent(r));if(!s)return!1;for(var a=1,l=s.length;l>a;++a){var h=i[a-1],c=o(s[a]);void 0===c&&hasOwnProperty.call(e,h.name)||(e[h.name]=c)}return!0};var b=function(){var t=!1;if("undefined"!=typeof window)return"complete"===document.readyState?t=!0:window.addEventListener("load",function(){setTimeout(function(){t=!0},0)}),function(e){if(t)if(e.state){var i=e.state.path;n.replace(i,e.state)}else n.show(m.pathname+m.hash,void 0,void 0,!1)}}();n.sameOrigin=c}).call(this,t("_process"))},{_process:2,"path-to-regexp":3}],2:[function(t,e){function i(){}var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.MutationObserver,i="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var n=[];if(e){var r=document.createElement("div");return new MutationObserver(function(){var t=n.slice();n.length=0,t.forEach(function(t){t()})}).observe(r,{attributes:!0}),function(t){n.length||r.setAttribute("yes","no"),n.push(t)}}return i?(window.addEventListener("message",function(t){var e=t.source;e!==window&&null!==e||"process-tick"!==t.data||(t.stopPropagation(),n.length<=0)||n.shift()()},!0),function(t){n.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.on=i,n.addListener=i,n.once=i,n.off=i,n.removeListener=i,n.removeAllListeners=i,n.emit=i,n.binding=function(){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw Error("process.chdir is not supported")}},{}],3:[function(t,e){function i(t){for(var e,i=[],n=0,r=0,o="";null!=(e=m.exec(t));){var a=e[0],l=e[1],h=e.index;if(o+=t.slice(r,h),r=h+a.length,l)o+=l[1];else{o&&(i.push(o),o="");var c=e[2],u=e[3],d=e[4],f=e[5],p=e[6],_=e[7],y="+"===p||"*"===p,v="?"===p||"*"===p,g=c||"/",b=d||f||(_?".*":"[^"+g+"]+?");i.push({name:u||n++,prefix:c||"",delimiter:g,optional:v,repeat:y,pattern:s(b)})}}return r<t.length&&(o+=t.substr(r)),o&&i.push(o),i}function n(t){return r(i(t))}function r(t){for(var e=Array(t.length),i=0;i<t.length;i++)"object"==typeof t[i]&&(e[i]=RegExp("^"+t[i].pattern+"$"));return function(i){for(var n="",r=i||{},o=0;o<t.length;o++){var s=t[o];if("string"!=typeof s){var a,l=r[s.name];if(null==l){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to be defined')}if(p(l)){if(!s.repeat)throw new TypeError('Expected "'+s.name+'" to not repeat, but received "'+l+'"');if(0===l.length){if(s.optional)continue;throw new TypeError('Expected "'+s.name+'" to not be empty')}for(var h=0;h<l.length;h++){if(a=encodeURIComponent(l[h]),!e[o].test(a))throw new TypeError('Expected all "'+s.name+'" to match "'+s.pattern+'", but received "'+a+'"');n+=(0===h?s.prefix:s.delimiter)+a}}else{if(a=encodeURIComponent(l),!e[o].test(a))throw new TypeError('Expected "'+s.name+'" to match "'+s.pattern+'", but received "'+a+'"');n+=s.prefix+a}}else n+=s}return n}}function o(t){
  return t.replace(/([.+*?=^!:${}()[\]|\/])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function a(t,e){return t.keys=e,t}function l(t){return t.sensitive?"":"i"}function h(t,e){var i=t.source.match(/\((?!\?)/g);if(i)for(var n=0;n<i.length;n++)e.push({name:n,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return a(t,e)}function c(t,e,i){for(var n=[],r=0;r<t.length;r++)n.push(f(t[r],e,i).source);return a(RegExp("(?:"+n.join("|")+")",l(i)),e)}function u(t,e,n){for(var r=i(t),o=d(r,n),s=0;s<r.length;s++)"string"!=typeof r[s]&&e.push(r[s]);return a(o,e)}function d(t,e){e=e||{};for(var i=e.strict,n=e.end!==!1,r="",s=t[t.length-1],a="string"==typeof s&&/\/$/.test(s),h=0;h<t.length;h++){var c=t[h];if("string"==typeof c)r+=o(c);else{var u=o(c.prefix),d=c.pattern;c.repeat&&(d+="(?:"+u+d+")*"),d=c.optional?u?"(?:"+u+"("+d+"))?":"("+d+")?":u+"("+d+")",r+=d}}return i||(r=(a?r.slice(0,-2):r)+"(?:\\/(?=$))?"),r+=n?"$":i&&a?"":"(?=\\/|$)",RegExp("^"+r,l(e))}function f(t,e,i){return e=e||[],p(e)?i||(i={}):(i=e,e=[]),t instanceof RegExp?h(t,e,i):p(t)?c(t,e,i):u(t,e,i)}var p=t("isarray");e.exports=f,e.exports.parse=i,e.exports.compile=n,e.exports.tokensToFunction=r,e.exports.tokensToRegExp=d;var m=RegExp("(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))","g")},{isarray:4}],4:[function(t,e){e.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},{}]},{},[1])(1)});var queries={},fjContentLoading=document.getElementById("fj-content-loading"),fjLoaderCircular=document.getElementById("fj-loader-circular"),fjRetryLoader=document.getElementById("fj-retry-loader"),stdEasing="s cubic-bezier(.4, 0, .2, 1)",outEasing="s cubic-bezier(.4, 0, 1, 1)",inEasing="s cubic-bezier(0, 0, .2, 1)",querystring="";!function(t,e,i,n,r,o,s){t.GoogleAnalyticsObject=r,t[r]=t[r]||function(){(t[r].q=t[r].q||[]).push(arguments)},t[r].l=1*new Date,o=e.createElement(i),s=e.getElementsByTagName(i)[0],o.async=1,o.src=n,s.parentNode.insertBefore(o,s)}(window,document,"script","https://www.google-analytics.com/analytics.js","ga"),ga("create","UA-86096862-1","auto"),ga("send","pageview"),Polymer({is:"customer-listeners",behaviors:[Polymer.NeonAnimationRunnerBehavior],properties:{showlistener:{type:Boolean,value:!0},drawer:{type:Boolean},selected:{type:Number,value:0,notify:!0,reflectToAttribute:!0},authchecked:{type:Boolean},loggedin:{type:Boolean},redirect:{type:String},message:{type:String},baseurl:{type:String,value:projectHostName+"/apis/user/listeners"},baseresponse:{type:Array},activeurl:{type:String,value:projectHostName+"/apis/user/listenerChatList"},activeresponse:{type:Object},loadingbuddy:{type:Boolean,observer:"_onLoadingBuddy"},placeholder:{type:Boolean,value:!0},chaturl:{type:String,value:projectHostName+"/apis/listener/userlist"},chatresponse:{type:Array},colors:{type:Array,value:["cyan","darkcyan","darkgreen","green"]},animationConfig:{type:Object,value:function(){return{entry:[{name:"slide-from-top-animation",node:this.$.progress,timing:{duration:600,delay:600}}],exit:[{name:"slide-up-animation",node:this.$.progress,timing:{duration:600}}]}}}},listeners:{"app-drawer-transitioned":"_onDrawerChanged","neon-animation-finish":"_onNeonAnimationFinish"},observers:["_onRedirect(redirect, authchecked, loggedin)"],ready:function(){page.base(getBasePage()),page.redirect("?"),page("/",this.noop),page(!0)},attached:function(){this.listen(window,"popstate","_onPageHistory"),this.listen(this.$.retryButton,"tap","onRetryBuddy"),this.listen(this.$.aBuddy,"error","onErrorBuddy"),this.listen(this.$.aBuddy,"response","onSuccessBuddy"),this.listen(this.$.aList,"response","onSuccessList")},detached:function(){this.unlisten(window,"popstate","_onPageHistory"),this.unlisten(this.$.retryButton,"tap","onRetryBuddy"),this.unlisten(this.$.aBuddy,"error","onErrorBuddy"),this.unlisten(this.$.aBuddy,"response","onSuccessBuddy"),this.unlisten(this.$.aList,"response","onSuccessBuddy")},noop:function(){},_onDrawerChanged:function(){this.$.drawer.hasAttribute("opened")&&!this.drawer?(addQuery("menu=1",!0),this.drawer=!0):!this.$.drawer.hasAttribute("opened")&&this.drawer&&(this.drawer=!1,queries.hasOwnProperty("menu")&&window.history.back())},_onPageHistory:function(){queries=getQueryAsObjects(window.location.href.split("?")[1]),!queries.hasOwnProperty("menu")&&this.drawer&&this.$.drawer.close()},_onLoadingBuddy:function(){this.loadingbuddy?(this.$.progress.style.opacity=1,this.playAnimation("entry")):this.debounce("hide",function(){this.playAnimation("exit")},4e3)},_onNeonAnimationFinish:function(){this.loadingbuddy||this.debounce("hide",function(){this.$.progress.style.opacity=0},4500)},onErrorBuddy:function(){this.$.retryBuddy.style.display="flex"},onSuccessBuddy:function(){this.$.retryBuddy.style.display="none"},onRetryBuddy:function(){this.$.aBuddy.generateRequest()},_onLeftTap:function(t){window.location.href="/profile?id="+this.baseresponse[t.model.index].id},_onRightTap:function(t){this.redirect=this.baseresponse[t.model.index].id,this.message="Opening a chat window",this.$.toast.open()},onSuccessList:function(){this.activeresponse.result.length>0?this.placeholder=!1:this.placeholder=!0},_onRedirect:function(t,e,i){e&&(i?window.location.href="/chat?id="+t:t?window.location.href="/welcome?redirect="+encodeURIComponent("https://feeljoy.in/chat?id="+t):window.location.href="/welcome")},_firstLetter:function(t){return t.charAt(0)},_randomClass:function(){return this.colors[Math.floor(Math.random()*this.colors.length)]}}),function(){"use strict";if("registerElement"in document&&"import"in document.createElement("link")&&"content"in document.createElement("template"))window.HTMLImports||document.dispatchEvent(new CustomEvent("WebComponentsReady",{bubbles:!0}));else{var t=document.createElement("script");t.src="bower_components/webcomponentsjs/webcomponents-lite.min.js",document.body.appendChild(t)}"serviceWorker"in navigator&&navigator.serviceWorker.register("service-worker.js").then(function(){})["catch"](function(){})}();