forked from tastejs/todomvc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
12 lines (12 loc) · 245 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><title>TodoMVC</title><meta name="description" content="Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, Spine and many more"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="TodoMVC"><meta name="twitter:site" content="@TasteJS"><meta name="twitter:description" content="Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS and many more"><meta name="twitter:image" content="https://raw.githubusercontent.com/tastejs/todomvc/gh-pages/site-assets/screenshot.png"><meta property="og:url" content="https://todomvc.com"><meta property="og:title" content="TodoMVC"><meta property="og:image" content="https://raw.github.com/tastejs/todomvc/gh-pages/site-assets/screenshot.png"><meta property="og:description" content="Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, Spine and many more"><link rel="shortcut icon" href="site-assets/favicon.ico"><script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script><link rel="stylesheet" href="site-assets/main.min.css"><div hidden><script>(function(){function resolve(){document.body.removeAttribute("unresolved")}if(window.WebComponents){addEventListener("WebComponentsReady",resolve)}else{if(document.readyState==="interactive"||document.readyState==="complete"){resolve()}else{addEventListener("DOMContentLoaded",resolve)}}})();window.Polymer={Settings:function(){var user=window.Polymer||{};var parts=location.search.slice(1).split("&");for(var i=0,o;i<parts.length&&(o=parts[i]);i++){o=o.split("=");o[0]&&(user[o[0]]=o[1]||true)}var wantShadow=user.dom==="shadow";var hasShadow=Boolean(Element.prototype.createShadowRoot);var nativeShadow=hasShadow&&!window.ShadowDOMPolyfill;var useShadow=wantShadow&&hasShadow;var hasNativeImports=Boolean("import"in document.createElement("link"));var useNativeImports=hasNativeImports;var useNativeCustomElements=!window.CustomElements||window.CustomElements.useNative;return{wantShadow:wantShadow,hasShadow:hasShadow,nativeShadow:nativeShadow,useShadow:useShadow,useNativeShadow:useShadow&&nativeShadow,useNativeImports:useNativeImports,useNativeCustomElements:useNativeCustomElements}}()};(function(){var userPolymer=window.Polymer;window.Polymer=function(prototype){if(typeof prototype==="function"){prototype=prototype.prototype}if(!prototype){prototype={}}var factory=desugar(prototype);prototype=factory.prototype;var options={prototype:prototype};if(prototype.extends){options.extends=prototype.extends}Polymer.telemetry._registrate(prototype);document.registerElement(prototype.is,options);return factory};var desugar=function(prototype){var base=Polymer.Base;if(prototype.extends){base=Polymer.Base._getExtendedPrototype(prototype.extends)}prototype=Polymer.Base.chainObject(prototype,base);prototype.registerCallback();return prototype.constructor};window.Polymer=Polymer;if(userPolymer){for(var i in userPolymer){Polymer[i]=userPolymer[i]}}Polymer.Class=desugar})();Polymer.telemetry={registrations:[],_regLog:function(prototype){console.log("["+prototype.is+"]: registered")},_registrate:function(prototype){this.registrations.push(prototype);Polymer.log&&this._regLog(prototype)},dumpRegistrations:function(){this.registrations.forEach(this._regLog)}};Object.defineProperty(window,"currentImport",{enumerable:true,configurable:true,get:function(){return(document._currentScript||document.currentScript).ownerDocument}});Polymer.RenderStatus={_ready:false,_callbacks:[],whenReady:function(cb){if(this._ready){cb()}else{this._callbacks.push(cb)}},_makeReady:function(){this._ready=true;for(var i=0;i<this._callbacks.length;i++){this._callbacks[i]()}this._callbacks=[]},_catchFirstRender:function(){requestAnimationFrame(function(){Polymer.RenderStatus._makeReady()})},_afterNextRenderQueue:[],_waitingNextRender:false,afterNextRender:function(element,fn,args){if(!this._waitingNextRender){this._waitingNextRender=true;this.whenReady(this._flushAfterNextRender)}this._afterNextRenderQueue.push([element,fn,args])},_flushAfterNextRender:function(){requestAnimationFrame(function(){setTimeout(Polymer.RenderStatus.__flushAfterNextRender)})},__flushAfterNextRender:function(){var self=Polymer.RenderStatus;self._waitingNextRender=false;for(var i=0,h;i<self._afterNextRenderQueue.length;i++){h=self._afterNextRenderQueue[i];h[1].apply(h[0],h[2]||Polymer.nar)}self._afterNextRenderQueue=[]}};if(window.HTMLImports){HTMLImports.whenReady(function(){Polymer.RenderStatus._catchFirstRender()})}else{Polymer.RenderStatus._catchFirstRender()}Polymer.ImportStatus=Polymer.RenderStatus;Polymer.ImportStatus.whenLoaded=Polymer.ImportStatus.whenReady;Polymer.Base={__isPolymerInstance__:true,_addFeature:function(feature){this.extend(this,feature)},registerCallback:function(){this._desugarBehaviors();this._doBehavior("beforeRegister");this._registerFeatures();this._doBehavior("registered")},createdCallback:function(){Polymer.telemetry.instanceCount++;this.root=this;this._doBehavior("created");this._initFeatures()},attachedCallback:function(){var self=this;Polymer.RenderStatus.whenReady(function(){self.isAttached=true;self._doBehavior("attached")})},detachedCallback:function(){this.isAttached=false;this._doBehavior("detached")},attributeChangedCallback:function(name,oldValue,newValue){this._attributeChangedImpl(name);this._doBehavior("attributeChanged",[name,oldValue,newValue])},_attributeChangedImpl:function(name){this._setAttributeToProperty(this,name)},extend:function(prototype,api){if(prototype&&api){var n$=Object.getOwnPropertyNames(api);for(var i=0,n;i<n$.length&&(n=n$[i]);i++){this.copyOwnProperty(n,api,prototype)}}return prototype||api},mixin:function(target,source){for(var i in source){target[i]=source[i]}return target},copyOwnProperty:function(name,source,target){var pd=Object.getOwnPropertyDescriptor(source,name);if(pd){Object.defineProperty(target,name,pd)}},_log:console.log.apply.bind(console.log,console),_warn:console.warn.apply.bind(console.warn,console),_error:console.error.apply.bind(console.error,console),_logf:function(){return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments,0))}};Polymer.Base._logPrefix=function(){var color=window.chrome||/firefox/i.test(navigator.userAgent);return color?["%c[%s::%s]:","font-weight: bold; background-color:#EEEE00;"]:["[%s::%s]:"]}();Polymer.Base.chainObject=function(object,inherited){if(object&&inherited&&object!==inherited){if(!Object.__proto__){object=Polymer.Base.extend(Object.create(inherited),object)}object.__proto__=inherited}return object};Polymer.Base=Polymer.Base.chainObject(Polymer.Base,HTMLElement.prototype);if(window.CustomElements){Polymer.instanceof=CustomElements.instanceof}else{Polymer.instanceof=function(obj,ctor){return obj instanceof ctor}}Polymer.isInstance=function(obj){return Boolean(obj&&obj.__isPolymerInstance__)};Polymer.telemetry.instanceCount=0;(function(){var modules={};var lcModules={};var findModule=function(id){return modules[id]||lcModules[id.toLowerCase()]};var DomModule=function(){return document.createElement("dom-module")};DomModule.prototype=Object.create(HTMLElement.prototype);Polymer.Base.extend(DomModule.prototype,{constructor:DomModule,createdCallback:function(){this.register()},register:function(id){var id=id||this.id||this.getAttribute("name")||this.getAttribute("is");if(id){this.id=id;modules[id]=this;lcModules[id.toLowerCase()]=this}},import:function(id,selector){if(id){var m=findModule(id);if(!m){forceDocumentUpgrade();m=findModule(id)}if(m&&selector){m=m.querySelector(selector)}return m}}});var cePolyfill=window.CustomElements&&!CustomElements.useNative;document.registerElement("dom-module",DomModule);function forceDocumentUpgrade(){if(cePolyfill){var script=document._currentScript||document.currentScript;var doc=script&&script.ownerDocument||document;if(doc){CustomElements.upgradeAll(doc)}}}})();Polymer.Base._addFeature({_prepIs:function(){if(!this.is){var module=(document._currentScript||document.currentScript).parentNode;if(module.localName==="dom-module"){var id=module.id||module.getAttribute("name")||module.getAttribute("is");this.is=id}}if(this.is){this.is=this.is.toLowerCase()}}});Polymer.Base._addFeature({behaviors:[],_desugarBehaviors:function(){if(this.behaviors.length){this.behaviors=this._desugarSomeBehaviors(this.behaviors)}},_desugarSomeBehaviors:function(behaviors){behaviors=this._flattenBehaviorsList(behaviors);for(var i=behaviors.length-1;i>=0;i--){this._mixinBehavior(behaviors[i])}return behaviors},_flattenBehaviorsList:function(behaviors){var flat=[];for(var i=0;i<behaviors.length;i++){var b=behaviors[i];if(b instanceof Array){flat=flat.concat(this._flattenBehaviorsList(b))}else if(b){flat.push(b)}else{this._warn(this._logf("_flattenBehaviorsList","behavior is null, check for missing or 404 import"))}}return flat},_mixinBehavior:function(b){var n$=Object.getOwnPropertyNames(b);for(var i=0,n;i<n$.length&&(n=n$[i]);i++){if(!Polymer.Base._behaviorProperties[n]&&!this.hasOwnProperty(n)){this.copyOwnProperty(n,b,this)}}},_prepBehaviors:function(){this._prepFlattenedBehaviors(this.behaviors)},_prepFlattenedBehaviors:function(behaviors){for(var i=0,l=behaviors.length;i<l;i++){this._prepBehavior(behaviors[i])}this._prepBehavior(this)},_doBehavior:function(name,args){for(var i=0;i<this.behaviors.length;i++){this._invokeBehavior(this.behaviors[i],name,args)}this._invokeBehavior(this,name,args)},_invokeBehavior:function(b,name,args){var fn=b[name];if(fn){fn.apply(this,args||Polymer.nar)}},_marshalBehaviors:function(){for(var i=0;i<this.behaviors.length;i++){this._marshalBehavior(this.behaviors[i])}this._marshalBehavior(this)}});Polymer.Base._behaviorProperties={hostAttributes:true,registered:true,properties:true,observers:true,listeners:true,created:true,attached:true,detached:true,attributeChanged:true,ready:true};Polymer.Base._addFeature({_getExtendedPrototype:function(tag){return this._getExtendedNativePrototype(tag)},_nativePrototypes:{},_getExtendedNativePrototype:function(tag){var p=this._nativePrototypes[tag];if(!p){var np=this.getNativePrototype(tag);p=this.extend(Object.create(np),Polymer.Base);this._nativePrototypes[tag]=p}return p},getNativePrototype:function(tag){return Object.getPrototypeOf(document.createElement(tag))}});Polymer.Base._addFeature({_prepConstructor:function(){this._factoryArgs=this.extends?[this.extends,this.is]:[this.is];var ctor=function(){return this._factory(arguments)};if(this.hasOwnProperty("extends")){ctor.extends=this.extends}Object.defineProperty(this,"constructor",{value:ctor,writable:true,configurable:true});ctor.prototype=this},_factory:function(args){var elt=document.createElement.apply(document,this._factoryArgs);if(this.factoryImpl){this.factoryImpl.apply(elt,args)}return elt}});Polymer.nob=Object.create(null);Polymer.Base._addFeature({properties:{},getPropertyInfo:function(property){var info=this._getPropertyInfo(property,this.properties);if(!info){for(var i=0;i<this.behaviors.length;i++){info=this._getPropertyInfo(property,this.behaviors[i].properties);if(info){return info}}}return info||Polymer.nob},_getPropertyInfo:function(property,properties){var p=properties&&properties[property];if(typeof p==="function"){p=properties[property]={type:p}}if(p){p.defined=true}return p},_prepPropertyInfo:function(){this._propertyInfo={};for(var i=0,p;i<this.behaviors.length;i++){this._addPropertyInfo(this._propertyInfo,this.behaviors[i].properties)}this._addPropertyInfo(this._propertyInfo,this.properties);this._addPropertyInfo(this._propertyInfo,this._propertyEffects)},_addPropertyInfo:function(target,source){if(source){var t,s;for(var i in source){t=target[i];s=source[i];if(i[0]==="_"&&!s.readOnly){continue}if(!target[i]){target[i]={type:typeof s==="function"?s:s.type,readOnly:s.readOnly,attribute:Polymer.CaseMap.camelToDashCase(i)}}else{if(!t.type){t.type=s.type}if(!t.readOnly){t.readOnly=s.readOnly}}}}}});Polymer.CaseMap={_caseMap:{},dashToCamelCase:function(dash){var mapped=Polymer.CaseMap._caseMap[dash];if(mapped){return mapped}if(dash.indexOf("-")<0){return Polymer.CaseMap._caseMap[dash]=dash}return Polymer.CaseMap._caseMap[dash]=dash.replace(/-([a-z])/g,function(m){return m[1].toUpperCase()})},camelToDashCase:function(camel){var mapped=Polymer.CaseMap._caseMap[camel];if(mapped){return mapped}return Polymer.CaseMap._caseMap[camel]=camel.replace(/([a-z][A-Z])/g,function(g){return g[0]+"-"+g[1].toLowerCase()})}};Polymer.Base._addFeature({_addHostAttributes:function(attributes){if(!this._aggregatedAttributes){this._aggregatedAttributes={}}if(attributes){this.mixin(this._aggregatedAttributes,attributes)}},_marshalHostAttributes:function(){if(this._aggregatedAttributes){this._applyAttributes(this,this._aggregatedAttributes)}},_applyAttributes:function(node,attr$){for(var n in attr$){if(!this.hasAttribute(n)&&n!=="class"){var v=attr$[n];this.serializeValueToAttribute(v,n,this)}}},_marshalAttributes:function(){this._takeAttributesToModel(this)},_takeAttributesToModel:function(model){if(this.hasAttributes()){for(var i in this._propertyInfo){var info=this._propertyInfo[i];if(this.hasAttribute(info.attribute)){this._setAttributeToProperty(model,info.attribute,i,info)}}}},_setAttributeToProperty:function(model,attribute,property,info){if(!this._serializing){var property=property||Polymer.CaseMap.dashToCamelCase(attribute);info=info||this._propertyInfo&&this._propertyInfo[property];if(info&&!info.readOnly){var v=this.getAttribute(attribute);model[property]=this.deserialize(v,info.type)}}},_serializing:false,reflectPropertyToAttribute:function(property,attribute,value){this._serializing=true;value=value===undefined?this[property]:value;this.serializeValueToAttribute(value,attribute||Polymer.CaseMap.camelToDashCase(property));this._serializing=false},serializeValueToAttribute:function(value,attribute,node){var str=this.serialize(value);node=node||this;if(str===undefined){node.removeAttribute(attribute)}else{node.setAttribute(attribute,str)}},deserialize:function(value,type){switch(type){case Number:value=Number(value);break;case Boolean:value=value!==null;break;case Object:try{value=JSON.parse(value)}catch(x){}break;case Array:try{value=JSON.parse(value)}catch(x){value=null;console.warn("Polymer::Attributes: couldn`t decode Array as JSON")}break;case Date:value=new Date(value);break;case String:default:break}return value},serialize:function(value){switch(typeof value){case"boolean":return value?"":undefined;case"object":if(value instanceof Date){return value}else if(value){try{return JSON.stringify(value)}catch(x){return""}}default:return value!=null?value:undefined}}});Polymer.Base._addFeature({_setupDebouncers:function(){this._debouncers={}},debounce:function(jobName,callback,wait){return this._debouncers[jobName]=Polymer.Debounce.call(this,this._debouncers[jobName],callback,wait)},isDebouncerActive:function(jobName){var debouncer=this._debouncers[jobName];return debouncer&&debouncer.finish},flushDebouncer:function(jobName){var debouncer=this._debouncers[jobName];if(debouncer){debouncer.complete()}},cancelDebouncer:function(jobName){var debouncer=this._debouncers[jobName];if(debouncer){debouncer.stop()}}});Polymer.version="1.2.2";Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs();this._prepBehaviors();this._prepConstructor();this._prepPropertyInfo()},_prepBehavior:function(b){this._addHostAttributes(b.hostAttributes)},_marshalBehavior:function(b){},_initFeatures:function(){this._marshalHostAttributes();this._setupDebouncers();this._marshalBehaviors()}});</script><script>Polymer.Base._addFeature({_prepTemplate:function(){if(this._template===undefined){this._template=Polymer.DomModule.import(this.is,"template")}if(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>."))}if(this._template&&!this._template.content&&HTMLTemplateElement.bootstrap){HTMLTemplateElement.decorate(this._template);HTMLTemplateElement.bootstrap(this._template.content)}},_stampTemplate:function(){if(this._template){this.root=this.instanceTemplate(this._template)}},instanceTemplate:function(template){var dom=document.importNode(template._content||template.content,true);return dom}});(function(){var baseAttachedCallback=Polymer.Base.attachedCallback;Polymer.Base._addFeature({_hostStack:[],ready:function(){},_registerHost:function(host){this.dataHost=host=host||Polymer.Base._hostStack[Polymer.Base._hostStack.length-1];if(host&&host._clients){host._clients.push(this)}},_beginHosting:function(){Polymer.Base._hostStack.push(this);if(!this._clients){this._clients=[]}},_endHosting:function(){Polymer.Base._hostStack.pop()},_tryReady:function(){if(this._canReady()){this._ready()}},_canReady:function(){return!this.dataHost||this.dataHost._clientsReadied},_ready:function(){this._beforeClientsReady();if(this._template){this._setupRoot();this._readyClients()}this._clientsReadied=true;this._clients=null;this._afterClientsReady();this._readySelf()},_readyClients:function(){this._beginDistribute();var c$=this._clients;if(c$){for(var i=0,l=c$.length,c;i<l&&(c=c$[i]);i++){c._ready()}}this._finishDistribute()},_readySelf:function(){this._doBehavior("ready");this._readied=true;if(this._attachedPending){this._attachedPending=false;this.attachedCallback()}},_beforeClientsReady:function(){},_afterClientsReady:function(){},_beforeAttached:function(){},attachedCallback:function(){if(this._readied){this._beforeAttached();baseAttachedCallback.call(this)}else{this._attachedPending=true}}})})();Polymer.ArraySplice=function(){function newSplice(index,removed,addedCount){return{index:index,removed:removed,addedCount:addedCount}}var EDIT_LEAVE=0;var EDIT_UPDATE=1;var EDIT_ADD=2;var EDIT_DELETE=3;function ArraySplice(){}ArraySplice.prototype={calcEditDistances:function(current,currentStart,currentEnd,old,oldStart,oldEnd){var rowCount=oldEnd-oldStart+1;var columnCount=currentEnd-currentStart+1;var distances=new Array(rowCount);for(var i=0;i<rowCount;i++){distances[i]=new Array(columnCount);distances[i][0]=i}for(var j=0;j<columnCount;j++)distances[0][j]=j;for(var i=1;i<rowCount;i++){for(var j=1;j<columnCount;j++){if(this.equals(current[currentStart+j-1],old[oldStart+i-1]))distances[i][j]=distances[i-1][j-1];else{var north=distances[i-1][j]+1;var west=distances[i][j-1]+1;distances[i][j]=north<west?north:west}}}return distances},spliceOperationsFromEditDistances:function(distances){var i=distances.length-1;var j=distances[0].length-1;var current=distances[i][j];var edits=[];while(i>0||j>0){if(i==0){edits.push(EDIT_ADD);j--;continue}if(j==0){edits.push(EDIT_DELETE);i--;continue}var northWest=distances[i-1][j-1];var west=distances[i-1][j];var north=distances[i][j-1];var min;if(west<north)min=west<northWest?west:northWest;else min=north<northWest?north:northWest;if(min==northWest){if(northWest==current){edits.push(EDIT_LEAVE)}else{edits.push(EDIT_UPDATE);current=northWest}i--;j--}else if(min==west){edits.push(EDIT_DELETE);i--;current=west}else{edits.push(EDIT_ADD);j--;current=north}}edits.reverse();return edits},calcSplices:function(current,currentStart,currentEnd,old,oldStart,oldEnd){var prefixCount=0;var suffixCount=0;var minLength=Math.min(currentEnd-currentStart,oldEnd-oldStart);if(currentStart==0&&oldStart==0)prefixCount=this.sharedPrefix(current,old,minLength);if(currentEnd==current.length&&oldEnd==old.length)suffixCount=this.sharedSuffix(current,old,minLength-prefixCount);currentStart+=prefixCount;oldStart+=prefixCount;currentEnd-=suffixCount;oldEnd-=suffixCount;if(currentEnd-currentStart==0&&oldEnd-oldStart==0)return[];if(currentStart==currentEnd){var splice=newSplice(currentStart,[],0);while(oldStart<oldEnd)splice.removed.push(old[oldStart++]);return[splice]}else if(oldStart==oldEnd)return[newSplice(currentStart,[],currentEnd-currentStart)];var ops=this.spliceOperationsFromEditDistances(this.calcEditDistances(current,currentStart,currentEnd,old,oldStart,oldEnd));var splice=undefined;var splices=[];var index=currentStart;var oldIndex=oldStart;for(var i=0;i<ops.length;i++){switch(ops[i]){case EDIT_LEAVE:if(splice){splices.push(splice);splice=undefined}index++;oldIndex++;break;case EDIT_UPDATE:if(!splice)splice=newSplice(index,[],0);splice.addedCount++;index++;splice.removed.push(old[oldIndex]);oldIndex++;break;case EDIT_ADD:if(!splice)splice=newSplice(index,[],0);splice.addedCount++;index++;break;case EDIT_DELETE:if(!splice)splice=newSplice(index,[],0);splice.removed.push(old[oldIndex]);oldIndex++;break}}if(splice){splices.push(splice)}return splices},sharedPrefix:function(current,old,searchLength){for(var i=0;i<searchLength;i++)if(!this.equals(current[i],old[i]))return i;return searchLength},sharedSuffix:function(current,old,searchLength){var index1=current.length;var index2=old.length;var count=0;while(count<searchLength&&this.equals(current[--index1],old[--index2]))count++;return count},calculateSplices:function(current,previous){return this.calcSplices(current,0,current.length,previous,0,previous.length)},equals:function(currentValue,previousValue){return currentValue===previousValue}};return new ArraySplice}();Polymer.domInnerHTML=function(){var escapeAttrRegExp=/[&\u00A0"]/g;var escapeDataRegExp=/[&\u00A0<>]/g;function escapeReplace(c){switch(c){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function escapeAttr(s){return s.replace(escapeAttrRegExp,escapeReplace)}function escapeData(s){return s.replace(escapeDataRegExp,escapeReplace)}function makeSet(arr){var set={};for(var i=0;i<arr.length;i++){set[arr[i]]=true}return set}var voidElements=makeSet(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);var plaintextParents=makeSet(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function getOuterHTML(node,parentNode,composed){switch(node.nodeType){case Node.ELEMENT_NODE:var tagName=node.localName;var s="<"+tagName;var attrs=node.attributes;for(var i=0,attr;attr=attrs[i];i++){s+=" "+attr.name+'="'+escapeAttr(attr.value)+'"'}s+=">";if(voidElements[tagName]){return s}return s+getInnerHTML(node,composed)+"</"+tagName+">";case Node.TEXT_NODE:var data=node.data;if(parentNode&&plaintextParents[parentNode.localName]){return data}return escapeData(data);case Node.COMMENT_NODE:return"\x3c!--"+node.data+"--\x3e";default:console.error(node);throw new Error("not implemented")}}function getInnerHTML(node,composed){if(node instanceof HTMLTemplateElement)node=node.content;var s="";var c$=Polymer.dom(node).childNodes;c$=composed?node._composedChildren:c$;for(var i=0,l=c$.length,child;i<l&&(child=c$[i]);i++){s+=getOuterHTML(child,node,composed)}return s}return{getInnerHTML:getInnerHTML}}();Polymer.DomApi=function(){"use strict";var Settings=Polymer.Settings;var getInnerHTML=Polymer.domInnerHTML.getInnerHTML;var nativeInsertBefore=Element.prototype.insertBefore;var nativeRemoveChild=Element.prototype.removeChild;var nativeAppendChild=Element.prototype.appendChild;var nativeCloneNode=Element.prototype.cloneNode;var nativeImportNode=Document.prototype.importNode;var needsToWrap=Settings.hasShadow&&!Settings.nativeShadow;var wrap=window.wrap?window.wrap:function(node){return node};var DomApi=function(node){this.node=needsToWrap?wrap(node):node;if(this.patch){this.patch()}};DomApi.prototype={flush:function(){Polymer.dom.flush()},deepContains:function(node){if(this.node.contains(node)){return true}var n=node;var wrappedDocument=wrap(document);while(n&&n!==wrappedDocument&&n!==this.node){n=Polymer.dom(n).parentNode||n.host}return n===this.node},_lazyDistribute:function(host){if(host.shadyRoot&&host.shadyRoot._distributionClean){host.shadyRoot._distributionClean=false;Polymer.dom.addDebouncer(host.debounce("_distribute",host._distributeContent))}},appendChild:function(node){return this._addNode(node)},insertBefore:function(node,ref_node){return this._addNode(node,ref_node)},_addNode:function(node,ref_node){this._removeNodeFromParent(node);var addedInsertionPoint;var root=this.getOwnerRoot();if(root){addedInsertionPoint=this._maybeAddInsertionPoint(node,this.node)}if(this._nodeHasLogicalChildren(this.node)){if(ref_node){var children=this.childNodes;var index=children.indexOf(ref_node);if(index<0){throw Error("The ref_node to be inserted before is not a child "+"of this node")}}this._addLogicalInfo(node,this.node,index)}this._addNodeToHost(node);if(!this._maybeDistribute(node,this.node)&&!this._tryRemoveUndistributedNode(node)){if(ref_node){ref_node=ref_node.localName===CONTENT?this._firstComposedNode(ref_node):ref_node}var container=this.node._isShadyRoot?this.node.host:this.node;addToComposedParent(container,node,ref_node);if(ref_node){nativeInsertBefore.call(container,node,ref_node)}else{nativeAppendChild.call(container,node)}}if(addedInsertionPoint){this._updateInsertionPoints(root.host)}this.notifyObserver();return node},removeChild:function(node){if(factory(node).parentNode!==this.node){console.warn("The node to be removed is not a child of this node",node)}this._removeNodeFromHost(node);if(!this._maybeDistribute(node,this.node)){var container=this.node._isShadyRoot?this.node.host:this.node;if(container===node.parentNode){removeFromComposedParent(container,node);nativeRemoveChild.call(container,node)}}this.notifyObserver();return node},replaceChild:function(node,ref_node){this.insertBefore(node,ref_node);this.removeChild(ref_node);return node},_hasCachedOwnerRoot:function(node){return Boolean(node._ownerShadyRoot!==undefined)},getOwnerRoot:function(){return this._ownerShadyRootForNode(this.node)},_ownerShadyRootForNode:function(node){if(!node){return}if(node._ownerShadyRoot===undefined){var root;if(node._isShadyRoot){root=node}else{var parent=Polymer.dom(node).parentNode;if(parent){root=parent._isShadyRoot?parent:this._ownerShadyRootForNode(parent)}else{root=null}}node._ownerShadyRoot=root}return node._ownerShadyRoot},_maybeDistribute:function(node,parent){var fragContent=node.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!node.__noContent&&Polymer.dom(node).querySelector(CONTENT);var wrappedContent=fragContent&&Polymer.dom(fragContent).parentNode.nodeType!==Node.DOCUMENT_FRAGMENT_NODE;var hasContent=fragContent||node.localName===CONTENT;if(hasContent){var root=this._ownerShadyRootForNode(parent);if(root){var host=root.host;this._lazyDistribute(host)}}var parentNeedsDist=this._parentNeedsDistribution(parent);if(parentNeedsDist){this._lazyDistribute(parent)}return parentNeedsDist||hasContent&&!wrappedContent},_maybeAddInsertionPoint:function(node,parent){var added;if(node.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&!node.__noContent){var c$=factory(node).querySelectorAll(CONTENT);for(var i=0,n,np,na;i<c$.length&&(n=c$[i]);i++){np=factory(n).parentNode;if(np===node){np=parent}na=this._maybeAddInsertionPoint(n,np);added=added||na}}else if(node.localName===CONTENT){saveLightChildrenIfNeeded(parent);saveLightChildrenIfNeeded(node);added=true}return added},_tryRemoveUndistributedNode:function(node){if(this.node.shadyRoot){var parent=getComposedParent(node);if(parent){nativeRemoveChild.call(parent,node)}return true}},_updateInsertionPoints:function(host){var i$=host.shadyRoot._insertionPoints=factory(host.shadyRoot).querySelectorAll(CONTENT);for(var i=0,c;i<i$.length;i++){c=i$[i];saveLightChildrenIfNeeded(c);saveLightChildrenIfNeeded(factory(c).parentNode)}},_nodeHasLogicalChildren:function(node){return Boolean(node._lightChildren!==undefined)},_parentNeedsDistribution:function(parent){return parent&&parent.shadyRoot&&hasInsertionPoint(parent.shadyRoot)},_removeNodeFromParent:function(node){var parent=node._lightParent||node.parentNode;if(parent&&hasDomApi(parent)){factory(parent).notifyObserver()}this._removeNodeFromHost(node,true)},_removeNodeFromHost:function(node,ensureComposedRemoval){var hostNeedsDist;var root;var parent=node._lightParent;if(parent){factory(node)._distributeParent();root=this._ownerShadyRootForNode(node);if(root){root.host._elementRemove(node);hostNeedsDist=this._removeDistributedChildren(root,node)}this._removeLogicalInfo(node,parent)}this._removeOwnerShadyRoot(node);if(root&&hostNeedsDist){this._updateInsertionPoints(root.host);this._lazyDistribute(root.host)}else if(ensureComposedRemoval){removeFromComposedParent(getComposedParent(node),node)}},_removeDistributedChildren:function(root,container){var hostNeedsDist;var ip$=root._insertionPoints;for(var i=0;i<ip$.length;i++){var content=ip$[i];if(this._contains(container,content)){var dc$=factory(content).getDistributedNodes();for(var j=0;j<dc$.length;j++){hostNeedsDist=true;var node=dc$[j];var parent=node.parentNode;if(parent){removeFromComposedParent(parent,node);nativeRemoveChild.call(parent,node)}}}}return hostNeedsDist},_contains:function(container,node){while(node){if(node==container){return true}node=factory(node).parentNode}},_addNodeToHost:function(node){var root=this.getOwnerRoot();if(root){root.host._elementAdd(node)}},_addLogicalInfo:function(node,container,index){var children=factory(container).childNodes;index=index===undefined?children.length:index;if(node.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var c$=arrayCopyChildNodes(node);for(var i=0,n;i<c$.length&&(n=c$[i]);i++){children.splice(index++,0,n);n._lightParent=container}}else{children.splice(index,0,node);node._lightParent=container}},_removeLogicalInfo:function(node,container){var children=factory(container).childNodes;var index=children.indexOf(node);if(index<0||container!==node._lightParent){throw Error("The node to be removed is not a child of this node")}children.splice(index,1);node._lightParent=null},_removeOwnerShadyRoot:function(node){if(this._hasCachedOwnerRoot(node)){var c$=factory(node).childNodes;for(var i=0,l=c$.length,n;i<l&&(n=c$[i]);i++){this._removeOwnerShadyRoot(n)}}node._ownerShadyRoot=undefined},_firstComposedNode:function(content){var n$=factory(content).getDistributedNodes();for(var i=0,l=n$.length,n,p$;i<l&&(n=n$[i]);i++){p$=factory(n).getDestinationInsertionPoints();if(p$[p$.length-1]===content){return n}}},querySelector:function(selector){return this.querySelectorAll(selector)[0]},querySelectorAll:function(selector){return this._query(function(n){return matchesSelector.call(n,selector)},this.node)},_query:function(matcher,node){node=node||this.node;var list=[];this._queryElements(factory(node).childNodes,matcher,list);return list},_queryElements:function(elements,matcher,list){for(var i=0,l=elements.length,c;i<l&&(c=elements[i]);i++){if(c.nodeType===Node.ELEMENT_NODE){this._queryElement(c,matcher,list)}}},_queryElement:function(node,matcher,list){if(matcher(node)){list.push(node)}this._queryElements(factory(node).childNodes,matcher,list)},getDestinationInsertionPoints:function(){return this.node._destinationInsertionPoints||[]},getDistributedNodes:function(){return this.node._distributedNodes||[]},queryDistributedElements:function(selector){var c$=this.getEffectiveChildNodes();var list=[];for(var i=0,l=c$.length,c;i<l&&(c=c$[i]);i++){if(c.nodeType===Node.ELEMENT_NODE&&matchesSelector.call(c,selector)){list.push(c)}}return list},getEffectiveChildNodes:function(){var list=[];var c$=this.childNodes;for(var i=0,l=c$.length,c;i<l&&(c=c$[i]);i++){if(c.localName===CONTENT){var d$=factory(c).getDistributedNodes();for(var j=0;j<d$.length;j++){list.push(d$[j])}}else{list.push(c)}}return list},_clear:function(){while(this.childNodes.length){this.removeChild(this.childNodes[0])}},setAttribute:function(name,value){this.node.setAttribute(name,value);this._distributeParent()},removeAttribute:function(name){this.node.removeAttribute(name);this._distributeParent()},_distributeParent:function(){if(this._parentNeedsDistribution(this.parentNode)){this._lazyDistribute(this.parentNode)}},cloneNode:function(deep){var n=nativeCloneNode.call(this.node,false);if(deep){var c$=this.childNodes;var d=factory(n);for(var i=0,nc;i<c$.length;i++){nc=factory(c$[i]).cloneNode(true);d.appendChild(nc)}}return n},importNode:function(externalNode,deep){var doc=this.node instanceof Document?this.node:this.node.ownerDocument;var n=nativeImportNode.call(doc,externalNode,false);if(deep){var c$=factory(externalNode).childNodes;var d=factory(n);for(var i=0,nc;i<c$.length;i++){nc=factory(doc).importNode(c$[i],true);d.appendChild(nc)}}return n},observeNodes:function(callback){if(callback){if(!this.observer){this.observer=this.node.localName===CONTENT?new DomApi.DistributedNodesObserver(this):new DomApi.EffectiveNodesObserver(this)}return this.observer.addListener(callback)}},unobserveNodes:function(handle){if(this.observer){this.observer.removeListener(handle)}},notifyObserver:function(){if(this.observer){this.observer.notify()}}};if(!Settings.useShadow){Object.defineProperties(DomApi.prototype,{childNodes:{get:function(){var c$=getLightChildren(this.node);return Array.isArray(c$)?c$:arrayCopyChildNodes(this.node)},configurable:true},children:{get:function(){return Array.prototype.filter.call(this.childNodes,function(n){return n.nodeType===Node.ELEMENT_NODE})},configurable:true},parentNode:{get:function(){return this.node._lightParent||getComposedParent(this.node)},configurable:true},firstChild:{get:function(){return this.childNodes[0]},configurable:true},lastChild:{get:function(){var c$=this.childNodes;return c$[c$.length-1]},configurable:true},nextSibling:{get:function(){var c$=this.parentNode&&factory(this.parentNode).childNodes;if(c$){return c$[Array.prototype.indexOf.call(c$,this.node)+1]}},configurable:true},previousSibling:{get:function(){var c$=this.parentNode&&factory(this.parentNode).childNodes;if(c$){return c$[Array.prototype.indexOf.call(c$,this.node)-1]}},configurable:true},firstElementChild:{get:function(){return this.children[0]},configurable:true},lastElementChild:{get:function(){var c$=this.children;return c$[c$.length-1]},configurable:true},nextElementSibling:{get:function(){var c$=this.parentNode&&factory(this.parentNode).children;if(c$){return c$[Array.prototype.indexOf.call(c$,this.node)+1]}},configurable:true},previousElementSibling:{get:function(){var c$=this.parentNode&&factory(this.parentNode).children;if(c$){return c$[Array.prototype.indexOf.call(c$,this.node)-1]}},configurable:true},textContent:{get:function(){var nt=this.node.nodeType;if(nt===Node.TEXT_NODE||nt===Node.COMMENT_NODE){return this.node.textContent}else{var tc=[];for(var i=0,cn=this.childNodes,c;c=cn[i];i++){if(c.nodeType!==Node.COMMENT_NODE){tc.push(c.textContent)}}return tc.join("")}},set:function(text){var nt=this.node.nodeType;if(nt===Node.TEXT_NODE||nt===Node.COMMENT_NODE){this.node.textContent=text}else{this._clear();if(text){this.appendChild(document.createTextNode(text))}}},configurable:true},innerHTML:{get:function(){var nt=this.node.nodeType;if(nt===Node.TEXT_NODE||nt===Node.COMMENT_NODE){return null}else{return getInnerHTML(this.node)}},set:function(text){var nt=this.node.nodeType;if(nt!==Node.TEXT_NODE||nt!==Node.COMMENT_NODE){this._clear();var d=document.createElement("div");d.innerHTML=text;var c$=arrayCopyChildNodes(d);for(var i=0;i<c$.length;i++){this.appendChild(c$[i])}}},configurable:true}});DomApi.prototype._getComposedInnerHTML=function(){return getInnerHTML(this.node,true)}}else{var forwardMethods=function(m$){for(var i=0;i<m$.length;i++){forwardMethod(m$[i])}};var forwardMethod=function(method){DomApi.prototype[method]=function(){return this.node[method].apply(this.node,arguments)}};forwardMethods(["cloneNode","appendChild","insertBefore","removeChild","replaceChild"]);DomApi.prototype.querySelectorAll=function(selector){return arrayCopy(this.node.querySelectorAll(selector))};DomApi.prototype.getOwnerRoot=function(){var n=this.node;while(n){if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&n.host){return n}n=n.parentNode}};DomApi.prototype.importNode=function(externalNode,deep){var doc=this.node instanceof Document?this.node:this.node.ownerDocument;return doc.importNode(externalNode,deep)};DomApi.prototype.getDestinationInsertionPoints=function(){var n$=this.node.getDestinationInsertionPoints&&this.node.getDestinationInsertionPoints();return n$?arrayCopy(n$):[]};DomApi.prototype.getDistributedNodes=function(){var n$=this.node.getDistributedNodes&&this.node.getDistributedNodes();return n$?arrayCopy(n$):[]};DomApi.prototype._distributeParent=function(){};Object.defineProperties(DomApi.prototype,{childNodes:{get:function(){return arrayCopyChildNodes(this.node)},configurable:true},children:{get:function(){return arrayCopyChildren(this.node)},configurable:true},textContent:{get:function(){return this.node.textContent},set:function(value){return this.node.textContent=value},configurable:true},innerHTML:{get:function(){return this.node.innerHTML},set:function(value){return this.node.innerHTML=value},configurable:true}});var forwardProperties=function(f$){for(var i=0;i<f$.length;i++){forwardProperty(f$[i])}};var forwardProperty=function(name){Object.defineProperty(DomApi.prototype,name,{get:function(){return this.node[name]},configurable:true})};forwardProperties(["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling"])}var CONTENT="content";function factory(node,patch){node=node||document;if(!node.__domApi){node.__domApi=new DomApi(node,patch)}return node.__domApi}function hasDomApi(node){return Boolean(node.__domApi)}Polymer.dom=function(obj,patch){if(obj instanceof Event){return Polymer.EventApi.factory(obj)}else{return factory(obj,patch)}};function getLightChildren(node){var children=node._lightChildren;return children?children:node.childNodes}function getComposedChildren(node){if(!node._composedChildren){node._composedChildren=arrayCopyChildNodes(node)}return node._composedChildren}function addToComposedParent(parent,node,ref_node){var children=getComposedChildren(parent);var i=ref_node?children.indexOf(ref_node):-1;if(node.nodeType===Node.DOCUMENT_FRAGMENT_NODE){var fragChildren=getComposedChildren(node);for(var j=0;j<fragChildren.length;j++){addNodeToComposedChildren(fragChildren[j],parent,children,i+j)}node._composedChildren=null}else{addNodeToComposedChildren(node,parent,children,i)}}function getComposedParent(node){return node.__patched?node._composedParent:node.parentNode}function addNodeToComposedChildren(node,parent,children,i){node._composedParent=parent;children.splice(i>=0?i:children.length,0,node)}function removeFromComposedParent(parent,node){node._composedParent=null;if(parent){var children=getComposedChildren(parent);var i=children.indexOf(node);if(i>=0){children.splice(i,1)}}}function saveLightChildrenIfNeeded(node){if(!node._lightChildren){var c$=arrayCopyChildNodes(node);for(var i=0,l=c$.length,child;i<l&&(child=c$[i]);i++){child._lightParent=child._lightParent||node}node._lightChildren=c$}}function arrayCopyChildNodes(parent){var copy=[],i=0;for(var n=parent.firstChild;n;n=n.nextSibling){copy[i++]=n}return copy}function arrayCopyChildren(parent){var copy=[],i=0;for(var n=parent.firstElementChild;n;n=n.nextElementSibling){copy[i++]=n}return copy}function arrayCopy(a$){var l=a$.length;var copy=new Array(l);for(var i=0;i<l;i++){copy[i]=a$[i]}return copy}function hasInsertionPoint(root){return Boolean(root&&root._insertionPoints.length)}var p=Element.prototype;var matchesSelector=p.matches||p.matchesSelector||p.mozMatchesSelector||p.msMatchesSelector||p.oMatchesSelector||p.webkitMatchesSelector;return{getLightChildren:getLightChildren,getComposedParent:getComposedParent,getComposedChildren:getComposedChildren,removeFromComposedParent:removeFromComposedParent,saveLightChildrenIfNeeded:saveLightChildrenIfNeeded,matchesSelector:matchesSelector,hasInsertionPoint:hasInsertionPoint,ctor:DomApi,factory:factory,hasDomApi:hasDomApi,arrayCopy:arrayCopy,arrayCopyChildNodes:arrayCopyChildNodes,arrayCopyChildren:arrayCopyChildren,wrap:wrap}}();Polymer.Base.extend(Polymer.dom,{_flushGuard:0,_FLUSH_MAX:100,_needsTakeRecords:!Polymer.Settings.useNativeCustomElements,_debouncers:[],_staticFlushList:[],_finishDebouncer:null,flush:function(){this._flushGuard=0;this._prepareFlush();while(this._debouncers.length&&this._flushGuard<this._FLUSH_MAX){for(var i=0;i<this._debouncers.length;i++){this._debouncers[i].complete()}if(this._finishDebouncer){this._finishDebouncer.complete()}this._prepareFlush();this._flushGuard++}if(this._flushGuard>=this._FLUSH_MAX){console.warn("Polymer.dom.flush aborted. Flush may not be complete.")}},_prepareFlush:function(){if(this._needsTakeRecords){CustomElements.takeRecords()}for(var i=0;i<this._staticFlushList.length;i++){this._staticFlushList[i]()}},addStaticFlush:function(fn){this._staticFlushList.push(fn)},removeStaticFlush:function(fn){var i=this._staticFlushList.indexOf(fn);if(i>=0){this._staticFlushList.splice(i,1)}},addDebouncer:function(debouncer){this._debouncers.push(debouncer);this._finishDebouncer=Polymer.Debounce(this._finishDebouncer,this._finishFlush)},_finishFlush:function(){Polymer.dom._debouncers=[]}});Polymer.EventApi=function(){"use strict";var DomApi=Polymer.DomApi.ctor;var Settings=Polymer.Settings;DomApi.Event=function(event){this.event=event};if(Settings.useShadow){DomApi.Event.prototype={get rootTarget(){return this.event.path[0]},get localTarget(){return this.event.target},get path(){return this.event.path}}}else{DomApi.Event.prototype={get rootTarget(){return this.event.target},get localTarget(){var current=this.event.currentTarget;var currentRoot=current&&Polymer.dom(current).getOwnerRoot();var p$=this.path;for(var i=0;i<p$.length;i++){if(Polymer.dom(p$[i]).getOwnerRoot()===currentRoot){return p$[i]}}},get path(){if(!this.event._path){var path=[];var o=this.rootTarget;while(o){path.push(o);o=Polymer.dom(o).parentNode||o.host}path.push(window);this.event._path=path}return this.event._path}}}var factory=function(event){if(!event.__eventApi){event.__eventApi=new DomApi.Event(event)}return event.__eventApi};return{factory:factory}}();(function(){"use strict";var DomApi=Polymer.DomApi.ctor;Object.defineProperty(DomApi.prototype,"classList",{get:function(){if(!this._classList){this._classList=new DomApi.ClassList(this)}return this._classList},configurable:true});DomApi.ClassList=function(host){this.domApi=host;this.node=host.node};DomApi.ClassList.prototype={add:function(){this.node.classList.add.apply(this.node.classList,arguments);this.domApi._distributeParent()},remove:function(){this.node.classList.remove.apply(this.node.classList,arguments);this.domApi._distributeParent()},toggle:function(){this.node.classList.toggle.apply(this.node.classList,arguments);this.domApi._distributeParent()},contains:function(){return this.node.classList.contains.apply(this.node.classList,arguments)}}})();(function(){"use strict";var DomApi=Polymer.DomApi.ctor;var Settings=Polymer.Settings;var hasDomApi=Polymer.DomApi.hasDomApi;DomApi.EffectiveNodesObserver=function(domApi){this.domApi=domApi;this.node=this.domApi.node;this._listeners=[]};DomApi.EffectiveNodesObserver.prototype={addListener:function(callback){if(!this._isSetup){this._setup();this._isSetup=true}var listener={fn:callback,_nodes:[]};this._listeners.push(listener);this._scheduleNotify();return listener},removeListener:function(handle){var i=this._listeners.indexOf(handle);if(i>=0){this._listeners.splice(i,1);handle._nodes=[]}if(!this._hasListeners()){this._cleanup();this._isSetup=false}},_setup:function(){this._observeContentElements(this.domApi.childNodes)},_cleanup:function(){this._unobserveContentElements(this.domApi.childNodes)},_hasListeners:function(){return Boolean(this._listeners.length)},_scheduleNotify:function(){if(this._debouncer){this._debouncer.stop()}this._debouncer=Polymer.Debounce(this._debouncer,this._notify);this._debouncer.context=this;Polymer.dom.addDebouncer(this._debouncer)},notify:function(){if(this._hasListeners()){this._scheduleNotify()}},_notify:function(mxns){this._beforeCallListeners();this._callListeners()},_beforeCallListeners:function(){this._updateContentElements()},_updateContentElements:function(){this._observeContentElements(this.domApi.childNodes)},_observeContentElements:function(elements){for(var i=0,n;i<elements.length&&(n=elements[i]);i++){if(this._isContent(n)){n.__observeNodesMap=n.__observeNodesMap||new WeakMap;if(!n.__observeNodesMap.has(this)){n.__observeNodesMap.set(this,this._observeContent(n))}}}},_observeContent:function(content){var self=this;var h=Polymer.dom(content).observeNodes(function(){self._scheduleNotify()});h._avoidChangeCalculation=true;return h},_unobserveContentElements:function(elements){for(var i=0,n,h;i<elements.length&&(n=elements[i]);i++){if(this._isContent(n)){h=n.__observeNodesMap.get(this);if(h){Polymer.dom(n).unobserveNodes(h);n.__observeNodesMap.delete(this)}}}},_isContent:function(node){return node.localName==="content"},_callListeners:function(){var o$=this._listeners;var nodes=this._getEffectiveNodes();for(var i=0,o;i<o$.length&&(o=o$[i]);i++){var info=this._generateListenerInfo(o,nodes);if(info||o._alwaysNotify){this._callListener(o,info)}}},_getEffectiveNodes:function(){return this.domApi.getEffectiveChildNodes()},_generateListenerInfo:function(listener,newNodes){if(listener._avoidChangeCalculation){return true}var oldNodes=listener._nodes;var info={target:this.node,addedNodes:[],removedNodes:[]};var splices=Polymer.ArraySplice.calculateSplices(newNodes,oldNodes);for(var i=0,s;i<splices.length&&(s=splices[i]);i++){for(var j=0,n;j<s.removed.length&&(n=s.removed[j]);j++){info.removedNodes.push(n)}}for(var i=0,s;i<splices.length&&(s=splices[i]);i++){for(var j=s.index;j<s.index+s.addedCount;j++){info.addedNodes.push(newNodes[j])}}listener._nodes=newNodes;if(info.addedNodes.length||info.removedNodes.length){return info}},_callListener:function(listener,info){return listener.fn.call(this.node,info)},enableShadowAttributeTracking:function(){}};if(Settings.useShadow){var baseSetup=DomApi.EffectiveNodesObserver.prototype._setup;var baseCleanup=DomApi.EffectiveNodesObserver.prototype._cleanup;var beforeCallListeners=DomApi.EffectiveNodesObserver.prototype._beforeCallListeners;Polymer.Base.extend(DomApi.EffectiveNodesObserver.prototype,{_setup:function(){if(!this._observer){var self=this;this._mutationHandler=function(mxns){if(mxns&&mxns.length){self._scheduleNotify()}};this._observer=new MutationObserver(this._mutationHandler);this._boundFlush=function(){self._flush()};Polymer.dom.addStaticFlush(this._boundFlush);this._observer.observe(this.node,{childList:true})}baseSetup.call(this)},_cleanup:function(){this._observer.disconnect();this._observer=null;this._mutationHandler=null;Polymer.dom.removeStaticFlush(this._boundFlush);baseCleanup.call(this)},_flush:function(){if(this._observer){this._mutationHandler(this._observer.takeRecords())}},enableShadowAttributeTracking:function(){if(this._observer){this._makeContentListenersAlwaysNotify();this._observer.disconnect();this._observer.observe(this.node,{childList:true,attributes:true,subtree:true});var root=this.domApi.getOwnerRoot();var host=root&&root.host;if(host&&Polymer.dom(host).observer){Polymer.dom(host).observer.enableShadowAttributeTracking()}}},_makeContentListenersAlwaysNotify:function(){for(var i=0,h;i<this._listeners.length;i++){h=this._listeners[i];h._alwaysNotify=h._isContentListener}}})}})();(function(){"use strict";var DomApi=Polymer.DomApi.ctor;var Settings=Polymer.Settings;DomApi.DistributedNodesObserver=function(domApi){DomApi.EffectiveNodesObserver.call(this,domApi)};DomApi.DistributedNodesObserver.prototype=Object.create(DomApi.EffectiveNodesObserver.prototype);Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype,{_setup:function(){},_cleanup:function(){},_beforeCallListeners:function(){},_getEffectiveNodes:function(){return this.domApi.getDistributedNodes()}});if(Settings.useShadow){Polymer.Base.extend(DomApi.DistributedNodesObserver.prototype,{_setup:function(){if(!this._observer){var root=this.domApi.getOwnerRoot();var host=root&&root.host;if(host){var self=this;this._observer=Polymer.dom(host).observeNodes(function(){self._scheduleNotify()});this._observer._isContentListener=true;if(this._hasAttrSelect()){Polymer.dom(host).observer.enableShadowAttributeTracking()}}}},_hasAttrSelect:function(){var select=this.node.getAttribute("select");return select&&select.match(/[[.]+/)},_cleanup:function(){var root=this.domApi.getOwnerRoot();var host=root&&root.host;if(host){Polymer.dom(host).unobserveNodes(this._observer)}this._observer=null}})}})();(function(){var hasDomApi=Polymer.DomApi.hasDomApi;Polymer.Base._addFeature({_prepShady:function(){this._useContent=this._useContent||Boolean(this._template)},_poolContent:function(){if(this._useContent){saveLightChildrenIfNeeded(this)}},_setupRoot:function(){if(this._useContent){this._createLocalRoot();if(!this.dataHost){upgradeLightChildren(this._lightChildren)}}},_createLocalRoot:function(){this.shadyRoot=this.root;this.shadyRoot._distributionClean=false;this.shadyRoot._hasDistributed=false;this.shadyRoot._isShadyRoot=true;this.shadyRoot._dirtyRoots=[];var i$=this.shadyRoot._insertionPoints=!this._notes||this._notes._hasContent?this.shadyRoot.querySelectorAll("content"):[];saveLightChildrenIfNeeded(this.shadyRoot);for(var i=0,c;i<i$.length;i++){c=i$[i];saveLightChildrenIfNeeded(c);saveLightChildrenIfNeeded(c.parentNode)}this.shadyRoot.host=this},get domHost(){var root=Polymer.dom(this).getOwnerRoot();return root&&root.host},distributeContent:function(updateInsertionPoints){if(this.shadyRoot){var dom=Polymer.dom(this);if(updateInsertionPoints){dom._updateInsertionPoints(this)}var host=getTopDistributingHost(this);dom._lazyDistribute(host)}},_distributeContent:function(){if(this._useContent&&!this.shadyRoot._distributionClean){this._beginDistribute();this._distributeDirtyRoots();this._finishDistribute()}},_beginDistribute:function(){if(this._useContent&&hasInsertionPoint(this.shadyRoot)){this._resetDistribution();this._distributePool(this.shadyRoot,this._collectPool())}},_distributeDirtyRoots:function(){var c$=this.shadyRoot._dirtyRoots;for(var i=0,l=c$.length,c;i<l&&(c=c$[i]);i++){c._distributeContent()}this.shadyRoot._dirtyRoots=[]},_finishDistribute:function(){if(this._useContent){this.shadyRoot._distributionClean=true;if(hasInsertionPoint(this.shadyRoot)){this._composeTree();notifyContentObservers(this.shadyRoot)}else{if(!this.shadyRoot._hasDistributed){this.textContent="";this._composedChildren=null;this.appendChild(this.shadyRoot)}else{var children=this._composeNode(this);this._updateChildNodes(this,children)}}if(!this.shadyRoot._hasDistributed){notifyInitialDistribution(this)}this.shadyRoot._hasDistributed=true}},elementMatches:function(selector,node){node=node||this;return matchesSelector.call(node,selector)},_resetDistribution:function(){var children=getLightChildren(this);for(var i=0;i<children.length;i++){var child=children[i];if(child._destinationInsertionPoints){child._destinationInsertionPoints=undefined}if(isInsertionPoint(child)){clearDistributedDestinationInsertionPoints(child)}}var root=this.shadyRoot;var p$=root._insertionPoints;for(var j=0;j<p$.length;j++){p$[j]._distributedNodes=[]}},_collectPool:function(){var pool=[];var children=getLightChildren(this);for(var i=0;i<children.length;i++){var child=children[i];if(isInsertionPoint(child)){pool.push.apply(pool,child._distributedNodes)}else{pool.push(child)}}return pool},_distributePool:function(node,pool){var p$=node._insertionPoints;for(var i=0,l=p$.length,p;i<l&&(p=p$[i]);i++){this._distributeInsertionPoint(p,pool);maybeRedistributeParent(p,this)}},_distributeInsertionPoint:function(content,pool){var anyDistributed=false;for(var i=0,l=pool.length,node;i<l;i++){node=pool[i];if(!node){continue}if(this._matchesContentSelect(node,content)){distributeNodeInto(node,content);pool[i]=undefined;anyDistributed=true}}if(!anyDistributed){var children=getLightChildren(content);for(var j=0;j<children.length;j++){distributeNodeInto(children[j],content)}}},_composeTree:function(){this._updateChildNodes(this,this._composeNode(this));var p$=this.shadyRoot._insertionPoints;for(var i=0,l=p$.length,p,parent;i<l&&(p=p$[i]);i++){parent=p._lightParent||p.parentNode;if(!parent._useContent&&parent!==this&&parent!==this.shadyRoot){this._updateChildNodes(parent,this._composeNode(parent))}}},_composeNode:function(node){var children=[];var c$=getLightChildren(node.shadyRoot||node);for(var i=0;i<c$.length;i++){var child=c$[i];if(isInsertionPoint(child)){var distributedNodes=child._distributedNodes;for(var j=0;j<distributedNodes.length;j++){var distributedNode=distributedNodes[j];if(isFinalDestination(child,distributedNode)){children.push(distributedNode)}}}else{children.push(child)}}return children},_updateChildNodes:function(container,children){var composed=getComposedChildren(container);var splices=Polymer.ArraySplice.calculateSplices(children,composed);for(var i=0,d=0,s;i<splices.length&&(s=splices[i]);i++){for(var j=0,n;j<s.removed.length&&(n=s.removed[j]);j++){if(getComposedParent(n)===container){remove(n)}composed.splice(s.index+d,1)}d-=s.addedCount}for(var i=0,s,next;i<splices.length&&(s=splices[i]);i++){next=composed[s.index];for(var j=s.index,n;j<s.index+s.addedCount;j++){n=children[j];insertBefore(container,n,next);composed.splice(j,0,n)}}ensureComposedParent(container,children)},_matchesContentSelect:function(node,contentElement){var select=contentElement.getAttribute("select");if(!select){return true}select=select.trim();if(!select){return true}if(!(node instanceof Element)){return false}var validSelectors=/^(:not\()?[*.#[a-zA-Z_|]/;if(!validSelectors.test(select)){return false}return this.elementMatches(select,node)},_elementAdd:function(){},_elementRemove:function(){}});var saveLightChildrenIfNeeded=Polymer.DomApi.saveLightChildrenIfNeeded;var getLightChildren=Polymer.DomApi.getLightChildren;var matchesSelector=Polymer.DomApi.matchesSelector;var hasInsertionPoint=Polymer.DomApi.hasInsertionPoint;var getComposedChildren=Polymer.DomApi.getComposedChildren;var getComposedParent=Polymer.DomApi.getComposedParent;var removeFromComposedParent=Polymer.DomApi.removeFromComposedParent;function distributeNodeInto(child,insertionPoint){insertionPoint._distributedNodes.push(child);var points=child._destinationInsertionPoints;if(!points){child._destinationInsertionPoints=[insertionPoint]}else{points.push(insertionPoint)}}function clearDistributedDestinationInsertionPoints(content){var e$=content._distributedNodes;if(e$){for(var i=0;i<e$.length;i++){var d=e$[i]._destinationInsertionPoints;if(d){d.splice(d.indexOf(content)+1,d.length)}}}}function maybeRedistributeParent(content,host){var parent=content._lightParent;if(parent&&parent.shadyRoot&&hasInsertionPoint(parent.shadyRoot)&&parent.shadyRoot._distributionClean){parent.shadyRoot._distributionClean=false;host.shadyRoot._dirtyRoots.push(parent)}}function isFinalDestination(insertionPoint,node){var points=node._destinationInsertionPoints;return points&&points[points.length-1]===insertionPoint}function isInsertionPoint(node){return node.localName=="content"}var nativeInsertBefore=Element.prototype.insertBefore;var nativeRemoveChild=Element.prototype.removeChild;function insertBefore(parentNode,newChild,refChild){var newChildParent=getComposedParent(newChild);if(newChildParent!==parentNode){removeFromComposedParent(newChildParent,newChild)}remove(newChild);nativeInsertBefore.call(parentNode,newChild,refChild||null);newChild._composedParent=parentNode}function remove(node){var parentNode=getComposedParent(node);if(parentNode){node._composedParent=null;nativeRemoveChild.call(parentNode,node)}}function ensureComposedParent(parent,children){for(var i=0,n;i<children.length;i++){children[i]._composedParent=parent}}function getTopDistributingHost(host){while(host&&hostNeedsRedistribution(host)){host=host.domHost}return host}function hostNeedsRedistribution(host){var c$=Polymer.dom(host).children;for(var i=0,c;i<c$.length;i++){c=c$[i];if(c.localName==="content"){return host.domHost}}}function notifyContentObservers(root){for(var i=0,c;i<root._insertionPoints.length;i++){c=root._insertionPoints[i];if(hasDomApi(c)){Polymer.dom(c).notifyObserver()}}}function notifyInitialDistribution(host){if(hasDomApi(host)){Polymer.dom(host).notifyObserver()}}var needsUpgrade=window.CustomElements&&!CustomElements.useNative;function upgradeLightChildren(children){if(needsUpgrade&&children){for(var i=0;i<children.length;i++){CustomElements.upgrade(children[i])}}}})();if(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.DomModule=document.createElement("dom-module");Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs();this._prepBehaviors();this._prepConstructor();this._prepTemplate();this._prepShady();this._prepPropertyInfo()},_prepBehavior:function(b){this._addHostAttributes(b.hostAttributes)},_initFeatures:function(){this._registerHost();if(this._template){this._poolContent();this._beginHosting();this._stampTemplate();this._endHosting()}this._marshalHostAttributes();this._setupDebouncers();this._marshalBehaviors();this._tryReady()},_marshalBehavior:function(b){}});</script><script>Polymer.nar=[];Polymer.Annotations={parseAnnotations:function(template){var list=[];var content=template._content||template.content;this._parseNodeAnnotations(content,list,template.hasAttribute("strip-whitespace"));return list},_parseNodeAnnotations:function(node,list,stripWhiteSpace){return node.nodeType===Node.TEXT_NODE?this._parseTextNodeAnnotation(node,list):this._parseElementAnnotations(node,list,stripWhiteSpace)},_bindingRegex:/([^{[]*)(\{\{|\[\[)(?!\}\}|\]\])(.+?)(?:\]\]|\}\})/g,_parseBindings:function(text){var re=this._bindingRegex;var parts=[];var m,lastIndex;while((m=re.exec(text))!==null){if(m[1]){parts.push({literal:m[1]})}var mode=m[2][0];var value=m[3].trim();var negate=false;if(value[0]=="!"){negate=true;value=value.substring(1).trim()}var customEvent,notifyEvent,colon;if(mode=="{"&&(colon=value.indexOf("::"))>0){notifyEvent=value.substring(colon+2);value=value.substring(0,colon);customEvent=true}parts.push({compoundIndex:parts.length,value:value,mode:mode,negate:negate,event:notifyEvent,customEvent:customEvent});lastIndex=re.lastIndex}if(lastIndex&&lastIndex<text.length){var literal=text.substring(lastIndex);if(literal){parts.push({literal:literal})}}if(parts.length){return parts}},_literalFromParts:function(parts){var s="";for(var i=0;i<parts.length;i++){var literal=parts[i].literal;s+=literal||""}return s},_parseTextNodeAnnotation:function(node,list){var parts=this._parseBindings(node.textContent);if(parts){node.textContent=this._literalFromParts(parts)||" ";var annote={bindings:[{kind:"text",name:"textContent",parts:parts,isCompound:parts.length!==1}]};list.push(annote);return annote}},_parseElementAnnotations:function(element,list,stripWhiteSpace){var annote={bindings:[],events:[]};if(element.localName==="content"){list._hasContent=true}this._parseChildNodesAnnotations(element,annote,list,stripWhiteSpace);if(element.attributes){this._parseNodeAttributeAnnotations(element,annote,list);if(this.prepElement){this.prepElement(element)}}if(annote.bindings.length||annote.events.length||annote.id){list.push(annote)}return annote},_parseChildNodesAnnotations:function(root,annote,list,stripWhiteSpace){if(root.firstChild){var node=root.firstChild;var i=0;while(node){var next=node.nextSibling;if(node.localName==="template"&&!node.hasAttribute("preserve-content")){this._parseTemplate(node,i,list,annote)}if(node.nodeType===Node.TEXT_NODE){var n=next;while(n&&n.nodeType===Node.TEXT_NODE){node.textContent+=n.textContent;next=n.nextSibling;root.removeChild(n);n=next}if(stripWhiteSpace&&!node.textContent.trim()){root.removeChild(node);i--}}if(node.parentNode){var childAnnotation=this._parseNodeAnnotations(node,list,stripWhiteSpace);if(childAnnotation){childAnnotation.parent=annote;childAnnotation.index=i}}node=next;i++}}},_parseTemplate:function(node,index,list,parent){var content=document.createDocumentFragment();content._notes=this.parseAnnotations(node);content.appendChild(node.content);list.push({bindings:Polymer.nar,events:Polymer.nar,templateContent:content,parent:parent,index:index})},_parseNodeAttributeAnnotations:function(node,annotation){var attrs=Array.prototype.slice.call(node.attributes);for(var i=attrs.length-1,a;a=attrs[i];i--){var n=a.name;var v=a.value;var b;if(n.slice(0,3)==="on-"){node.removeAttribute(n);annotation.events.push({name:n.slice(3),value:v})}else if(b=this._parseNodeAttributeAnnotation(node,n,v)){annotation.bindings.push(b)}else if(n==="id"){annotation.id=v}}},_parseNodeAttributeAnnotation:function(node,name,value){var parts=this._parseBindings(value);if(parts){var origName=name;var kind="property";if(name[name.length-1]=="$"){name=name.slice(0,-1);kind="attribute"}var literal=this._literalFromParts(parts);if(literal&&kind=="attribute"){node.setAttribute(name,literal)}if(node.localName=="input"&&name=="value"){node.setAttribute(origName,"")}node.removeAttribute(origName);if(kind==="property"){name=Polymer.CaseMap.dashToCamelCase(name)}return{kind:kind,name:name,parts:parts,literal:literal,isCompound:parts.length!==1}}},_localSubTree:function(node,host){return node===host?node.childNodes:node._lightChildren||node.childNodes},findAnnotatedNode:function(root,annote){var parent=annote.parent&&Polymer.Annotations.findAnnotatedNode(root,annote.parent);return!parent?root:Polymer.Annotations._localSubTree(parent,root)[annote.index]}};(function(){function resolveCss(cssText,ownerDocument){return cssText.replace(CSS_URL_RX,function(m,pre,url,post){return pre+"'"+resolve(url.replace(/["']/g,""),ownerDocument)+"'"+post})}function resolveAttrs(element,ownerDocument){for(var name in URL_ATTRS){var a$=URL_ATTRS[name];for(var i=0,l=a$.length,a,at,v;i<l&&(a=a$[i]);i++){if(name==="*"||element.localName===name){at=element.attributes[a];v=at&&at.value;if(v&&v.search(BINDING_RX)<0){at.value=a==="style"?resolveCss(v,ownerDocument):resolve(v,ownerDocument)}}}}}function resolve(url,ownerDocument){if(url&&url[0]==="#"){return url}var resolver=getUrlResolver(ownerDocument);resolver.href=url;return resolver.href||url}var tempDoc;var tempDocBase;function resolveUrl(url,baseUri){if(!tempDoc){tempDoc=document.implementation.createHTMLDocument("temp");tempDocBase=tempDoc.createElement("base");tempDoc.head.appendChild(tempDocBase)}tempDocBase.href=baseUri;return resolve(url,tempDoc)}function getUrlResolver(ownerDocument){return ownerDocument.__urlResolver||(ownerDocument.__urlResolver=ownerDocument.createElement("a"))}var CSS_URL_RX=/(url\()([^)]*)(\))/g;var URL_ATTRS={"*":["href","src","style","url"],form:["action"]};var BINDING_RX=/\{\{|\[\[/;Polymer.ResolveUrl={resolveCss:resolveCss,resolveAttrs:resolveAttrs,resolveUrl:resolveUrl}})();Polymer.Base._addFeature({_prepAnnotations:function(){if(!this._template){this._notes=[]}else{var self=this;Polymer.Annotations.prepElement=function(element){self._prepElement(element)};if(this._template._content&&this._template._content._notes){this._notes=this._template._content._notes}else{this._notes=Polymer.Annotations.parseAnnotations(this._template)}this._processAnnotations(this._notes);Polymer.Annotations.prepElement=null}},_processAnnotations:function(notes){for(var i=0;i<notes.length;i++){var note=notes[i];for(var j=0;j<note.bindings.length;j++){var b=note.bindings[j];for(var k=0;k<b.parts.length;k++){var p=b.parts[k];if(!p.literal){p.signature=this._parseMethod(p.value);if(!p.signature){p.model=this._modelForPath(p.value)}}}}if(note.templateContent){this._processAnnotations(note.templateContent._notes);var pp=note.templateContent._parentProps=this._discoverTemplateParentProps(note.templateContent._notes);var bindings=[];for(var prop in pp){bindings.push({index:note.index,kind:"property",name:"_parent_"+prop,parts:[{mode:"{",model:prop,value:prop}]})}note.bindings=note.bindings.concat(bindings)}}},_discoverTemplateParentProps:function(notes){var pp={};for(var i=0,n;i<notes.length&&(n=notes[i]);i++){for(var j=0,b$=n.bindings,b;j<b$.length&&(b=b$[j]);j++){for(var k=0,p$=b.parts,p;k<p$.length&&(p=p$[k]);k++){if(p.signature){var args=p.signature.args;for(var kk=0;kk<args.length;kk++){pp[args[kk].model]=true}}else{pp[p.model]=true}}}if(n.templateContent){var tpp=n.templateContent._parentProps;Polymer.Base.mixin(pp,tpp)}}return pp},_prepElement:function(element){Polymer.ResolveUrl.resolveAttrs(element,this._template.ownerDocument)},_findAnnotatedNode:Polymer.Annotations.findAnnotatedNode,_marshalAnnotationReferences:function(){if(this._template){this._marshalIdNodes();this._marshalAnnotatedNodes();this._marshalAnnotatedListeners()}},_configureAnnotationReferences:function(config){var notes=this._notes;var nodes=this._nodes;for(var i=0;i<notes.length;i++){var note=notes[i];var node=nodes[i];this._configureTemplateContent(note,node);this._configureCompoundBindings(note,node)}},_configureTemplateContent:function(note,node){if(note.templateContent){node._content=note.templateContent}},_configureCompoundBindings:function(note,node){var bindings=note.bindings;for(var i=0;i<bindings.length;i++){var binding=bindings[i];if(binding.isCompound){var storage=node.__compoundStorage__||(node.__compoundStorage__={});var parts=binding.parts;var literals=new Array(parts.length);for(var j=0;j<parts.length;j++){literals[j]=parts[j].literal}var name=binding.name;storage[name]=literals;if(binding.literal&&binding.kind=="property"){if(node._configValue){node._configValue(name,binding.literal)}else{node[name]=binding.literal}}}}},_marshalIdNodes:function(){this.$={};for(var i=0,l=this._notes.length,a;i<l&&(a=this._notes[i]);i++){if(a.id){this.$[a.id]=this._findAnnotatedNode(this.root,a)}}},_marshalAnnotatedNodes:function(){if(this._notes&&this._notes.length){var r=new Array(this._notes.length);for(var i=0;i<this._notes.length;i++){r[i]=this._findAnnotatedNode(this.root,this._notes[i])}this._nodes=r}},_marshalAnnotatedListeners:function(){for(var i=0,l=this._notes.length,a;i<l&&(a=this._notes[i]);i++){if(a.events&&a.events.length){var node=this._findAnnotatedNode(this.root,a);for(var j=0,e$=a.events,e;j<e$.length&&(e=e$[j]);j++){this.listen(node,e.name,e.value)}}}}});Polymer.Base._addFeature({listeners:{},_listenListeners:function(listeners){var node,name,eventName;for(eventName in listeners){if(eventName.indexOf(".")<0){node=this;name=eventName}else{name=eventName.split(".");node=this.$[name[0]];name=name[1]}this.listen(node,name,listeners[eventName])}},listen:function(node,eventName,methodName){var handler=this._recallEventHandler(this,eventName,node,methodName);if(!handler){handler=this._createEventHandler(node,eventName,methodName)}if(handler._listening){return}this._listen(node,eventName,handler);handler._listening=true},_boundListenerKey:function(eventName,methodName){return eventName+":"+methodName},_recordEventHandler:function(host,eventName,target,methodName,handler){var hbl=host.__boundListeners;if(!hbl){hbl=host.__boundListeners=new WeakMap}var bl=hbl.get(target);if(!bl){bl={};hbl.set(target,bl)}var key=this._boundListenerKey(eventName,methodName);bl[key]=handler},_recallEventHandler:function(host,eventName,target,methodName){var hbl=host.__boundListeners;if(!hbl){return}var bl=hbl.get(target);if(!bl){return}var key=this._boundListenerKey(eventName,methodName);return bl[key]},_createEventHandler:function(node,eventName,methodName){var host=this;var handler=function(e){if(host[methodName]){host[methodName](e,e.detail)}else{host._warn(host._logf("_createEventHandler","listener method `"+methodName+"` not defined"))}};handler._listening=false;this._recordEventHandler(host,eventName,node,methodName,handler);return handler},unlisten:function(node,eventName,methodName){var handler=this._recallEventHandler(this,eventName,node,methodName);if(handler){this._unlisten(node,eventName,handler);handler._listening=false}},_listen:function(node,eventName,handler){node.addEventListener(eventName,handler)},_unlisten:function(node,eventName,handler){node.removeEventListener(eventName,handler)}});(function(){"use strict";var wrap=Polymer.DomApi.wrap;var HAS_NATIVE_TA=typeof document.head.style.touchAction==="string";var GESTURE_KEY="__polymerGestures";var HANDLED_OBJ="__polymerGesturesHandled";var TOUCH_ACTION="__polymerGesturesTouchAction";var TAP_DISTANCE=25;var TRACK_DISTANCE=5;var TRACK_LENGTH=2;var MOUSE_TIMEOUT=2500;var MOUSE_EVENTS=["mousedown","mousemove","mouseup","click"];var MOUSE_WHICH_TO_BUTTONS=[0,1,4,2];var MOUSE_HAS_BUTTONS=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(e){return false}}();var IS_TOUCH_ONLY=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);var mouseCanceller=function(mouseEvent){mouseEvent[HANDLED_OBJ]={skip:true};if(mouseEvent.type==="click"){var path=Polymer.dom(mouseEvent).path;for(var i=0;i<path.length;i++){if(path[i]===POINTERSTATE.mouse.target){return}}mouseEvent.preventDefault();mouseEvent.stopPropagation()}};function setupTeardownMouseCanceller(setup){for(var i=0,en;i<MOUSE_EVENTS.length;i++){en=MOUSE_EVENTS[i];if(setup){document.addEventListener(en,mouseCanceller,true)}else{document.removeEventListener(en,mouseCanceller,true)}}}function ignoreMouse(){if(IS_TOUCH_ONLY){return}if(!POINTERSTATE.mouse.mouseIgnoreJob){setupTeardownMouseCanceller(true)}var unset=function(){setupTeardownMouseCanceller();POINTERSTATE.mouse.target=null;POINTERSTATE.mouse.mouseIgnoreJob=null};POINTERSTATE.mouse.mouseIgnoreJob=Polymer.Debounce(POINTERSTATE.mouse.mouseIgnoreJob,unset,MOUSE_TIMEOUT)}function hasLeftMouseButton(ev){var type=ev.type;if(MOUSE_EVENTS.indexOf(type)===-1){return false}if(type==="mousemove"){var buttons=ev.buttons===undefined?1:ev.buttons;if(ev instanceof window.MouseEvent&&!MOUSE_HAS_BUTTONS){buttons=MOUSE_WHICH_TO_BUTTONS[ev.which]||0}return Boolean(buttons&1)}else{var button=ev.button===undefined?0:ev.button;return button===0}}function isSyntheticClick(ev){if(ev.type==="click"){if(ev.detail===0){return true}var t=Gestures.findOriginalTarget(ev);var bcr=t.getBoundingClientRect();var x=ev.pageX,y=ev.pageY;return!(x>=bcr.left&&x<=bcr.right&&(y>=bcr.top&&y<=bcr.bottom))}return false}var POINTERSTATE={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:false}};function firstTouchAction(ev){var path=Polymer.dom(ev).path;var ta="auto";for(var i=0,n;i<path.length;i++){n=path[i];if(n[TOUCH_ACTION]){ta=n[TOUCH_ACTION];break}}return ta}function trackDocument(stateObj,movefn,upfn){stateObj.movefn=movefn;stateObj.upfn=upfn;document.addEventListener("mousemove",movefn);document.addEventListener("mouseup",upfn)}function untrackDocument(stateObj){document.removeEventListener("mousemove",stateObj.movefn);document.removeEventListener("mouseup",stateObj.upfn)}var Gestures={gestures:{},recognizers:[],deepTargetFind:function(x,y){var node=document.elementFromPoint(x,y);var next=node;while(next&&next.shadowRoot){next=next.shadowRoot.elementFromPoint(x,y);if(next){node=next}}return node},findOriginalTarget:function(ev){if(ev.path){return ev.path[0]}return ev.target},handleNative:function(ev){var handled;var type=ev.type;var node=wrap(ev.currentTarget);var gobj=node[GESTURE_KEY];if(!gobj){return}var gs=gobj[type];if(!gs){return}if(!ev[HANDLED_OBJ]){ev[HANDLED_OBJ]={};if(type.slice(0,5)==="touch"){var t=ev.changedTouches[0];if(type==="touchstart"){if(ev.touches.length===1){POINTERSTATE.touch.id=t.identifier}}if(POINTERSTATE.touch.id!==t.identifier){return}if(!HAS_NATIVE_TA){if(type==="touchstart"||type==="touchmove"){Gestures.handleTouchAction(ev)}}if(type==="touchend"){POINTERSTATE.mouse.target=Polymer.dom(ev).rootTarget;ignoreMouse(true)}}}handled=ev[HANDLED_OBJ];if(handled.skip){return}var recognizers=Gestures.recognizers;for(var i=0,r;i<recognizers.length;i++){r=recognizers[i];if(gs[r.name]&&!handled[r.name]){if(r.flow&&r.flow.start.indexOf(ev.type)>-1){if(r.reset){r.reset()}}}}for(var i=0,r;i<recognizers.length;i++){r=recognizers[i];if(gs[r.name]&&!handled[r.name]){handled[r.name]=true;r[type](ev)}}},handleTouchAction:function(ev){var t=ev.changedTouches[0];var type=ev.type;if(type==="touchstart"){POINTERSTATE.touch.x=t.clientX;POINTERSTATE.touch.y=t.clientY;POINTERSTATE.touch.scrollDecided=false}else if(type==="touchmove"){if(POINTERSTATE.touch.scrollDecided){return}POINTERSTATE.touch.scrollDecided=true;var ta=firstTouchAction(ev);var prevent=false;var dx=Math.abs(POINTERSTATE.touch.x-t.clientX);var dy=Math.abs(POINTERSTATE.touch.y-t.clientY);if(!ev.cancelable){}else if(ta==="none"){prevent=true}else if(ta==="pan-x"){prevent=dy>dx}else if(ta==="pan-y"){prevent=dx>dy}if(prevent){ev.preventDefault()}else{Gestures.prevent("track")}}},add:function(node,evType,handler){node=wrap(node);var recognizer=this.gestures[evType];var deps=recognizer.deps;var name=recognizer.name;var gobj=node[GESTURE_KEY];if(!gobj){node[GESTURE_KEY]=gobj={}}for(var i=0,dep,gd;i<deps.length;i++){dep=deps[i];if(IS_TOUCH_ONLY&&MOUSE_EVENTS.indexOf(dep)>-1){continue}gd=gobj[dep];if(!gd){gobj[dep]=gd={_count:0}}if(gd._count===0){node.addEventListener(dep,this.handleNative)}gd[name]=(gd[name]||0)+1;gd._count=(gd._count||0)+1}node.addEventListener(evType,handler);if(recognizer.touchAction){this.setTouchAction(node,recognizer.touchAction)}},remove:function(node,evType,handler){node=wrap(node);var recognizer=this.gestures[evType];var deps=recognizer.deps;var name=recognizer.name;var gobj=node[GESTURE_KEY];if(gobj){for(var i=0,dep,gd;i<deps.length;i++){dep=deps[i];gd=gobj[dep];if(gd&&gd[name]){gd[name]=(gd[name]||1)-1;gd._count=(gd._count||1)-1;if(gd._count===0){node.removeEventListener(dep,this.handleNative)}}}}node.removeEventListener(evType,handler)},register:function(recog){this.recognizers.push(recog);for(var i=0;i<recog.emits.length;i++){this.gestures[recog.emits[i]]=recog}},findRecognizerByEvent:function(evName){for(var i=0,r;i<this.recognizers.length;i++){r=this.recognizers[i];for(var j=0,n;j<r.emits.length;j++){n=r.emits[j];if(n===evName){return r}}}return null},setTouchAction:function(node,value){if(HAS_NATIVE_TA){node.style.touchAction=value}node[TOUCH_ACTION]=value},fire:function(target,type,detail){var ev=Polymer.Base.fire(type,detail,{node:target,bubbles:true,cancelable:true});if(ev.defaultPrevented){var se=detail.sourceEvent;if(se&&se.preventDefault){se.preventDefault()}}},prevent:function(evName){var recognizer=this.findRecognizerByEvent(evName);if(recognizer.info){recognizer.info.prevent=true}}};Gestures.register({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:function(){},upfn:function(){}},reset:function(){untrackDocument(this.info)},mousedown:function(e){if(!hasLeftMouseButton(e)){return}var t=Gestures.findOriginalTarget(e);var self=this;var movefn=function movefn(e){if(!hasLeftMouseButton(e)){self.fire("up",t,e);untrackDocument(self.info)}};var upfn=function upfn(e){if(hasLeftMouseButton(e)){self.fire("up",t,e)}untrackDocument(self.info)};trackDocument(this.info,movefn,upfn);this.fire("down",t,e)},touchstart:function(e){this.fire("down",Gestures.findOriginalTarget(e),e.changedTouches[0])},touchend:function(e){this.fire("up",Gestures.findOriginalTarget(e),e.changedTouches[0])},fire:function(type,target,event){var self=this;Gestures.fire(target,type,{x:event.clientX,y:event.clientY,sourceEvent:event,prevent:function(e){return Gestures.prevent(e)}})}});Gestures.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:false,moves:[],addMove:function(move){if(this.moves.length>TRACK_LENGTH){this.moves.shift()}this.moves.push(move)},movefn:function(){},upfn:function(){},prevent:false},reset:function(){this.info.state="start";this.info.started=false;this.info.moves=[];this.info.x=0;this.info.y=0;this.info.prevent=false;untrackDocument(this.info)},hasMovedEnough:function(x,y){if(this.info.prevent){return false}if(this.info.started){return true}var dx=Math.abs(this.info.x-x);var dy=Math.abs(this.info.y-y);return dx>=TRACK_DISTANCE||dy>=TRACK_DISTANCE},mousedown:function(e){if(!hasLeftMouseButton(e)){return}var t=Gestures.findOriginalTarget(e);var self=this;var movefn=function movefn(e){var x=e.clientX,y=e.clientY;if(self.hasMovedEnough(x,y)){self.info.state=self.info.started?e.type==="mouseup"?"end":"track":"start";self.info.addMove({x:x,y:y});if(!hasLeftMouseButton(e)){self.info.state="end";untrackDocument(self.info)}self.fire(t,e);self.info.started=true}};var upfn=function upfn(e){if(self.info.started){Gestures.prevent("tap");movefn(e)}untrackDocument(self.info)};trackDocument(this.info,movefn,upfn);this.info.x=e.clientX;this.info.y=e.clientY},touchstart:function(e){var ct=e.changedTouches[0];this.info.x=ct.clientX;this.info.y=ct.clientY},touchmove:function(e){var t=Gestures.findOriginalTarget(e);var ct=e.changedTouches[0];var x=ct.clientX,y=ct.clientY;if(this.hasMovedEnough(x,y)){this.info.addMove({x:x,y:y});this.fire(t,ct);this.info.state="track";this.info.started=true}},touchend:function(e){var t=Gestures.findOriginalTarget(e);var ct=e.changedTouches[0];if(this.info.started){Gestures.prevent("tap");this.info.state="end";this.info.addMove({x:ct.clientX,y:ct.clientY});this.fire(t,ct)}},fire:function(target,touch){var secondlast=this.info.moves[this.info.moves.length-2];var lastmove=this.info.moves[this.info.moves.length-1];var dx=lastmove.x-this.info.x;var dy=lastmove.y-this.info.y;var ddx,ddy=0;if(secondlast){ddx=lastmove.x-secondlast.x;ddy=lastmove.y-secondlast.y}return Gestures.fire(target,"track",{state:this.info.state,x:touch.clientX,y:touch.clientY,dx:dx,dy:dy,ddx:ddx,ddy:ddy,sourceEvent:touch,hover:function(){return Gestures.deepTargetFind(touch.clientX,touch.clientY)}})}});Gestures.register({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:false},reset:function(){this.info.x=NaN;this.info.y=NaN;this.info.prevent=false},save:function(e){this.info.x=e.clientX;this.info.y=e.clientY},mousedown:function(e){if(hasLeftMouseButton(e)){this.save(e)}},click:function(e){if(hasLeftMouseButton(e)){this.forward(e)}},touchstart:function(e){this.save(e.changedTouches[0])},touchend:function(e){this.forward(e.changedTouches[0])},forward:function(e){var dx=Math.abs(e.clientX-this.info.x);var dy=Math.abs(e.clientY-this.info.y);var t=Gestures.findOriginalTarget(e);if(isNaN(dx)||isNaN(dy)||dx<=TAP_DISTANCE&&dy<=TAP_DISTANCE||isSyntheticClick(e)){if(!this.info.prevent){Gestures.fire(t,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e})}}}});var DIRECTION_MAP={x:"pan-x",y:"pan-y",none:"none",all:"auto"};Polymer.Base._addFeature({_listen:function(node,eventName,handler){if(Gestures.gestures[eventName]){Gestures.add(node,eventName,handler)}else{node.addEventListener(eventName,handler)}},_unlisten:function(node,eventName,handler){if(Gestures.gestures[eventName]){Gestures.remove(node,eventName,handler)}else{node.removeEventListener(eventName,handler)}},setScrollDirection:function(direction,node){node=node||this;Gestures.setTouchAction(node,DIRECTION_MAP[direction]||"auto")}});Polymer.Gestures=Gestures})();Polymer.Async={_currVal:0,_lastVal:0,_callbacks:[],_twiddleContent:0,_twiddle:document.createTextNode(""),run:function(callback,waitTime){if(waitTime>0){return~setTimeout(callback,waitTime)}else{this._twiddle.textContent=this._twiddleContent++;this._callbacks.push(callback);return this._currVal++}},cancel:function(handle){if(handle<0){clearTimeout(~handle)}else{var idx=handle-this._lastVal;if(idx>=0){if(!this._callbacks[idx]){throw"invalid async handle: "+handle}this._callbacks[idx]=null}}},_atEndOfMicrotask:function(){var len=this._callbacks.length;for(var i=0;i<len;i++){var cb=this._callbacks[i];if(cb){try{cb()}catch(e){i++;this._callbacks.splice(0,i);this._lastVal+=i;this._twiddle.textContent=this._twiddleContent++;throw e}}}this._callbacks.splice(0,len);this._lastVal+=len}};new window.MutationObserver(function(){Polymer.Async._atEndOfMicrotask()}).observe(Polymer.Async._twiddle,{characterData:true});Polymer.Debounce=function(){var Async=Polymer.Async;var Debouncer=function(context){this.context=context;var self=this;this.boundComplete=function(){self.complete()}};Debouncer.prototype={go:function(callback,wait){var h;this.finish=function(){Async.cancel(h)};h=Async.run(this.boundComplete,wait);this.callback=callback},stop:function(){if(this.finish){this.finish();this.finish=null}},complete:function(){if(this.finish){this.stop();this.callback.call(this.context)}}};function debounce(debouncer,callback,wait){if(debouncer){debouncer.stop()}else{debouncer=new Debouncer(this)}debouncer.go(callback,wait);return debouncer}return debounce}();Polymer.Base._addFeature({$$:function(slctr){return Polymer.dom(this.root).querySelector(slctr)},toggleClass:function(name,bool,node){node=node||this;if(arguments.length==1){bool=!node.classList.contains(name)}if(bool){Polymer.dom(node).classList.add(name)}else{Polymer.dom(node).classList.remove(name)}},toggleAttribute:function(name,bool,node){node=node||this;if(arguments.length==1){bool=!node.hasAttribute(name)}if(bool){Polymer.dom(node).setAttribute(name,"")}else{Polymer.dom(node).removeAttribute(name)}},classFollows:function(name,toElement,fromElement){if(fromElement){Polymer.dom(fromElement).classList.remove(name)}if(toElement){Polymer.dom(toElement).classList.add(name)}},attributeFollows:function(name,toElement,fromElement){if(fromElement){Polymer.dom(fromElement).removeAttribute(name)}if(toElement){Polymer.dom(toElement).setAttribute(name,"")}},getEffectiveChildNodes:function(){return Polymer.dom(this).getEffectiveChildNodes()},getEffectiveChildren:function(){var list=Polymer.dom(this).getEffectiveChildNodes();return list.filter(function(n){return n.nodeType===Node.ELEMENT_NODE})},getEffectiveTextContent:function(){var cn=this.getEffectiveChildNodes();var tc=[];for(var i=0,c;c=cn[i];i++){if(c.nodeType!==Node.COMMENT_NODE){tc.push(Polymer.dom(c).textContent)}}return tc.join("")},queryEffectiveChildren:function(slctr){var e$=Polymer.dom(this).queryDistributedElements(slctr);return e$&&e$[0]},queryAllEffectiveChildren:function(slctr){return Polymer.dom(this).queryDistributedElements(slctr)},getContentChildNodes:function(slctr){var content=Polymer.dom(this.root).querySelector(slctr||"content");return content?Polymer.dom(content).getDistributedNodes():[]},getContentChildren:function(slctr){return this.getContentChildNodes(slctr).filter(function(n){return n.nodeType===Node.ELEMENT_NODE})},fire:function(type,detail,options){options=options||Polymer.nob;var node=options.node||this;var detail=detail===null||detail===undefined?{}:detail;var bubbles=options.bubbles===undefined?true:options.bubbles;var cancelable=Boolean(options.cancelable);var useCache=options._useCache;var event=this._getEvent(type,bubbles,cancelable,useCache);event.detail=detail;if(useCache){this.__eventCache[type]=null}node.dispatchEvent(event);if(useCache){this.__eventCache[type]=event}return event},__eventCache:{},_getEvent:function(type,bubbles,cancelable,useCache){var event=useCache&&this.__eventCache[type];if(!event||(event.bubbles!=bubbles||event.cancelable!=cancelable)){event=new Event(type,{bubbles:Boolean(bubbles),cancelable:cancelable})}return event},async:function(callback,waitTime){var self=this;return Polymer.Async.run(function(){callback.call(self)},waitTime)},cancelAsync:function(handle){Polymer.Async.cancel(handle)},arrayDelete:function(path,item){var index;if(Array.isArray(path)){index=path.indexOf(item);if(index>=0){return path.splice(index,1)}}else{var arr=this._get(path);index=arr.indexOf(item);if(index>=0){return this.splice(path,index,1)}}},transform:function(transform,node){node=node||this;node.style.webkitTransform=transform;node.style.transform=transform},translate3d:function(x,y,z,node){node=node||this;this.transform("translate3d("+x+","+y+","+z+")",node)},importHref:function(href,onload,onerror){var l=document.createElement("link");l.rel="import";l.href=href;var self=this;if(onload){l.onload=function(e){return onload.call(self,e)}}if(onerror){l.onerror=function(e){return onerror.call(self,e)}}document.head.appendChild(l);return l},create:function(tag,props){var elt=document.createElement(tag);if(props){for(var n in props){elt[n]=props[n]}}return elt},isLightDescendant:function(node){return this!==node&&this.contains(node)&&Polymer.dom(this).getOwnerRoot()===Polymer.dom(node).getOwnerRoot()},isLocalDescendant:function(node){return this.root===Polymer.dom(node).getOwnerRoot()}});Polymer.Bind={_dataEventCache:{},prepareModel:function(model){Polymer.Base.mixin(model,this._modelApi)},_modelApi:{_notifyChange:function(source,event,value){value=value===undefined?this[source]:value;event=event||Polymer.CaseMap.camelToDashCase(source)+"-changed";this.fire(event,{value:value},{bubbles:false,cancelable:false,_useCache:true})},_propertySetter:function(property,value,effects,fromAbove){var old=this.__data__[property];if(old!==value&&(old===old||value===value)){this.__data__[property]=value;if(typeof value=="object"){this._clearPath(property)}if(this._propertyChanged){this._propertyChanged(property,value,old)}if(effects){this._effectEffects(property,value,effects,old,fromAbove)}}return old},__setProperty:function(property,value,quiet,node){node=node||this;var effects=node._propertyEffects&&node._propertyEffects[property];if(effects){node._propertySetter(property,value,effects,quiet)}else{node[property]=value}},_effectEffects:function(property,value,effects,old,fromAbove){for(var i=0,l=effects.length,fx;i<l&&(fx=effects[i]);i++){fx.fn.call(this,property,value,fx.effect,old,fromAbove)}},_clearPath:function(path){for(var prop in this.__data__){if(prop.indexOf(path+".")===0){this.__data__[prop]=undefined}}}},ensurePropertyEffects:function(model,property){if(!model._propertyEffects){model._propertyEffects={}}var fx=model._propertyEffects[property];if(!fx){fx=model._propertyEffects[property]=[]}return fx},addPropertyEffect:function(model,property,kind,effect){var fx=this.ensurePropertyEffects(model,property);var propEffect={kind:kind,effect:effect,fn:Polymer.Bind["_"+kind+"Effect"]};fx.push(propEffect);return propEffect},createBindings:function(model){var fx$=model._propertyEffects;if(fx$){for(var n in fx$){var fx=fx$[n];fx.sort(this._sortPropertyEffects);this._createAccessors(model,n,fx)}}},_sortPropertyEffects:function(){var EFFECT_ORDER={compute:0,annotation:1,computedAnnotation:2,reflect:3,notify:4,observer:5,complexObserver:6,function:7};return function(a,b){return EFFECT_ORDER[a.kind]-EFFECT_ORDER[b.kind]}}(),_createAccessors:function(model,property,effects){var defun={get:function(){return this.__data__[property]}};var setter=function(value){this._propertySetter(property,value,effects)};var info=model.getPropertyInfo&&model.getPropertyInfo(property);if(info&&info.readOnly){if(!info.computed){model["_set"+this.upper(property)]=setter}}else{defun.set=setter}Object.defineProperty(model,property,defun)},upper:function(name){return name[0].toUpperCase()+name.substring(1)},_addAnnotatedListener:function(model,index,property,path,event){if(!model._bindListeners){model._bindListeners=[]}var fn=this._notedListenerFactory(property,path,this._isStructured(path));var eventName=event||Polymer.CaseMap.camelToDashCase(property)+"-changed";model._bindListeners.push({index:index,property:property,path:path,changedFn:fn,event:eventName})},_isStructured:function(path){return path.indexOf(".")>0},_isEventBogus:function(e,target){return e.path&&e.path[0]!==target},_notedListenerFactory:function(property,path,isStructured){return function(target,value,targetPath){if(targetPath){this._notifyPath(this._fixPath(path,property,targetPath),value)}else{value=target[property];if(!isStructured){this[path]=value}else{if(this.__data__[path]!=value){this.set(path,value)}}}}},prepareInstance:function(inst){inst.__data__=Object.create(null)},setupBindListeners:function(inst){var b$=inst._bindListeners;for(var i=0,l=b$.length,info;i<l&&(info=b$[i]);i++){var node=inst._nodes[info.index];this._addNotifyListener(node,inst,info.event,info.changedFn)}},_addNotifyListener:function(element,context,event,changedFn){element.addEventListener(event,function(e){return context._notifyListener(changedFn,e)})}};Polymer.Base.extend(Polymer.Bind,{_shouldAddListener:function(effect){return effect.name&&effect.kind!="attribute"&&effect.kind!="text"&&!effect.isCompound&&effect.parts[0].mode==="{"&&!effect.parts[0].negate},_annotationEffect:function(source,value,effect){if(source!=effect.value){value=this._get(effect.value);this.__data__[effect.value]=value}var calc=effect.negate?!value:value;if(!effect.customEvent||this._nodes[effect.index][effect.name]!==calc){return this._applyEffectValue(effect,calc)}},_reflectEffect:function(source,value,effect){this.reflectPropertyToAttribute(source,effect.attribute,value)},_notifyEffect:function(source,value,effect,old,fromAbove){if(!fromAbove){this._notifyChange(source,effect.event,value)}},_functionEffect:function(source,value,fn,old,fromAbove){fn.call(this,source,value,old,fromAbove)},_observerEffect:function(source,value,effect,old){var fn=this[effect.method];if(fn){fn.call(this,value,old)}else{this._warn(this._logf("_observerEffect","observer method `"+effect.method+"` not defined"))}},_complexObserverEffect:function(source,value,effect){var fn=this[effect.method];if(fn){var args=Polymer.Bind._marshalArgs(this.__data__,effect,source,value);if(args){fn.apply(this,args)}}else{this._warn(this._logf("_complexObserverEffect","observer method `"+effect.method+"` not defined"))}},_computeEffect:function(source,value,effect){var args=Polymer.Bind._marshalArgs(this.__data__,effect,source,value);if(args){var fn=this[effect.method];if(fn){this.__setProperty(effect.name,fn.apply(this,args))}else{this._warn(this._logf("_computeEffect","compute method `"+effect.method+"` not defined"))}}},_annotatedComputationEffect:function(source,value,effect){var computedHost=this._rootDataHost||this;var fn=computedHost[effect.method];if(fn){var args=Polymer.Bind._marshalArgs(this.__data__,effect,source,value);if(args){var computedvalue=fn.apply(computedHost,args);if(effect.negate){computedvalue=!computedvalue}this._applyEffectValue(effect,computedvalue)}}else{computedHost._warn(computedHost._logf("_annotatedComputationEffect","compute method `"+effect.method+"` not defined"))}},_marshalArgs:function(model,effect,path,value){var values=[];var args=effect.args;for(var i=0,l=args.length;i<l;i++){var arg=args[i];var name=arg.name;var v;if(arg.literal){v=arg.value}else if(arg.structured){v=Polymer.Base._get(name,model)}else{v=model[name]}if(args.length>1&&v===undefined){return}if(arg.wildcard){var baseChanged=name.indexOf(path+".")===0;var matches=effect.trigger.name.indexOf(name)===0&&!baseChanged;values[i]={path:matches?path:name,value:matches?value:v,base:v}}else{values[i]=v}}return values}});Polymer.Base._addFeature({_addPropertyEffect:function(property,kind,effect){var prop=Polymer.Bind.addPropertyEffect(this,property,kind,effect);prop.pathFn=this["_"+prop.kind+"PathEffect"]},_prepEffects:function(){Polymer.Bind.prepareModel(this);this._addAnnotationEffects(this._notes)},_prepBindings:function(){Polymer.Bind.createBindings(this)},_addPropertyEffects:function(properties){if(properties){for(var p in properties){var prop=properties[p];if(prop.observer){this._addObserverEffect(p,prop.observer)}if(prop.computed){prop.readOnly=true;this._addComputedEffect(p,prop.computed)}if(prop.notify){this._addPropertyEffect(p,"notify",{event:Polymer.CaseMap.camelToDashCase(p)+"-changed"})}if(prop.reflectToAttribute){this._addPropertyEffect(p,"reflect",{attribute:Polymer.CaseMap.camelToDashCase(p)})}if(prop.readOnly){Polymer.Bind.ensurePropertyEffects(this,p)}}}},_addComputedEffect:function(name,expression){var sig=this._parseMethod(expression);for(var i=0,arg;i<sig.args.length&&(arg=sig.args[i]);i++){this._addPropertyEffect(arg.model,"compute",{method:sig.method,args:sig.args,trigger:arg,name:name})}},_addObserverEffect:function(property,observer){this._addPropertyEffect(property,"observer",{method:observer,property:property})},_addComplexObserverEffects:function(observers){if(observers){for(var i=0,o;i<observers.length&&(o=observers[i]);i++){this._addComplexObserverEffect(o)}}},_addComplexObserverEffect:function(observer){var sig=this._parseMethod(observer);for(var i=0,arg;i<sig.args.length&&(arg=sig.args[i]);i++){this._addPropertyEffect(arg.model,"complexObserver",{method:sig.method,args:sig.args,trigger:arg})}},_addAnnotationEffects:function(notes){for(var i=0,note;i<notes.length&&(note=notes[i]);i++){var b$=note.bindings;for(var j=0,binding;j<b$.length&&(binding=b$[j]);j++){this._addAnnotationEffect(binding,i)}}},_addAnnotationEffect:function(note,index){if(Polymer.Bind._shouldAddListener(note)){Polymer.Bind._addAnnotatedListener(this,index,note.name,note.parts[0].value,note.parts[0].event)}for(var i=0;i<note.parts.length;i++){var part=note.parts[i];if(part.signature){this._addAnnotatedComputationEffect(note,part,index)}else if(!part.literal){this._addPropertyEffect(part.model,"annotation",{kind:note.kind,index:index,name:note.name,value:part.value,isCompound:note.isCompound,compoundIndex:part.compoundIndex,event:part.event,customEvent:part.customEvent,negate:part.negate})}}},_addAnnotatedComputationEffect:function(note,part,index){var sig=part.signature;if(sig.static){this.__addAnnotatedComputationEffect("__static__",index,note,part,null)}else{for(var i=0,arg;i<sig.args.length&&(arg=sig.args[i]);i++){if(!arg.literal){this.__addAnnotatedComputationEffect(arg.model,index,note,part,arg)}}}},__addAnnotatedComputationEffect:function(property,index,note,part,trigger){this._addPropertyEffect(property,"annotatedComputation",{index:index,isCompound:note.isCompound,compoundIndex:part.compoundIndex,kind:note.kind,name:note.name,negate:part.negate,method:part.signature.method,args:part.signature.args,trigger:trigger})},_parseMethod:function(expression){var m=expression.match(/([^\s]+)\((.*)\)/);if(m){var sig={method:m[1],static:true};if(m[2].trim()){var args=m[2].replace(/\\,/g,",").split(",");return this._parseArgs(args,sig)}else{sig.args=Polymer.nar;return sig}}},_parseArgs:function(argList,sig){sig.args=argList.map(function(rawArg){var arg=this._parseArg(rawArg);if(!arg.literal){sig.static=false}return arg},this);return sig},_parseArg:function(rawArg){var arg=rawArg.trim().replace(/,/g,",").replace(/\\(.)/g,"$1");var a={name:arg,model:this._modelForPath(arg)};var fc=arg[0];if(fc==="-"){fc=arg[1]}if(fc>="0"&&fc<="9"){fc="#"}switch(fc){case"'":case'"':a.value=arg.slice(1,-1);a.literal=true;break;case"#":a.value=Number(arg);a.literal=true;break}if(!a.literal){a.structured=arg.indexOf(".")>0;if(a.structured){a.wildcard=arg.slice(-2)==".*";if(a.wildcard){a.name=arg.slice(0,-2)}}}return a},_marshalInstanceEffects:function(){Polymer.Bind.prepareInstance(this);if(this._bindListeners){Polymer.Bind.setupBindListeners(this)}},_applyEffectValue:function(info,value){var node=this._nodes[info.index];var property=info.name;if(info.isCompound){var storage=node.__compoundStorage__[property];storage[info.compoundIndex]=value;value=storage.join("")}if(info.kind=="attribute"){this.serializeValueToAttribute(value,property,node)}else{if(property==="className"){value=this._scopeElementClass(node,value)}if(property==="textContent"||node.localName=="input"&&property=="value"){value=value==undefined?"":value}var pinfo;if(!node._propertyInfo||!(pinfo=node._propertyInfo[property])||!pinfo.readOnly){this.__setProperty(property,value,true,node)}}},_executeStaticEffects:function(){if(this._propertyEffects&&this._propertyEffects.__static__){this._effectEffects("__static__",null,this._propertyEffects.__static__)}}});Polymer.Base._addFeature({_setupConfigure:function(initialConfig){this._config={};this._handlers=[];if(initialConfig){for(var i in initialConfig){if(initialConfig[i]!==undefined){this._config[i]=initialConfig[i]}}}},_marshalAttributes:function(){this._takeAttributesToModel(this._config)},_attributeChangedImpl:function(name){var model=this._clientsReadied?this:this._config;this._setAttributeToProperty(model,name)},_configValue:function(name,value){var info=this._propertyInfo[name];if(!info||!info.readOnly){this._config[name]=value}},_beforeClientsReady:function(){this._configure()},_configure:function(){this._configureAnnotationReferences();this._aboveConfig=this.mixin({},this._config);var config={};for(var i=0;i<this.behaviors.length;i++){this._configureProperties(this.behaviors[i].properties,config)}this._configureProperties(this.properties,config);this.mixin(config,this._aboveConfig);this._config=config;if(this._clients&&this._clients.length){this._distributeConfig(this._config)}},_configureProperties:function(properties,config){for(var i in properties){var c=properties[i];if(c.value!==undefined){var value=c.value;if(typeof value=="function"){value=value.call(this,this._config)}config[i]=value}}},_distributeConfig:function(config){var fx$=this._propertyEffects;if(fx$){for(var p in config){var fx=fx$[p];if(fx){for(var i=0,l=fx.length,x;i<l&&(x=fx[i]);i++){if(x.kind==="annotation"&&!x.isCompound){var node=this._nodes[x.effect.index];if(node._configValue){var value=p===x.effect.value?config[p]:this._get(x.effect.value,config);node._configValue(x.effect.name,value)}}}}}}},_afterClientsReady:function(){this._executeStaticEffects();this._applyConfig(this._config,this._aboveConfig);this._flushHandlers()},_applyConfig:function(config,aboveConfig){for(var n in config){if(this[n]===undefined){this.__setProperty(n,config[n],n in aboveConfig)}}},_notifyListener:function(fn,e){if(!Polymer.Bind._isEventBogus(e,e.target)){var value,path;if(e.detail){value=e.detail.value;path=e.detail.path}if(!this._clientsReadied){this._queueHandler([fn,e.target,value,path])}else{return fn.call(this,e.target,value,path)}}},_queueHandler:function(args){this._handlers.push(args)},_flushHandlers:function(){var h$=this._handlers;for(var i=0,l=h$.length,h;i<l&&(h=h$[i]);i++){h[0].call(this,h[1],h[2],h[3])}this._handlers=[]}});(function(){"use strict";Polymer.Base._addFeature({notifyPath:function(path,value,fromAbove){var info={};this._get(path,this,info);this._notifyPath(info.path,value,fromAbove)},_notifyPath:function(path,value,fromAbove){var old=this._propertySetter(path,value);if(old!==value&&(old===old||value===value)){this._pathEffector(path,value);if(!fromAbove){this._notifyPathUp(path,value)}return true}},_getPathParts:function(path){if(Array.isArray(path)){var parts=[];for(var i=0;i<path.length;i++){var args=path[i].toString().split(".");for(var j=0;j<args.length;j++){parts.push(args[j])}}return parts}else{return path.toString().split(".")}},set:function(path,value,root){var prop=root||this;var parts=this._getPathParts(path);var array;var last=parts[parts.length-1];if(parts.length>1){for(var i=0;i<parts.length-1;i++){var part=parts[i];if(array&&part[0]=="#"){prop=Polymer.Collection.get(array).getItem(part)}else{prop=prop[part];if(array&&parseInt(part,10)==part){parts[i]=Polymer.Collection.get(array).getKey(prop)}}if(!prop){return}array=Array.isArray(prop)?prop:null}if(array){var coll=Polymer.Collection.get(array);if(last[0]=="#"){var key=last;var old=coll.getItem(key);last=array.indexOf(old);coll.setItem(key,value)}else if(parseInt(last,10)==last){var old=prop[last];var key=coll.getKey(old);parts[i]=key;coll.setItem(key,value)}}prop[last]=value;if(!root){this._notifyPath(parts.join("."),value)}}else{prop[path]=value}},get:function(path,root){return this._get(path,root)},_get:function(path,root,info){var prop=root||this;var parts=this._getPathParts(path);var array;for(var i=0;i<parts.length;i++){if(!prop){return}var part=parts[i];if(array&&part[0]=="#"){prop=Polymer.Collection.get(array).getItem(part)}else{prop=prop[part];if(info&&array&&parseInt(part,10)==part){parts[i]=Polymer.Collection.get(array).getKey(prop)}}array=Array.isArray(prop)?prop:null}if(info){info.path=parts.join(".")}return prop},_pathEffector:function(path,value){var model=this._modelForPath(path);var fx$=this._propertyEffects&&this._propertyEffects[model];if(fx$){for(var i=0,fx;i<fx$.length&&(fx=fx$[i]);i++){var fxFn=fx.pathFn;if(fxFn){fxFn.call(this,path,value,fx.effect)}}}if(this._boundPaths){this._notifyBoundPaths(path,value)}},_annotationPathEffect:function(path,value,effect){if(effect.value===path||effect.value.indexOf(path+".")===0){Polymer.Bind._annotationEffect.call(this,path,value,effect)}else if(path.indexOf(effect.value+".")===0&&!effect.negate){var node=this._nodes[effect.index];if(node&&node._notifyPath){var p=this._fixPath(effect.name,effect.value,path);node._notifyPath(p,value,true)}}},_complexObserverPathEffect:function(path,value,effect){if(this._pathMatchesEffect(path,effect)){Polymer.Bind._complexObserverEffect.call(this,path,value,effect)}},_computePathEffect:function(path,value,effect){if(this._pathMatchesEffect(path,effect)){Polymer.Bind._computeEffect.call(this,path,value,effect)}},_annotatedComputationPathEffect:function(path,value,effect){if(this._pathMatchesEffect(path,effect)){Polymer.Bind._annotatedComputationEffect.call(this,path,value,effect)}},_pathMatchesEffect:function(path,effect){var effectArg=effect.trigger.name;return effectArg==path||effectArg.indexOf(path+".")===0||effect.trigger.wildcard&&path.indexOf(effectArg)===0},linkPaths:function(to,from){this._boundPaths=this._boundPaths||{};if(from){this._boundPaths[to]=from}else{this.unlinkPaths(to)}},unlinkPaths:function(path){if(this._boundPaths){delete this._boundPaths[path]}},_notifyBoundPaths:function(path,value){for(var a in this._boundPaths){var b=this._boundPaths[a];if(path.indexOf(a+".")==0){this._notifyPath(this._fixPath(b,a,path),value)}else if(path.indexOf(b+".")==0){this._notifyPath(this._fixPath(a,b,path),value)}}},_fixPath:function(property,root,path){return property+path.slice(root.length)},_notifyPathUp:function(path,value){var rootName=this._modelForPath(path);var dashCaseName=Polymer.CaseMap.camelToDashCase(rootName);var eventName=dashCaseName+this._EVENT_CHANGED;this.fire(eventName,{path:path,value:value},{bubbles:false,_useCache:true})},_modelForPath:function(path){var dot=path.indexOf(".");return dot<0?path:path.slice(0,dot)},_EVENT_CHANGED:"-changed",notifySplices:function(path,splices){var info={};var array=this._get(path,this,info);this._notifySplices(array,info.path,splices)},_notifySplices:function(array,path,splices){var change={keySplices:Polymer.Collection.applySplices(array,splices),indexSplices:splices};if(!array.hasOwnProperty("splices")){Object.defineProperty(array,"splices",{configurable:true,writable:true})}array.splices=change;this._notifyPath(path+".splices",change);this._notifyPath(path+".length",array.length);change.keySplices=null;change.indexSplices=null},_notifySplice:function(array,path,index,added,removed){this._notifySplices(array,path,[{index:index,addedCount:added,removed:removed,object:array,type:"splice"}])},push:function(path){var info={};var array=this._get(path,this,info);var args=Array.prototype.slice.call(arguments,1);var len=array.length;var ret=array.push.apply(array,args);if(args.length){this._notifySplice(array,info.path,len,args.length,[])}return ret},pop:function(path){var info={};var array=this._get(path,this,info);var hadLength=Boolean(array.length);var args=Array.prototype.slice.call(arguments,1);var ret=array.pop.apply(array,args);if(hadLength){this._notifySplice(array,info.path,array.length,0,[ret])}return ret},splice:function(path,start,deleteCount){var info={};var array=this._get(path,this,info);if(start<0){start=array.length-Math.floor(-start)}else{start=Math.floor(start)}if(!start){start=0}var args=Array.prototype.slice.call(arguments,1);var ret=array.splice.apply(array,args);var addedCount=Math.max(args.length-2,0);if(addedCount||ret.length){this._notifySplice(array,info.path,start,addedCount,ret)}return ret},shift:function(path){var info={};var array=this._get(path,this,info);var hadLength=Boolean(array.length);var args=Array.prototype.slice.call(arguments,1);var ret=array.shift.apply(array,args);if(hadLength){this._notifySplice(array,info.path,0,0,[ret])}return ret},unshift:function(path){var info={};var array=this._get(path,this,info);var args=Array.prototype.slice.call(arguments,1);var ret=array.unshift.apply(array,args);if(args.length){this._notifySplice(array,info.path,0,args.length,[])}return ret},prepareModelNotifyPath:function(model){this.mixin(model,{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,_modelForPath:Polymer.Base._modelForPath,_pathMatchesEffect:Polymer.Base._pathMatchesEffect,_notifyBoundPaths:Polymer.Base._notifyBoundPaths,_getPathParts:Polymer.Base._getPathParts})}})})();Polymer.Base._addFeature({resolveUrl:function(url){var module=Polymer.DomModule.import(this.is);var root="";if(module){var assetPath=module.getAttribute("assetpath")||"";root=Polymer.ResolveUrl.resolveUrl(assetPath,module.ownerDocument.baseURI)}return Polymer.ResolveUrl.resolveUrl(url,root)}});Polymer.CssParse=function(){var api={parse:function(text){text=this._clean(text);return this._parseCss(this._lex(text),text)},_clean:function(cssText){return cssText.replace(this._rx.comments,"").replace(this._rx.port,"")},_lex:function(text){var root={start:0,end:text.length};var n=root;for(var i=0,s=0,l=text.length;i<l;i++){switch(text[i]){case this.OPEN_BRACE:if(!n.rules){n.rules=[]}var p=n;var previous=p.rules[p.rules.length-1];n={start:i+1,parent:p,previous:previous};p.rules.push(n);break;case this.CLOSE_BRACE:n.end=i+1;n=n.parent||root;break}}return root},_parseCss:function(node,text){var t=text.substring(node.start,node.end-1);node.parsedCssText=node.cssText=t.trim();if(node.parent){var ss=node.previous?node.previous.end:node.parent.start;t=text.substring(ss,node.start-1);t=this._expandUnicodeEscapes(t);t=t.replace(this._rx.multipleSpaces," ");t=t.substring(t.lastIndexOf(";")+1);var s=node.parsedSelector=node.selector=t.trim();node.atRule=s.indexOf(this.AT_START)===0;if(node.atRule){if(s.indexOf(this.MEDIA_START)===0){node.type=this.types.MEDIA_RULE}else if(s.match(this._rx.keyframesRule)){node.type=this.types.KEYFRAMES_RULE}}else{if(s.indexOf(this.VAR_START)===0){node.type=this.types.MIXIN_RULE}else{node.type=this.types.STYLE_RULE}}}var r$=node.rules;if(r$){for(var i=0,l=r$.length,r;i<l&&(r=r$[i]);i++){this._parseCss(r,text)}}return node},_expandUnicodeEscapes:function(s){return s.replace(/\\([0-9a-f]{1,6})\s/gi,function(){var code=arguments[1],repeat=6-code.length;while(repeat--){code="0"+code}return"\\"+code})},stringify:function(node,preserveProperties,text){text=text||"";var cssText="";if(node.cssText||node.rules){var r$=node.rules;if(r$&&(preserveProperties||!this._hasMixinRules(r$))){for(var i=0,l=r$.length,r;i<l&&(r=r$[i]);i++){cssText=this.stringify(r,preserveProperties,cssText)}}else{cssText=preserveProperties?node.cssText:this.removeCustomProps(node.cssText);cssText=cssText.trim();if(cssText){cssText=" "+cssText+"\n"}}}if(cssText){if(node.selector){text+=node.selector+" "+this.OPEN_BRACE+"\n"}text+=cssText;if(node.selector){text+=this.CLOSE_BRACE+"\n\n"}}return text},_hasMixinRules:function(rules){return rules[0].selector.indexOf(this.VAR_START)===0},removeCustomProps:function(cssText){cssText=this.removeCustomPropAssignment(cssText);return this.removeCustomPropApply(cssText)},removeCustomPropAssignment:function(cssText){return cssText.replace(this._rx.customProp,"").replace(this._rx.mixinProp,"")},removeCustomPropApply:function(cssText){return cssText.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:"@"};return api}();Polymer.StyleUtil=function(){return{MODULE_STYLES_SELECTOR:"style, link[rel=import][type~=css], template",INCLUDE_ATTR:"include",toCssText:function(rules,callback,preserveProperties){if(typeof rules==="string"){rules=this.parser.parse(rules)}if(callback){this.forEachStyleRule(rules,callback)}return this.parser.stringify(rules,preserveProperties)},forRulesInStyles:function(styles,callback){if(styles){for(var i=0,l=styles.length,s;i<l&&(s=styles[i]);i++){this.forEachStyleRule(this.rulesForStyle(s),callback)}}},rulesForStyle:function(style){if(!style.__cssRules&&style.textContent){style.__cssRules=this.parser.parse(style.textContent)}return style.__cssRules},clearStyleRules:function(style){style.__cssRules=null},forEachStyleRule:function(node,callback){if(!node){return}var s=node.parsedSelector;var skipRules=false;if(node.type===this.ruleTypes.STYLE_RULE){callback(node)}else if(node.type===this.ruleTypes.KEYFRAMES_RULE||node.type===this.ruleTypes.MIXIN_RULE){skipRules=true}var r$=node.rules;if(r$&&!skipRules){for(var i=0,l=r$.length,r;i<l&&(r=r$[i]);i++){this.forEachStyleRule(r,callback)}}},applyCss:function(cssText,moniker,target,afterNode){var style=document.createElement("style");if(moniker){style.setAttribute("scope",moniker)}style.textContent=cssText;target=target||document.head;if(!afterNode){var n$=target.querySelectorAll("style[scope]");afterNode=n$[n$.length-1]}target.insertBefore(style,afterNode&&afterNode.nextSibling||target.firstChild);return style},cssFromModules:function(moduleIds,warnIfNotFound){var modules=moduleIds.trim().split(" ");var cssText="";for(var i=0;i<modules.length;i++){cssText+=this.cssFromModule(modules[i],warnIfNotFound)}return cssText},cssFromModule:function(moduleId,warnIfNotFound){var m=Polymer.DomModule.import(moduleId);if(m&&!m._cssText){m._cssText=this.cssFromElement(m)}if(!m&&warnIfNotFound){console.warn("Could not find style data in module named",moduleId)}return m&&m._cssText||""},cssFromElement:function(element){var cssText="";var content=element.content||element;var e$=Polymer.DomApi.arrayCopy(content.querySelectorAll(this.MODULE_STYLES_SELECTOR));for(var i=0,e;i<e$.length;i++){e=e$[i];if(e.localName==="template"){cssText+=this.cssFromElement(e)}else{if(e.localName==="style"){var include=e.getAttribute(this.INCLUDE_ATTR);if(include){cssText+=this.cssFromModules(include,true)}e=e.__appliedElement||e;e.parentNode.removeChild(e);cssText+=this.resolveCss(e.textContent,element.ownerDocument)}else if(e.import&&e.import.body){cssText+=this.resolveCss(e.import.body.textContent,e.import)}}}return cssText},resolveCss:Polymer.ResolveUrl.resolveCss,parser:Polymer.CssParse,ruleTypes:Polymer.CssParse.types}}();Polymer.StyleTransformer=function(){var nativeShadow=Polymer.Settings.useNativeShadow;var styleUtil=Polymer.StyleUtil;var api={dom:function(node,scope,useAttr,shouldRemoveScope){this._transformDom(node,scope||"",useAttr,shouldRemoveScope)},_transformDom:function(node,selector,useAttr,shouldRemoveScope){if(node.setAttribute){this.element(node,selector,useAttr,shouldRemoveScope)}var c$=Polymer.dom(node).childNodes;for(var i=0;i<c$.length;i++){this._transformDom(c$[i],selector,useAttr,shouldRemoveScope)}},element:function(element,scope,useAttr,shouldRemoveScope){if(useAttr){if(shouldRemoveScope){element.removeAttribute(SCOPE_NAME)}else{element.setAttribute(SCOPE_NAME,scope)}}else{if(scope){if(element.classList){if(shouldRemoveScope){element.classList.remove(SCOPE_NAME);element.classList.remove(scope)}else{element.classList.add(SCOPE_NAME);element.classList.add(scope)}}else if(element.getAttribute){var c=element.getAttribute(CLASS);if(shouldRemoveScope){if(c){element.setAttribute(CLASS,c.replace(SCOPE_NAME,"").replace(scope,""))}}else{element.setAttribute(CLASS,c+(c?" ":"")+SCOPE_NAME+" "+scope)}}}}},elementStyles:function(element,callback){var styles=element._styles;var cssText="";for(var i=0,l=styles.length,s,text;i<l&&(s=styles[i]);i++){var rules=styleUtil.rulesForStyle(s);cssText+=nativeShadow?styleUtil.toCssText(rules,callback):this.css(rules,element.is,element.extends,callback,element._scopeCssViaAttr)+"\n\n"}return cssText.trim()},css:function(rules,scope,ext,callback,useAttr){var hostScope=this._calcHostScope(scope,ext);scope=this._calcElementScope(scope,useAttr);var self=this;return styleUtil.toCssText(rules,function(rule){if(!rule.isScoped){self.rule(rule,scope,hostScope);rule.isScoped=true}if(callback){callback(rule,scope,hostScope)}})},_calcElementScope:function(scope,useAttr){if(scope){return useAttr?CSS_ATTR_PREFIX+scope+CSS_ATTR_SUFFIX:CSS_CLASS_PREFIX+scope}else{return""}},_calcHostScope:function(scope,ext){return ext?"[is="+scope+"]":scope},rule:function(rule,scope,hostScope){this._transformRule(rule,this._transformComplexSelector,scope,hostScope)},_transformRule:function(rule,transformer,scope,hostScope){var p$=rule.selector.split(COMPLEX_SELECTOR_SEP);for(var i=0,l=p$.length,p;i<l&&(p=p$[i]);i++){p$[i]=transformer.call(this,p,scope,hostScope)}rule.selector=rule.transformedSelector=p$.join(COMPLEX_SELECTOR_SEP)},_transformComplexSelector:function(selector,scope,hostScope){var stop=false;var hostContext=false;var self=this;selector=selector.replace(SIMPLE_SELECTOR_SEP,function(m,c,s){if(!stop){var info=self._transformCompoundSelector(s,c,scope,hostScope);stop=stop||info.stop;hostContext=hostContext||info.hostContext;c=info.combinator;s=info.value}else{s=s.replace(SCOPE_JUMP," ")}return c+s});if(hostContext){selector=selector.replace(HOST_CONTEXT_PAREN,function(m,pre,paren,post){return pre+paren+" "+hostScope+post+COMPLEX_SELECTOR_SEP+" "+pre+hostScope+paren+post})}return selector},_transformCompoundSelector:function(selector,combinator,scope,hostScope){var jumpIndex=selector.search(SCOPE_JUMP);var hostContext=false;if(selector.indexOf(HOST_CONTEXT)>=0){hostContext=true}else if(selector.indexOf(HOST)>=0){selector=selector.replace(HOST_PAREN,function(m,host,paren){return hostScope+paren});selector=selector.replace(HOST,hostScope)}else if(jumpIndex!==0){selector=scope?this._transformSimpleSelector(selector,scope):selector}if(selector.indexOf(CONTENT)>=0){combinator=""}var stop;if(jumpIndex>=0){selector=selector.replace(SCOPE_JUMP," ");stop=true}return{value:selector,combinator:combinator,stop:stop,hostContext:hostContext}},_transformSimpleSelector:function(selector,scope){var p$=selector.split(PSEUDO_PREFIX);p$[0]+=scope;return p$.join(PSEUDO_PREFIX)},documentRule:function(rule){rule.selector=rule.parsedSelector;this.normalizeRootSelector(rule);if(!nativeShadow){this._transformRule(rule,this._transformDocumentSelector)}},normalizeRootSelector:function(rule){if(rule.selector===ROOT){rule.selector="body"}},_transformDocumentSelector:function(selector){return selector.match(SCOPE_JUMP)?this._transformComplexSelector(selector,SCOPE_DOC_SELECTOR):this._transformSimpleSelector(selector.trim(),SCOPE_DOC_SELECTOR)},SCOPE_NAME:"style-scope"};var SCOPE_NAME=api.SCOPE_NAME;var SCOPE_DOC_SELECTOR=":not(["+SCOPE_NAME+"])"+":not(."+SCOPE_NAME+")";var COMPLEX_SELECTOR_SEP=",";var SIMPLE_SELECTOR_SEP=/(^|[\s>+~]+)([^\s>+~]+)/g;var HOST=":host";var ROOT=":root";var HOST_PAREN=/(\:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/g;var HOST_CONTEXT=":host-context";var HOST_CONTEXT_PAREN=/(.*)(?:\:host-context)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))(.*)/;var CONTENT="::content";var SCOPE_JUMP=/\:\:content|\:\:shadow|\/deep\//;var CSS_CLASS_PREFIX=".";var CSS_ATTR_PREFIX="["+SCOPE_NAME+"~=";var CSS_ATTR_SUFFIX="]";var PSEUDO_PREFIX=":";var CLASS="class";return api}();Polymer.StyleExtends=function(){var styleUtil=Polymer.StyleUtil;return{hasExtends:function(cssText){return Boolean(cssText.match(this.rx.EXTEND))},transform:function(style){var rules=styleUtil.rulesForStyle(style);var self=this;styleUtil.forEachStyleRule(rules,function(rule){var map=self._mapRule(rule);if(rule.parent){var m;while(m=self.rx.EXTEND.exec(rule.cssText)){var extend=m[1];var extendor=self._findExtendor(extend,rule);if(extendor){self._extendRule(rule,extendor)}}}rule.cssText=rule.cssText.replace(self.rx.EXTEND,"")});return styleUtil.toCssText(rules,function(rule){if(rule.selector.match(self.rx.STRIP)){rule.cssText=""}},true)},_mapRule:function(rule){if(rule.parent){var map=rule.parent.map||(rule.parent.map={});var parts=rule.selector.split(",");for(var i=0,p;i<parts.length;i++){p=parts[i];map[p.trim()]=rule}return map}},_findExtendor:function(extend,rule){return rule.parent&&rule.parent.map&&rule.parent.map[extend]||this._findExtendor(extend,rule.parent)},_extendRule:function(target,source){if(target.parent!==source.parent){this._cloneAndAddRuleToParent(source,target.parent)}target.extends=target.extends||[];target.extends.push(source);source.selector=source.selector.replace(this.rx.STRIP,"");source.selector=(source.selector&&source.selector+",\n")+target.selector;if(source.extends){source.extends.forEach(function(e){this._extendRule(target,e)},this)}},_cloneAndAddRuleToParent:function(rule,parent){rule=Object.create(rule);rule.parent=parent;if(rule.extends){rule.extends=rule.extends.slice()}parent.rules.push(rule)},rx:{EXTEND:/@extends\(([^)]*)\)\s*?;/gim,STRIP:/%[^,]*$/}}}();(function(){var prepElement=Polymer.Base._prepElement;var nativeShadow=Polymer.Settings.useNativeShadow;var styleUtil=Polymer.StyleUtil;var styleTransformer=Polymer.StyleTransformer;var styleExtends=Polymer.StyleExtends;Polymer.Base._addFeature({_prepElement:function(element){if(this._encapsulateStyle){styleTransformer.element(element,this.is,this._scopeCssViaAttr)}prepElement.call(this,element)},_prepStyles:function(){if(this._encapsulateStyle===undefined){this._encapsulateStyle=!nativeShadow&&Boolean(this._template)}if(this._template){this._styles=this._collectStyles();var cssText=styleTransformer.elementStyles(this);if(cssText){var style=styleUtil.applyCss(cssText,this.is,nativeShadow?this._template.content:null);if(!nativeShadow){this._scopeStyle=style}}}else{this._styles=[]}},_collectStyles:function(){var styles=[];var cssText="",m$=this.styleModules;if(m$){for(var i=0,l=m$.length,m;i<l&&(m=m$[i]);i++){cssText+=styleUtil.cssFromModule(m)}}cssText+=styleUtil.cssFromModule(this.is);var p=this._template&&this._template.parentNode;if(this._template&&(!p||p.id.toLowerCase()!==this.is)){cssText+=styleUtil.cssFromElement(this._template)}if(cssText){var style=document.createElement("style");style.textContent=cssText;if(styleExtends.hasExtends(style.textContent)){cssText=styleExtends.transform(style)}styles.push(style)}return styles},_elementAdd:function(node){if(this._encapsulateStyle){if(node.__styleScoped){node.__styleScoped=false}else{styleTransformer.dom(node,this.is,this._scopeCssViaAttr)}}},_elementRemove:function(node){if(this._encapsulateStyle){styleTransformer.dom(node,this.is,this._scopeCssViaAttr,true)}},scopeSubtree:function(container,shouldObserve){if(nativeShadow){return}var self=this;var scopify=function(node){if(node.nodeType===Node.ELEMENT_NODE){node.className=self._scopeElementClass(node,node.className);var n$=node.querySelectorAll("*");for(var i=0,n;i<n$.length&&(n=n$[i]);i++){n.className=self._scopeElementClass(n,n.className)}}};scopify(container);if(shouldObserve){var mo=new MutationObserver(function(mxns){for(var i=0,m;i<mxns.length&&(m=mxns[i]);i++){if(m.addedNodes){for(var j=0;j<m.addedNodes.length;j++){scopify(m.addedNodes[j])}}}});mo.observe(container,{childList:true,subtree:true});return mo}}})})();Polymer.StyleProperties=function(){"use strict";var nativeShadow=Polymer.Settings.useNativeShadow;var matchesSelector=Polymer.DomApi.matchesSelector;var styleUtil=Polymer.StyleUtil;var styleTransformer=Polymer.StyleTransformer;return{decorateStyles:function(styles){var self=this,props={};styleUtil.forRulesInStyles(styles,function(rule){self.decorateRule(rule);self.collectPropertiesInCssText(rule.propertyInfo.cssText,props)});var names=[];for(var i in props){names.push(i)}return names},decorateRule:function(rule){if(rule.propertyInfo){return rule.propertyInfo}var info={},properties={};var hasProperties=this.collectProperties(rule,properties);if(hasProperties){info.properties=properties;rule.rules=null}info.cssText=this.collectCssText(rule);rule.propertyInfo=info;return info},collectProperties:function(rule,properties){var info=rule.propertyInfo;if(info){if(info.properties){Polymer.Base.mixin(properties,info.properties);return true}}else{var m,rx=this.rx.VAR_ASSIGN;var cssText=rule.parsedCssText;var any;while(m=rx.exec(cssText)){properties[m[1]]=(m[2]||m[3]).trim();any=true}return any}},collectCssText:function(rule){var customCssText="";var cssText=rule.parsedCssText;cssText=cssText.replace(this.rx.BRACKETED,"").replace(this.rx.VAR_ASSIGN,"");var parts=cssText.split(";");for(var i=0,p;i<parts.length;i++){p=parts[i];if(p.match(this.rx.MIXIN_MATCH)||p.match(this.rx.VAR_MATCH)){customCssText+=p+";\n"}}return customCssText},collectPropertiesInCssText:function(cssText,props){var m;while(m=this.rx.VAR_CAPTURE.exec(cssText)){props[m[1]]=true;var def=m[2];if(def&&def.match(this.rx.IS_VAR)){props[def]=true}}},reify:function(props){var names=Object.getOwnPropertyNames(props);for(var i=0,n;i<names.length;i++){n=names[i];props[n]=this.valueForProperty(props[n],props)}},valueForProperty:function(property,props){if(property){if(property.indexOf(";")>=0){property=this.valueForProperties(property,props)}else{var self=this;var fn=function(all,prefix,value,fallback){var propertyValue=self.valueForProperty(props[value],props)||(props[fallback]?self.valueForProperty(props[fallback],props):fallback);return prefix+(propertyValue||"")};property=property.replace(this.rx.VAR_MATCH,fn)}}return property&&property.trim()||""},valueForProperties:function(property,props){var parts=property.split(";");for(var i=0,p,m;i<parts.length;i++){if(p=parts[i]){m=p.match(this.rx.MIXIN_MATCH);if(m){p=this.valueForProperty(props[m[1]],props)}else{var pp=p.split(":");if(pp[1]){pp[1]=pp[1].trim();pp[1]=this.valueForProperty(pp[1],props)||pp[1]}p=pp.join(":")}parts[i]=p&&p.lastIndexOf(";")===p.length-1?p.slice(0,-1):p||""}}return parts.filter(function(v){return v}).join(";")},applyProperties:function(rule,props){var output="";if(!rule.propertyInfo){this.decorateRule(rule)}if(rule.propertyInfo.cssText){output=this.valueForProperties(rule.propertyInfo.cssText,props)}rule.cssText=output},propertyDataFromStyles:function(styles,element){var props={},self=this;var o=[],i=0;styleUtil.forRulesInStyles(styles,function(rule){if(!rule.propertyInfo){self.decorateRule(rule)}if(element&&rule.propertyInfo.properties&&matchesSelector.call(element,rule.transformedSelector||rule.parsedSelector)){self.collectProperties(rule,props);addToBitMask(i,o)}i++});return{properties:props,key:o}},scopePropertiesFromStyles:function(styles){if(!styles._scopeStyleProperties){styles._scopeStyleProperties=this.selectedPropertiesFromStyles(styles,this.SCOPE_SELECTORS)}return styles._scopeStyleProperties},hostPropertiesFromStyles:function(styles){if(!styles._hostStyleProperties){styles._hostStyleProperties=this.selectedPropertiesFromStyles(styles,this.HOST_SELECTORS)}return styles._hostStyleProperties},selectedPropertiesFromStyles:function(styles,selectors){var props={},self=this;styleUtil.forRulesInStyles(styles,function(rule){if(!rule.propertyInfo){self.decorateRule(rule)}for(var i=0;i<selectors.length;i++){if(rule.parsedSelector===selectors[i]){self.collectProperties(rule,props);return}}});return props},transformStyles:function(element,properties,scopeSelector){var self=this;var hostSelector=styleTransformer._calcHostScope(element.is,element.extends);var rxHostSelector=element.extends?"\\"+hostSelector.slice(0,-1)+"\\]":hostSelector;var hostRx=new RegExp(this.rx.HOST_PREFIX+rxHostSelector+this.rx.HOST_SUFFIX);return styleTransformer.elementStyles(element,function(rule){self.applyProperties(rule,properties);if(rule.cssText&&!nativeShadow){self._scopeSelector(rule,hostRx,hostSelector,element._scopeCssViaAttr,scopeSelector)}})},_scopeSelector:function(rule,hostRx,hostSelector,viaAttr,scopeId){rule.transformedSelector=rule.transformedSelector||rule.selector;var selector=rule.transformedSelector;var scope=viaAttr?"["+styleTransformer.SCOPE_NAME+"~="+scopeId+"]":"."+scopeId;var parts=selector.split(",");for(var i=0,l=parts.length,p;i<l&&(p=parts[i]);i++){parts[i]=p.match(hostRx)?p.replace(hostSelector,hostSelector+scope):scope+" "+p}rule.selector=parts.join(",")},applyElementScopeSelector:function(element,selector,old,viaAttr){var c=viaAttr?element.getAttribute(styleTransformer.SCOPE_NAME):element.className;var v=old?c.replace(old,selector):(c?c+" ":"")+this.XSCOPE_NAME+" "+selector;if(c!==v){if(viaAttr){element.setAttribute(styleTransformer.SCOPE_NAME,v)}else{element.className=v}}},applyElementStyle:function(element,properties,selector,style){var cssText=style?style.textContent||"":this.transformStyles(element,properties,selector);var s=element._customStyle;if(s&&!nativeShadow&&s!==style){s._useCount--;if(s._useCount<=0&&s.parentNode){s.parentNode.removeChild(s)}}if(nativeShadow||(!style||!style.parentNode)){if(nativeShadow&&element._customStyle){element._customStyle.textContent=cssText;style=element._customStyle}else if(cssText){style=styleUtil.applyCss(cssText,selector,nativeShadow?element.root:null,element._scopeStyle)}}if(style){style._useCount=style._useCount||0;if(element._customStyle!=style){style._useCount++}element._customStyle=style}return style},mixinCustomStyle:function(props,customStyle){var v;for(var i in customStyle){v=customStyle[i];if(v||v===0){props[i]=v}}},rx:{VAR_ASSIGN:/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:([^;{]*)|{([^}]*)})(?:(?=[;\s}])|$)/gi,MIXIN_MATCH:/(?:^|\W+)@apply[\s]*\(([^)]*)\)/i,VAR_MATCH:/(^|\W+)var\([\s]*([^,)]*)[\s]*,?[\s]*((?:[^,)]*)|(?:[^;]*\([^;)]*\)))[\s]*?\)/gi,VAR_CAPTURE:/\([\s]*(--[^,\s)]*)(?:,[\s]*(--[^,\s)]*))?(?:\)|,)/gi,IS_VAR:/^--/,BRACKETED:/\{[^}]*\}/g,HOST_PREFIX:"(?:^|[^.#[:])",HOST_SUFFIX:"($|[.:[\\s>+~])"},HOST_SELECTORS:[":host"],SCOPE_SELECTORS:[":root"],XSCOPE_NAME:"x-scope"};function addToBitMask(n,bits){var o=parseInt(n/32);var v=1<<n%32;bits[o]=(bits[o]||0)|v}}();(function(){Polymer.StyleCache=function(){this.cache={}};Polymer.StyleCache.prototype={MAX:100,store:function(is,data,keyValues,keyStyles){data.keyValues=keyValues;data.styles=keyStyles;var s$=this.cache[is]=this.cache[is]||[];s$.push(data);if(s$.length>this.MAX){s$.shift()}},retrieve:function(is,keyValues,keyStyles){var cache=this.cache[is];if(cache){for(var i=cache.length-1,data;i>=0;i--){data=cache[i];if(keyStyles===data.styles&&this._objectsEqual(keyValues,data.keyValues)){return data}}}},clear:function(){this.cache={}},_objectsEqual:function(target,source){var t,s;for(var i in target){t=target[i],s=source[i];if(!(typeof t==="object"&&t?this._objectsStrictlyEqual(t,s):t===s)){return false}}if(Array.isArray(target)){return target.length===source.length}return true},_objectsStrictlyEqual:function(target,source){return this._objectsEqual(target,source)&&this._objectsEqual(source,target)}}})();Polymer.StyleDefaults=function(){var styleProperties=Polymer.StyleProperties;var styleUtil=Polymer.StyleUtil;var StyleCache=Polymer.StyleCache;var api={_styles:[],_properties:null,customStyle:{},_styleCache:new StyleCache,addStyle:function(style){this._styles.push(style);this._properties=null},get _styleProperties(){if(!this._properties){styleProperties.decorateStyles(this._styles);this._styles._scopeStyleProperties=null;this._properties=styleProperties.scopePropertiesFromStyles(this._styles);styleProperties.mixinCustomStyle(this._properties,this.customStyle);styleProperties.reify(this._properties)}return this._properties},_needsStyleProperties:function(){},_computeStyleProperties:function(){return this._styleProperties},updateStyles:function(properties){this._properties=null;if(properties){Polymer.Base.mixin(this.customStyle,properties)}this._styleCache.clear();for(var i=0,s;i<this._styles.length;i++){s=this._styles[i];s=s.__importElement||s;s._apply()}}};return api}();(function(){"use strict";var serializeValueToAttribute=Polymer.Base.serializeValueToAttribute;var propertyUtils=Polymer.StyleProperties;var styleTransformer=Polymer.StyleTransformer;var styleUtil=Polymer.StyleUtil;var styleDefaults=Polymer.StyleDefaults;var nativeShadow=Polymer.Settings.useNativeShadow;Polymer.Base._addFeature({_prepStyleProperties:function(){this._ownStylePropertyNames=this._styles?propertyUtils.decorateStyles(this._styles):null},customStyle:null,getComputedStyleValue:function(property){return this._styleProperties&&this._styleProperties[property]||getComputedStyle(this).getPropertyValue(property)},_setupStyleProperties:function(){this.customStyle={}},_needsStyleProperties:function(){return Boolean(this._ownStylePropertyNames&&this._ownStylePropertyNames.length)},_beforeAttached:function(){if(!this._scopeSelector&&this._needsStyleProperties()){this._updateStyleProperties()}},_findStyleHost:function(){var e=this,root;while(root=Polymer.dom(e).getOwnerRoot()){if(Polymer.isInstance(root.host)){return root.host}e=root.host}return styleDefaults},_updateStyleProperties:function(){var info,scope=this._findStyleHost();if(!scope._styleCache){scope._styleCache=new Polymer.StyleCache}var scopeData=propertyUtils.propertyDataFromStyles(scope._styles,this);scopeData.key.customStyle=this.customStyle;info=scope._styleCache.retrieve(this.is,scopeData.key,this._styles);var scopeCached=Boolean(info);if(scopeCached){this._styleProperties=info._styleProperties}else{this._computeStyleProperties(scopeData.properties)}this._computeOwnStyleProperties();if(!scopeCached){info=styleCache.retrieve(this.is,this._ownStyleProperties,this._styles)}var globalCached=Boolean(info)&&!scopeCached;var style=this._applyStyleProperties(info);if(!scopeCached){style=style&&nativeShadow?style.cloneNode(true):style;info={style:style,_scopeSelector:this._scopeSelector,_styleProperties:this._styleProperties};scopeData.key.customStyle={};this.mixin(scopeData.key.customStyle,this.customStyle);scope._styleCache.store(this.is,info,scopeData.key,this._styles);if(!globalCached){styleCache.store(this.is,Object.create(info),this._ownStyleProperties,this._styles)}}},_computeStyleProperties:function(scopeProps){var scope=this._findStyleHost();if(!scope._styleProperties){scope._computeStyleProperties()}var props=Object.create(scope._styleProperties);this.mixin(props,propertyUtils.hostPropertiesFromStyles(this._styles));scopeProps=scopeProps||propertyUtils.propertyDataFromStyles(scope._styles,this).properties;this.mixin(props,scopeProps);this.mixin(props,propertyUtils.scopePropertiesFromStyles(this._styles));propertyUtils.mixinCustomStyle(props,this.customStyle);propertyUtils.reify(props);this._styleProperties=props},_computeOwnStyleProperties:function(){var props={};for(var i=0,n;i<this._ownStylePropertyNames.length;i++){n=this._ownStylePropertyNames[i];props[n]=this._styleProperties[n]}this._ownStyleProperties=props},_scopeCount:0,_applyStyleProperties:function(info){var oldScopeSelector=this._scopeSelector;this._scopeSelector=info?info._scopeSelector:this.is+"-"+this.__proto__._scopeCount++;var style=propertyUtils.applyElementStyle(this,this._styleProperties,this._scopeSelector,info&&info.style);if(!nativeShadow){propertyUtils.applyElementScopeSelector(this,this._scopeSelector,oldScopeSelector,this._scopeCssViaAttr)}return style},serializeValueToAttribute:function(value,attribute,node){node=node||this;if(attribute==="class"&&!nativeShadow){var host=node===this?this.domHost||this.dataHost:this;if(host){value=host._scopeElementClass(node,value)}}node=this.shadyRoot&&this.shadyRoot._hasDistributed?Polymer.dom(node):node;serializeValueToAttribute.call(this,value,attribute,node)},_scopeElementClass:function(element,selector){if(!nativeShadow&&!this._scopeCssViaAttr){selector+=(selector?" ":"")+SCOPE_NAME+" "+this.is+(element._scopeSelector?" "+XSCOPE_NAME+" "+element._scopeSelector:"")}return selector},updateStyles:function(properties){if(this.isAttached){if(properties){this.mixin(this.customStyle,properties)}if(this._needsStyleProperties()){this._updateStyleProperties()}else{this._styleProperties=null}if(this._styleCache){this._styleCache.clear()}this._updateRootStyles()}},_updateRootStyles:function(root){root=root||this.root;var c$=Polymer.dom(root)._query(function(e){return e.shadyRoot||e.shadowRoot});for(var i=0,l=c$.length,c;i<l&&(c=c$[i]);i++){if(c.updateStyles){c.updateStyles()}}}});Polymer.updateStyles=function(properties){styleDefaults.updateStyles(properties);Polymer.Base._updateRootStyles(document)};var styleCache=new Polymer.StyleCache;Polymer.customStyleCache=styleCache;var SCOPE_NAME=styleTransformer.SCOPE_NAME;var XSCOPE_NAME=propertyUtils.XSCOPE_NAME})();Polymer.Base._addFeature({_registerFeatures:function(){this._prepIs();this._prepConstructor();this._prepTemplate();this._prepStyles();this._prepStyleProperties();this._prepAnnotations();this._prepEffects();this._prepBehaviors();this._prepPropertyInfo();this._prepBindings();this._prepShady()},_prepBehavior:function(b){this._addPropertyEffects(b.properties);this._addComplexObserverEffects(b.observers);this._addHostAttributes(b.hostAttributes)},_initFeatures:function(){this._setupConfigure();this._setupStyleProperties();this._setupDebouncers();this._registerHost();if(this._template){this._poolContent();this._beginHosting();this._stampTemplate();this._endHosting();this._marshalAnnotationReferences()}this._marshalInstanceEffects();this._marshalBehaviors();this._marshalHostAttributes();this._marshalAttributes();this._tryReady()},_marshalBehavior:function(b){if(b.listeners){this._listenListeners(b.listeners)}}});(function(){var nativeShadow=Polymer.Settings.useNativeShadow;var propertyUtils=Polymer.StyleProperties;var styleUtil=Polymer.StyleUtil;var cssParse=Polymer.CssParse;var styleDefaults=Polymer.StyleDefaults;var styleTransformer=Polymer.StyleTransformer;Polymer({is:"custom-style",extends:"style",_template:null,properties:{include:String},ready:function(){this._tryApply()},attached:function(){this._tryApply()},_tryApply:function(){if(!this._appliesToDocument){if(this.parentNode&&this.parentNode.localName!=="dom-module"){this._appliesToDocument=true;var e=this.__appliedElement||this;styleDefaults.addStyle(e);if(e.textContent||this.include){this._apply()}else{var self=this;var observer=new MutationObserver(function(){observer.disconnect();self._apply()});observer.observe(e,{childList:true})}}}},_apply:function(){var e=this.__appliedElement||this;if(this.include){e.textContent=styleUtil.cssFromModules(this.include,true)+e.textContent}if(e.textContent){styleUtil.forEachStyleRule(styleUtil.rulesForStyle(e),function(rule){styleTransformer.documentRule(rule)});this._applyCustomProperties(e)}},_applyCustomProperties:function(element){this._computeStyleProperties();var props=this._styleProperties;var rules=styleUtil.rulesForStyle(element);element.textContent=styleUtil.toCssText(rules,function(rule){var css=rule.cssText=rule.parsedCssText;if(rule.propertyInfo&&rule.propertyInfo.cssText){css=cssParse.removeCustomPropAssignment(css);rule.cssText=propertyUtils.valueForProperties(css,props)}})}})})();Polymer.Templatizer={properties:{__hideTemplateChildren__:{observer:"_showHideChildren"}},_instanceProps:Polymer.nob,_parentPropPrefix:"_parent_",templatize:function(template){this._templatized=template;if(!template._content){template._content=template.content}if(template._content._ctor){this.ctor=template._content._ctor;this._prepParentProperties(this.ctor.prototype,template);return}var archetype=Object.create(Polymer.Base);this._customPrepAnnotations(archetype,template);this._prepParentProperties(archetype,template);archetype._prepEffects();this._customPrepEffects(archetype);archetype._prepBehaviors();archetype._prepPropertyInfo();archetype._prepBindings();archetype._notifyPathUp=this._notifyPathUpImpl;archetype._scopeElementClass=this._scopeElementClassImpl;archetype.listen=this._listenImpl;archetype._showHideChildren=this._showHideChildrenImpl;var _constructor=this._constructorImpl;var ctor=function TemplateInstance(model,host){_constructor.call(this,model,host)};ctor.prototype=archetype;archetype.constructor=ctor;template._content._ctor=ctor;this.ctor=ctor},_getRootDataHost:function(){return this.dataHost&&this.dataHost._rootDataHost||this.dataHost},_showHideChildrenImpl:function(hide){var c=this._children;for(var i=0;i<c.length;i++){var n=c[i];if(Boolean(hide)!=Boolean(n.__hideTemplateChildren__)){if(n.nodeType===Node.TEXT_NODE){if(hide){n.__polymerTextContent__=n.textContent;n.textContent=""}else{n.textContent=n.__polymerTextContent__}}else if(n.style){if(hide){n.__polymerDisplay__=n.style.display;n.style.display="none"}else{n.style.display=n.__polymerDisplay__}}}n.__hideTemplateChildren__=hide}},_debounceTemplate:function(fn){Polymer.dom.addDebouncer(this.debounce("_debounceTemplate",fn))},_flushTemplates:function(debouncerExpired){Polymer.dom.flush()},_customPrepEffects:function(archetype){var parentProps=archetype._parentProps;for(var prop in parentProps){archetype._addPropertyEffect(prop,"function",this._createHostPropEffector(prop))}for(var prop in this._instanceProps){archetype._addPropertyEffect(prop,"function",this._createInstancePropEffector(prop))}},_customPrepAnnotations:function(archetype,template){archetype._template=template;var c=template._content;if(!c._notes){var rootDataHost=archetype._rootDataHost;if(rootDataHost){Polymer.Annotations.prepElement=function(){rootDataHost._prepElement()}}c._notes=Polymer.Annotations.parseAnnotations(template);Polymer.Annotations.prepElement=null;this._processAnnotations(c._notes)}archetype._notes=c._notes;archetype._parentProps=c._parentProps},_prepParentProperties:function(archetype,template){var parentProps=this._parentProps=archetype._parentProps;if(this._forwardParentProp&&parentProps){var proto=archetype._parentPropProto;var prop;if(!proto){for(prop in this._instanceProps){delete parentProps[prop]}proto=archetype._parentPropProto=Object.create(null);if(template!=this){Polymer.Bind.prepareModel(proto);Polymer.Base.prepareModelNotifyPath(proto)}for(prop in parentProps){var parentProp=this._parentPropPrefix+prop;var effects=[{kind:"function",effect:this._createForwardPropEffector(prop),fn:Polymer.Bind._functionEffect},{kind:"notify",fn:Polymer.Bind._notifyEffect,effect:{event:Polymer.CaseMap.camelToDashCase(parentProp)+"-changed"}}];Polymer.Bind._createAccessors(proto,parentProp,effects)}}var self=this;if(template!=this){Polymer.Bind.prepareInstance(template);template._forwardParentProp=function(source,value){self._forwardParentProp(source,value)}}this._extendTemplate(template,proto);template._pathEffector=function(path,value,fromAbove){return self._pathEffectorImpl(path,value,fromAbove)}}},_createForwardPropEffector:function(prop){return function(source,value){this._forwardParentProp(prop,value)}},_createHostPropEffector:function(prop){var prefix=this._parentPropPrefix;return function(source,value){this.dataHost._templatized[prefix+prop]=value}},_createInstancePropEffector:function(prop){return function(source,value,old,fromAbove){if(!fromAbove){this.dataHost._forwardInstanceProp(this,prop,value)}}},_extendTemplate:function(template,proto){var n$=Object.getOwnPropertyNames(proto);for(var i=0,n;i<n$.length&&(n=n$[i]);i++){var val=template[n];var pd=Object.getOwnPropertyDescriptor(proto,n);Object.defineProperty(template,n,pd);if(val!==undefined){template._propertySetter(n,val)}}},_showHideChildren:function(hidden){},_forwardInstancePath:function(inst,path,value){},_forwardInstanceProp:function(inst,prop,value){},_notifyPathUpImpl:function(path,value){var dataHost=this.dataHost;var dot=path.indexOf(".");var root=dot<0?path:path.slice(0,dot);dataHost._forwardInstancePath.call(dataHost,this,path,value);if(root in dataHost._parentProps){dataHost._templatized.notifyPath(dataHost._parentPropPrefix+path,value)}},_pathEffectorImpl:function(path,value,fromAbove){if(this._forwardParentPath){if(path.indexOf(this._parentPropPrefix)===0){var subPath=path.substring(this._parentPropPrefix.length);var model=this._modelForPath(subPath);if(model in this._parentProps){this._forwardParentPath(subPath,value)}}}Polymer.Base._pathEffector.call(this._templatized,path,value,fromAbove)},_constructorImpl:function(model,host){this._rootDataHost=host._getRootDataHost();this._setupConfigure(model);this._registerHost(host);this._beginHosting();this.root=this.instanceTemplate(this._template);this.root.__noContent=!this._notes._hasContent;this.root.__styleScoped=true;this._endHosting();this._marshalAnnotatedNodes();this._marshalInstanceEffects();this._marshalAnnotatedListeners();var children=[];for(var n=this.root.firstChild;n;n=n.nextSibling){children.push(n);n._templateInstance=this}this._children=children;if(host.__hideTemplateChildren__){this._showHideChildren(true)}this._tryReady()},_listenImpl:function(node,eventName,methodName){var model=this;var host=this._rootDataHost;var handler=host._createEventHandler(node,eventName,methodName);var decorated=function(e){e.model=model;handler(e)};host._listen(node,eventName,decorated)},_scopeElementClassImpl:function(node,value){var host=this._rootDataHost;if(host){return host._scopeElementClass(node,value)}},stamp:function(model){model=model||{};if(this._parentProps){var templatized=this._templatized;for(var prop in this._parentProps){model[prop]=templatized[this._parentPropPrefix+prop]}}return new this.ctor(model,this)},modelForElement:function(el){var model;while(el){if(model=el._templateInstance){if(model.dataHost!=this){el=model.dataHost}else{return model}}else{el=el.parentNode}}}};Polymer({is:"dom-template",extends:"template",_template:null,behaviors:[Polymer.Templatizer],ready:function(){this.templatize(this)}});Polymer._collections=new WeakMap;Polymer.Collection=function(userArray){Polymer._collections.set(userArray,this);this.userArray=userArray;this.store=userArray.slice();this.initMap()};Polymer.Collection.prototype={constructor:Polymer.Collection,initMap:function(){var omap=this.omap=new WeakMap;var pmap=this.pmap={};var s=this.store;for(var i=0;i<s.length;i++){var item=s[i];if(item&&typeof item=="object"){omap.set(item,i)}else{pmap[item]=i}}},add:function(item){var key=this.store.push(item)-1;if(item&&typeof item=="object"){this.omap.set(item,key)}else{this.pmap[item]=key}return"#"+key},removeKey:function(key){key=this._parseKey(key);this._removeFromMap(this.store[key]);delete this.store[key]},_removeFromMap:function(item){if(item&&typeof item=="object"){this.omap.delete(item)}else{delete this.pmap[item]}},remove:function(item){var key=this.getKey(item);this.removeKey(key);return key},getKey:function(item){var key;if(item&&typeof item=="object"){key=this.omap.get(item)}else{key=this.pmap[item]}if(key!=undefined){return"#"+key}},getKeys:function(){return Object.keys(this.store).map(function(key){return"#"+key})},_parseKey:function(key){if(key[0]=="#"){return key.slice(1)}throw new Error("unexpected key "+key)},setItem:function(key,item){key=this._parseKey(key);var old=this.store[key];if(old){this._removeFromMap(old)}if(item&&typeof item=="object"){this.omap.set(item,key)}else{this.pmap[item]=key}this.store[key]=item},getItem:function(key){key=this._parseKey(key);return this.store[key]},getItems:function(){var items=[],store=this.store;for(var key in store){items.push(store[key])}return items},_applySplices:function(splices){var keyMap={},key;for(var i=0,s;i<splices.length&&(s=splices[i]);i++){s.addedKeys=[];for(var j=0;j<s.removed.length;j++){key=this.getKey(s.removed[j]);keyMap[key]=keyMap[key]?null:-1}for(var j=0;j<s.addedCount;j++){var item=this.userArray[s.index+j];key=this.getKey(item);key=key===undefined?this.add(item):key;keyMap[key]=keyMap[key]?null:1;s.addedKeys.push(key)}}var removed=[];var added=[];for(var key in keyMap){if(keyMap[key]<0){this.removeKey(key);removed.push(key)}if(keyMap[key]>0){added.push(key)}}return[{removed:removed,added:added}]}};Polymer.Collection.get=function(userArray){return Polymer._collections.get(userArray)||new Polymer.Collection(userArray)};Polymer.Collection.applySplices=function(userArray,splices){var coll=Polymer._collections.get(userArray);return coll?coll._applySplices(splices):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,initialCount:{type:Number,observer:"_initializeChunking"},targetFramerate:{type:Number,value:20},_targetFrameTime:{computed:"_computeFrameTime(targetFramerate)"}},behaviors:[Polymer.Templatizer],observers:["_itemsChanged(items.*)"],created:function(){this._instances=[];this._pool=[];this._limit=Infinity;var self=this;this._boundRenderChunk=function(){self._renderChunk()}},detached:function(){for(var i=0;i<this._instances.length;i++){this._detachInstance(i)}},attached:function(){var parent=Polymer.dom(Polymer.dom(this).parentNode);for(var i=0;i<this._instances.length;i++){this._attachInstance(i,parent)}},ready:function(){this._instanceProps={__key__:true};this._instanceProps[this.as]=true;this._instanceProps[this.indexAs]=true;if(!this.ctor){this.templatize(this)}},_sortChanged:function(sort){var dataHost=this._getRootDataHost();this._sortFn=sort&&(typeof sort=="function"?sort:function(){return dataHost[sort].apply(dataHost,arguments)});this._needFullRefresh=true;if(this.items){this._debounceTemplate(this._render)}},_filterChanged:function(filter){var dataHost=this._getRootDataHost();this._filterFn=filter&&(typeof filter=="function"?filter:function(){return dataHost[filter].apply(dataHost,arguments)});this._needFullRefresh=true;if(this.items){this._debounceTemplate(this._render)}},_computeFrameTime:function(rate){return Math.ceil(1e3/rate)},_initializeChunking:function(){if(this.initialCount){this._limit=this.initialCount;this._chunkCount=this.initialCount;this._lastChunkTime=performance.now()}},_tryRenderChunk:function(){if(this.items&&this._limit<this.items.length){this.debounce("renderChunk",this._requestRenderChunk)}},_requestRenderChunk:function(){requestAnimationFrame(this._boundRenderChunk)},_renderChunk:function(){var currChunkTime=performance.now();var ratio=this._targetFrameTime/(currChunkTime-this._lastChunkTime);this._chunkCount=Math.round(this._chunkCount*ratio)||1;this._limit+=this._chunkCount;this._lastChunkTime=currChunkTime;this._debounceTemplate(this._render)},_observeChanged:function(){this._observePaths=this.observe&&this.observe.replace(".*",".").split(" ")},_itemsChanged:function(change){if(change.path=="items"){if(Array.isArray(this.items)){this.collection=Polymer.Collection.get(this.items)}else if(!this.items){this.collection=null}else{this._error(this._logf("dom-repeat","expected array for `items`,"+" found",this.items))}this._keySplices=[];this._indexSplices=[];this._needFullRefresh=true;this._initializeChunking();this._debounceTemplate(this._render)}else if(change.path=="items.splices"){this._keySplices=this._keySplices.concat(change.value.keySplices);this._indexSplices=this._indexSplices.concat(change.value.indexSplices);this._debounceTemplate(this._render)}else{var subpath=change.path.slice(6);this._forwardItemPath(subpath,change.value);this._checkObservedPaths(subpath)}},_checkObservedPaths:function(path){if(this._observePaths){path=path.substring(path.indexOf(".")+1);var paths=this._observePaths;for(var i=0;i<paths.length;i++){if(path.indexOf(paths[i])===0){this._needFullRefresh=true;if(this.delay){this.debounce("render",this._render,this.delay)}else{this._debounceTemplate(this._render)}return}}}},render:function(){this._needFullRefresh=true;this._debounceTemplate(this._render);this._flushTemplates()},_render:function(){var c=this.collection;if(this._needFullRefresh){this._applyFullRefresh();this._needFullRefresh=false}else if(this._keySplices.length){if(this._sortFn){this._applySplicesUserSort(this._keySplices)}else{if(this._filterFn){this._applyFullRefresh()}else{this._applySplicesArrayOrder(this._indexSplices)}}}else{}this._keySplices=[];this._indexSplices=[];var keyToIdx=this._keyToInstIdx={};for(var i=this._instances.length-1;i>=0;i--){var inst=this._instances[i];if(inst.isPlaceholder&&i<this._limit){inst=this._insertInstance(i,inst.__key__)}else if(!inst.isPlaceholder&&i>=this._limit){inst=this._downgradeInstance(i,inst.__key__)}keyToIdx[inst.__key__]=i;if(!inst.isPlaceholder){inst.__setProperty(this.indexAs,i,true)}}this._pool.length=0;this.fire("dom-change");this._tryRenderChunk()},_applyFullRefresh:function(){var c=this.collection;var keys;if(this._sortFn){keys=c?c.getKeys():[]}else{keys=[];var items=this.items;if(items){for(var i=0;i<items.length;i++){keys.push(c.getKey(items[i]))}}}var self=this;if(this._filterFn){keys=keys.filter(function(a){return self._filterFn(c.getItem(a))})}if(this._sortFn){keys.sort(function(a,b){return self._sortFn(c.getItem(a),c.getItem(b))})}for(var i=0;i<keys.length;i++){var key=keys[i];var inst=this._instances[i];if(inst){inst.__key__=key;if(!inst.isPlaceholder&&i<this._limit){inst.__setProperty(this.as,c.getItem(key),true)}}else if(i<this._limit){this._insertInstance(i,key)}else{this._insertPlaceholder(i,key)}}for(var j=this._instances.length-1;j>=i;j--){this._detachAndRemoveInstance(j)}},_numericSort:function(a,b){return a-b},_applySplicesUserSort:function(splices){var c=this.collection;var instances=this._instances;var keyMap={};for(var i=0,s;i<splices.length&&(s=splices[i]);i++){for(var j=0;j<s.removed.length;j++){var key=s.removed[j];keyMap[key]=keyMap[key]?null:-1}for(var j=0;j<s.added.length;j++){var key=s.added[j];keyMap[key]=keyMap[key]?null:1}}var removedIdxs=[];var addedKeys=[];for(var key in keyMap){if(keyMap[key]===-1){removedIdxs.push(this._keyToInstIdx[key])}if(keyMap[key]===1){addedKeys.push(key)}}if(removedIdxs.length){removedIdxs.sort(this._numericSort);for(var i=removedIdxs.length-1;i>=0;i--){var idx=removedIdxs[i];if(idx!==undefined){this._detachAndRemoveInstance(idx)}}}var self=this;if(addedKeys.length){if(this._filterFn){addedKeys=addedKeys.filter(function(a){return self._filterFn(c.getItem(a))})}addedKeys.sort(function(a,b){return self._sortFn(c.getItem(a),c.getItem(b))});var start=0;for(var i=0;i<addedKeys.length;i++){start=this._insertRowUserSort(start,addedKeys[i])}}},_insertRowUserSort:function(start,key){var c=this.collection;var item=c.getItem(key);var end=this._instances.length-1;var idx=-1;while(start<=end){var mid=start+end>>1;var midKey=this._instances[mid].__key__;var cmp=this._sortFn(c.getItem(midKey),item);if(cmp<0){start=mid+1}else if(cmp>0){end=mid-1}else{idx=mid;break}}if(idx<0){idx=end+1}this._insertPlaceholder(idx,key);return idx},_applySplicesArrayOrder:function(splices){var c=this.collection;for(var i=0,s;i<splices.length&&(s=splices[i]);i++){for(var j=0;j<s.removed.length;j++){this._detachAndRemoveInstance(s.index)}for(var j=0;j<s.addedKeys.length;j++){this._insertPlaceholder(s.index+j,s.addedKeys[j])}}},_detachInstance:function(idx){var inst=this._instances[idx];if(!inst.isPlaceholder){for(var i=0;i<inst._children.length;i++){var el=inst._children[i];Polymer.dom(inst.root).appendChild(el)}return inst}},_attachInstance:function(idx,parent){var inst=this._instances[idx];if(!inst.isPlaceholder){parent.insertBefore(inst.root,this)}},_detachAndRemoveInstance:function(idx){var inst=this._detachInstance(idx);if(inst){this._pool.push(inst)}this._instances.splice(idx,1)},_insertPlaceholder:function(idx,key){this._instances.splice(idx,0,{isPlaceholder:true,__key__:key})},_stampInstance:function(idx,key){var model={__key__:key};model[this.as]=this.collection.getItem(key);model[this.indexAs]=idx;return this.stamp(model)},_insertInstance:function(idx,key){var inst=this._pool.pop();if(inst){inst.__setProperty(this.as,this.collection.getItem(key),true);inst.__setProperty("__key__",key,true)}else{inst=this._stampInstance(idx,key)}var beforeRow=this._instances[idx+1];var beforeNode=beforeRow&&!beforeRow.isPlaceholder?beforeRow._children[0]:this;var parentNode=Polymer.dom(this).parentNode;Polymer.dom(parentNode).insertBefore(inst.root,beforeNode);this._instances[idx]=inst;return inst},_downgradeInstance:function(idx,key){var inst=this._detachInstance(idx);if(inst){this._pool.push(inst)}inst={isPlaceholder:true,__key__:key};this._instances[idx]=inst;return inst},_showHideChildren:function(hidden){for(var i=0;i<this._instances.length;i++){this._instances[i]._showHideChildren(hidden)}},_forwardInstanceProp:function(inst,prop,value){if(prop==this.as){var idx;if(this._sortFn||this._filterFn){idx=this.items.indexOf(this.collection.getItem(inst.__key__))}else{idx=inst[this.indexAs]}this.set("items."+idx,value)}},_forwardInstancePath:function(inst,path,value){if(path.indexOf(this.as+".")===0){this._notifyPath("items."+inst.__key__+"."+path.slice(this.as.length+1),value)}},_forwardParentProp:function(prop,value){var i$=this._instances;for(var i=0,inst;i<i$.length&&(inst=i$[i]);i++){if(!inst.isPlaceholder){inst.__setProperty(prop,value,true)}}},_forwardParentPath:function(path,value){var i$=this._instances;for(var i=0,inst;i<i$.length&&(inst=i$[i]);i++){if(!inst.isPlaceholder){inst._notifyPath(path,value,true)}}},_forwardItemPath:function(path,value){if(this._keyToInstIdx){var dot=path.indexOf(".");var key=path.substring(0,dot<0?path.length:dot);var idx=this._keyToInstIdx[key];var inst=this._instances[idx];if(inst&&!inst.isPlaceholder){if(dot>=0){path=this.as+"."+path.substring(dot+1);inst._notifyPath(path,value,true)}else{inst.__setProperty(this.as,value,true)}}}},itemForElement:function(el){var instance=this.modelForElement(el);return instance&&instance[this.as]},keyForElement:function(el){var instance=this.modelForElement(el);return instance&&instance.__key__},indexForElement:function(el){var instance=this.modelForElement(el);return instance&&instance[this.indexAs]}});Polymer({is:"array-selector",_template:null,properties:{items:{type:Array,observer:"clearSelection"},multi:{type:Boolean,value:false,observer:"clearSelection"},selected:{type:Object,notify:true},selectedItem:{type:Object,notify:true},toggle:{type:Boolean,value:false}},clearSelection:function(){if(Array.isArray(this.selected)){for(var i=0;i<this.selected.length;i++){this.unlinkPaths("selected."+i)}}else{this.unlinkPaths("selected");this.unlinkPaths("selectedItem")}if(this.multi){if(!this.selected||this.selected.length){this.selected=[];this._selectedColl=Polymer.Collection.get(this.selected)}}else{this.selected=null;this._selectedColl=null}this.selectedItem=null},isSelected:function(item){if(this.multi){return this._selectedColl.getKey(item)!==undefined}else{return this.selected==item}},deselect:function(item){if(this.multi){if(this.isSelected(item)){var skey=this._selectedColl.getKey(item);this.arrayDelete("selected",item);this.unlinkPaths("selected."+skey)}}else{this.selected=null;this.selectedItem=null;this.unlinkPaths("selected");this.unlinkPaths("selectedItem")}},select:function(item){var icol=Polymer.Collection.get(this.items);var key=icol.getKey(item);if(this.multi){if(this.isSelected(item)){if(this.toggle){this.deselect(item)}}else{this.push("selected",item);var skey=this._selectedColl.getKey(item);this.linkPaths("selected."+skey,"items."+key)}}else{if(this.toggle&&item==this.selected){this.deselect()}else{this.selected=item;this.selectedItem=item;this.linkPaths("selected","items."+key);this.linkPaths("selectedItem","items."+key)}}}});Polymer({is:"dom-if",extends:"template",_template:null,properties:{if:{type:Boolean,value:false,observer:"_queueRender"},restamp:{type:Boolean,value:false,observer:"_queueRender"}},behaviors:[Polymer.Templatizer],_queueRender:function(){this._debounceTemplate(this._render)},detached:function(){this._teardownInstance()},attached:function(){if(this.if&&this.ctor){this.async(this._ensureInstance)}},render:function(){this._flushTemplates()},_render:function(){if(this.if){if(!this.ctor){this.templatize(this)}this._ensureInstance();this._showHideChildren()}else if(this.restamp){this._teardownInstance()}if(!this.restamp&&this._instance){this._showHideChildren()}if(this.if!=this._lastIf){this.fire("dom-change");this._lastIf=this.if}},_ensureInstance:function(){if(!this._instance){var parentNode=Polymer.dom(this).parentNode;if(parentNode){var parent=Polymer.dom(parentNode);this._instance=this.stamp();var root=this._instance.root;parent.insertBefore(root,this)}}},_teardownInstance:function(){if(this._instance){var c$=this._instance._children;if(c$){var parent=Polymer.dom(Polymer.dom(c$[0]).parentNode);for(var i=0,n;i<c$.length&&(n=c$[i]);i++){parent.removeChild(n)}}this._instance=null}},_showHideChildren:function(){var hidden=this.__hideTemplateChildren__||!this.if;if(this._instance){this._instance._showHideChildren(hidden)}},_forwardParentProp:function(prop,value){if(this._instance){this._instance[prop]=value}},_forwardParentPath:function(path,value){if(this._instance){this._instance._notifyPath(path,value,true)}}});Polymer({is:"dom-bind",extends:"template",_template:null,created:function(){var self=this;Polymer.RenderStatus.whenReady(function(){self._markImportsReady()})},_ensureReady:function(){if(!this._readied){this._readySelf()}},_markImportsReady:function(){this._importsReady=true;this._ensureReady()},_registerFeatures:function(){this._prepConstructor()},_insertChildren:function(){var parentDom=Polymer.dom(Polymer.dom(this).parentNode);parentDom.insertBefore(this.root,this)},_removeChildren:function(){if(this._children){for(var i=0;i<this._children.length;i++){this.root.appendChild(this._children[i])}}},_initFeatures:function(){},_scopeElementClass:function(element,selector){if(this.dataHost){return this.dataHost._scopeElementClass(element,selector)}else{return selector}},_prepConfigure:function(){var config={};for(var prop in this._propertyEffects){config[prop]=this[prop]}var setupConfigure=this._setupConfigure;this._setupConfigure=function(){setupConfigure.call(this,config)}},attached:function(){if(this._importsReady){this.render()}},detached:function(){this._removeChildren()},render:function(){this._ensureReady();if(!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.DomApi.arrayCopyChildNodes(this.root)}this._insertChildren();this.fire("dom-change")}});</script><style>[hidden]{display:none!important}</style><style is="custom-style">:root{--layout:{display:-ms-flexbox;display:-webkit-flex;display:flex};--layout-inline:{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex};--layout-horizontal:{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row};--layout-horizontal-reverse:{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse};--layout-vertical:{display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column};--layout-vertical-reverse:{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse};--layout-wrap:{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap};--layout-wrap-reverse:{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse};--layout-flex-auto:{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto};--layout-flex-none:{-ms-flex:none;-webkit-flex:none;flex:none};--layout-flex:{-ms-flex:1 1 0;-webkit-flex:1;flex:1;-webkit-flex-basis:0;flex-basis:0};--layout-flex-2:{-ms-flex:2;-webkit-flex:2;flex:2};--layout-flex-3:{-ms-flex:3;-webkit-flex:3;flex:3};--layout-flex-4:{-ms-flex:4;-webkit-flex:4;flex:4};--layout-flex-5:{-ms-flex:5;-webkit-flex:5;flex:5};--layout-flex-6:{-ms-flex:6;-webkit-flex:6;flex:6};--layout-flex-7:{-ms-flex:7;-webkit-flex:7;flex:7};--layout-flex-8:{-ms-flex:8;-webkit-flex:8;flex:8};--layout-flex-9:{-ms-flex:9;-webkit-flex:9;flex:9};--layout-flex-10:{-ms-flex:10;-webkit-flex:10;flex:10};--layout-flex-11:{-ms-flex:11;-webkit-flex:11;flex:11};--layout-flex-12:{-ms-flex:12;-webkit-flex:12;flex:12};--layout-start:{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start};--layout-center:{-ms-flex-align:center;-webkit-align-items:center;align-items:center};--layout-end:{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end};--layout-start-justified:{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start};--layout-center-justified:{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center};--layout-end-justified:{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end};--layout-around-justified:{-ms-flex-pack:around;-webkit-justify-content:space-around;justify-content:space-around};--layout-justified:{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between};--layout-center-center:{-ms-flex-align:center;-webkit-align-items:center;align-items:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center};--layout-self-start:{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start};--layout-self-center:{-ms-align-self:center;-webkit-align-self:center;align-self:center};--layout-self-end:{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end};--layout-self-stretch:{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch};--layout-block:{display:block};--layout-invisible:{visibility:hidden!important};--layout-relative:{position:relative};--layout-fit:{position:absolute;top:0;right:0;bottom:0;left:0};--layout-scroll:{-webkit-overflow-scrolling:touch;overflow:auto};--layout-fullbleed:{margin:0;height:100vh}--layout-fixed-top:{position:fixed;top:0;left:0;right:0};--layout-fixed-right:{position:fixed;top:0;right:0;bottom:0};--layout-fixed-bottom:{position:fixed;right:0;bottom:0;left:0};--layout-fixed-left:{position:fixed;top:0;bottom:0;left:0}}</style><style>html /deep/ .layout.horizontal,html /deep/ .layout.horizontal-reverse,html /deep/ .layout.vertical,html /deep/ .layout.vertical-reverse{display:-ms-flexbox;display:-webkit-flex;display:flex}html /deep/ .layout.inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}html /deep/ .layout.horizontal{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}html /deep/ .layout.horizontal-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}html /deep/ .layout.vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}html /deep/ .layout.vertical-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}html /deep/ .layout.wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}html /deep/ .layout.wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}html /deep/ .flex-auto{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}html /deep/ .flex-none{-ms-flex:none;-webkit-flex:none;flex:none}html /deep/ .flex,html /deep/ .flex-1{-ms-flex:1;-webkit-flex:1;flex:1}html /deep/ .flex-2{-ms-flex:2;-webkit-flex:2;flex:2}html /deep/ .flex-3{-ms-flex:3;-webkit-flex:3;flex:3}html /deep/ .flex-4{-ms-flex:4;-webkit-flex:4;flex:4}html /deep/ .flex-5{-ms-flex:5;-webkit-flex:5;flex:5}html /deep/ .flex-6{-ms-flex:6;-webkit-flex:6;flex:6}html /deep/ .flex-7{-ms-flex:7;-webkit-flex:7;flex:7}html /deep/ .flex-8{-ms-flex:8;-webkit-flex:8;flex:8}html /deep/ .flex-9{-ms-flex:9;-webkit-flex:9;flex:9}html /deep/ .flex-10{-ms-flex:10;-webkit-flex:10;flex:10}html /deep/ .flex-11{-ms-flex:11;-webkit-flex:11;flex:11}html /deep/ .flex-12{-ms-flex:12;-webkit-flex:12;flex:12}html /deep/ .layout.start{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}html /deep/ .layout.center,html /deep/ .layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}html /deep/ .layout.end{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}html /deep/ .layout.start-justified{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}html /deep/ .layout.center-justified,html /deep/ .layout.center-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}html /deep/ .layout.end-justified{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}html /deep/ .layout.around-justified{-ms-flex-pack:around;-webkit-justify-content:space-around;justify-content:space-around}html /deep/ .layout.justified{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}html /deep/ .self-start{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start}html /deep/ .self-center{-ms-align-self:center;-webkit-align-self:center;align-self:center}html /deep/ .self-end{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end}html /deep/ .self-stretch{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch}html /deep/ .block{display:block}html /deep/ [hidden]{display:none!important}html /deep/ .invisible{visibility:hidden!important}html /deep/ .relative{position:relative}html /deep/ .fit{position:absolute;top:0;right:0;bottom:0;left:0}body.fullbleed{margin:0;height:100vh}html /deep/ .scroll{-webkit-overflow-scrolling:touch;overflow:auto}.fixed-bottom,.fixed-left,.fixed-right,.fixed-top{position:fixed}html /deep/ .fixed-top{top:0;left:0;right:0}html /deep/ .fixed-right{top:0;right:0;bottom:0}html /deep/ .fixed-bottom{right:0;bottom:0;left:0}html /deep/ .fixed-left{top:0;bottom:0;left:0}</style><style>.layout.horizontal,.layout.horizontal-reverse,.layout.vertical,.layout.vertical-reverse{display:-ms-flexbox;display:-webkit-flex;display:flex}.layout.inline{display:-ms-inline-flexbox;display:-webkit-inline-flex;display:inline-flex}.layout.horizontal{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}.layout.horizontal-reverse{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.layout.vertical{-ms-flex-direction:column;-webkit-flex-direction:column;flex-direction:column}.layout.vertical-reverse{-ms-flex-direction:column-reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse}.layout.wrap{-ms-flex-wrap:wrap;-webkit-flex-wrap:wrap;flex-wrap:wrap}.layout.wrap-reverse{-ms-flex-wrap:wrap-reverse;-webkit-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse}.flex-auto{-ms-flex:1 1 auto;-webkit-flex:1 1 auto;flex:1 1 auto}.flex-none{-ms-flex:none;-webkit-flex:none;flex:none}.flex,.flex-1{-ms-flex:1;-webkit-flex:1;flex:1}.flex-2{-ms-flex:2;-webkit-flex:2;flex:2}.flex-3{-ms-flex:3;-webkit-flex:3;flex:3}.flex-4{-ms-flex:4;-webkit-flex:4;flex:4}.flex-5{-ms-flex:5;-webkit-flex:5;flex:5}.flex-6{-ms-flex:6;-webkit-flex:6;flex:6}.flex-7{-ms-flex:7;-webkit-flex:7;flex:7}.flex-8{-ms-flex:8;-webkit-flex:8;flex:8}.flex-9{-ms-flex:9;-webkit-flex:9;flex:9}.flex-10{-ms-flex:10;-webkit-flex:10;flex:10}.flex-11{-ms-flex:11;-webkit-flex:11;flex:11}.flex-12{-ms-flex:12;-webkit-flex:12;flex:12}.layout.start{-ms-flex-align:start;-webkit-align-items:flex-start;align-items:flex-start}.layout.center,.layout.center-center{-ms-flex-align:center;-webkit-align-items:center;align-items:center}.layout.end{-ms-flex-align:end;-webkit-align-items:flex-end;align-items:flex-end}.layout.start-justified{-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start}.layout.center-justified,.layout.center-center{-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center}.layout.end-justified{-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.layout.around-justified{-ms-flex-pack:around;-webkit-justify-content:space-around;justify-content:space-around}.layout.justified{-ms-flex-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.self-start{-ms-align-self:flex-start;-webkit-align-self:flex-start;align-self:flex-start}.self-center{-ms-align-self:center;-webkit-align-self:center;align-self:center}.self-end{-ms-align-self:flex-end;-webkit-align-self:flex-end;align-self:flex-end}.self-stretch{-ms-align-self:stretch;-webkit-align-self:stretch;align-self:stretch}.block{display:block}[hidden]{display:none!important}.invisible{visibility:hidden!important}.relative{position:relative}.fit{position:absolute;top:0;right:0;bottom:0;left:0}body.fullbleed{margin:0;height:100vh}.scroll{-webkit-overflow-scrolling:touch;overflow:auto}.fixed-bottom,.fixed-left,.fixed-right,.fixed-top{position:fixed}.fixed-top{top:0;left:0;right:0}.fixed-right{top:0;right:0;bottom:0}.fixed-bottom{right:0;bottom:0;left:0}.fixed-left{top:0;bottom:0;left:0}</style><script>Polymer.IronResizableBehavior={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:false}},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:true,cancelable:true});if(!this._parentResizable){window.addEventListener("resize",this._boundNotifyResize);this.notifyResize()}},detached:function(){if(this._parentResizable){this._parentResizable.stopResizeNotificationsFor(this)}else{window.removeEventListener("resize",this._boundNotifyResize)}this._parentResizable=null},notifyResize:function(){if(!this.isAttached){return}this._interestedResizables.forEach(function(resizable){if(this.resizerShouldNotify(resizable)){this._notifyDescendant(resizable)}},this);this._fireResize()},assignParentResizable:function(parentResizable){this._parentResizable=parentResizable},stopResizeNotificationsFor:function(target){var index=this._interestedResizables.indexOf(target);if(index>-1){this._interestedResizables.splice(index,1);this.unlisten(target,"iron-resize","_onDescendantIronResize")}},resizerShouldNotify:function(element){return true},_onDescendantIronResize:function(event){if(this._notifyingDescendant){event.stopPropagation();return}if(!Polymer.Settings.useShadow){this._fireResize()}},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:false})},_onIronRequestResizeNotifications:function(event){var target=event.path?event.path[0]:event.target;if(target===this){return}if(this._interestedResizables.indexOf(target)===-1){this._interestedResizables.push(target);this.listen(target,"iron-resize","_onDescendantIronResize")}target.assignParentResizable(this);this._notifyDescendant(target);event.stopPropagation()},_parentResizableChanged:function(parentResizable){if(parentResizable){window.removeEventListener("resize",this._boundNotifyResize)}},_notifyDescendant:function(descendant){if(!this.isAttached){return}this._notifyingDescendant=true;descendant.notifyResize();this._notifyingDescendant=false}};</script><script>Polymer.IronSelection=function(selectCallback){this.selection=[];this.selectCallback=selectCallback};Polymer.IronSelection.prototype={get:function(){return this.multi?this.selection.slice():this.selection[0]},clear:function(excludes){this.selection.slice().forEach(function(item){if(!excludes||excludes.indexOf(item)<0){this.setItemSelected(item,false)}},this)},isSelected:function(item){return this.selection.indexOf(item)>=0},setItemSelected:function(item,isSelected){if(item!=null){if(isSelected){this.selection.push(item)}else{var i=this.selection.indexOf(item);if(i>=0){this.selection.splice(i,1)}}if(this.selectCallback){this.selectCallback(item,isSelected)}}},select:function(item){if(this.multi){this.toggle(item)}else if(this.get()!==item){this.setItemSelected(this.get(),false);this.setItemSelected(item,true)}},toggle:function(item){this.setItemSelected(item,!this.isSelected(item))}};</script><script>Polymer.IronSelectableBehavior={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:true},selectedItem:{type:Object,readOnly:true,notify:true},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},items:{type:Array,readOnly:true,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1}}}},observers:["_updateSelected(attrForSelected, selected)"],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();if(!this._shouldUpdateSelection){this._updateSelected(this.attrForSelected,this.selected)}this._addListener(this.activateEvent)},detached:function(){if(this._observer){Polymer.dom(this).unobserveNodes(this._observer)}this._removeListener(this.activateEvent)},indexOf:function(item){return this.items.indexOf(item)},select:function(value){this.selected=value},selectPrevious:function(){var length=this.items.length;var index=(Number(this._valueToIndex(this.selected))-1+length)%length;this.selected=this._indexToValue(index)},selectNext:function(){var index=(Number(this._valueToIndex(this.selected))+1)%this.items.length;this.selected=this._indexToValue(index)},get _shouldUpdateSelection(){return this.selected!=null},_addListener:function(eventName){this.listen(this,eventName,"_activateHandler")},_removeListener:function(eventName){this.unlisten(this,eventName,"_activateHandler")},_activateEventChanged:function(eventName,old){this._removeListener(old);this._addListener(eventName)},_updateItems:function(){var nodes=Polymer.dom(this).queryDistributedElements(this.selectable||"*");nodes=Array.prototype.filter.call(nodes,this._bindFilterItem);this._setItems(nodes)},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(selected){this._selection.select(this._valueToItem(this.selected))},_filterItem:function(node){return!this._excludedLocalNames[node.localName]},_valueToItem:function(value){return value==null?null:this.items[this._valueToIndex(value)]},_valueToIndex:function(value){if(this.attrForSelected){for(var i=0,item;item=this.items[i];i++){if(this._valueForItem(item)==value){return i}}}else{return Number(value)}},_indexToValue:function(index){if(this.attrForSelected){var item=this.items[index];if(item){return this._valueForItem(item)}}else{return index}},_valueForItem:function(item){return item[this.attrForSelected]||item.getAttribute(this.attrForSelected)},_applySelection:function(item,isSelected){if(this.selectedClass){this.toggleClass(this.selectedClass,isSelected,item)}if(this.selectedAttribute){this.toggleAttribute(this.selectedAttribute,isSelected,item)}this._selectionChange();this.fire("iron-"+(isSelected?"select":"deselect"),{item:item})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(node){return Polymer.dom(node).observeNodes(function(mutations){this.fire("iron-items-changed",mutations,{bubbles:false,cancelable:false});this._updateItems();if(this._shouldUpdateSelection){this._updateSelected()}})},_activateHandler:function(e){var t=e.target;var items=this.items;while(t&&t!=this){var i=items.indexOf(t);if(i>=0){var value=this._indexToValue(i);this._itemActivate(value,t);return}t=t.parentNode}},_itemActivate:function(value,item){if(!this.fire("iron-activate",{selected:value,item:item},{cancelable:true}).defaultPrevented){this.select(value)}}};</script><script>Polymer.IronMultiSelectableBehaviorImpl={properties:{multi:{type:Boolean,value:false,observer:"multiChanged"},selectedValues:{type:Array,notify:true},selectedItems:{type:Array,readOnly:true,notify:true}},observers:["_updateSelected(attrForSelected, selectedValues)"],select:function(value){if(this.multi){if(this.selectedValues){this._toggleSelected(value)}else{this.selectedValues=[value]}}else{this.selected=value}},multiChanged:function(multi){this._selection.multi=multi},get _shouldUpdateSelection(){return this.selected!=null||this.selectedValues!=null&&this.selectedValues.length},_updateSelected:function(){if(this.multi){this._selectMulti(this.selectedValues)}else{this._selectSelected(this.selected)}},_selectMulti:function(values){this._selection.clear();if(values){for(var i=0;i<values.length;i++){this._selection.setItemSelected(this._valueToItem(values[i]),true)}}},_selectionChange:function(){var s=this._selection.get();if(this.multi){this._setSelectedItems(s)}else{this._setSelectedItems([s]);this._setSelectedItem(s)}},_toggleSelected:function(value){var i=this.selectedValues.indexOf(value);var unselected=i<0;if(unselected){this.push("selectedValues",value)}else{this.splice("selectedValues",i,1)}this._selection.setItemSelected(this._valueToItem(value),unselected)}};Polymer.IronMultiSelectableBehavior=[Polymer.IronSelectableBehavior,Polymer.IronMultiSelectableBehaviorImpl];</script><script>(function(){"use strict";var KEY_IDENTIFIER={"U+0009":"tab","U+001B":"esc","U+0020":"space","U+002A":"*","U+0030":"0","U+0031":"1","U+0032":"2","U+0033":"3","U+0034":"4","U+0035":"5","U+0036":"6","U+0037":"7","U+0038":"8","U+0039":"9","U+0041":"a","U+0042":"b","U+0043":"c","U+0044":"d","U+0045":"e","U+0046":"f","U+0047":"g","U+0048":"h","U+0049":"i","U+004A":"j","U+004B":"k","U+004C":"l","U+004D":"m","U+004E":"n","U+004F":"o","U+0050":"p","U+0051":"q","U+0052":"r","U+0053":"s","U+0054":"t","U+0055":"u","U+0056":"v","U+0057":"w","U+0058":"x","U+0059":"y","U+005A":"z","U+007F":"del"};var KEY_CODE={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:"*"};var MODIFIER_KEYS={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"};var KEY_CHAR=/[a-z0-9*]/;var IDENT_CHAR=/U\+/;var ARROW_KEY=/^arrow/;var SPACE_KEY=/^space(bar)?/;function transformKey(key){var validKey="";if(key){var lKey=key.toLowerCase();if(lKey.length==1){if(KEY_CHAR.test(lKey)){validKey=lKey}}else if(ARROW_KEY.test(lKey)){validKey=lKey.replace("arrow","")}else if(SPACE_KEY.test(lKey)){validKey="space"}else if(lKey=="multiply"){validKey="*"}else{validKey=lKey}}return validKey}function transformKeyIdentifier(keyIdent){var validKey="";if(keyIdent){if(IDENT_CHAR.test(keyIdent)){validKey=KEY_IDENTIFIER[keyIdent]}else{validKey=keyIdent.toLowerCase()}}return validKey}function transformKeyCode(keyCode){var validKey="";if(Number(keyCode)){if(keyCode>=65&&keyCode<=90){validKey=String.fromCharCode(32+keyCode)}else if(keyCode>=112&&keyCode<=123){validKey="f"+(keyCode-112)}else if(keyCode>=48&&keyCode<=57){validKey=String(48-keyCode)}else if(keyCode>=96&&keyCode<=105){validKey=String(96-keyCode)}else{validKey=KEY_CODE[keyCode]}}return validKey}function normalizedKeyForEvent(keyEvent){return transformKey(keyEvent.key)||transformKeyIdentifier(keyEvent.keyIdentifier)||transformKeyCode(keyEvent.keyCode)||transformKey(keyEvent.detail.key)||""}function keyComboMatchesEvent(keyCombo,keyEvent){return normalizedKeyForEvent(keyEvent)===keyCombo.key&&!!keyEvent.shiftKey===!!keyCombo.shiftKey&&!!keyEvent.ctrlKey===!!keyCombo.ctrlKey&&!!keyEvent.altKey===!!keyCombo.altKey&&!!keyEvent.metaKey===!!keyCombo.metaKey}function parseKeyComboString(keyComboString){return keyComboString.split("+").reduce(function(parsedKeyCombo,keyComboPart){var eventParts=keyComboPart.split(":");var keyName=eventParts[0];var event=eventParts[1];if(keyName in MODIFIER_KEYS){parsedKeyCombo[MODIFIER_KEYS[keyName]]=true}else{parsedKeyCombo.key=keyName;parsedKeyCombo.event=event||"keydown"}return parsedKeyCombo},{combo:keyComboString.split(":").shift()})}function parseEventString(eventString){return eventString.split(" ").map(function(keyComboString){return parseKeyComboString(keyComboString)})}Polymer.IronA11yKeysBehavior={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:false},_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(eventString,handlerName){this._imperativeKeyBindings[eventString]=handlerName;this._prepKeyBindings();this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={};this._prepKeyBindings();this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(event,eventString){var keyCombos=parseEventString(eventString);var index;for(index=0;index<keyCombos.length;++index){if(keyComboMatchesEvent(keyCombos[index],event)){return true}}return false},_collectKeyBindings:function(){var keyBindings=this.behaviors.map(function(behavior){return behavior.keyBindings});if(keyBindings.indexOf(this.keyBindings)===-1){keyBindings.push(this.keyBindings)}return keyBindings},_prepKeyBindings:function(){this._keyBindings={};this._collectKeyBindings().forEach(function(keyBindings){for(var eventString in keyBindings){this._addKeyBinding(eventString,keyBindings[eventString])}},this);for(var eventString in this._imperativeKeyBindings){this._addKeyBinding(eventString,this._imperativeKeyBindings[eventString])}},_addKeyBinding:function(eventString,handlerName){parseEventString(eventString).forEach(function(keyCombo){this._keyBindings[keyCombo.event]=this._keyBindings[keyCombo.event]||[];this._keyBindings[keyCombo.event].push([keyCombo,handlerName])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners();if(this.isAttached){this._listenKeyEventListeners()}},_listenKeyEventListeners:function(){Object.keys(this._keyBindings).forEach(function(eventName){var keyBindings=this._keyBindings[eventName];var boundKeyHandler=this._onKeyBindingEvent.bind(this,keyBindings);this._boundKeyHandlers.push([this.keyEventTarget,eventName,boundKeyHandler]);this.keyEventTarget.addEventListener(eventName,boundKeyHandler)},this)},_unlistenKeyEventListeners:function(){var keyHandlerTuple;var keyEventTarget;var eventName;var boundKeyHandler;while(this._boundKeyHandlers.length){keyHandlerTuple=this._boundKeyHandlers.pop();keyEventTarget=keyHandlerTuple[0];eventName=keyHandlerTuple[1];boundKeyHandler=keyHandlerTuple[2];keyEventTarget.removeEventListener(eventName,boundKeyHandler)}},_onKeyBindingEvent:function(keyBindings,event){if(this.stopKeyboardEventPropagation){event.stopPropagation()}keyBindings.forEach(function(keyBinding){var keyCombo=keyBinding[0];var handlerName=keyBinding[1];if(!event.defaultPrevented&&keyComboMatchesEvent(keyCombo,event)){this._triggerKeyHandler(keyCombo,handlerName,event)}},this)},_triggerKeyHandler:function(keyCombo,handlerName,keyboardEvent){var detail=Object.create(keyCombo);detail.keyboardEvent=keyboardEvent;var event=new CustomEvent(keyCombo.event,{detail:detail,cancelable:true});this[handlerName].call(this,event);if(event.defaultPrevented){keyboardEvent.preventDefault()}}}})();</script><script>Polymer.IronMenuBehaviorImpl={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:true,type:Object},attrForItemTitle:{type:String}},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(value){if(this._defaultFocusAsync){this.cancelAsync(this._defaultFocusAsync);this._defaultFocusAsync=null}var item=this._valueToItem(value);if(item&&item.hasAttribute("disabled"))return;this._setFocusedItem(item);Polymer.IronMultiSelectableBehaviorImpl.select.apply(this,arguments)},_resetTabindices:function(){var selectedItem=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(item){item.setAttribute("tabindex",item===selectedItem?"0":"-1")},this)},_updateMultiselectable:function(multi){if(multi){this.setAttribute("aria-multiselectable","true")}else{this.removeAttribute("aria-multiselectable")}},_focusWithKeyboardEvent:function(event){for(var i=0,item;item=this.items[i];i++){var attr=this.attrForItemTitle||"textContent";var title=item[attr]||item.getAttribute(attr);if(title&&title.trim().charAt(0).toLowerCase()===String.fromCharCode(event.keyCode).toLowerCase()){this._setFocusedItem(item);break}}},_focusPrevious:function(){var length=this.items.length;var index=(Number(this.indexOf(this.focusedItem))-1+length)%length;this._setFocusedItem(this.items[index])},_focusNext:function(){var index=(Number(this.indexOf(this.focusedItem))+1)%this.items.length;this._setFocusedItem(this.items[index])},_applySelection:function(item,isSelected){if(isSelected){item.setAttribute("aria-selected","true")}else{item.removeAttribute("aria-selected")}Polymer.IronSelectableBehavior._applySelection.apply(this,arguments)},_focusedItemChanged:function(focusedItem,old){old&&old.setAttribute("tabindex","-1");if(focusedItem){focusedItem.setAttribute("tabindex","0");focusedItem.focus()}},_onIronItemsChanged:function(event){var mutations=event.detail;var mutation;var index;for(index=0;index<mutations.length;++index){mutation=mutations[index];if(mutation.addedNodes.length){this._resetTabindices();break}}},_onShiftTabDown:function(event){var oldTabIndex;Polymer.IronMenuBehaviorImpl._shiftTabPressed=true;oldTabIndex=this.getAttribute("tabindex");this.setAttribute("tabindex","-1");this.async(function(){this.setAttribute("tabindex",oldTabIndex);Polymer.IronMenuBehaviorImpl._shiftTabPressed=false},1)},_onFocus:function(event){if(Polymer.IronMenuBehaviorImpl._shiftTabPressed){return}this.blur();this._setFocusedItem(null);this._defaultFocusAsync=this.async(function(){var selectedItem=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;if(selectedItem){this._setFocusedItem(selectedItem)}else{this._setFocusedItem(this.items[0])}},100)},_onUpKey:function(event){this._focusPrevious()},_onDownKey:function(event){this._focusNext()},_onEscKey:function(event){this.focusedItem.blur()},_onKeydown:function(event){if(this.keyboardEventMatchesKeys(event,"up down esc")){return}this._focusWithKeyboardEvent(event)}};Polymer.IronMenuBehaviorImpl._shiftTabPressed=false;Polymer.IronMenuBehavior=[Polymer.IronMultiSelectableBehavior,Polymer.IronA11yKeysBehavior,Polymer.IronMenuBehaviorImpl];</script><script>Polymer.IronMenubarBehaviorImpl={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(event){this.focusedItem.click();event.detail.keyboardEvent.preventDefault()},_onDownKey:function(event){this.focusedItem.click();event.detail.keyboardEvent.preventDefault()},_onLeftKey:function(){this._focusPrevious()},_onRightKey:function(){this._focusNext()},_onKeydown:function(event){if(this.keyboardEventMatchesKeys(event,"up down left right esc")){return}this._focusWithKeyboardEvent(event)}};Polymer.IronMenubarBehavior=[Polymer.IronMenuBehavior,Polymer.IronMenubarBehaviorImpl];</script><script>(function(){var metaDatas={};var metaArrays={};var singleton=null;Polymer.IronMeta=Polymer({is:"iron-meta",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:true,observer:"_valueChanged"},self:{type:Boolean,observer:"_selfChanged"},list:{type:Array,notify:true}},hostAttributes:{hidden:true},factoryImpl:function(config){if(config){for(var n in config){switch(n){case"type":case"key":case"value":this[n]=config[n];break}}}},created:function(){this._metaDatas=metaDatas;this._metaArrays=metaArrays},_keyChanged:function(key,old){this._resetRegistration(old)},_valueChanged:function(value){this._resetRegistration(this.key)},_selfChanged:function(self){if(self){this.value=this}},_typeChanged:function(type){this._unregisterKey(this.key);if(!metaDatas[type]){metaDatas[type]={}}this._metaData=metaDatas[type];if(!metaArrays[type]){metaArrays[type]=[]}this.list=metaArrays[type];this._registerKeyValue(this.key,this.value)},byKey:function(key){return this._metaData&&this._metaData[key]},_resetRegistration:function(oldKey){this._unregisterKey(oldKey);this._registerKeyValue(this.key,this.value)},_unregisterKey:function(key){this._unregister(key,this._metaData,this.list)},_registerKeyValue:function(key,value){this._register(key,value,this._metaData,this.list)},_register:function(key,value,data,list){if(key&&data&&value!==undefined){data[key]=value;list.push(value)}},_unregister:function(key,data,list){if(key&&data){if(key in data){var value=data[key];delete data[key];this.arrayDelete(list,value)}}}});Polymer.IronMeta.getIronMeta=function getIronMeta(){if(singleton===null){singleton=new Polymer.IronMeta}return singleton};Polymer.IronMetaQuery=Polymer({is:"iron-meta-query",properties:{type:{type:String,value:"default",observer:"_typeChanged"},key:{type:String,observer:"_keyChanged"},value:{type:Object,notify:true,readOnly:true},list:{type:Array,notify:true}},factoryImpl:function(config){if(config){for(var n in config){switch(n){case"type":case"key":this[n]=config[n];break}}}},created:function(){this._metaDatas=metaDatas;this._metaArrays=metaArrays},_keyChanged:function(key){this._setValue(this._metaData&&this._metaData[key])},_typeChanged:function(type){this._metaData=metaDatas[type];this.list=metaArrays[type];if(this.key){this._keyChanged(this.key)}},byKey:function(key){return this._metaData&&this._metaData[key]}})})();</script><dom-module id="iron-icon"><style>:host{@apply(--layout-inline);@apply(--layout-center-center);position:relative;vertical-align:middle;fill:var(--iron-icon-fill-color,currentcolor);stroke:var(--iron-icon-stroke-color,none);width:var(--iron-icon-width,24px);height:var(--iron-icon-height,24px)}</style><template></template><script>Polymer({is:"iron-icon",properties:{icon:{type:String,observer:"_iconChanged"},theme:{type:String,observer:"_updateIcon"},src:{type:String,observer:"_srcChanged"},_meta:{value:Polymer.Base.create("iron-meta",{type:"iconset"})}},_DEFAULT_ICONSET:"icons",_iconChanged:function(icon){var parts=(icon||"").split(":");this._iconName=parts.pop();this._iconsetName=parts.pop()||this._DEFAULT_ICONSET;this._updateIcon()},_srcChanged:function(src){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){if(this._usesIconset()){if(this._iconsetName){this._iconset=this._meta.byKey(this._iconsetName);if(this._iconset){this._iconset.applyIcon(this,this._iconName,this.theme);this.unlisten(window,"iron-iconset-added","_updateIcon")}else{this.listen(window,"iron-iconset-added","_updateIcon")}}}else{if(!this._img){this._img=document.createElement("img");this._img.style.width="100%";this._img.style.height="100%";this._img.draggable=false}this._img.src=this.src;Polymer.dom(this.root).appendChild(this._img)}}});</script></dom-module><style is="custom-style">:root{--dark-primary-color:#303f9f;--default-primary-color:#3f51b5;--light-primary-color:#c5cae9;--text-primary-color:#fff;--accent-color:#ff4081;--primary-background-color:#fff;--primary-text-color:#212121;--secondary-text-color:#757575;--disabled-text-color:#bdbdbd;--divider-color:#e0e0e0}</style><script>Polymer.IronControlState={properties:{focused:{type:Boolean,value:false,notify:true,readOnly:true,reflectToAttribute:true},disabled:{type:Boolean,value:false,notify:true,observer:"_disabledChanged",reflectToAttribute:true},_oldTabIndex:{type:Number},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,true);this.addEventListener("blur",this._boundFocusBlurHandler,true)},_focusBlurHandler:function(event){if(event.target===this){this._setFocused(event.type==="focus")}else if(!this.shadowRoot&&!this.isLightDescendant(event.target)){this.fire(event.type,{sourceEvent:event},{node:this,bubbles:event.bubbles,cancelable:event.cancelable})}},_disabledChanged:function(disabled,old){this.setAttribute("aria-disabled",disabled?"true":"false");this.style.pointerEvents=disabled?"none":"";if(disabled){this._oldTabIndex=this.tabIndex;this.focused=false;this.tabIndex=-1}else if(this._oldTabIndex!==undefined){this.tabIndex=this._oldTabIndex}},_changedControlState:function(){if(this._controlStateChanged){this._controlStateChanged()}}};</script><script>Polymer.IronButtonStateImpl={properties:{pressed:{type:Boolean,readOnly:true,value:false,reflectToAttribute:true,observer:"_pressedChanged"},toggles:{type:Boolean,value:false,reflectToAttribute:true},active:{type:Boolean,value:false,notify:true,reflectToAttribute:true},pointerDown:{type:Boolean,readOnly:true,value:false},receivedFocusFromKeyboard:{type:Boolean,readOnly:true},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(){if(this.toggles){this._userActivate(!this.active)}else{this.active=false}},_detectKeyboardFocus:function(focused){this._setReceivedFocusFromKeyboard(!this.pointerDown&&focused)},_userActivate:function(active){if(this.active!==active){this.active=active;this.fire("change")}},_downHandler:function(event){this._setPointerDown(true);this._setPressed(true);this._setReceivedFocusFromKeyboard(false)},_upHandler:function(){this._setPointerDown(false);this._setPressed(false)},__isFocusedLightDescendant:function(target){var root=Polymer.dom(this).getOwnerRoot()||document;var focusedElement=root.activeElement;return this!==target&&this.isLightDescendant(target)&&target==focusedElement},_spaceKeyDownHandler:function(event){var keyboardEvent=event.detail.keyboardEvent;var target=Polymer.dom(keyboardEvent).localTarget;if(this.__isFocusedLightDescendant(target))return;keyboardEvent.preventDefault();keyboardEvent.stopImmediatePropagation();this._setPressed(true)},_spaceKeyUpHandler:function(event){var keyboardEvent=event.detail.keyboardEvent;var target=Polymer.dom(keyboardEvent).localTarget;if(this.__isFocusedLightDescendant(target))return;if(this.pressed){this._asyncClick()}this._setPressed(false)},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(pressed){this._changedButtonState()},_ariaActiveAttributeChanged:function(value,oldValue){if(oldValue&&oldValue!=value&&this.hasAttribute(oldValue)){this.removeAttribute(oldValue)}},_activeChanged:function(active,ariaActiveAttribute){if(this.toggles){this.setAttribute(this.ariaActiveAttribute,active?"true":"false")}else{this.removeAttribute(this.ariaActiveAttribute)}this._changedButtonState()},_controlStateChanged:function(){if(this.disabled){this._setPressed(false)}else{this._changedButtonState()}},_changedButtonState:function(){if(this._buttonStateChanged){this._buttonStateChanged()}}};Polymer.IronButtonState=[Polymer.IronA11yKeysBehavior,Polymer.IronButtonStateImpl];</script><dom-module id="paper-ripple"><template><style>:host{display:block;position:absolute;border-radius:inherit;overflow:hidden;top:0;left:0;right:0;bottom:0;pointer-events:none}:host([animating]){-webkit-transform:translate(0,0);transform:translate3d(0,0,0)}:host([noink]){pointer-events:none}#background,#waves,.wave-container,.wave{pointer-events:none;position:absolute;top:0;left:0;width:100%;height:100%}#background,.wave{opacity:0}#waves,.wave{overflow:hidden}.wave-container,.wave{border-radius:50%}:host(.circle) #background,:host(.circle) #waves{border-radius:50%}:host(.circle) .wave-container{overflow:hidden}</style><div id="background"></div><div id="waves"></div></template></dom-module><script>(function(){var Utility={distance:function(x1,y1,x2,y2){var xDelta=x1-x2;var yDelta=y1-y2;return Math.sqrt(xDelta*xDelta+yDelta*yDelta)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function ElementMetrics(element){this.element=element;this.width=this.boundingRect.width;this.height=this.boundingRect.height;this.size=Math.max(this.width,this.height)}ElementMetrics.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(x,y){var topLeft=Utility.distance(x,y,0,0);var topRight=Utility.distance(x,y,this.width,0);var bottomLeft=Utility.distance(x,y,0,this.height);var bottomRight=Utility.distance(x,y,this.width,this.height);return Math.max(topLeft,topRight,bottomLeft,bottomRight)}};function Ripple(element){this.element=element;this.color=window.getComputedStyle(element).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()}Ripple.MAX_RADIUS=300;Ripple.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var elapsed;if(!this.mouseDownStart){return 0}elapsed=Utility.now()-this.mouseDownStart;if(this.mouseUpStart){elapsed-=this.mouseUpElapsed}return elapsed},get mouseUpElapsed(){return this.mouseUpStart?Utility.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 width2=this.containerMetrics.width*this.containerMetrics.width;var height2=this.containerMetrics.height*this.containerMetrics.height;var waveRadius=Math.min(Math.sqrt(width2+height2),Ripple.MAX_RADIUS)*1.1+5;var duration=1.1-.2*(waveRadius/Ripple.MAX_RADIUS);var timeNow=this.mouseInteractionSeconds/duration;var size=waveRadius*(1-Math.pow(80,-timeNow));return Math.abs(size)},get opacity(){if(!this.mouseUpStart){return this.initialOpacity}return Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity)},get outerOpacity(){var outerOpacity=this.mouseUpElapsedSeconds*.3;var waveOpacity=this.opacity;return Math.max(0,Math.min(outerOpacity,waveOpacity))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,Ripple.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,Ripple.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(){if(this.xEnd){return this.xStart+this.translationFraction*(this.xEnd-this.xStart)}return this.xStart},get yNow(){if(this.yEnd){return this.yStart+this.translationFraction*(this.yEnd-this.yStart)}return 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 ElementMetrics(this.element)},draw:function(){var scale;var translateString;var dx;var dy;this.wave.style.opacity=this.opacity;scale=this.radius/(this.containerMetrics.size/2);dx=this.xNow-this.containerMetrics.width/2;dy=this.yNow-this.containerMetrics.height/2;this.waveContainer.style.webkitTransform="translate("+dx+"px, "+dy+"px)";this.waveContainer.style.transform="translate3d("+dx+"px, "+dy+"px, 0)";this.wave.style.webkitTransform="scale("+scale+","+scale+")";this.wave.style.transform="scale3d("+scale+","+scale+",1)"},downAction:function(event){var xCenter=this.containerMetrics.width/2;var yCenter=this.containerMetrics.height/2;this.resetInteractionState();this.mouseDownStart=Utility.now();if(this.center){this.xStart=xCenter;this.yStart=yCenter;this.slideDistance=Utility.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)}else{this.xStart=event?event.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2;this.yStart=event?event.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2}if(this.recenters){this.xEnd=xCenter;this.yEnd=yCenter;this.slideDistance=Utility.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(event){if(!this.isMouseDown){return}this.mouseUpStart=Utility.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:false},center:{type:Boolean,value:false},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:true,reflectToAttribute:true,value:false},holdDown:{type:Boolean,value:false,observer:"_holdDownChanged"},noink:{type:Boolean,value:false},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},observers:["_noinkChanged(noink, isAttached)"],get target(){var ownerRoot=Polymer.dom(this).getOwnerRoot();var target;if(this.parentNode.nodeType==11){target=ownerRoot.host}else{target=this.parentNode}return target},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){this.listen(this.target,"up","uiUpAction");this.listen(this.target,"down","uiDownAction")},detached:function(){this.unlisten(this.target,"up","uiUpAction");this.unlisten(this.target,"down","uiDownAction")},get shouldKeepAnimating(){for(var index=0;index<this.ripples.length;++index){if(!this.ripples[index].isAnimationComplete){return true}}return false},simulatedRipple:function(){this.downAction(null);this.async(function(){this.upAction()},1)},uiDownAction:function(event){if(!this.noink){this.downAction(event)}},downAction:function(event){if(this.holdDown&&this.ripples.length>0){return}var ripple=this.addRipple();ripple.downAction(event);if(!this._animating){this.animate()}},uiUpAction:function(event){if(!this.noink){this.upAction(event)}},upAction:function(event){if(this.holdDown){return}this.ripples.forEach(function(ripple){ripple.upAction(event)});this.animate()},onAnimationComplete:function(){this._animating=false;this.$.background.style.backgroundColor=null;this.fire("transitionend")},addRipple:function(){var ripple=new Ripple(this);Polymer.dom(this.$.waves).appendChild(ripple.waveContainer);this.$.background.style.backgroundColor=ripple.color;this.ripples.push(ripple);this._setAnimating(true);return ripple},removeRipple:function(ripple){var rippleIndex=this.ripples.indexOf(ripple);if(rippleIndex<0){return}this.ripples.splice(rippleIndex,1);ripple.remove();if(!this.ripples.length){this._setAnimating(false)}},animate:function(){var index;var ripple;this._animating=true;for(index=0;index<this.ripples.length;++index){ripple=this.ripples[index];ripple.draw();this.$.background.style.opacity=ripple.outerOpacity;if(ripple.isOpacityFullyDecayed&&!ripple.isRestingAtMaxRadius){this.removeRipple(ripple)}}if(!this.shouldKeepAnimating&&this.ripples.length===0){this.onAnimationComplete()}else{window.requestAnimationFrame(this._boundAnimate)}},_onEnterKeydown:function(){this.uiDownAction();this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(newVal,oldVal){if(oldVal===undefined){return}if(newVal){this.downAction()}else{this.upAction()}},_noinkChanged:function(noink,attached){if(attached){this.keyEventTarget=noink?this:this.target}}})})();</script><script>Polymer.PaperRippleBehavior={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){if(this.focused){this.ensureRipple()}},_downHandler:function(event){Polymer.IronButtonStateImpl._downHandler.call(this,event);if(this.pressed){this.ensureRipple(event)}},ensureRipple:function(opt_triggeringEvent){if(!this.hasRipple()){this._ripple=this._createRipple();this._ripple.noink=this.noink;var rippleContainer=this._rippleContainer||this.root;if(rippleContainer){Polymer.dom(rippleContainer).appendChild(this._ripple)}var domContainer=rippleContainer===this.shadyRoot?this:rippleContainer;if(opt_triggeringEvent){var target=opt_triggeringEvent.target;if(domContainer.contains(target)){this._ripple.uiDownAction(opt_triggeringEvent)}}}},getRipple:function(){this.ensureRipple();return this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){return document.createElement("paper-ripple")},_noinkChanged:function(noink){if(this.hasRipple()){this._ripple.noink=noink}}};</script><script>Polymer.PaperButtonBehaviorImpl={properties:{elevation:{type:Number,reflectToAttribute:true,readOnly:true}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:true},_calculateElevation:function(){var e=1;if(this.disabled){e=0}else if(this.active||this.pressed){e=4}else if(this.receivedFocusFromKeyboard){e=3}this._setElevation(e)},_computeKeyboardClass:function(receivedFocusFromKeyboard){this.classList.toggle("keyboard-focus",receivedFocusFromKeyboard)},_spaceKeyDownHandler:function(event){Polymer.IronButtonStateImpl._spaceKeyDownHandler.call(this,event);if(this.hasRipple()){this._ripple.uiDownAction()}},_spaceKeyUpHandler:function(event){Polymer.IronButtonStateImpl._spaceKeyUpHandler.call(this,event);if(this.hasRipple()){this._ripple.uiUpAction()}}};Polymer.PaperButtonBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperButtonBehaviorImpl];</script><script>Polymer.PaperInkyFocusBehaviorImpl={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(receivedFocusFromKeyboard){if(receivedFocusFromKeyboard){this.ensureRipple()}if(this.hasRipple()){this._ripple.holdDown=receivedFocusFromKeyboard}},_createRipple:function(){var ripple=Polymer.PaperRippleBehavior._createRipple();ripple.id="ink";ripple.setAttribute("center","");ripple.classList.add("circle");return ripple}};Polymer.PaperInkyFocusBehavior=[Polymer.IronButtonState,Polymer.IronControlState,Polymer.PaperRippleBehavior,Polymer.PaperInkyFocusBehaviorImpl];</script><dom-module id="paper-icon-button"><template strip-whitespace=""><style>:host{display:inline-block;position:relative;padding:8px;outline:0;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;z-index:0;line-height:1;width:40px;height:40px;box-sizing:border-box!important;@apply(--paper-icon-button)}:host #ink{color:var(--paper-icon-button-ink-color,--primary-text-color);opacity:.6}:host([disabled]){color:var(--paper-icon-button-disabled-text,--disabled-text-color);pointer-events:none;cursor:auto;@apply(--paper-icon-button-disabled)}iron-icon{--iron-icon-width:100%;--iron-icon-height:100%}</style><iron-icon id="icon" src="bower_components/paper-icon-button/[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon></template><script>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(newValue,oldValue){var label=this.getAttribute("aria-label");if(!label||oldValue==label){this.setAttribute("aria-label",newValue)}}});</script></dom-module><style is="custom-style">:root{--google-red-100:#f4c7c3;--google-red-300:#e67c73;--google-red-500:#db4437;--google-red-700:#c53929;--google-blue-100:#c6dafc;--google-blue-300:#7baaf7;--google-blue-500:#4285f4;--google-blue-700:#3367d6;--google-green-100:#b7e1cd;--google-green-300:#57bb8a;--google-green-500:#0f9d58;--google-green-700:#0b8043;--google-yellow-100:#fce8b2;--google-yellow-300:#f7cb4d;--google-yellow-500:#f4b400;--google-yellow-700:#f09300;--google-grey-100:#f5f5f5;--google-grey-300:#e0e0e0;--google-grey-500:#9e9e9e;--google-grey-700:#616161;--paper-red-50:#ffebee;--paper-red-100:#ffcdd2;--paper-red-200:#ef9a9a;--paper-red-300:#e57373;--paper-red-400:#ef5350;--paper-red-500:#f44336;--paper-red-600:#e53935;--paper-red-700:#d32f2f;--paper-red-800:#c62828;--paper-red-900:#b71c1c;--paper-red-a100:#ff8a80;--paper-red-a200:#ff5252;--paper-red-a400:#ff1744;--paper-red-a700:#d50000;--paper-pink-50:#fce4ec;--paper-pink-100:#f8bbd0;--paper-pink-200:#f48fb1;--paper-pink-300:#f06292;--paper-pink-400:#ec407a;--paper-pink-500:#e91e63;--paper-pink-600:#d81b60;--paper-pink-700:#c2185b;--paper-pink-800:#ad1457;--paper-pink-900:#880e4f;--paper-pink-a100:#ff80ab;--paper-pink-a200:#ff4081;--paper-pink-a400:#f50057;--paper-pink-a700:#c51162;--paper-purple-50:#f3e5f5;--paper-purple-100:#e1bee7;--paper-purple-200:#ce93d8;--paper-purple-300:#ba68c8;--paper-purple-400:#ab47bc;--paper-purple-500:#9c27b0;--paper-purple-600:#8e24aa;--paper-purple-700:#7b1fa2;--paper-purple-800:#6a1b9a;--paper-purple-900:#4a148c;--paper-purple-a100:#ea80fc;--paper-purple-a200:#e040fb;--paper-purple-a400:#d500f9;--paper-purple-a700:#a0f;--paper-deep-purple-50:#ede7f6;--paper-deep-purple-100:#d1c4e9;--paper-deep-purple-200:#b39ddb;--paper-deep-purple-300:#9575cd;--paper-deep-purple-400:#7e57c2;--paper-deep-purple-500:#673ab7;--paper-deep-purple-600:#5e35b1;--paper-deep-purple-700:#512da8;--paper-deep-purple-800:#4527a0;--paper-deep-purple-900:#311b92;--paper-deep-purple-a100:#b388ff;--paper-deep-purple-a200:#7c4dff;--paper-deep-purple-a400:#651fff;--paper-deep-purple-a700:#6200ea;--paper-indigo-50:#e8eaf6;--paper-indigo-100:#c5cae9;--paper-indigo-200:#9fa8da;--paper-indigo-300:#7986cb;--paper-indigo-400:#5c6bc0;--paper-indigo-500:#3f51b5;--paper-indigo-600:#3949ab;--paper-indigo-700:#303f9f;--paper-indigo-800:#283593;--paper-indigo-900:#1a237e;--paper-indigo-a100:#8c9eff;--paper-indigo-a200:#536dfe;--paper-indigo-a400:#3d5afe;--paper-indigo-a700:#304ffe;--paper-blue-50:#e3f2fd;--paper-blue-100:#bbdefb;--paper-blue-200:#90caf9;--paper-blue-300:#64b5f6;--paper-blue-400:#42a5f5;--paper-blue-500:#2196f3;--paper-blue-600:#1e88e5;--paper-blue-700:#1976d2;--paper-blue-800:#1565c0;--paper-blue-900:#0d47a1;--paper-blue-a100:#82b1ff;--paper-blue-a200:#448aff;--paper-blue-a400:#2979ff;--paper-blue-a700:#2962ff;--paper-light-blue-50:#e1f5fe;--paper-light-blue-100:#b3e5fc;--paper-light-blue-200:#81d4fa;--paper-light-blue-300:#4fc3f7;--paper-light-blue-400:#29b6f6;--paper-light-blue-500:#03a9f4;--paper-light-blue-600:#039be5;--paper-light-blue-700:#0288d1;--paper-light-blue-800:#0277bd;--paper-light-blue-900:#01579b;--paper-light-blue-a100:#80d8ff;--paper-light-blue-a200:#40c4ff;--paper-light-blue-a400:#00b0ff;--paper-light-blue-a700:#0091ea;--paper-cyan-50:#e0f7fa;--paper-cyan-100:#b2ebf2;--paper-cyan-200:#80deea;--paper-cyan-300:#4dd0e1;--paper-cyan-400:#26c6da;--paper-cyan-500:#00bcd4;--paper-cyan-600:#00acc1;--paper-cyan-700:#0097a7;--paper-cyan-800:#00838f;--paper-cyan-900:#006064;--paper-cyan-a100:#84ffff;--paper-cyan-a200:#18ffff;--paper-cyan-a400:#00e5ff;--paper-cyan-a700:#00b8d4;--paper-teal-50:#e0f2f1;--paper-teal-100:#b2dfdb;--paper-teal-200:#80cbc4;--paper-teal-300:#4db6ac;--paper-teal-400:#26a69a;--paper-teal-500:#009688;--paper-teal-600:#00897b;--paper-teal-700:#00796b;--paper-teal-800:#00695c;--paper-teal-900:#004d40;--paper-teal-a100:#a7ffeb;--paper-teal-a200:#64ffda;--paper-teal-a400:#1de9b6;--paper-teal-a700:#00bfa5;--paper-green-50:#e8f5e9;--paper-green-100:#c8e6c9;--paper-green-200:#a5d6a7;--paper-green-300:#81c784;--paper-green-400:#66bb6a;--paper-green-500:#4caf50;--paper-green-600:#43a047;--paper-green-700:#388e3c;--paper-green-800:#2e7d32;--paper-green-900:#1b5e20;--paper-green-a100:#b9f6ca;--paper-green-a200:#69f0ae;--paper-green-a400:#00e676;--paper-green-a700:#00c853;--paper-light-green-50:#f1f8e9;--paper-light-green-100:#dcedc8;--paper-light-green-200:#c5e1a5;--paper-light-green-300:#aed581;--paper-light-green-400:#9ccc65;--paper-light-green-500:#8bc34a;--paper-light-green-600:#7cb342;--paper-light-green-700:#689f38;--paper-light-green-800:#558b2f;--paper-light-green-900:#33691e;--paper-light-green-a100:#ccff90;--paper-light-green-a200:#b2ff59;--paper-light-green-a400:#76ff03;--paper-light-green-a700:#64dd17;--paper-lime-50:#f9fbe7;--paper-lime-100:#f0f4c3;--paper-lime-200:#e6ee9c;--paper-lime-300:#dce775;--paper-lime-400:#d4e157;--paper-lime-500:#cddc39;--paper-lime-600:#c0ca33;--paper-lime-700:#afb42b;--paper-lime-800:#9e9d24;--paper-lime-900:#827717;--paper-lime-a100:#f4ff81;--paper-lime-a200:#eeff41;--paper-lime-a400:#c6ff00;--paper-lime-a700:#aeea00;--paper-yellow-50:#fffde7;--paper-yellow-100:#fff9c4;--paper-yellow-200:#fff59d;--paper-yellow-300:#fff176;--paper-yellow-400:#ffee58;--paper-yellow-500:#ffeb3b;--paper-yellow-600:#fdd835;--paper-yellow-700:#fbc02d;--paper-yellow-800:#f9a825;--paper-yellow-900:#f57f17;--paper-yellow-a100:#ffff8d;--paper-yellow-a200:#ff0;--paper-yellow-a400:#ffea00;--paper-yellow-a700:#ffd600;--paper-amber-50:#fff8e1;--paper-amber-100:#ffecb3;--paper-amber-200:#ffe082;--paper-amber-300:#ffd54f;--paper-amber-400:#ffca28;--paper-amber-500:#ffc107;--paper-amber-600:#ffb300;--paper-amber-700:#ffa000;--paper-amber-800:#ff8f00;--paper-amber-900:#ff6f00;--paper-amber-a100:#ffe57f;--paper-amber-a200:#ffd740;--paper-amber-a400:#ffc400;--paper-amber-a700:#ffab00;--paper-orange-50:#fff3e0;--paper-orange-100:#ffe0b2;--paper-orange-200:#ffcc80;--paper-orange-300:#ffb74d;--paper-orange-400:#ffa726;--paper-orange-500:#ff9800;--paper-orange-600:#fb8c00;--paper-orange-700:#f57c00;--paper-orange-800:#ef6c00;--paper-orange-900:#e65100;--paper-orange-a100:#ffd180;--paper-orange-a200:#ffab40;--paper-orange-a400:#ff9100;--paper-orange-a700:#ff6500;--paper-deep-orange-50:#fbe9e7;--paper-deep-orange-100:#ffccbc;--paper-deep-orange-200:#ffab91;--paper-deep-orange-300:#ff8a65;--paper-deep-orange-400:#ff7043;--paper-deep-orange-500:#ff5722;--paper-deep-orange-600:#f4511e;--paper-deep-orange-700:#e64a19;--paper-deep-orange-800:#d84315;--paper-deep-orange-900:#bf360c;--paper-deep-orange-a100:#ff9e80;--paper-deep-orange-a200:#ff6e40;--paper-deep-orange-a400:#ff3d00;--paper-deep-orange-a700:#dd2c00;--paper-brown-50:#efebe9;--paper-brown-100:#d7ccc8;--paper-brown-200:#bcaaa4;--paper-brown-300:#a1887f;--paper-brown-400:#8d6e63;--paper-brown-500:#795548;--paper-brown-600:#6d4c41;--paper-brown-700:#5d4037;--paper-brown-800:#4e342e;--paper-brown-900:#3e2723;--paper-grey-50:#fafafa;--paper-grey-100:#f5f5f5;--paper-grey-200:#eee;--paper-grey-300:#e0e0e0;--paper-grey-400:#bdbdbd;--paper-grey-500:#9e9e9e;--paper-grey-600:#757575;--paper-grey-700:#616161;--paper-grey-800:#424242;--paper-grey-900:#212121;--paper-blue-grey-50:#eceff1;--paper-blue-grey-100:#cfd8dc;--paper-blue-grey-200:#b0bec5;--paper-blue-grey-300:#90a4ae;--paper-blue-grey-400:#78909c;--paper-blue-grey-500:#607d8b;--paper-blue-grey-600:#546e7a;--paper-blue-grey-700:#455a64;--paper-blue-grey-800:#37474f;--paper-blue-grey-900:#263238;--dark-divider-opacity:.12;--dark-disabled-opacity:.26;--dark-secondary-opacity:.54;--dark-primary-opacity:.87;--light-divider-opacity:.12;--light-disabled-opacity:.3;--light-secondary-opacity:.7;--light-primary-opacity:1}</style><script>Polymer({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24}},attached:function(){this.style.display="none"},getIconNames:function(){this._icons=this._createIconMap();return Object.keys(this._icons).map(function(n){return this.name+":"+n},this)},applyIcon:function(element,iconName){element=element.root||element;this.removeIcon(element);var svg=this._cloneIcon(iconName);if(svg){var pde=Polymer.dom(element);pde.insertBefore(svg,pde.childNodes[0]);return element._svgIcon=svg}return null},removeIcon:function(element){if(element._svgIcon){Polymer.dom(element).removeChild(element._svgIcon);element._svgIcon=null}},_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 icons=Object.create(null);Polymer.dom(this).querySelectorAll("[id]").forEach(function(icon){icons[icon.id]=icon});return icons},_cloneIcon:function(id){this._icons=this._icons||this._createIconMap();return this._prepareSvgClone(this._icons[id],this.size)},_prepareSvgClone:function(sourceSvg,size){if(sourceSvg){var content=sourceSvg.cloneNode(true),svg=document.createElementNS("https://www.w3.org/2000/svg","svg"),viewBox=content.getAttribute("viewBox")||"0 0 "+size+" "+size;svg.setAttribute("viewBox",viewBox);svg.setAttribute("preserveAspectRatio","xMidYMid meet");svg.style.cssText="pointer-events: none; display: block; width: 100%; height: 100%;";svg.appendChild(content).removeAttribute("id");return svg}return null}});</script><iron-iconset-svg name="paper-tabs" size="24"><svg><defs><g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g><g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g></defs></svg></iron-iconset-svg><dom-module id="paper-tab"><style>:host{@apply(--layout-inline);@apply(--layout-center);@apply(--layout-center-justified);@apply(--layout-flex);position:relative;padding:0 12px;overflow:hidden;cursor:pointer;@apply(--paper-tab)}:host(:focus){outline:0}:host([link]){padding:0}.tab-content{height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);transition:opacity .1s cubic-bezier(0.4,0,1,1);@apply(--paper-tab-content)}:host(:not(.iron-selected))>.tab-content{opacity:.8;@apply(--paper-tab-content-unselected)}:host(:focus) .tab-content{opacity:1;font-weight:700}paper-ripple{color:var(--paper-tab-ink,--paper-yellow-a100)}.tab-content>::content>a{height:100%;-ms-flex:1 1 0;-webkit-flex:1;flex:1;-webkit-flex-basis:0;flex-basis:0}</style><template><div class="tab-content flex-auto center-center horizontal layout"><content></content></div></template></dom-module><script>Polymer({is:"paper-tab",behaviors:[Polymer.IronControlState,Polymer.IronButtonState,Polymer.PaperRippleBehavior],hostAttributes:{role:"tab"},listeners:{down:"_updateNoink"},ready:function(){var ripple=this.getRipple();ripple.initialOpacity=.95;ripple.opacityDecayVelocity=.98},attached:function(){this._updateNoink()},get _parentNoink(){var parent=Polymer.dom(this).parentNode;return!!parent&&!!parent.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink}});</script><dom-module id="paper-tabs"><style>:host{@apply(--layout);@apply(--layout-center);height:48px;font-size:14px;font-weight:500;overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;@apply(--paper-tabs)}:host-context([dir=rtl]){@apply(--layout-horizontal-reverse)}#tabsContainer{position:relative;height:100%;white-space:nowrap;overflow:hidden}#tabsContent{height:100%}#tabsContent.scrollable{position:absolute;white-space:nowrap}.hidden{display:none}.not-visible{opacity:0;cursor:default}paper-icon-button{width:48px;height:48px;padding:12px;margin:0 4px}#selectionBar{position:absolute;height:2px;bottom:0;left:0;right:0;background-color:var(--paper-tabs-selection-bar-color,--paper-yellow-a100);-webkit-transform-origin:left center;transform-origin:left center;-webkit-transform:scale(0);transform:scale(0);transition:-webkit-transform;transition:transform;@apply(--paper-tabs-selection-bar)}#selectionBar.align-bottom{top:0;bottom:auto}#selectionBar.expand{transition-duration:.15s;transition-timing-function:cubic-bezier(0.4,0,1,1)}#selectionBar.contract{transition-duration:.18s;transition-timing-function:cubic-bezier(0,0,.2,1)}#tabsContent>::content>:not(#selectionBar){height:100%}</style><template><paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button><div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down"><div id="tabsContent" class$="[[_computeTabsContentClass(scrollable)]]"><content select="*"></content><div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div></div></div><paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button></template></dom-module><script>Polymer({is:"paper-tabs",behaviors:[Polymer.IronResizableBehavior,Polymer.IronMenubarBehavior],properties:{noink:{type:Boolean,value:false,observer:"_noinkChanged"},noBar:{type:Boolean,value:false},noSlide:{type:Boolean,value:false},scrollable:{type:Boolean,value:false},disableDrag:{type:Boolean,value:false},hideScrollButtons:{type:Boolean,value:false},alignBottom:{type:Boolean,value:false},selected:{type:String,notify:true},selectable:{type:String,value:"paper-tab"},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:false},_rightHidden:{type:Boolean,value:false},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onResize","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},created:function(){this._holdJob=null},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},_noinkChanged:function(noink){var childTabs=Polymer.dom(this).querySelectorAll("paper-tab");childTabs.forEach(noink?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(element){element.setAttribute("noink","")},_removeNoinkAttribute:function(element){element.removeAttribute("noink")},_computeScrollButtonClass:function(hideThisButton,scrollable,hideScrollButtons){if(!scrollable||hideScrollButtons){return"hidden"}if(hideThisButton){return"not-visible"}return""},_computeTabsContentClass:function(scrollable){return scrollable?"scrollable":"horizontal layout"},_computeSelectionBarClass:function(noBar,alignBottom){if(noBar){return"hidden"}else if(alignBottom){return"align-bottom"}},_onResize:function(){this.debounce("_onResize",function(){this._scroll();this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(event){this._tabChanged(event.detail.item,this._previousTab);this._previousTab=event.detail.item;this.cancelDebouncer("tab-changed")},_onIronDeselect:function(event){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab)},1)},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(e,detail){if(!this.scrollable){return}var ddx=detail&&-detail.ddx||0;this._affectScroll(ddx)},_down:function(e){this.async(function(){if(this._defaultFocusAsync){this.cancelAsync(this._defaultFocusAsync);this._defaultFocusAsync=null}},1)},_affectScroll:function(dx){this.$.tabsContainer.scrollLeft+=dx;var scrollLeft=this.$.tabsContainer.scrollLeft;this._leftHidden=scrollLeft===0;this._rightHidden=scrollLeft===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(tab,old){if(!tab){this._positionBar(0,0);return}var r=this.$.tabsContent.getBoundingClientRect();var w=r.width;var tabRect=tab.getBoundingClientRect();var tabOffsetLeft=tabRect.left-r.left;this._pos={width:this._calcPercent(tabRect.width,w),left:this._calcPercent(tabOffsetLeft,w)};if(this.noSlide||old==null){this._positionBar(this._pos.width,this._pos.left);return}var oldRect=old.getBoundingClientRect();var oldIndex=this.items.indexOf(old);var index=this.items.indexOf(tab);var m=5;this.$.selectionBar.classList.add("expand");if(oldIndex<index){this._positionBar(this._calcPercent(tabRect.left+tabRect.width-oldRect.left,w)-m,this._left)}else{this._positionBar(this._calcPercent(oldRect.left+oldRect.width-tabRect.left,w)-m,this._calcPercent(tabOffsetLeft,w)+m)}if(this.scrollable){this._scrollToSelectedIfNeeded(tabRect.width,tabOffsetLeft)}},_scrollToSelectedIfNeeded:function(tabWidth,tabOffsetLeft){var l=tabOffsetLeft-this.$.tabsContainer.scrollLeft;if(l<0){this.$.tabsContainer.scrollLeft+=l}else{l+=tabWidth-this.$.tabsContainer.offsetWidth;if(l>0){this.$.tabsContainer.scrollLeft+=l}}},_calcPercent:function(w,w0){return 100*w/w0},_positionBar:function(width,left){width=width||0;left=left||0;this._width=width;this._left=left;this.transform("translate3d("+left+"%, 0, 0) scaleX("+width/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(e){var cl=this.$.selectionBar.classList;if(cl.contains("expand")){cl.remove("expand");cl.add("contract");this._positionBar(this._pos.width,this._pos.left)}else if(cl.contains("contract")){cl.remove("contract")}}});</script></div></head><body><div class="container"><header class="row"><div class="col-md-8"><img class="logo" src="site-assets/logo.svg" width="500" height="86" alt="TodoMVC"><p>Helping you <strong>select</strong> an MV* framework</p><nav><a href="https://github.com/tastejs/todomvc/archive/master.zip" class="zocial red">Download</a><a href="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/tastejs/todomvc" class="zocial ltgray">View on GitHub</a><a href="https://medium.com/@tastejs" class="zocial ltgray">Blog</a></nav></div><div class="col-md-4"><img class="logo-icon" src="site-assets/logo-icon.png" width="330" height="330" alt="TodoMVC"></div></header><div class="row"><div class="col-md-4"><h2>Introduction</h2><p>Developers these days are spoiled with choice when it comes to <a href="https://coding.smashingmagazine.com/2012/07/27/journey-through-the-javascript-mvc-jungle/">selecting</a> an <strong>MV* framework</strong> for structuring and organizing their JavaScript web apps.</p><p>Backbone, Ember, AngularJS… the list of new and stable solutions continues to grow, but just how do you decide on which to use in a sea of so many options?</p><p>To help solve this problem, we created <a href="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/tastejs/todomvc">TodoMVC</a> - a project which offers the same Todo application implemented using MV* concepts in most of the popular JavaScript MV* frameworks of today.</p><a href="https://twitter.com/tastejs" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false"></a><a href="https://twitter.com/share" class="twitter-share-button" data-via="tastejs" data-url="https://todomvc.com" data-text="TodoMVC - Helping you select an MV* framework - Todo apps for Backbone.js, Ember.js, AngularJS, and more"></a><div class="g-plusone" data-size="medium" data-annotation="none" data-href="https://todomvc.com"></div></div><div class="col-md-8"><h2>Examples</h2><style is="custom-style">paper-tabs{--paper-tabs-selection-bar-color:#b12d2b}paper-tab{--paper-tab-ink:#b12d2b}paper-tabs,core-toolbar{color:#353535;background-color:#f4f4f4;font-family:'Helvetica Neue',Helvetica,Arial;box-shadow:0 3px 2px rgba(0,0,0,.2)}</style><paper-tabs selected="{{selectedTab}}" class="js-app-tabs"><paper-tab data-target="js">JavaScript</paper-tab><paper-tab data-target="ctojs">Compile-to-JS</paper-tab><paper-tab data-target="labs">Labs</paper-tab></paper-tabs><iron-pages selected="{{selectedTab}}" class="app-lists"><div class="js-app-list" data-app-list="js"><p class="applist-intro">
These are examples written in pure JavaScript.
</p><ul class="js-app-list-inner applist js"><li class="routing"><a href="examples/backbone" data-source="https://backbonejs.org/" data-content="Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.">Backbone.js</a></li><li class="routing"><a href="examples/angularjs" data-source="https://angularjs.org" data-content="What HTML would have been had it been designed for web apps">AngularJS</a></li><li class="routing"><a href="examples/emberjs" data-source="https://emberjs.com" data-content="Ember is a JavaScript framework for creating ambitious web applications that eliminates boilerplate and provides a standard application architecture.">Ember.js</a></li><li class="routing"><a href="examples/knockoutjs" data-source="https://knockoutjs.com" data-content="Simplify dynamic JavaScript UIs by applying the Model-View-View Model (MVVM) pattern">KnockoutJS</a></li><li class="routing"><a href="examples/dojo" data-source="https://dojotoolkit.org" data-content="Dojo saves you time and scales with your development process, using web standards as its platform. It’s the toolkit experienced developers turn to for building high quality desktop and mobile web applications.">Dojo</a></li><li class="routing"><a href="examples/knockback" data-source="https://kmalakoff.github.com/knockback/" data-content="Knockback.js provides Knockout.js magic for Backbone.js Models and Collections.">Knockback.js</a></li><li class="routing"><a href="examples/canjs" data-source="https://canjs.us" data-content="CanJS with jQuery. CanJS is a client-side, JavaScript framework that makes building rich web applications easy. It provides can.Model (for connecting to RESTful JSON interfaces), can.View (for template loading and caching), can.Observe (for key-value binding), can.EJS (live binding templates), can.Control (declarative event bindings) and can.route (routing support).">CanJS</a></li><li class="routing"><a href="examples/polymer/index.html" data-source="https://polymer-project.org" data-content="Polymer is a new type of library for the web, built on top of Web Components, and designed to leverage the evolving web platform on modern browsers. It is comprised of core platform features (e.g Shadow DOM, Custom Elements, MDV) enabled with polyfills and a next generation web application framework built on these technologies.">Polymer</a></li><li class="routing"><a href="examples/react" data-source="https://facebook.github.io/react/" data-content="React is a JavaScript library for building user interfaces.">React</a></li><li class="routing"><a href="examples/mithril" data-source="https://mithril.js.org/" data-content="Mithril is a modern client-side Javascript framework for building Single Page Applications. It's small (< 8kb gzip), fast and provides routing and XHR utilities out of the box.">Mithril</a></li><li class="routing"><a href="examples/vue" data-source="https://vuejs.org" data-content="Vue.js provides the benefits of MVVM data binding and a composable component system with an extremely simple and flexible API.">Vue.js</a></li><li class="routing"><a href="examples/backbone_marionette" data-source="https://marionettejs.com" data-content="Backbone.Marionette is a composite application library for Backbone.js that aims to simplify the construction of large scale JavaScript applications.">Marionette.js</a></li></ul></div><div class="js-app-list" data-app-list="ctojs"><p class="applist-intro">
These are applications written in programming
languages that compile to JavaScript.
</p><ul class="js-app-list-inner applist js"><li class="routing"><a href="examples/kotlin-react" data-source="https://github.com/JetBrains/create-react-kotlin-app" data-content="Kotlin + React implementation uses Kotlin language in conjunction with React. Kotlin is designed to be an industrial-strength object-oriented language, and a 'better language' than Java, but still be fully interoperable with Java code, allowing companies to make a gradual migration from Java to Kotlin">Kotlin + React</a></li><li class="routing"><a href="examples/spine" data-source="https://spinejs.com" data-content="Spine is a lightweight framework for building JavaScript web applications. Spine gives you an MVC structure and then gets out of your way, allowing you to concentrate on the fun stuff, building awesome web applications.">Spine</a></li><li class="routing"><a href="examples/vanilladart/build/web" data-source="https://dartlang.org" data-content="Dart firstly targets the development of modern and large scale browser-side web apps. It's an object oriented language with a C-style syntax. It has two run modes : it can be compiled to JS, and will later run in native VM in compliant browsers (just in a dedicated Chromium provided with Dart SDK for the moment).">Dart</a></li><li class="routing"><a href="examples/gwt" data-source="https://developers.google.com/web-toolkit/" data-content="Google Web Toolkit (GWT) is an MVP development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google AdWords.">GWT</a></li><li class="routing"><a href="examples/closure" data-source="https://code.google.com/closure/library/" data-content="The Closure Library is a broad, well-tested, modular, and cross-browser JavaScript library. You can pull just what you need from a large set of reusable UI widgets and controls, and from lower-level utilities for DOM manipulation, server communication, animation, data structures, unit testing, rich-text editing, and more.">Closure</a></li><li class="routing"><a href="examples/elm" data-source="https://elm-lang.org" data-content="A functional reactive language for interactive applications">Elm</a></li><li><a href="examples/angular-dart/web" data-source="https://github.com/angular/angular.dart" data-content="Dart firstly targets the development of modern and large scale browser-side web apps. It's an object oriented language with a C-style syntax. AngularDart is a port of Angular to Dart.">AngularDart</a></li><li><a href="examples/typescript-backbone" data-source="https://typescriptlang.org" data-content="TypeScript is a language for application-scale JavaScript development. It offers classes, modules, interfaces and type-checking at compile time to help you build robust components.">TypeScript <br>+ Backbone.js</a></li><li><a href="examples/typescript-angular" data-source="https://typescriptlang.org" data-content="An AngularJS + TypeScript implementation of TodoMVC. The only significant difference between this and the vanilla Angular app is that dependency injection is done via annotated constructors, which allows minification of JavaScript.">TypeScript <br>+ AngularJS</a></li><li><a href="examples/typescript-react" data-source="https://typescriptlang.org" data-content="An TypeScript + React implementation of TodoMVC. TypeScript is a language for application-scale JavaScript development. It offers classes, modules, interfaces and type-checking at compile time to help you build robust components. This examples showcases how to work with TSX files, which allow us to enjoy native JSX support while working with TypeScript.">TypeScript <br>+ React</a></li><li class="routing"><a href="examples/reagent" data-source="https://reagent-project.github.io/" data-content="Reagent provides a minimalistic interface between ClojureScript and React.">Reagent</a></li><li class="routing"><a href="examples/scalajs-react" data-source="https://github.com/japgolly/scalajs-react" data-content="Facebook's React on Scala.js.">Scala.js + React</a></li><li class="routing"><a href="examples/binding-scala" data-source="https://github.com/ThoughtWorksInc/Binding.scala" data-content="Binding.scala is a reactive web framework. This TodoMVC application has the tiniest code size among all the TodoMVC implementations.">Scala.js + Binding.scala</a></li><li class="routing"><a href="examples/js_of_ocaml" data-source="https://ocsigen.org/js_of_ocaml/" data-content="Js_of_ocaml is a compiler of OCaml bytecode to Javascript.">js_of_ocaml</a></li><li class="routing"><a href="examples/humble" data-source="https://github.com/go-humble/humble" data-content="Humble is a collection of loosely-coupled tools designed to build client-side and hybrid web applications using GopherJS, which compiles Go code to JavaScript.">Humble + GopherJS</a></li></ul></div><div class="js-app-list" data-app-list="labs"><p class="applist-intro">
These are examples written in JavaScript that
we are still evaluating.
</p><ul class="js-app-list-inner applist js"><li class="routing"><a href="examples/backbone_require" data-source="https://requirejs.org" data-content="RequireJS is a JavaScript file and module loader. It is optimized for in-browser use, but it can be used in other JavaScript environments, like Rhino and Node. Using a modular script loader like RequireJS will improve the speed and quality of your code.">Backbone.js + RequireJS</a></li><li><a href="examples/knockoutjs_require" data-source="https://knockoutjs.com" data-content="This project is an adaptation of /examples/knockoutjs with require.js.">KnockoutJS + RequireJS</a></li><li class="routing"><a href="examples/angularjs_require" data-source="https://angularjs.org" data-content="What HTML would have been had it been designed for web apps. This is an example of using it with AMD modules.">AngularJS + RequireJS</a></li><li class="routing"><a href="examples/canjs_require" data-source="https://canjs.us" data-content="CanJS is a client-side, JavaScript framework that makes building rich web applications easy. The AMD version lets you use the framework in a fully modular fashion and will only what you actually need.">CanJS + RequireJS</a></li><li class="routing"><a href="examples/lavaca_require" data-source="https://getlavaca.com" data-content="A curated collection of tools for building mobile web applications.">Lavaca + RequireJS</a></li><li><a href="examples/cujo/index.html" data-source="https://cujojs.com" data-content="cujoJS is an architectural framework for building highly modular, scalable, maintainable applications in Javascript. It provides architectural plumbing, such as modules (AMD and CommonJS), declarative application composition, declarative connections, and aspect oriented programming.">cujoJS</a></li><li class="routing"><a href="examples/sammyjs" data-source="https://sammyjs.org" data-content="Sammy.js is a tiny JavaScript framework developed to ease the pain and provide a basic structure for developing JavaScript applications.">Sammy.js</a></li><li><a href="examples/somajs" data-source="https://somajs.github.com/somajs" data-content="soma.js is a framework created to build scalable and maintainable javascript applications.">soma.js</a></li><li><a href="examples/duel/www" data-source="https://bitbucket.org/mckamey/duel/wiki/Home" data-content="DUEL is a dual-side templating engine using HTML for layout and 100% pure JavaScript as the binding language. The same views may be executed both directly in the browser (client-side template) and on the server (server-side template).">DUEL</a></li><li class="routing"><a href="examples/kendo" data-source="https://www.kendoui.com/" data-content="Kendo UI is a comprehensive HTML5, JavaScript framework for modern web and mobile app development">Kendo UI</a></li><li><a href="examples/dijon" data-source="https://github.com/creynders/dijon-framework" data-content="Dijon is an IOC and DI micro-framework for Javascript. Originally it was meant to be a port of Robotlegs, but deviated to something quite different. It remains however heavily inspired by Robotlegs, and more specifically Swiftsuspenders.">Dijon</a></li><li class="routing"><a href="examples/enyo_backbone" data-source="https://enyojs.com/" data-content="Enyo is a simple but powerful encapsulation model, which helps you factor application functionality into self-contained building blocks that are easy to reuse and maintain.">Enyo +<br>Backbone.js</a></li><li class="routing"><a href="examples/sapui5" data-source="https://scn.sap.com/community/developer-center/front-end" data-content="SAPUI5 is SAP's HTML5-based UI technology that allows you to build rich, interactive Web applications.">SAPUI5</a></li><li class="routing"><a href="examples/exoskeleton" data-source="https://exosjs.com/" data-content="A faster and leaner Backbone for your HTML5 apps.">Exoskeleton</a></li><li><a href="examples/ractive" data-source="https://ractivejs.org" data-content="Ractive.js is a next-generation DOM manipulation library, optimised for developer sanity.">Ractive.js</a></li><li class="routing"><a href="examples/react-alt" data-source="https://alt.js.org" data-content="This React example integrates Alt for an example of an application following the Flux architecture.">React + Alt</a></li><li><a href="examples/react-backbone" data-source="https://facebook.github.io/react/" data-content="This React example integrates Backbone for its model and router. It is a showcase of third-party library integration for developers wishing to use React together with a different JavaScript framework.">React + <br>Backbone.js</a></li><li><a href="examples/aurelia" data-source="https://aurelia.io/" data-content="Aurelia is a next generation JavaScript client framework that leverages simple conventions to empower your creativity">Aurelia</a></li><li><a href="examples/angular2" data-source="https://angular.io" data-content="Angular is a development platform for building mobile and desktop web applications">Angular 2.0</a></li><li class="routing"><a href="examples/riotjs" data-source="https://riotjs.com/" data-content="Riot.js is a React-like user interface micro-library.">Riot</a></li><li class="routing"><a href="examples/jsblocks" data-source="https://jsblocks.com/" data-content="From simple user interfaces to complex single-page applications using faster, server-side rendered and easy to learn framework.">JSBlocks</a></li></ul></div></iron-pages><ul class="legend"><li><span class="label">R</span> = App also demonstrates routing</li></ul><hr><h2>Real-time</h2><ul class="applist"><li class="routing"><a href="https://todomvc-socketstream.herokuapp.com" data-source="https://www.socketstream.org" data-content="SocketStream is a fast, modular Node.js web framework dedicated to building realtime single-page apps">SocketStream</a></li><li class="routing"><a href="examples/firebase-angular" data-source="https://www.firebase.com" data-content="Firebase is a scalable realtime backend that lets you build apps without managing servers. Firebase persists and updates JSON data in realtime and is best used in combination with a JavaScript MV* framework such as AngularJS or Backbone.">Firebase + AngularJS</a></li></ul><hr><h2>Node.js</h2><ul class="applist"><li><a href="https://gcloud-todos.appspot.com" data-source="https://googlecloudplatform.github.io/gcloud-node/" data-content="An Express backend implementation for the AngularJS front end using Google Cloud Client Library for Node.js.">Express + gcloud-node</a></li></ul><hr><h2>Compare these to a non-framework implementation</h2><ul class="applist"><li class="routing"><a href="examples/vanillajs" data-source="https://developer.mozilla.org/en/JavaScript" data-content="You know JavaScript right? :P">Vanilla JS</a></li><li class="routing"><a href="examples/vanilla-es6" data-source="https://developer.mozilla.org/en/JavaScript" data-content="Just ECMAScript 6 and DOM APIs. Compiled with Google Closure Compiler.">Vanilla ES6</a></li><li class="routing"><a href="examples/jquery" data-source="https://jquery.com" data-content="jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.">jQuery</a></li></ul></div></div><hr><div class="row"><div class="col-md-6 quotes"><blockquote class="quote speech-bubble"><p></p><footer><img width="40" height="40" alt=""><a></a></footer></blockquote></div><div class="col-md-6"><img class="screenshot" src="site-assets/screenshot.png" width="558" height="246" alt="Todo app screenshot"></div></div><hr><div class="row"><div class="col-md-4"><h2>New in 1.3</h2><ul class="whats-new"><li>We now have 64 applications.
<label class="link" for="news-expander">New since 1.3 ▼</label><input type="checkbox" id="news-expander"><ul class="collapsed" id="new-apps"><li><a href="examples/angular-dart/web">AngularDart</a></li><li><a href="examples/atmajs">Atma.js</a></li><li><a href="examples/exoskeleton">Exoskeleton</a></li><li><a href="examples/componentjs">ComponentJS</a></li><li><a href="examples/binding-scala">Binding.scala</a></li></ul></li><li>Updates have been made to apps including Vanilla, Angular, React, Backbone, Ember, jQuery & many more.</li><li>The knockoutjs_classBindingProvider application has been removed.</li></ul></div><div class="col-md-4"><h2>Selecting a Framework</h2><p>Once you've downloaded the latest release and played around with the apps, you'll want to decide on a specific framework to try out.</p><p>Study the syntax required for defining models, views and (where applicable) controllers and classes in the frameworks you're interested in and try your hand at editing the code to see how it feels using it first-hand.</p><p>Please ensure that if you're happy with this, you do spend more time investigating the framework (including reading the official docs, the source and its complete feature list). There's often a lot more to a framework than what we present in our examples.</p></div><div class="col-md-4"><h2>Getting Involved</h2><p>Is there a bug we haven't fixed or an MV* framework you feel would benefit from being included in TodoMVC?</p><p>If so, feel free to fork the repo, read our <a href="https://github.com/tastejs/todomvc/wiki">contribution guidelines</a>, and submit a pull request — we'll be happy to review it for inclusion.</p><p>Make sure you use the <a href="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/tastejs/todomvc-app-template">template</a> as a starting point and read the <a href="https://github.com/tastejs/todomvc/blob/master/app-spec.md">app specification</a>.</p><p><a class="zocial small ltgray" href="https://github.com/tastejs/todomvc/wiki">Submit Pull Request »</a></p></div></div><hr><footer class="credit"><p>Brought to you by
<a href="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/addyosmani"><img src="https://gravatar.com/avatar/96270e4c3e5e9806cf7245475c00b275?s=80" width="40" height="40" alt="Addy Osmani">Addy</a><a href="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/sindresorhus"><img src="https://gravatar.com/avatar/d36a92237c75c5337c17b60d90686bf9.png?s=80" width="40" height="40" alt="Sindre Sorhus">Sindre</a><a href="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/passy"><img src="https://gravatar.com/avatar/be451fcdbf0e5ff07f23ed16cb5c90a3.png?s=80" width="40" height="40" alt="Pascal Hartig">Pascal</a><a href="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/stephenplusplus"><img src="https://gravatar.com/avatar/098cfe2d360e77c3229f2cd5298354c4?s=80" width="40" height="40" alt="Stephen Sawchuk">Stephen</a><a href="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/colineberhardt"><img src="https://gravatar.com/avatar/73bba00b41ff1c9ecc3ee29487bace7d?s=80" width="40" height="40" alt="Colin Eberhardt">Colin</a><a href="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/arthurvr"><img src="https://avatars1.githubusercontent.com/u/6025224?v=3&s=80" width="40" height="40" alt="Arthur Verschaeve">Arthur</a><a href="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/samccone"><img src="https://avatars0.githubusercontent.com/u/883126?v=3&s=80" width="40" height="40" alt="Sam Saccone">Sam</a></p></footer></div><script src="site-assets/main.min.js"></script><script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.async=true;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs)}}(document,"script","twitter-wjs");</script><script>(function(){var po=document.createElement("script");po.type="text/javascript";po.async=true;po.src="https://apis.google.com/js/plusone.js";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(po,s)})();</script><script>var _gaq=[["_setAccount","UA-31081062-1"],["_trackPageview"]];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src="//www.google-analytics.com/ga.js";s.parentNode.insertBefore(g,s)})(document,"script");</script></body></html>