Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: pkg/polymer/lib/src/js/polymer/polymer.js.map

Issue 307793002: update polymer, nodebind, and templatebinding (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.concat.js.map ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 {"version":3,"file":"polymer.js","sources":["../src/polymer.js","../src/boot.js" ,"../src/lib/lang.js","../src/lib/job.js","../src/lib/dom.js","../src/lib/super. js","../src/lib/deserialize.js","../src/api.js","../src/instance/utils.js","../s rc/instance/events.js","../src/instance/attributes.js","../src/instance/properti es.js","../src/instance/mdv.js","../src/instance/base.js","../src/instance/style s.js","../src/declaration/polymer.js","../src/declaration/path.js","../src/decla ration/styles.js","../src/declaration/events.js","../src/declaration/properties. js","../src/declaration/attributes.js","../src/declaration/prototype.js","../src /declaration/queue.js","../src/declaration/import.js","../src/declaration/polyme r-element.js"],"names":["Polymer","window","scope","extend","prototype","api","O bject","getOwnPropertyNames","forEach","n","pd","getOwnPropertyDescriptor","defi neProperty","value","nom","job","callback","wait","stop","Job","this","go","inCo ntext","context","boundComplete","complete","bind","h","setTimeout","handle","cl earTimeout","requestAnimationFrame","cancelAnimationFrame","call","registry","HT MLElement","register","tag","getPrototypeForTag","getPrototypeOf","document","cr eateElement","originalStopPropagation","Event","stopPropagation","cancelBubble", "apply","arguments","$super","arrayOfArgs","caller","_super","nameInThis","conso le","warn","memoizeSuper","fn","nextSuper","proto","name","method","p","__proto_ _","n$","i","l","length","d","super","deserializeValue","currentValue","inferred Type","Date","typeHandlers","string","date","parse","now","boolean","number","pa rseFloat","parseInt","isNaN","object","JSON","replace","e","function","declarati on","instance","publish","apis","utils","async","args","timeout","Platform","flu sh","cancelAsync","fire","type","detail","onNode","bubbles","cancelable","node", "event","CustomEvent","undefined","dispatchEvent","asyncFire","classFollows","an ew","old","className","classList","remove","add","nop","nob","asyncMethod","log" ,"logFlags","EVENT_PREFIX","events","addHostListeners","eventDelegates","keys"," localName","bindable","eventName","self","PolymerExpressions","prepareEventBindi ng","Path","get","resolveEventHandler","model","path","getValueFrom","dispatchMe thod","obj","group","groupEnd","attributes","copyInstanceAttributes","a$","_inst anceAttributes","k","hasAttribute","setAttribute","takeAttributes","_publishLC", "a","attributeToProperty","propertyForAttribute","search","bindPattern","match", "stringValue","serializeValue","reflectPropertyToAttribute","serializedValue","r emoveAttribute","bindProperties","inA","inProperty","observable","LOG_BIND_PROPS ","inB","inPath","v","discardChanges","setValue","Observer","defineComputedPrope rty","properties","observeProperties","_observeNames","pn$","_publishNames","o", "_propertyObserver","CompoundObserver","registerObservers","addPath","observeArr ayValue","observe","open","notifyPropertyChanges","newValues","oldValues","paths ","called","invokeMethod","callbackName","Array","isArray","closeNamedObserver", "observer","ArrayObserver","registerNamedObserver","bindProperty","property","ob servers","_observers","push","closeObservers","closeObserverArray","observerArra y","close","o$","_namedObservers","closeNamedObservers","findEventController","p arentNode","lightDomController","host","syntax","ctlr","mdv","instanceTemplate", "template","dom","createInstance","bindings_","enableBindingsReflection","path_" ,"mixinSuper","asyncUnbindAll","_unbound","unbind","_unbindAllJob","unbindAll"," cancelUnbindAll","mustachePattern","isBase","hasOwnProperty","PolymerBase","base ","created","ready","createdCallback","templateInstance","prepareElement","_elem entPrepared","shadowRoots","parseDeclarations","attachedCallback","attached","en teredView","hasBeenAttached","domReady","detachedCallback","preventDispose","det ached","leftView","enteredViewCallback","leftViewCallback","enteredDocumentCallb ack","leftDocumentCallback","element","parseDeclaration","elementElement","fetch Template","root","shadowFromTemplate","querySelector","createShadowRoot","append Child","shadowRootReady","lightFromTemplate","refNode","insertBefore","marshalNo deReferences","PointerGestures","$","querySelectorAll","id","attributeChangedCal lback","getAttribute","attributeChanged","onMutation","listener","MutationObserv er","mutations","disconnect","childList","subtree","constructor","Base","shimCss Text","cssText","is","selector","ShadowCSS","makeScopeSelector","STYLE_SCOPE_ATT RIBUTE","STYLE_CONTROLLER_SCOPE","styles","installControllerStyles","findStyleSc ope","scopeHasNamedStyle","cssTextForScope","installScopeCssText","installScopeS tyle","style","s","textContent","ShadowDOMPolyfill","cssTextToScopeStyle","apply StyleToScope","_scopeStyles","script","_currentScript","getRegisteredPrototype", "registerPrototype","notifyPrototype","waitingForPrototype","client","waitProtot ype","registerWhenReady","prototypesByName","declarations","deliverDeclarations" ,"resolveElementPaths","urlResolver","resolveDom","addResolvePathApi","assetPath ","URL","ownerDocument","baseURI","resolvePath","urlPath","u","href","importRule ForSheet","sheet","baseUrl","head","clone","createStyleElement","attr","firstEle mentChild","s$","nextElementSibling","cssTextFromSheet","__resource","matchesSel ector","inSelector","matches","STYLE_SELECTOR","STYLE_LOADABLE_MATCH","SHEET_SEL ECTOR","STYLE_GLOBAL_SCOPE","SCOPE_ATTR","loadStyles","content","templateContent ","convertSheetsToStyles","findLoadableStyles","styleResolver","c","copySheetAtt ributes","replaceChild","link","loadables","installSheets","cacheSheets","cacheS tyles","installLocalSheets","installGlobalStyles","sheets","findNodes","removeCh ild","filter","firstChild","matcher","nodes","array","templateNodes","concat","s tyleForScope","scopeDescriptor","webkitMatchesSelector","mozMatchesSelector","pa rseHostEvents","delegates","addAttributeDelegates","hasEventPrefix","removeEvent Prefix","trim","slice","prefixLength","inferObservers","explodeObservers","explo ded","ni","names","split","optimizePropertyMaps","publishProperties","requirePro perties","lowerCaseMap","map","toLowerCase","ATTRIBUTES_ATTRIBUTE","ATTRIBUTES_R EGEX","inheritAttributesObjects","inheritObject","publishAttributes","accumulate InstanceAttributes","clonable","isInstanceAttribute","blackList","extends","nosc ript","assetpath","cache-csstext","ensurePrototypeTraversal","ancestor","extende eName","buildPrototype","publishConstructor","extension","generateBasePrototype" ,"desugarBeforeChaining","chainPrototypes","desugarAfterChaining","inheritMetaDa ta","chained","chainObject","extendee","shimStyling","registerCallback","symbol" ,"ctor","extnds","findBasePrototype","ensureBaseApi","memoizedBases","extended", "create","mixinMethod","source","info","typeExtension","findTypeExtension","regi sterElement","indexOf","inherited","queueForElement","contains","mainQueue","imp ortQueue","nextQueued","whenPolymerReady","queue","waitToReady","CustomElements" ,"HTMLImports","whenImportsReady","addReadyCallback","check","__check","__go","u seNative","readied","shift","nextElement","canReady","isEmpty","upgradeDocumentT ree","readyCallbacks","addEventListener","importElements","elementOrFragment","i mportUrls","urls","url","frag","createDocumentFragment","rel","import","isRegist ered","Boolean","isCustomTag","init","loadResources","registered","waitingForQue ue","waitingForResources","_register","handleNoScript","_needsResources","body"] ,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKAA,WCI8B,kBAAnBC,QAAOD,UAChBA,YCL F,SAAUE,GAGR,QAASC,GAAOC,EAAWC,GAiBzB,MAhBID,IAAaC,GAEfC,OAAOC,oBAAoBF,GAAKG,QAA Q,SAASC,GAE/C,GAAIC,GAAKJ,OAAOK,yBAAyBN,EAAKI,EAC1CC,KAEFJ,OAAOM,eAAeR,EAAWK,EAA GC,GAEb,kBAAZA,GAAGG,QAEZH,EAAGG,MAAMC,IAAML,MAKhBL,EAKTF,EAAMC,OAASA,GAEdH,SC1B H,SAAUE,GA6CR,QAASa,GAAIA,EAAKC,EAAUC,GAO1B,MANIF,GACFA,EAAIG,OAEJH,EAAM,GAAII,G AAIC,MAEhBL,EAAIM,GAAGL,EAAUC,GACVF,EAzCT,GAAII,GAAM,SAASG,GACjBF,KAAKG,QAAUD,EA CfF,KAAKI,cAAgBJ,KAAKK,SAASC,KAAKN,MAE1CD,GAAIf,WACFiB,GAAI,SAASL,EAAUC,GACrBG,K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AK4Y,WAAaqE,EAAaj d,KAAK4Y,UAClD3W,QAAQC,KAAK,sGACuClC,KAAKuC,KACrDvC,KAAK4Y,SAEX5Y,KAAKgB,SAAShB, KAAKuC,KAAMvC,KAAK4Y,SAC9B5Y,KAAKsd,YAAa,GAIpB5K,oBAAqB,SAASnQ,GAC5B,MAAKgQ,GAAu BhQ,GAA5B,QAEEmQ,EAAoBnQ,EAAMvC,MAE1BA,KAAK0d,eAAenb,IAEb,IAIXmb,eAAgB,SAASnb,GA EvB,GAAIvC,KAAKiI,aAAa,cAAgBjI,KAAK6Y,SAQzC,GAPA7Y,KAAK6Y,UAAW,EAOZha,OAAO2c,iBA AmBA,eAAeO,UAC3Cnd,QAAQ2D,OACH,CACL,GAAI8P,GAASjR,SAASC,cAAc,SACpCgR,GAAOL,YAAc, YAAezP,EAAO,MAC3CvC,KAAKyP,YAAY4C,KAKvBmL,oBAAqB,WACnB,MAAOxd,MAAK2d,iBAMdJ,gBAA iB,WACf,MAAOjC,GAAMzb,KAAKG,KAAMA,KAAK6S,kBAAmB7S,KAAKyd,YAGvDJ,cAAe,WACbrd,KAAK 2d,iBAAkB,EACvB3d,KAAKiV,WAAW,WACdjV,KAAK2d,iBAAkB,EACvB3d,KAAK6S,qBACLvS,KAAKN, SASXf,GAAIqF,QAAQrF,EAAImF,YAAapF,GAc7BF,EAAMyT,uBAAyBA,EAI/B8I,EAAiB,WACfja,SAA Swc,KAAK7U,gBAAgB,cAC9B3H,SAASqE,cACP,GAAIF,aAAY,iBAAkBJ,SAAS,OAM/C/D,SAASyZ,gBA AgB,mBAAoB7b,UAAWA,KAEvDJ","sourcesContent":["/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-s tyle\n * license that can be found in the LICENSE file.\n */\nPolymer = {};\n"," /*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICE NSE file.\n */\n\n// TODO(sorvell): this ensures Polymer is an object and not a function\n// Platform is currently defining it as a function to allow for async loading\n// of polymer; once we refine the loading process this likely goes away .\nif (typeof window.Polymer === 'function') {\n Polymer = {};\n}\n\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE fil e.\n */\n(function(scope) {\n\n // copy own properties from 'api' to 'prototype , with name hinting for 'super'\n function extend(prototype, api) {\n if (pr ototype && api) {\n // use only own properties of 'api'\n Object.getOw nPropertyNames(api).forEach(function(n) {\n // acquire property descripto r\n var pd = Object.getOwnPropertyDescriptor(api, n);\n if (pd) {\ n // clone property via descriptor\n Object.defineProperty(pro totype, n, pd);\n // cache name-of-method for 'super' engine\n if (typeof pd.value == 'function') {\n // hint the 'super' engine\n pd.value.nom = n;\n }\n }\n });\n }\n retu rn prototype;\n }\n \n // exports\n\n scope.extend = extend;\n\n})(Polymer); \n","/* \n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in th e LICENSE file.\n */\n\n(function(scope) {\n \n // usage\n \n // invoke cb.c all(this) in 100ms, unless the job is re-registered,\n // which resets the time r\n // \n // this.myJob = this.job(this.myJob, cb, 100)\n //\n // returns a job handle which can be used to re-register a job\n\n var Job = function(inCont ext) {\n this.context = inContext;\n this.boundComplete = this.complete.bi nd(this)\n };\n Job.prototype = {\n go: function(callback, wait) {\n t his.callback = callback;\n var h;\n if (!wait) {\n h = requestA nimationFrame(this.boundComplete);\n this.handle = function() {\n cancelAnimationFrame(h);\n }\n } else {\n h = setTimeout(th is.boundComplete, wait);\n this.handle = function() {\n clearTim eout(h);\n }\n }\n },\n stop: function() {\n if (this.han dle) {\n this.handle();\n this.handle = null;\n }\n },\n complete: function() {\n if (this.handle) {\n this.stop();\n this.callback.call(this.context);\n }\n }\n };\n \n function job(jo b, callback, wait) {\n if (job) {\n job.stop();\n } else {\n job = new Job(this);\n }\n job.go(callback, wait);\n return job;\n }\n \ n // exports \n\n scope.job = job;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is govern ed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(func tion(scope) {\n\n var registry = {};\n\n HTMLElement.register = function(tag, prototype) {\n registry[tag] = prototype;\n }\n\n // get prototype mapped t o node <tag>\n HTMLElement.getPrototypeForTag = function(tag) {\n var protot ype = !tag ? HTMLElement.prototype : registry[tag];\n // TODO(sjmiles): creat ing <tag> is likely to have wasteful side-effects\n return prototype || Objec t.getPrototypeOf(document.createElement(tag));\n };\n\n // we have to flag pro pagation stoppage for the event dispatcher\n var originalStopPropagation = Even t.prototype.stopPropagation;\n Event.prototype.stopPropagation = function() {\n this.cancelBubble = true;\n originalStopPropagation.apply(this, arguments );\n };\n \n // TODO(sorvell): remove when we're sure imports does not need\n // to load stylesheets\n /*\n HTMLImports.importer.preloadSelectors += \n ', polymer-element link[rel=stylesheet]';\n */\n})(Polymer);\n","/*\n * Copy right 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n (function(scope) {\n // super\n\n // `arrayOfArgs` is an optional ar ray of args like one might pass\n // to `Function.apply`\n\n // TODO(sjmil es):\n // $super must be installed on an instance or prototype chain\n // as `super`, and invoked via `this`, e.g.\n // `this.super();`\n\n // will not work if function objects are not unique, for example,\n // when using mixins.\n // The memoization strategy assumes each function exists on only one \n // prototype chain i.e. we use the function object f or memoizing)\n // perhaps we can bookkeep on the prototype itself instead \n function $super(arrayOfArgs) {\n // since we are thunking a method ca ll, performance is important here: \n // memoize all lookups, once memoized the fast path calls no other \n // functions\n //\n // find the caller (cannot be `strict` because of 'caller')\n var caller = $super.calle r;\n // memoized 'name of method' \n var nom = caller.nom;\n // m emoized next implementation prototype\n var _super = caller._super;\n if (!_super) {\n if (!nom) {\n nom = caller.nom = nameInThis.cal l(this, caller);\n }\n if (!nom) {\n console.warn('called super() on a method not installed declaratively (has no .nom property)');\n }\n // super prototype is either cached or we have to find it\n // by searching __proto__ (at the 'top')\n _super = memoizeSuper(caller , nom, getPrototypeOf(this));\n }\n if (!_super) {\n // if _sup er is falsey, there is no super implementation\n //console.warn('called $ super(' + nom + ') where there is no super implementation');\n } else {\n // our super function\n var fn = _super[nom];\n // memoize i nformation so 'fn' can call 'super'\n if (!fn._super) {\n memoiz eSuper(fn, nom, _super);\n }\n // invoke the inherited method\n // if 'fn' is not function valued, this will throw\n return fn.apply (this, arrayOfArgs || []);\n }\n }\n\n function nextSuper(proto, name , caller) {\n // look for an inherited prototype that implements name\n while (proto) {\n if ((proto[name] !== caller) && proto[name]) {\n return proto;\n }\n proto = getPrototypeOf(proto);\n }\n }\n\n function memoizeSuper(method, name, proto) {\n // find and cac he next prototype containing `name`\n // we need the prototype so we can do another lookup\n // from here\n method._super = nextSuper(proto, name , method);\n if (method._super) {\n // _super is a prototype, the ac tual method is _super[name]\n // tag super method with it's name for furt her lookups\n method._super[name].nom = name;\n }\n return meth od._super;\n }\n\n function nameInThis(value) {\n var p = this.__prot o__;\n while (p && p !== HTMLElement.prototype) {\n // TODO(sjmiles) : getOwnPropertyNames is absurdly expensive\n var n$ = Object.getOwnPrope rtyNames(p);\n for (var i=0, l=n$.length, n; i<l && (n=n$[i]); i++) {\n var d = Object.getOwnPropertyDescriptor(p, n);\n if (typeof d.v alue === 'function' && d.value === value) {\n return n;\n }\ n }\n p = p.__proto__;\n }\n }\n\n // NOTE: In some pla tforms (IE10) the prototype chain is faked via \n // __proto__. Therefore, al ways get prototype via __proto__ instead of\n // the more standard Object.get PrototypeOf.\n function getPrototypeOf(prototype) {\n return prototype._ _proto__;\n }\n\n // utility function to precompute name tags for function s\n // in a (unchained) prototype\n function hintSuper(prototype) {\n // tag functions with their prototype name to optimize\n // super call inv ocations\n for (var n in prototype) {\n var pd = Object.getOwnProper tyDescriptor(prototype, n);\n if (pd && typeof pd.value === 'function') { \n pd.value.nom = n;\n }\n }\n }\n\n // exports\n\n scope.super = $super;\n\n})(Polymer);\n","/* \n * Copyright 2013 The Polymer A uthors. All rights reserved.\n * Use of this source code is governed by a BSD-st yle\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n var typeHandlers = {\n string: function(value) {\n return value;\ n },\n date: function(value) {\n return new Date(Date.parse(value) || Date.now());\n },\n boolean: function(value) {\n if (value === '') { \n return true;\n }\n return value === 'false' ? false : !!valu e;\n },\n number: function(value) {\n var n = parseFloat(value);\n // hex values like \"0xFFFF\" parseFloat as 0\n if (n === 0) {\n n = parseInt(value);\n }\n return isNaN(n) ? value : n;\n // this code disabled because encoded values (like \"0xFFFF\")\n // do not round t rip to their original format\n //return (String(floatVal) === value) ? floa tVal : value;\n },\n object: function(value, currentValue) {\n if (cu rrentValue === null) {\n return value;\n }\n try {\n // If the string is an object, we can parse is with the JSON library.\n // i nclude convenience replace for single-quotes. If the author omits\n // qu otes altogether, parse will fail.\n return JSON.parse(value.replace(/'/g, '\"'));\n } catch(e) {\n // The object isn't valid JSON, return the raw value\n return value;\n }\n },\n // avoid deserialization of functions\n 'function': function(value, currentValue) {\n return cur rentValue;\n }\n };\n\n function deserializeValue(value, currentValue) {\n // attempt to infer type from default value\n var inferredType = typeof cu rrentValue;\n // invent 'date' type value for Date\n if (currentValue inst anceof Date) {\n inferredType = 'date';\n }\n // delegate deserializa tion via type string\n return typeHandlers[inferredType](value, currentValue) ;\n }\n\n // exports\n\n scope.deserializeValue = deserializeValue;\n\n})(Pol ymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * U se of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.extend;\n\n // module\n\n var api = {};\n\n api.declaration = {};\n ap i.instance = {};\n\n api.publish = function(apis, prototype) {\n for (var n in apis) {\n extend(prototype, apis[n]);\n }\n }\n\n // exports\n\n s cope.api = api;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. A ll rights reserved.\n * Use of this source code is governed by a BSD-style\n * l icense that can be found in the LICENSE file.\n */\n(function(scope) {\n\n var utils = {\n /**\n * Invokes a function asynchronously. The context of th e callback\n * function is bound to 'this' automatically.\n * @method async\n * @param {Function|String} method\n * @param {any|Array} args\ n * @param {number} timeout\n */\n async: function(method, args, ti meout) {\n // when polyfilling Object.observe, ensure changes \n // pr opagate before executing the async method\n Platform.flush();\n // sec ond argument to `apply` must be an array\n args = (args && args.length) ? a rgs : [args];\n // function to invoke\n var fn = function() {\n (this[method] || method).apply(this, args);\n }.bind(this);\n // exec ute `fn` sooner or later\n var handle = timeout ? setTimeout(fn, timeout) : \n requestAnimationFrame(fn);\n // NOTE: switch on inverting handl e to determine which time is used.\n return timeout ? handle : ~handle;\n },\n cancelAsync: function(handle) {\n if (handle < 0) {\n canc elAnimationFrame(~handle);\n } else {\n clearTimeout(handle);\n }\n },\n /**\n * Fire an event.\n * @method fire\n * @retu rns {Object} event\n * @param {string} type An event name.\n * @param {any} detail\n * @param {Node} onNode Target node.\n */\n fire: fun ction(type, detail, onNode, bubbles, cancelable) {\n var node = onNode || t his;\n var detail = detail || {};\n var event = new CustomEvent(type, {\n bubbles: (bubbles !== undefined ? bubbles : true), \n cancelab le: (cancelable !== undefined ? cancelable : true), \n detail: detail\n });\n node.dispatchEvent(event);\n return event;\n },\n /**\ n * Fire an event asynchronously.\n * @method asyncFire\n * @para m {string} type An event name.\n * @param detail\n * @param {Node} toN ode Target node.\n */\n asyncFire: function(/*inType, inDetail*/) {\n this.async(\"fire\", arguments);\n },\n /**\n * Remove class from old, add class to anew, if they exist\n * @param classFollows\n * @par am anew A node.\n * @param old A node\n * @param className\n */\n classFollows: function(anew, old, className) {\n if (old) {\n ol d.classList.remove(className);\n }\n if (anew) {\n anew.classLi st.add(className);\n }\n }\n };\n\n // no-operation function for handy stubs\n var nop = function() {};\n\n // null-object for handy stubs\n var no b = {};\n\n // deprecated\n\n utils.asyncMethod = utils.async;\n\n // exports \n\n scope.api.instance.utils = utils;\n scope.nop = nop;\n scope.nob = nob;\ n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserv ed.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n va r log = window.logFlags || {};\n var EVENT_PREFIX = 'on-';\n\n // instance eve nts api\n var events = {\n // read-only\n EVENT_PREFIX: EVENT_PREFIX,\n // event listeners on host\n addHostListeners: function() {\n var even ts = this.eventDelegates;\n log.events && (Object.keys(events).length > 0) && console.log('[%s] addHostListeners:', this.localName, events);\n // NOTE : host events look like bindings but really are not;\n // (1) we don't want the attribute to be set and (2) we want to support\n // multiple event lis teners ('host' and 'instance') and Node.bind\n // by default supports 1 thi ng being bound.\n // We do, however, leverage the event hookup code in Poly merExpressions\n // so that we have a common code path for handling declara tive events.\n var self = this, bindable, eventName;\n for (var n in e vents) {\n eventName = EVENT_PREFIX + n;\n bindable = PolymerExpre ssions.prepareEventBinding(\n Path.get(events[n]),\n eventName , \n {\n resolveEventHandler: function(model, path, node) {\ n var fn = path.getValueFrom(self);\n if (fn) {\n return fn.bind(self);\n }\n }\n }\n );\n bindable(this, this, false);\n }\n },\n // call 'm ethod' or function method on 'obj' with 'args', if the method exists\n dispat chMethod: function(obj, method, args) {\n if (obj) {\n log.events && console.group('[%s] dispatch [%s]', obj.localName, method);\n var fn = t ypeof method === 'function' ? method : obj[method];\n if (fn) {\n fn[args ? 'apply' : 'call'](obj, args);\n }\n log.events && cons ole.groupEnd();\n Platform.flush();\n }\n }\n };\n\n // exports \n\n scope.api.instance.events = events;\n\n})(Polymer);\n","/*\r\n * Copyright 2013 The Polymer Authors. All rights reserved.\r\n * Use of this source code is governed by a BSD-style\r\n * license that can be found in the LICENSE file.\r\ n */\r\n(function(scope) {\r\n\r\n // instance api for attributes\r\n\r\n var attributes = {\r\n copyInstanceAttributes: function () {\r\n var a$ = th is._instanceAttributes;\r\n for (var k in a$) {\r\n if (!this.hasAtt ribute(k)) {\r\n this.setAttribute(k, a$[k]);\r\n }\r\n }\r \n },\r\n // for each attribute on this, deserialize value to property as needed\r\n takeAttributes: function() {\r\n // if we have no publish loo kup table, we have no attributes to take\r\n // TODO(sjmiles): ad hoc\r\n if (this._publishLC) {\r\n for (var i=0, a$=this.attributes, l=a$.len gth, a; (a=a$[i]) && i<l; i++) {\r\n this.attributeToProperty(a.name, a .value);\r\n }\r\n }\r\n },\r\n // if attribute 'name' is mapp ed to a property, deserialize\r\n // 'value' into that property\r\n attrib uteToProperty: function(name, value) {\r\n // try to match this attribute t o a property (attributes are\r\n // all lower-case, so this is case-insensi tive search)\r\n var name = this.propertyForAttribute(name);\r\n if (n ame) {\r\n // filter out 'mustached' values, these are to be\r\n / / replaced with bound-data and are not yet values\r\n // themselves\r\n if (value && value.search(scope.bindPattern) >= 0) {\r\n return;\ r\n }\r\n // get original value\r\n var currentValue = this [name];\r\n // deserialize Boolean or Number values from attribute\r\n var value = this.deserializeValue(value, currentValue);\r\n // only act if the value has changed\r\n if (value !== currentValue) {\r\n // install new value (has side-effects)\r\n this[name] = value;\r\n }\r\n }\r\n },\r\n // return the published property matching n ame, or undefined\r\n propertyForAttribute: function(name) {\r\n var mat ch = this._publishLC && this._publishLC[name];\r\n //console.log('propertyF orAttribute:', name, 'matches', match);\r\n return match;\r\n },\r\n // convert representation of 'stringValue' based on type of 'currentValue'\r\n deserializeValue: function(stringValue, currentValue) {\r\n return scope. deserializeValue(stringValue, currentValue);\r\n },\r\n serializeValue: fu nction(value, inferredType) {\r\n if (inferredType === 'boolean') {\r\n return value ? '' : undefined;\r\n } else if (inferredType !== 'object' && inferredType !== 'function'\r\n && value !== undefined) {\r\n return value;\r\n }\r\n },\r\n reflectPropertyToAttribute: function (name) {\r\n var inferredType = typeof this[name];\r\n // try to intel ligently serialize property value\r\n var serializedValue = this.serializeV alue(this[name], inferredType);\r\n // boolean properties must reflect as b oolean attributes\r\n if (serializedValue !== undefined) {\r\n this. setAttribute(name, serializedValue);\r\n // TODO(sorvell): we should remo ve attr for all properties\r\n // that have undefined serialization; howe ver, we will need to\r\n // refine the attr reflection system to achieve this; pica, for example,\r\n // relies on having inferredType object prop erties not removed as\r\n // attrs.\r\n } else if (inferredType === 'boolean') {\r\n this.removeAttribute(name);\r\n }\r\n }\r\n };\ r\n\r\n // exports\r\n\r\n scope.api.instance.attributes = attributes;\r\n\r\n })(Polymer);\r\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserve d.\n * Use of this source code is governed by a BSD-style\n * license that can b e found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var l og = window.logFlags || {};\n\n // magic words\n\n var OBSERVE_SUFFIX = 'Chang ed';\n\n // element api\n\n var empty = [];\n\n var properties = {\n obser veProperties: function() {\n var n$ = this._observeNames, pn$ = this._publi shNames;\n if ((n$ && n$.length) || (pn$ && pn$.length)) {\n var sel f = this;\n var o = this._propertyObserver = new CompoundObserver();\n // keep track of property observer so we can shut it down\n this.reg isterObservers([o]);\n for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n o.addPath(this, n);\n // observer array properties\n var pd = Object.getOwnPropertyDescriptor(this.__proto__, n);\n if (pd && pd.value) {\n this.observeArrayValue(n, pd.value, null);\n }\n }\n for (var i=0, l=pn$.length, n; (i<l) && (n=pn$[i ]); i++) {\n if (!this.observe || (this.observe[n] === undefined)) {\n o.addPath(this, n);\n }\n }\n o.open(this.noti fyPropertyChanges, this);\n }\n },\n notifyPropertyChanges: function( newValues, oldValues, paths) {\n var name, method, called = {};\n for (var i in oldValues) {\n // note: paths is of form [object, path, object, path]\n name = paths[2 * i + 1];\n if (this.publish[name] !== und efined) {\n this.reflectPropertyToAttribute(name);\n }\n method = this.observe[name];\n if (method) {\n this.observeArray Value(name, newValues[i], oldValues[i]);\n if (!called[method]) {\n called[method] = true;\n // observes the value if it is an ar ray\n this.invokeMethod(method, [oldValues[i], newValues[i], argument s]);\n }\n }\n }\n },\n observeArrayValue: function(n ame, value, old) {\n // we only care if there are registered side-effects\n var callbackName = this.observe[name];\n if (callbackName) {\n // if we are observing the previous value, stop\n if (Array.isArray(old) ) {\n log.observe && console.log('[%s] observeArrayValue: unregister ob server [%s]', this.localName, name);\n this.closeNamedObserver(name + ' __array');\n }\n // if the new value is an array, being observing it\n if (Array.isArray(value)) {\n log.observe && console.log('[ %s] observeArrayValue: register observer [%s]', this.localName, name, value);\n var observer = new ArrayObserver(value);\n observer.open(funct ion(value, old) {\n this.invokeMethod(callbackName, [old]);\n }, this);\n this.registerNamedObserver(name + '__array', observer);\n }\n }\n },\n bindProperty: function(property, observable) {\n // apply Polymer two-way reference binding\n return bindProperties(th is, property, observable);\n },\n invokeMethod: function(method, args) {\n var fn = this[method] || method;\n if (typeof fn === 'function') {\n fn.apply(this, args);\n }\n },\n registerObservers: function(o bservers) {\n this._observers.push(observers);\n },\n // observer arr ay items are arrays of observers.\n closeObservers: function() {\n for ( var i=0, l=this._observers.length; i<l; i++) {\n this.closeObserverArray( this._observers[i]);\n }\n this._observers = [];\n },\n closeObs erverArray: function(observerArray) {\n for (var i=0, l=observerArray.lengt h, o; i<l; i++) {\n o = observerArray[i];\n if (o && o.close) {\n o.close();\n }\n }\n },\n // bookkeeping observers fo r memory management\n registerNamedObserver: function(name, observer) {\n var o$ = this._namedObservers || (this._namedObservers = {});\n o$[name] = observer;\n },\n closeNamedObserver: function(name) {\n var o$ = th is._namedObservers;\n if (o$ && o$[name]) {\n o$[name].close();\n o$[name] = null;\n return true;\n }\n },\n closeNamedObse rvers: function() {\n if (this._namedObservers) {\n var keys=Object. keys(this._namedObservers);\n for (var i=0, l=keys.length, k, o; (i < l) && (k=keys[i]); i++) {\n o = this._namedObservers[k];\n o.clos e();\n }\n this._namedObservers = {};\n }\n }\n };\n\n / / property binding\n // bind a property in A to a path in B by converting A[pro perty] to a\n // getter/setter pair that accesses B[...path...]\n function bin dProperties(inA, inProperty, observable) {\n log.bind && console.log(LOG_BIND _PROPS, inB.localName || 'object', inPath, inA.localName, inProperty);\n // c apture A's value if B's value is null or undefined,\n // otherwise use B's va lue\n // TODO(sorvell): need to review, can do with ObserverTransform\n va r v = observable.discardChanges();\n if (v === null || v === undefined) {\n observable.setValue(inA[inProperty]);\n }\n return Observer.defineComp utedProperty(inA, inProperty, observable);\n }\n\n // logging\n var LOG_OBSER VE = '[%s] watching [%s]';\n var LOG_OBSERVED = '[%s#%s] watch: [%s] now [%s] w as [%s]';\n var LOG_CHANGED = '[%s#%s] propertyChanged: [%s] now [%s] was [%s]' ;\n var LOG_BIND_PROPS = \"[%s]: bindProperties: [%s] to [%s].[%s]\";\n\n // e xports\n\n scope.api.instance.properties = properties;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this sour ce code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.logFlags || 0;\n var events = scope.api.instance.events;\n\n var syntax = new PolymerExpr essions();\n syntax.resolveEventHandler = function(model, path, node) {\n va r ctlr = findEventController(node);\n if (ctlr) {\n var fn = path.getVal ueFrom(ctlr);\n if (fn) {\n return fn.bind(ctlr);\n }\n }\n }\n\n // An event controller is the host element for the shadowRoot in which \ n // the node exists, or the first ancestor with a 'lightDomController'\n // p roperty.\n function findEventController(node) {\n while (node.parentNode) {\ n if (node.lightDomController) {\n return node;\n }\n node = node.parentNode;\n }\n return node.host;\n };\n\n // element api supp orting mdv\n\n var mdv = {\n syntax: syntax,\n instanceTemplate: function (template) {\n var dom = template.createInstance(this, this.syntax);\n this.registerObservers(dom.bindings_);\n return dom;\n },\n bind: fu nction(name, observable, oneTime) {\n var property = this.propertyForAttrib ute(name);\n if (!property) {\n // TODO(sjmiles): this mixin method must use the special form\n // of `super` installed by `mixinMethod` in d eclaration/prototype.js\n return this.mixinSuper(arguments);\n } els e {\n // use n-way Polymer binding\n var observer = this.bindPrope rty(property, observable);\n this.reflectPropertyToAttribute(property);\n // NOTE: reflecting binding information is typically required only for\n // tooling. It has a performance cost so it's opt-in in Node.bind.\n if (Platform.enableBindingsReflection) {\n observer.path = observab le.path_;\n this.bindings_ = this.bindings_ || {};\n this.bind ings_[name] = observer;\n }\n return observer;\n }\n },\n // TODO(sorvell): unbind/unbindAll has been removed, as public api, from\n // TemplateBinding. We still need to close/dispose of observers but perhaps\n // we should choose a more explicit name.\n asyncUnbindAll: function() {\n if (!this._unbound) {\n log.unbind && console.log('[%s] asyncUnbindA ll', this.localName);\n this._unbindAllJob = this.job(this._unbindAllJob, this.unbindAll, 0);\n }\n },\n unbindAll: function() {\n if (!t his._unbound) {\n this.closeObservers();\n this.closeNamedObserver s();\n this._unbound = true;\n }\n },\n cancelUnbindAll: funct ion() {\n if (this._unbound) {\n log.unbind && console.warn('[%s] al ready unbound, cannot cancel unbindAll', this.localName);\n return;\n }\n log.unbind && console.log('[%s] cancelUnbindAll', this.localName);\n if (this._unbindAllJob) {\n this._unbindAllJob = this._unbindAllJob. stop();\n }\n }\n };\n\n function unbindNodeTree(node) {\n forNodeT ree(node, _nodeUnbindAll);\n }\n\n function _nodeUnbindAll(node) {\n node.u nbindAll();\n }\n\n function forNodeTree(node, callback) {\n if (node) {\n callback(node);\n for (var child = node.firstChild; child; child = chi ld.nextSibling) {\n forNodeTree(child, callback);\n }\n }\n }\n\ n var mustachePattern = /\\{\\{([^{}]*)}}/;\n\n // exports\n\n scope.bindPatt ern = mustachePattern;\n scope.api.instance.mdv = mdv;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this sour ce code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n var base = {\n PolymerBase: true,\n jo b: function(job, callback, wait) {\n if (typeof job === 'string') {\n var n = '___' + job;\n this[n] = Polymer.job.call(this, this[n], callba ck, wait);\n } else {\n return Polymer.job.call(this, job, callback, wait);\n }\n },\n super: Polymer.super,\n // user entry point for element has had its createdCallback called\n created: function() {\n },\n // user entry point for element has shadowRoot and is ready for\n // api interaction\n ready: function() {\n },\n createdCallback: function() {\ n if (this.templateInstance && this.templateInstance.model) {\n cons ole.warn('Attributes on ' + this.localName + ' were data bound ' +\n 'prior to Polymer upgrading the element. This may result in ' +\n 'in correct binding types.');\n }\n this.created();\n this.prepareEle ment();\n },\n // system entry point, do not override\n prepareElement: function() {\n this._elementPrepared = true;\n // install shadowRoots storage\n this.shadowRoots = {};\n // storage for closeable observers .\n this._observers = [];\n // install property observers\n this. observeProperties();\n // install boilerplate attributes\n this.copyIn stanceAttributes();\n // process input attributes\n this.takeAttribute s();\n // add event listeners\n this.addHostListeners();\n // pro cess declarative resources\n this.parseDeclarations(this.__proto__);\n // TODO(sorvell): CE polyfill uses unresolved attribute to simulate\n // : unresolved; remove this attribute to be compatible with native\n // CE.\n this.removeAttribute('unresolved');\n // user entry point\n this.r eady();\n },\n attachedCallback: function() {\n this.cancelUnbindAll( );\n // invoke user action\n if (this.attached) {\n this.attach ed();\n }\n // TODO(sorvell): bc\n if (this.enteredView) {\n this.enteredView();\n }\n // NOTE: domReady can be used to access e lements in dom (descendants, \n // ancestors, siblings) such that the devel oper is enured to upgrade\n // ordering. If the element definitions have lo aded, domReady\n // can be used to access upgraded elements.\n if (!th is.hasBeenAttached) {\n this.hasBeenAttached = true;\n if (this.do mReady) {\n this.async('domReady');\n }\n }\n },\n de tachedCallback: function() {\n if (!this.preventDispose) {\n this.as yncUnbindAll();\n }\n // invoke user action\n if (this.detached) {\n this.detached();\n }\n // TODO(sorvell): bc\n if (this .leftView) {\n this.leftView();\n }\n },\n // TODO(sorvell): b c\n enteredViewCallback: function() {\n this.attachedCallback();\n }, \n // TODO(sorvell): bc\n leftViewCallback: function() {\n this.detac hedCallback();\n },\n // TODO(sorvell): bc\n enteredDocumentCallback: f unction() {\n this.attachedCallback();\n },\n // TODO(sorvell): bc\n leftDocumentCallback: function() {\n this.detachedCallback();\n },\n // recursive ancestral <element> initialization, oldest first\n parseDecla rations: function(p) {\n if (p && p.element) {\n this.parseDeclarati ons(p.__proto__);\n p.parseDeclaration.call(this, p.element);\n }\n },\n // parse input <element> as needed, override for custom behavior\n parseDeclaration: function(elementElement) {\n var template = this.fetchTe mplate(elementElement);\n if (template) {\n var root = this.shadowFr omTemplate(template);\n this.shadowRoots[elementElement.name] = root;\n }\n },\n // return a shadow-root template (if desired), override for c ustom behavior\n fetchTemplate: function(elementElement) {\n return elem entElement.querySelector('template');\n },\n // utility function that crea tes a shadow root from a <template>\n shadowFromTemplate: function(template) {\n if (template) {\n // make a shadow root\n var root = this .createShadowRoot();\n // stamp template\n // which includes parsi ng and applying MDV bindings before being \n // inserted (to avoid {{}} i n attribute values)\n // e.g. to prevent <img src=\"images/{{icon}}\"> fr om generating a 404.\n var dom = this.instanceTemplate(template);\n // append to shadow dom\n root.appendChild(dom);\n // perform po st-construction initialization tasks on shadow root\n this.shadowRootRead y(root, template);\n // return the created shadow root\n return ro ot;\n }\n },\n // utility function that stamps a <template> into ligh t-dom\n lightFromTemplate: function(template, refNode) {\n if (template) {\n // TODO(sorvell): mark this element as a lightDOMController so that\ n // event listeners on bound nodes inside it will be called on it.\n // Note, the expectation here is that events on all descendants \n // should be handled by this element.\n this.lightDomController = true;\n // stamp template\n // which includes parsing and applying MDV bind ings before being \n // inserted (to avoid {{}} in attribute values)\n // e.g. to prevent <img src=\"images/{{icon}}\"> from generating a 404.\n var dom = this.instanceTemplate(template);\n // append to shadow do m\n if (refNode) {\n this.insertBefore(dom, refNode); \ n } else {\n this.appendChild(dom);\n }\n // perfo rm post-construction initialization tasks on ahem, light root\n this.shad owRootReady(this);\n // return the created shadow root\n return do m;\n }\n },\n shadowRootReady: function(root) {\n // locate node s with id and store references to them in this.$ hash\n this.marshalNodeRef erences(root);\n // set up pointer gestures\n PointerGestures.register (root);\n },\n // locate nodes with id and store references to them in thi s.$ hash\n marshalNodeReferences: function(root) {\n // establish $ inst ance variable\n var $ = this.$ = this.$ || {};\n // populate $ from no des with ID from the LOCAL tree\n if (root) {\n var n$ = root.queryS electorAll(\"[id]\");\n for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n $[n.id] = n;\n };\n }\n },\n attributeChang edCallback: function(name, oldValue) {\n // TODO(sjmiles): adhoc filter\n if (name !== 'class' && name !== 'style') {\n this.attributeToPropert y(name, this.getAttribute(name));\n }\n if (this.attributeChanged) {\n this.attributeChanged.apply(this, arguments);\n }\n },\n onMu tation: function(node, listener) {\n var observer = new MutationObserver(fu nction(mutations) {\n listener.call(this, observer, mutations);\n observer.disconnect();\n }.bind(this));\n observer.observe(node, {chil dList: true, subtree: true});\n }\n };\n\n // true if object has own Polyme rBase api\n function isBase(object) {\n return object.hasOwnProperty('Polyme rBase') \n }\n\n // name a base constructor for dev tools\n\n function Polyme rBase() {};\n PolymerBase.prototype = base;\n base.constructor = PolymerBase;\ n \n // exports\n\n scope.Base = PolymerBase;\n scope.isBase = isBase;\n sc ope.api.instance.base = base;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Po lymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(sc ope) {\n\n // imports\n\n var log = window.logFlags || {};\n \n // magic wor ds\n \n var STYLE_SCOPE_ATTRIBUTE = 'element';\n var STYLE_CONTROLLER_SCOPE = 'controller';\n \n var styles = {\n STYLE_SCOPE_ATTRIBUTE: STYLE_SCOPE_ATT RIBUTE,\n /**\n * Installs external stylesheets and <style> elements with the attribute \n * polymer-scope='controller' into the scope of element. Th is is intended\n * to be a called during custom element construction.\n * /\n installControllerStyles: function() {\n // apply controller styles, but only if they are not yet applied\n var scope = this.findStyleScope();\n if (scope && !this.scopeHasNamedStyle(scope, this.localName)) {\n / / allow inherited controller styles\n var proto = getPrototypeOf(this), c ssText = '';\n while (proto && proto.element) {\n cssText += pro to.element.cssTextForScope(STYLE_CONTROLLER_SCOPE);\n proto = getProtot ypeOf(proto);\n }\n if (cssText) {\n this.installScopeCss Text(cssText, scope);\n }\n }\n },\n installScopeStyle: functi on(style, name, scope) {\n var scope = scope || this.findStyleScope(), name = name || '';\n if (scope && !this.scopeHasNamedStyle(scope, this.localNam e + name)) {\n var cssText = '';\n if (style instanceof Array) {\n for (var i=0, l=style.length, s; (i<l) && (s=style[i]); i++) {\n cssText += s.textContent + '\\n\\n';\n }\n } else {\n cssText = style.textContent;\n }\n this.installScopeCssText(c ssText, scope, name);\n }\n },\n installScopeCssText: function(cssTex t, scope, name) {\n scope = scope || this.findStyleScope();\n name = n ame || '';\n if (!scope) {\n return;\n }\n if (window.Shad owDOMPolyfill) {\n cssText = shimCssText(cssText, scope.host);\n }\n var style = this.element.cssTextToScopeStyle(cssText,\n STYLE_CON TROLLER_SCOPE);\n Polymer.applyStyleToScope(style, scope);\n // cache that this style has been applied\n scope._scopeStyles[this.localName + name ] = true;\n },\n findStyleScope: function(node) {\n // find the shado w root that contains this element\n var n = node || this;\n while (n.p arentNode) {\n n = n.parentNode;\n }\n return n;\n },\n s copeHasNamedStyle: function(scope, name) {\n scope._scopeStyles = scope._sc opeStyles || {};\n return scope._scopeStyles[name];\n }\n };\n \n // NOTE: use raw prototype traversal so that we ensure correct traversal\n // on p latforms where the protoype chain is simulated via __proto__ (IE10)\n function getPrototypeOf(prototype) {\n return prototype.__proto__;\n }\n\n function shimCssText(cssText, host) {\n var name = '', is = false;\n if (host) {\n name = host.localName;\n is = host.hasAttribute('is');\n }\n var selector = Platform.ShadowCSS.makeScopeSelector(name, is);\n return Platform .ShadowCSS.shimCssText(cssText, selector);\n }\n\n // exports\n\n scope.api.i nstance.styles = styles;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD- style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.extend;\n var api = scope.api;\n\n / / imperative implementation: Polymer()\n\n // specify an 'own' prototype for ta g `name`\n function element(name, prototype) {\n if (arguments.length === 1 && typeof arguments[0] !== 'string') {\n prototype = name;\n var scrip t = document._currentScript;\n name = script && script.parentNode && script .parentNode.getAttribute ?\n script.parentNode.getAttribute('name') : ' ';\n if (!name) {\n throw 'Element name could not be inferred.';\n }\n }\n if (getRegisteredPrototype[name]) {\n throw 'Already regi stered (Polymer) prototype for element ' + name;\n }\n // cache the protot ype\n registerPrototype(name, prototype);\n // notify the registrar waitin g for 'name', if any\n notifyPrototype(name);\n }\n\n // async prototype so urce\n\n function waitingForPrototype(name, client) {\n waitPrototype[name] = client;\n }\n\n var waitPrototype = {};\n\n function notifyPrototype(name) {\n if (waitPrototype[name]) {\n waitPrototype[name].registerWhenReady() ;\n delete waitPrototype[name];\n }\n }\n\n // utility and bookkeeping \n\n // maps tag names to prototypes, as registered with\n // Polymer. Prototy pes associated with a tag name\n // using document.registerElement are availabl e from\n // HTMLElement.getPrototypeForTag().\n // If an element was fully reg istered by Polymer, then\n // Polymer.getRegisteredPrototype(name) === \n // HTMLElement.getPrototypeForTag(name)\n\n var prototypesByName = {};\n\n funct ion registerPrototype(name, prototype) {\n return prototypesByName[name] = pr ototype || {};\n }\n\n function getRegisteredPrototype(name) {\n return pro totypesByName[name];\n }\n\n // exports\n\n scope.getRegisteredPrototype = ge tRegisteredPrototype;\n scope.waitingForPrototype = waitingForPrototype;\n\n / / namespace shenanigans so we can expose our scope on the registration \n // fu nction\n\n // make window.Polymer reference `element()`\n\n window.Polymer = e lement;\n\n // TODO(sjmiles): find a way to do this that is less terrible\n // copy window.Polymer properties onto `element()`\n\n extend(Polymer, scope);\n\ n // Under the HTMLImports polyfill, scripts in the main document\n // do not block on imports; we want to allow calls to Polymer in the main\n // document. Platform collects those calls until we can process them, which\n // we do here. \n\n var declarations = Platform.deliverDeclarations();\n if (declarations) {\ n for (var i=0, l=declarations.length, d; (i<l) && (d=declarations[i]); i++) {\n element.apply(null, d);\n }\n }\n\n})(Polymer);\n","/* \n * Copyrig ht 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */ \n\n(function(scope) {\n\nvar path = {\n resolveElementPaths: function(node) {\ n Platform.urlResolver.resolveDom(node);\n },\n addResolvePathApi: function () {\n // let assetpath attribute modify the resolve path\n var assetPath = this.getAttribute('assetpath') || '';\n var root = new URL(assetPath, this. ownerDocument.baseURI);\n this.prototype.resolvePath = function(urlPath, base ) {\n var u = new URL(urlPath, base || root);\n return u.href;\n }; \n }\n};\n\n// exports\nscope.api.declaration.path = path;\n\n})(Polymer);\n"," /*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICE NSE file.\n */\n(function(scope) {\n\n // imports\n\n var log = window.logFlag s || {};\n var api = scope.api.instance.styles;\n var STYLE_SCOPE_ATTRIBUTE = api.STYLE_SCOPE_ATTRIBUTE;\n\n // magic words\n\n var STYLE_SELECTOR = 'style' ;\n var STYLE_LOADABLE_MATCH = '@import';\n var SHEET_SELECTOR = 'link[rel=sty lesheet]';\n var STYLE_GLOBAL_SCOPE = 'global';\n var SCOPE_ATTR = 'polymer-sc ope';\n\n var styles = {\n // returns true if resources are loading\n loa dStyles: function(callback) {\n var content = this.templateContent();\n if (content) {\n this.convertSheetsToStyles(content);\n }\n v ar styles = this.findLoadableStyles(content);\n if (styles.length) {\n Platform.styleResolver.loadStyles(styles, callback);\n } else if (callba ck) {\n callback();\n }\n },\n convertSheetsToStyles: function (root) {\n var s$ = root.querySelectorAll(SHEET_SELECTOR);\n for (var i=0, l=s$.length, s, c; (i<l) && (s=s$[i]); i++) {\n c = createStyleEleme nt(importRuleForSheet(s, this.ownerDocument.baseURI),\n this.ownerDoc ument);\n this.copySheetAttributes(c, s);\n s.parentNode.replaceCh ild(c, s);\n }\n },\n copySheetAttributes: function(style, link) {\n for (var i=0, a$=link.attributes, l=a$.length, a; (a=a$[i]) && i<l; i++) {\ n if (a.name !== 'rel' && a.name !== 'href') {\n style.setAttrib ute(a.name, a.value);\n }\n }\n },\n findLoadableStyles: funct ion(root) {\n var loadables = [];\n if (root) {\n var s$ = root .querySelectorAll(STYLE_SELECTOR);\n for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]); i++) {\n if (s.textContent.match(STYLE_LOADABLE_MATCH)) { \n loadables.push(s);\n }\n }\n }\n return loadables;\n },\n /**\n * Install external stylesheets loaded in <poly mer-element> elements into the \n * element's template.\n * @param eleme ntElement The <element> element to style.\n */\n installSheets: function( ) {\n this.cacheSheets();\n this.cacheStyles();\n this.installLoc alSheets();\n this.installGlobalStyles();\n },\n /**\n * Remove a ll sheets from element and store for later use.\n */\n cacheSheets: funct ion() {\n this.sheets = this.findNodes(SHEET_SELECTOR);\n this.sheets. forEach(function(s) {\n if (s.parentNode) {\n s.parentNode.remov eChild(s);\n }\n });\n },\n cacheStyles: function() {\n t his.styles = this.findNodes(STYLE_SELECTOR + '[' + SCOPE_ATTR + ']');\n thi s.styles.forEach(function(s) {\n if (s.parentNode) {\n s.parentN ode.removeChild(s);\n }\n });\n },\n /**\n * Takes externa l stylesheets loaded in an <element> element and moves\n * their content int o a <style> element inside the <element>'s template.\n * The sheet is then r emoved from the <element>. This is done only so \n * that if the element is loaded in the main document, the sheet does\n * not become active.\n * N ote, ignores sheets with the attribute 'polymer-scope'.\n * @param elementEl ement The <element> element to style.\n */\n installLocalSheets: function () {\n var sheets = this.sheets.filter(function(s) {\n return !s.ha sAttribute(SCOPE_ATTR);\n });\n var content = this.templateContent();\ n if (content) {\n var cssText = '';\n sheets.forEach(functio n(sheet) {\n cssText += cssTextFromSheet(sheet) + '\\n';\n });\n if (cssText) {\n var style = createStyleElement(cssText, this.o wnerDocument);\n content.insertBefore(style, content.firstChild);\n }\n }\n },\n findNodes: function(selector, matcher) {\n var nodes = this.querySelectorAll(selector).array();\n var content = this.templ ateContent();\n if (content) {\n var templateNodes = content.querySe lectorAll(selector).array();\n nodes = nodes.concat(templateNodes);\n }\n return matcher ? nodes.filter(matcher) : nodes;\n },\n template Content: function() {\n var template = this.querySelector('template');\n return template && templateContent(template);\n },\n /**\n * Promot es external stylesheets and <style> elements with the attribute \n * polymer -scope='global' into global scope.\n * This is particularly useful for defin ing @keyframe rules which \n * currently do not function in scoped or shadow style elements.\n * (See wkb.ug/72462)\n * @param elementElement The <e lement> element to style.\n */\n // TODO(sorvell): remove when wkb.ug/7246 2 is addressed.\n installGlobalStyles: function() {\n var style = this.s tyleForScope(STYLE_GLOBAL_SCOPE);\n applyStyleToScope(style, document.head) ;\n },\n cssTextForScope: function(scopeDescriptor) {\n var cssText = '';\n // handle stylesheets\n var selector = '[' + SCOPE_ATTR + '=' + scopeDescriptor + ']';\n var matcher = function(s) {\n return match esSelector(s, selector);\n };\n var sheets = this.sheets.filter(matche r);\n sheets.forEach(function(sheet) {\n cssText += cssTextFromSheet (sheet) + '\\n\\n';\n });\n // handle cached style elements\n var styles = this.styles.filter(matcher);\n styles.forEach(function(style) {\n cssText += style.textContent + '\\n\\n';\n });\n return cssTex t;\n },\n styleForScope: function(scopeDescriptor) {\n var cssText = this.cssTextForScope(scopeDescriptor);\n return this.cssTextToScopeStyle(cs sText, scopeDescriptor);\n },\n cssTextToScopeStyle: function(cssText, sco peDescriptor) {\n if (cssText) {\n var style = createStyleElement(cs sText);\n style.setAttribute(STYLE_SCOPE_ATTRIBUTE, this.getAttribute('na me') +\n '-' + scopeDescriptor);\n return style;\n }\n }\n };\n\n function importRuleForSheet(sheet, baseUrl) {\n var href = new URL(sheet.getAttribute('href'), baseUrl).href;\n return '@import \\'' + href + '\\';';\n }\n\n function applyStyleToScope(style, scope) {\n if (style) { \n if (scope === document) {\n scope = document.head;\n }\n if (window.ShadowDOMPolyfill) {\n scope = document.head;\n }\n // TODO(sorvell): necessary for IE\n // see https://connect.microsoft.com /IE/feedback/details/790212/\n // cloning-a-style-element-and-adding-to-doc ument-produces\n // -unexpected-result#details\n // var clone = style. cloneNode(true);\n var clone = createStyleElement(style.textContent);\n var attr = style.getAttribute(STYLE_SCOPE_ATTRIBUTE);\n if (attr) {\n clone.setAttribute(STYLE_SCOPE_ATTRIBUTE, attr);\n }\n // TODO(sor vell): probably too brittle; try to figure out \n // where to put the eleme nt.\n var refNode = scope.firstElementChild;\n if (scope === document. head) {\n var selector = 'style[' + STYLE_SCOPE_ATTRIBUTE + ']';\n var s$ = document.head.querySelectorAll(selector);\n if (s$.length) {\n refNode = s$[s$.length-1].nextElementSibling;\n }\n }\n scope.insertBefore(clone, refNode);\n }\n }\n\n function createStyleEleme nt(cssText, scope) {\n scope = scope || document;\n scope = scope.createEl ement ? scope : scope.ownerDocument;\n var style = scope.createElement('style ');\n style.textContent = cssText;\n return style;\n }\n\n function cssT extFromSheet(sheet) {\n return (sheet && sheet.__resource) || '';\n }\n\n f unction matchesSelector(node, inSelector) {\n if (matches) {\n return ma tches.call(node, inSelector);\n }\n }\n var p = HTMLElement.prototype;\n v ar matches = p.matches || p.matchesSelector || p.webkitMatchesSelector \n | | p.mozMatchesSelector;\n \n // exports\n\n scope.api.declaration.styles = st yles;\n scope.applyStyleToScope = applyStyleToScope;\n \n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this sour ce code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n\n(function(scope) {\n\n // imports\n\n var log = window.logFlags || {};\n var api = scope.api.instance.events;\n var EVENT_PREFIX = api.EVENT_P REFIX;\n // polymer-element declarative api: events feature\n\n var events = { \n parseHostEvents: function() {\n // our delegates map\n var dele gates = this.prototype.eventDelegates;\n // extract data from attributes in to delegates\n this.addAttributeDelegates(delegates);\n },\n addAttri buteDelegates: function(delegates) {\n // for each attribute\n for (va r i=0, a; a=this.attributes[i]; i++) {\n // does it have magic marker ide ntifying it as an event delegate?\n if (this.hasEventPrefix(a.name)) {\n // if so, add the info to delegates\n delegates[this.removeEve ntPrefix(a.name)] = a.value.replace('{{', '')\n .replace('}}', ''). trim();\n }\n }\n },\n // starts with 'on-'\n hasEventPrefi x: function (n) {\n return n && (n[0] === 'o') && (n[1] === 'n') && (n[2] = == '-');\n },\n removeEventPrefix: function(n) {\n return n.slice(pre fixLength);\n }\n };\n\n var prefixLength = EVENT_PREFIX.length;\n\n // ex ports\n scope.api.declaration.events = events;\n\n})(Polymer);","/*\r\n * Copyr ight 2013 The Polymer Authors. All rights reserved.\r\n * Use of this source cod e is governed by a BSD-style\r\n * license that can be found in the LICENSE file .\r\n */\r\n(function(scope) {\r\n\r\n // element api\r\n\r\n var properties = {\r\n inferObservers: function(prototype) {\r\n // called before protot ype.observe is chained to inherited object\r\n var observe = prototype.obse rve, property;\r\n for (var n in prototype) {\r\n if (n.slice(-7) == = 'Changed') {\r\n if (!observe) {\r\n observe = (prototype .observe = {});\r\n }\r\n property = n.slice(0, -7)\r\n observe[property] = observe[property] || n;\r\n }\r\n }\r\n }, \r\n explodeObservers: function(prototype) {\r\n // called before protot ype.observe is chained to inherited object\r\n var o = prototype.observe;\r \n if (o) {\r\n var exploded = {};\r\n for (var n in o) {\r\n var names = n.split(' ');\r\n for (var i=0, ni; ni=names[i]; i++) {\r\n exploded[ni] = o[n];\r\n }\r\n }\r\n prototype.observe = exploded;\r\n }\r\n },\r\n optimizePropertyMaps : function(prototype) {\r\n if (prototype.observe) {\r\n // construc t name list\r\n var a = prototype._observeNames = [];\r\n for (var n in prototype.observe) {\r\n var names = n.split(' ');\r\n f or (var i=0, ni; ni=names[i]; i++) {\r\n a.push(ni);\r\n }\r \n }\r\n }\r\n if (prototype.publish) {\r\n // construct name list\r\n var a = prototype._publishNames = [];\r\n for (var n in prototype.publish) {\r\n a.push(n);\r\n }\r\n }\r\n },\r\n publishProperties: function(prototype, base) {\r\n // if we have any properties to publish\r\n var publish = prototype.publish;\r\n if (publish) {\r\n // transcribe `publish` entries onto own prototype\r\n this.requireProperties(publish, prototype, base);\r\n // construct map of lower-cased property names\r\n prototype._publishLC = this.lowerCa seMap(publish);\r\n }\r\n },\r\n requireProperties: function(properti es, prototype, base) {\r\n // ensure a prototype value for each property\r\ n for (var n in properties) {\r\n if (prototype[n] === undefined && base[n] === undefined) {\r\n prototype[n] = properties[n];\r\n } \r\n }\r\n },\r\n lowerCaseMap: function(properties) {\r\n var m ap = {};\r\n for (var n in properties) {\r\n map[n.toLowerCase()] = n;\r\n }\r\n return map;\r\n }\r\n };\r\n\r\n // exports\r\n\r\n scope.api.declaration.properties = properties;\r\n\r\n})(Polymer);\r\n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICENSE fi le.\n */\n(function(scope) {\n\n // magic words\n\n var ATTRIBUTES_ATTRIBUTE = 'attributes';\n var ATTRIBUTES_REGEX = /\\s|,/;\n\n // attributes api\n\n va r attributes = {\n inheritAttributesObjects: function(prototype) {\n // chain our lower-cased publish map to the inherited version\n this.inheritOb ject(prototype, 'publishLC');\n // chain our instance attributes map to the inherited version\n this.inheritObject(prototype, '_instanceAttributes');\ n },\n publishAttributes: function(prototype, base) {\n // merge name s from 'attributes' attribute\n var attributes = this.getAttribute(ATTRIBUT ES_ATTRIBUTE);\n if (attributes) {\n // get properties to publish\n var publish = prototype.publish || (prototype.publish = {});\n // names='a b c' or names='a,b,c'\n var names = attributes.split(ATTRIBUTES_ REGEX);\n // record each name for publishing\n for (var i=0, l=nam es.length, n; i<l; i++) {\n // remove excess ws\n n = names[i] .trim();\n // do not override explicit entries\n if (n && publ ish[n] === undefined && base[n] === undefined) {\n publish[n] = null; \n }\n }\n }\n },\n // record clonable attributes fro m <element>\n accumulateInstanceAttributes: function() {\n // inherit in stance attributes\n var clonable = this.prototype._instanceAttributes;\n // merge attributes from element\n var a$ = this.attributes;\n for (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) { \n if (this.isInsta nceAttribute(a.name)) {\n clonable[a.name] = a.value;\n }\n }\n },\n isInstanceAttribute: function(name) {\n return !this.blackL ist[name] && name.slice(0,3) !== 'on-';\n },\n // do not clone these attri butes onto instances\n blackList: {\n name: 1,\n 'extends': 1,\n constructor: 1,\n noscript: 1,\n assetpath: 1,\n 'cache-csstex t': 1\n }\n };\n\n // add ATTRIBUTES_ATTRIBUTE to the blacklist\n attribut es.blackList[ATTRIBUTES_ATTRIBUTE] = 1;\n\n // exports\n\n scope.api.declarati on.attributes = attributes;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polyme r Authors. All rights reserved.\n * Use of this source code is governed by a BSD -style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n \n var api = scope.api;\n var isBase = scope.isBase;\n var extend = scope.extend;\n\n // prototype api\n\n var prototype = {\n\n r egister: function(name, extendeeName) {\n // build prototype combining exte ndee, Polymer base, and named api\n this.buildPrototype(name, extendeeName) ;\n // register our custom element with the platform\n this.registerPr ototype(name, extendeeName);\n // reference constructor in a global named b y 'constructor' attribute\n this.publishConstructor();\n },\n\n build Prototype: function(name, extendeeName) {\n // get our custom prototype (be fore chaining)\n var extension = scope.getRegisteredPrototype(name);\n // get basal prototype\n var base = this.generateBasePrototype(extendeeNam e);\n // implement declarative features\n this.desugarBeforeChaining(e xtension, base);\n // join prototypes\n this.prototype = this.chainPro totypes(extension, base);\n // more declarative features\n this.desuga rAfterChaining(name, extendeeName);\n },\n\n desugarBeforeChaining: functi on(prototype, base) {\n // back reference declaration element\n // TOD O(sjmiles): replace `element` with `elementElement` or `declaration`\n prot otype.element = this;\n // transcribe `attributes` declarations onto own pr ototype's `publish`\n this.publishAttributes(prototype, base);\n // `p ublish` properties to the prototype and to attribute watch\n this.publishPr operties(prototype, base);\n // infer observers for `observe` list based on method names\n this.inferObservers(prototype);\n // desugar compound observer syntax, e.g. 'a b c' \n this.explodeObservers(prototype);\n },\ n\n chainPrototypes: function(prototype, base) {\n // chain various meta -data objects to inherited versions\n this.inheritMetaData(prototype, base) ;\n // chain custom api to inherited\n var chained = this.chainObject( prototype, base);\n // x-platform fixup\n ensurePrototypeTraversal(cha ined);\n return chained;\n },\n\n inheritMetaData: function(prototype , base) {\n // chain observe object to inherited\n this.inheritObject( 'observe', prototype, base);\n // chain publish object to inherited\n this.inheritObject('publish', prototype, base);\n // chain our lower-cased publish map to the inherited version\n this.inheritObject('_publishLC', pro totype, base);\n // chain our instance attributes map to the inherited vers ion\n this.inheritObject('_instanceAttributes', prototype, base);\n // chain our event delegates map to the inherited version\n this.inheritObjec t('eventDelegates', prototype, base);\n },\n\n // implement various declar ative features\n desugarAfterChaining: function(name, extendee) {\n // b uild side-chained lists to optimize iterations\n this.optimizePropertyMaps( this.prototype);\n // install external stylesheets as if they are inline\n this.installSheets();\n // adjust any paths in dom from imports\n this.resolveElementPaths(this);\n // compile list of attributes to copy to instances\n this.accumulateInstanceAttributes();\n // parse on-* dele gates declared on `this` element\n this.parseHostEvents();\n //\n // install a helper method this.resolvePath to aid in \n // setting resour ce urls. e.g.\n // this.$.image.src = this.resolvePath('images/foo.png')\n this.addResolvePathApi();\n // under ShadowDOMPolyfill, transforms to approximate missing CSS features\n if (window.ShadowDOMPolyfill) {\n Platform.ShadowCSS.shimStyling(this.templateContent(), name, extendee);\n }\n // allow custom element access to the declarative context\n if (th is.prototype.registerCallback) {\n this.prototype.registerCallback(this); \n }\n },\n\n // if a named constructor is requested in element, map a reference\n // to the constructor to the given symbol\n publishConstruct or: function() {\n var symbol = this.getAttribute('constructor');\n if (symbol) {\n window[symbol] = this.ctor;\n }\n },\n\n // buil d prototype combining extendee, Polymer base, and named api\n generateBasePro totype: function(extnds) {\n var prototype = this.findBasePrototype(extnds) ;\n if (!prototype) {\n // create a prototype based on tag-name exte nsion\n var prototype = HTMLElement.getPrototypeForTag(extnds);\n // insert base api in inheritance chain (if needed)\n prototype = this.en sureBaseApi(prototype);\n // memoize this base\n memoizedBases[ext nds] = prototype;\n }\n return prototype;\n },\n\n findBaseProto type: function(name) {\n return memoizedBases[name];\n },\n\n // inst all Polymer instance api into prototype chain, as needed \n ensureBaseApi: fu nction(prototype) {\n if (prototype.PolymerBase) {\n return prototyp e;\n }\n var extended = Object.create(prototype);\n // we need a unique copy of base api for each base prototype\n // therefore we 'extend' here instead of simply chaining\n api.publish(api.instance, extended);\n // TODO(sjmiles): sharing methods across prototype chains is\n // not su pported by 'super' implementation which optimizes\n // by memoizing prototy pe relationships.\n // Probably we should have a version of 'extend' that i s \n // share-aware: it could study the text of each function,\n // lo ok for usage of 'super', and wrap those functions in\n // closures.\n // As of now, there is only one problematic method, so \n // we just patch it manually.\n // To avoid re-entrancy problems, the special super method\n // installed is called `mixinSuper` and the mixin method\n // must us e this method instead of the default `super`.\n this.mixinMethod(extended, prototype, api.instance.mdv, 'bind');\n // return buffed-up prototype\n return extended;\n },\n\n mixinMethod: function(extended, prototype, api , name) {\n var $super = function(args) {\n return prototype[name].a pply(this, args);\n };\n extended[name] = function() {\n this.m ixinSuper = $super;\n return api[name].apply(this, arguments);\n }\n },\n\n // ensure prototype[name] inherits from a prototype.prototype[name ]\n inheritObject: function(name, prototype, base) {\n // require an obj ect\n var source = prototype[name] || {};\n // chain inherited propert ies onto a new object\n prototype[name] = this.chainObject(source, base[nam e]);\n },\n\n // register 'prototype' to custom element 'name', store cons tructor \n registerPrototype: function(name, extendee) { \n var info = { \n prototype: this.prototype\n }\n // native element must be sp ecified in extends\n var typeExtension = this.findTypeExtension(extendee);\ n if (typeExtension) {\n info.extends = typeExtension;\n }\n // register the prototype with HTMLElement for name lookup\n HTMLElement .register(name, this.prototype);\n // register the custom type\n this. ctor = document.registerElement(name, info);\n },\n\n findTypeExtension: f unction(name) {\n if (name && name.indexOf('-') < 0) {\n return name ;\n } else {\n var p = this.findBasePrototype(name);\n if (p. element) {\n return this.findTypeExtension(p.element.extends);\n }\n }\n }\n\n };\n\n // memoize base prototypes\n var memoizedBases = {};\n\n // implementation of 'chainObject' depends on support for __proto__\n if (Object.__proto__) {\n prototype.chainObject = function(object, inherite d) {\n if (object && inherited && object !== inherited) {\n object._ _proto__ = inherited;\n }\n return object;\n }\n } else {\n pro totype.chainObject = function(object, inherited) {\n if (object && inherite d && object !== inherited) {\n var chained = Object.create(inherited);\n object = extend(chained, object);\n }\n return object;\n }\n }\n\n // On platforms that do not support __proto__ (versions of IE), the pro totype\n // chain of a custom element is simulated via installation of __proto_ _.\n // Although custom elements manages this, we install it here so it's\n // available during desugaring.\n function ensurePrototypeTraversal(prototype) {\ n if (!Object.__proto__) {\n var ancestor = Object.getPrototypeOf(protot ype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n ancestor.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n }\ n\n // exports\n\n api.declaration.prototype = prototype;\n\n})(Polymer);\n"," /*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of this source code is governed by a BSD-style\n * license that can be found in the LICE NSE file.\n */\n(function(scope) {\n\n var queue = {\n // tell the queue to wait for an element to be ready\n wait: function(element, check, go) {\n if (this.indexOf(element) === -1) {\n this.add(element);\n elemen t.__check = check;\n element.__go = go;\n }\n return (this.inde xOf(element) !== 0);\n },\n add: function(element) {\n //console.log( 'queueing', element.name);\n queueForElement(element).push(element);\n } ,\n indexOf: function(element) {\n var i = queueForElement(element).inde xOf(element);\n if (i >= 0 && document.contains(element)) {\n i += ( HTMLImports.useNative || HTMLImports.ready) ? \n importQueue.length : 1 e9;\n }\n return i; \n },\n // tell the queue an element is rea dy to be registered\n go: function(element) {\n var readied = this.remov e(element);\n if (readied) {\n readied.__go.call(readied);\n readied.__check = readied.__go = null;\n this.check();\n }\n },\n remove: function(element) {\n var i = this.indexOf(element);\n if (i !== 0) {\n //console.warn('queue order wrong', i);\n return;\n }\n return queueForElement(element).shift();\n },\n check: funct ion() {\n // next\n var element = this.nextElement();\n if (eleme nt) {\n element.__check.call(element);\n }\n if (this.canReady( )) {\n this.ready();\n return true;\n }\n },\n nextElem ent: function() {\n return nextQueued();\n },\n canReady: function() {\n return !this.waitToReady && this.isEmpty();\n },\n isEmpty: funct ion() {\n return !importQueue.length && !mainQueue.length;\n },\n rea dy: function() {\n // TODO(sorvell): As an optimization, turn off CE polyfi ll upgrading\n // while registering. This way we avoid having to upgrade ea ch document\n // piecemeal per registration and can instead register all el ements\n // and upgrade once in a batch. Without this optimization, upgrade time\n // degrades significantly when SD polyfill is used. This is mainly because\n // querying the document tree for elements is slow under the SD p olyfill.\n if (CustomElements.ready === false) {\n CustomElements.up gradeDocumentTree(document);\n CustomElements.ready = true;\n }\n if (readyCallbacks) {\n var fn;\n while (readyCallbacks.length) {\n fn = readyCallbacks.shift();\n fn();\n }\n }\ n },\n addReadyCallback: function(callback) {\n if (callback) {\n readyCallbacks.push(callback);\n }\n },\n waitToReady: true\n }; \n\n var importQueue = [];\n var mainQueue = [];\n var readyCallbacks = [];\n \n function queueForElement(element) {\n return document.contains(element) ? mainQueue : importQueue;\n }\n\n function nextQueued() {\n return importQu eue.length ? importQueue[0] : mainQueue[0];\n }\n\n var polymerReadied = false ; \n\n document.addEventListener('WebComponentsReady', function() {\n Custom Elements.ready = false;\n });\n \n function whenPolymerReady(callback) {\n queue.waitToReady = true;\n CustomElements.ready = false;\n HTMLImports.w henImportsReady(function() {\n queue.addReadyCallback(callback);\n que ue.waitToReady = false;\n queue.check();\n });\n }\n\n // exports\n s cope.queue = queue;\n scope.whenPolymerReady = whenPolymerReady;\n})(Polymer);\ n","/*\n * Copyright 2013 The Polymer Authors. All rights reserved.\n * Use of t his source code is governed by a BSD-style\n * license that can be found in the LICENSE file.\n */\n(function(scope) {\n\n var whenPolymerReady = scope.whenPol ymerReady;\n\n function importElements(elementOrFragment, callback) {\n if ( elementOrFragment) {\n document.head.appendChild(elementOrFragment);\n whenPolymerReady(callback);\n } else if (callback) {\n callback();\n }\n }\n\n function importUrls(urls, callback) {\n if (urls && urls.length) {\n var frag = document.createDocumentFragment();\n for (var i=0, l=urls.length, url, link; (i<l) && (url=urls[i]); i++) {\n link = docu ment.createElement('link');\n link.rel = 'import';\n link.href = url;\n frag.appendChild(link);\n }\n importElements(fr ag, callback);\n } else if (callback) {\n callback();\n }\n }\n\n / / exports\n scope.import = importUrls;\n scope.importElements = importElements ;\n\n})(Polymer);\n","/*\n * Copyright 2013 The Polymer Authors. All rights rese rved.\n * Use of this source code is governed by a BSD-style\n * license that ca n be found in the LICENSE file.\n */\n(function(scope) {\n\n // imports\n\n va r extend = scope.extend;\n var api = scope.api;\n var queue = scope.queue;\n var whenPolymerReady = scope.whenPolymerReady;\n var getRegisteredPrototype = s cope.getRegisteredPrototype;\n var waitingForPrototype = scope.waitingForProtot ype;\n\n // declarative implementation: <polymer-element>\n\n var prototype = extend(Object.create(HTMLElement.prototype), {\n\n createdCallback: function( ) {\n if (this.getAttribute('name')) {\n this.init();\n }\n },\n\n init: function() {\n // fetch declared values\n this.name = this.getAttribute('name');\n this.extends = this.getAttribute('extends');\n // initiate any async resource fetches\n this.loadResources();\n // register when all constraints are met\n this.registerWhenReady();\n },\n\n registerWhenReady: function() {\n if (this.registered\n || t his.waitingForPrototype(this.name)\n || this.waitingForQueue()\n || this.waitingForResources()) {\n return;\n }\n // TODO(sorvell ): ends up calling '_register' by virtue\n // of `waitingForQueue` (see bel ow)\n queue.go(this);\n },\n\n // TODO(sorvell): refactor, this metho d is private-ish, but it's being\n // called by the queue object.\n _regis ter: function() {\n //console.log('registering', this.name);\n //conso le.group('registering', this.name);\n // warn if extending from a custom el ement not registered via Polymer\n if (isCustomTag(this.extends) && !isRegi stered(this.extends)) {\n console.warn('%s is attempting to extend %s, an unregistered element ' +\n 'or one that was not registered with Poly mer.', this.name,\n this.extends);\n }\n this.register(this .name, this.extends);\n this.registered = true;\n //console.groupEnd() ;\n },\n\n waitingForPrototype: function(name) {\n if (!getRegistered Prototype(name)) {\n // then wait for a prototype\n waitingForProt otype(name, this);\n // emulate script if user is not supplying one\n this.handleNoScript(name);\n // prototype not ready yet\n retu rn true;\n }\n },\n\n handleNoScript: function(name) {\n // if e xplicitly marked as 'noscript'\n if (this.hasAttribute('noscript') && !this .noscript) {\n this.noscript = true;\n // TODO(sorvell): CustomEle ments polyfill awareness:\n // noscript elements should upgrade in logica l order\n // script injection ensures this under native custom elements;\ n // under imports + ce polyfills, scripts run before upgrades.\n // dependencies should be ready at upgrade time so register\n // prototyp e at this time.\n if (window.CustomElements && !CustomElements.useNative) {\n Polymer(name);\n } else {\n var script = document. createElement('script');\n script.textContent = 'Polymer(\\'' + name + '\\');';\n this.appendChild(script);\n }\n }\n },\n\n waitingForResources: function() {\n return this._needsResources;\n },\n \n // NOTE: Elements must be queued in proper order for inheritance/compositi on\n // dependency resolution. Previously this was enforced for inheritance,\ n // and by rule for composition. It's now entirely by rule.\n waitingForQ ueue: function() {\n return queue.wait(this, this.registerWhenReady, this._ register);\n },\n\n loadResources: function() {\n this._needsResource s = true;\n this.loadStyles(function() {\n this._needsResources = fa lse;\n this.registerWhenReady();\n }.bind(this));\n }\n\n });\n\ n // semi-pluggable APIs \n\n // TODO(sjmiles): should be fully pluggable (aka decoupled, currently\n // the various plugins are allowed to depend on each ot her directly)\n api.publish(api.declaration, prototype);\n\n // utility and bo okkeeping\n\n function isRegistered(name) {\n return Boolean(HTMLElement.get PrototypeForTag(name));\n }\n\n function isCustomTag(name) {\n return (name && name.indexOf('-') >= 0);\n }\n\n // exports\n\n scope.getRegisteredProtot ype = getRegisteredPrototype;\n \n // boot tasks\n\n whenPolymerReady(functio n() {\n document.body.removeAttribute('unresolved');\n document.dispatchEv ent(\n new CustomEvent('polymer-ready', {bubbles: true})\n );\n });\n\n // register polymer-element with document\n\n document.registerElement('polym er-element', {prototype: prototype});\n\n})(Polymer);\n"]} 1 {"version":3,"file":"polymer.js","sources":["../../polymer-gestures/src/scope.js ","../../polymer-gestures/src/targetfind.js","../../polymer-gestures/src/touch-a ction.js","../../polymer-gestures/src/eventFactory.js","../../polymer-gestures/s rc/pointermap.js","../../polymer-gestures/src/dispatcher.js","../../polymer-gest ures/src/installer.js","../../polymer-gestures/src/mouse.js","../../polymer-gest ures/src/touch.js","../../polymer-gestures/src/ms.js","../../polymer-gestures/sr c/pointer.js","../../polymer-gestures/src/platform-events.js","../../polymer-ges tures/src/track.js","../../polymer-gestures/src/hold.js","../../polymer-gestures /src/tap.js","../../polymer-expressions/third_party/esprima/esprima.js","../../p olymer-expressions/src/polymer-expressions.js","polymer-versioned.js","../src/bo ot.js","../src/lib/lang.js","../src/lib/job.js","../src/lib/dom.js","../src/lib/ super.js","../src/lib/deserialize.js","../src/api.js","../src/instance/utils.js" ,"../src/instance/events.js","../src/instance/attributes.js","../src/instance/pr operties.js","../src/instance/mdv.js","../src/instance/base.js","../src/instance /styles.js","../src/declaration/polymer.js","../src/declaration/path.js","../src /declaration/styles.js","../src/declaration/events.js","../src/declaration/prope rties.js","../src/declaration/attributes.js","../src/declaration/mdv.js","../src /declaration/prototype.js","../src/declaration/queue.js","../src/declaration/imp ort.js","../src/declaration/polymer-element.js","../src/lib/auto-binding.js"],"n ames":["window","PolymerGestures","scope","target","shadow","inEl","shadowRoot", "webkitShadowRoot","canTarget","Boolean","elementFromPoint","targetingShadow","s ","this","olderShadow","os","olderShadowRoot","se","querySelector","allShadows", "element","shadows","push","searchRoot","inRoot","x","y","st","sr","t","ssr","ow ner","document","parentNode","nodeType","Node","DOCUMENT_NODE","DOCUMENT_FRAGMEN T_NODE","findTarget","inEvent","clientX","clientY","LCA","a","b","contains","ade pth","depth","bdepth","d","walk","n","u","i","host","deepContains","common","ins ideNode","node","rect","getBoundingClientRect","left","right","top","bottom","ta rgetFinding","bind","shadowSelector","v","selector","rule","attrib2css","selecto rs","styles","hasTouchAction","head","style","touchAction","hasShadowRoot","Shad owDOMPolyfill","createShadowRoot","forEach","r","String","map","el","createEleme nt","textContent","appendChild","MOUSE_PROPS","MOUSE_DEFAULTS","NOP_FACTORY","ev entFactory","preventTap","makeBaseEvent","inType","inDict","e","createEvent","in itEvent","bubbles","cancelable","makeGestureEvent","Object","create","k","keys", "length","makePointerEvent","p","buttons","pressure","pointerId","width","height ","tiltX","tiltY","pointerType","hwTimestamp","isPrimary","PointerMap","USE_MAP" ,"m","Map","pointers","POINTERS_FN","values","prototype","size","set","inId","in dexOf","has","delete","splice","get","clear","callback","thisArg","call","CLONE_ PROPS","CLONE_DEFAULTS","HAS_SVG_INSTANCE","SVGElementInstance","wrap","wrapIfNe eded","dispatcher","pointermap","eventMap","eventSources","eventSourceList","ges tures","gestureQueue","registerSource","name","source","newEvents","events","reg isterGesture","register","es","l","unregister","down","fireEvent","move","type", "fillGestureQueue","up","cancel","tapPrevented","eventHandler","_handledByPG","f n","listen","addEvent","unlisten","removeEvent","eventName","addEventListener_", "boundHandler","addEventListener","removeEventListener_","removeEventListener"," makeEvent","preventDefault","_target","dispatchEvent","cloneEvent","eventCopy"," correspondingUseElement","clone","gestureTrigger","g","j","ev","requestAnimation Frame","boundGestureTrigger","Installer","add","remove","changed","binder","addC allback","removeCallback","changedCallback","MO","observer","mutationWatcher","A rray","toArray","slice","filter","MutationObserver","WebKitMutationObserver","SE LECTOR","OBSERVER_INIT","subtree","childList","attributes","attributeOldValue"," attributeFilter","watchSubtree","observe","enableOnSubtree","readyState","instal lOnLoad","installNewSubtree","findElements","addElement","querySelectorAll","rem oveElement","elementChanged","oldValue","concatLists","accum","list","concat","i sElement","ELEMENT_NODE","flattenMutationTree","inNodes","tree","reduce","mutati ons","mutationHandler","added","addedNodes","removed","removedNodes","console"," warn","DEDUP_DIST","WHICH_TO_BUTTONS","HAS_BUTTONS","MouseEvent","mouseEvents"," POINTER_ID","POINTER_TYPE","lastTouches","isEventSimulatedFromTouch","lts","dx", "Math","abs","dy","prepareEvent","which","mousedown","mouseup","mousemove","rela tedTarget","cleanupMouse","INSTALLER","DEDUP_TIMEOUT","CLICK_COUNT_TIMEOUT","ATT RIB","HAS_TOUCH_ACTION","touchEvents","elementAdded","getAttribute","touchAction ToScrollType","_scrollType","elementRemoved","undefined","oldSt","scrollTypes"," EMITTER","XSCROLLER","YSCROLLER","SCROLLER","exec","firstTouch","isPrimaryTouch" ,"inTouch","identifier","setPrimaryTouch","firstXY","X","Y","scrolling","cancelR esetClickCount","removePrimaryPointer","inPointer","resetClickCount","clickCount ","resetId","setTimeout","clearTimeout","typeToButtons","ret","touch","id","curr entTouchEvent","touchToPointer","cte","detail","webkitRadiusX","radiusX","webkit RadiusY","radiusY","webkitForce","force","self","processTouches","inFunction","t l","changedTouches","shouldScroll","scrollAxis","currentTarget","oa","da","doa", "findTouch","inTL","vacuumTouches","touches","value","key","out","cancelOut","to uchstart","dedupSynthMouse","touchmove","touchcancel","pointer","touchend","clea nUpPointer","lt","HAS_BITMAP_TYPE","MSPointerEvent","MSPOINTER_TYPE_MOUSE","msEv ents","POINTER_TYPES","cleanup","MSPointerDown","MSPointerMove","MSPointerUp","M SPointerCancel","pointerEvents","pointerdown","pointermove","pointerup","pointer cancel","PointerEvent","navigator","msPointerEnabled","ontouchstart","track","WI GGLE_THRESHOLD","clampDir","inDelta","calcPositionDelta","inA","inB","pageX","pa geY","fireTrack","inTrackingData","downEvent","dd","lastMoveEvent","xDirection", "yDirection","ddx","ddy","screenX","screenY","trackInfo","downTarget","tracking" ,"hold","HOLD_DELAY","heldPointer","holdJob","pulse","Date","now","timeStamp","h eld","fireHold","clearInterval","setInterval","inHoldTime","holdTime","tap","sho uldTap","downState","start","altKey","ctrlKey","metaKey","shiftKey","global","as sert","condition","message","Error","isDecimalDigit","ch","isWhiteSpace","fromCh arCode","isLineTerminator","isIdentifierStart","isIdentifierPart","isKeyword","s kipWhitespace","index","charCodeAt","getIdentifier","scanIdentifier","Token","Id entifier","Keyword","NullLiteral","BooleanLiteral","range","scanPunctuator","cod e2","ch2","code","ch1","Punctuator","throwError","Messages","UnexpectedToken","s canNumericLiteral","number","NumericLiteral","parseFloat","scanStringLiteral","q uote","str","octal","StringLiteral","isIdentifierName","token","advance","EOF"," lex","lookahead","peek","pos","messageFormat","error","args","arguments","msg"," replace","whole","description","throwUnexpected","expect","match","matchKeyword" ,"keyword","parseArrayInitialiser","elements","parseExpression","delegate","crea teArrayExpression","parseObjectPropertyKey","createLiteral","createIdentifier"," parseObjectProperty","createProperty","parseObjectInitialiser","properties","cre ateObjectExpression","parseGroupExpression","expr","parsePrimaryExpression","cre ateThisExpression","parseArguments","parseNonComputedProperty","parseNonComputed Member","parseComputedMember","parseLeftHandSideExpression","property","createMe mberExpression","parseUnaryExpression","parsePostfixExpression","createUnaryExpr ession","binaryPrecedence","prec","parseBinaryExpression","stack","operator","po p","createBinaryExpression","parseConditionalExpression","consequent","alternate ","createConditionalExpression","parseFilter","createFilter","parseFilters","par seTopLevel","Syntax","parseInExpression","parseAsExpression","createTopLevel","c reateAsExpression","indexName","createInExpression","parse","inDelegate","state" ,"labelSet","TokenName","ArrayExpression","BinaryExpression","CallExpression","C onditionalExpression","EmptyStatement","ExpressionStatement","Literal","LabeledS tatement","LogicalExpression","MemberExpression","ObjectExpression","Program","P roperty","ThisExpression","UnaryExpression","UnknownLabel","Redeclaration","espr ima","prepareBinding","expressionText","filterRegistry","expression","getExpress ion","scopeIdent","tagName","ex","model","oneTime","binding","getBinding","polym erExpressionScopeIdent_","indexIdent","polymerExpressionIndexIdent_","expression ParseCache","ASTDelegate","Expression","valueFn_","IdentPath","path","Path","obj ect","accessor","dynamicDeps","valid","simplePath","getFn","Filter","notImplemen ted","arg","valueFn","filters","deps","currentPath","ConstantObservable","value_ ","convertStylePropertyName","c","toLowerCase","findScope","prop","parentScopeNa me","hasOwnProperty","isLiteralExpression","pathString","isNaN","Number","Polyme rExpressions","addPath","getValueFrom","setValue","newValue","setValueFrom",{"en d":{"file":"../../polymer-expressions/src/polymer-expressions.js","comments_befo re":[],"nlb":false,"endpos":3741,"pos":3733,"col":8,"line":123,"value":"fullPath ","type":"name"},"start":{"file":"../../polymer-expressions/src/polymer-expressi ons.js","comments_before":[],"nlb":false,"endpos":3741,"pos":3733,"col":8,"line" :123,"value":"fullPath","type":"name"},"name":"fullPath"},"fullPath","fullPath_" ,"last","context","propName","transform","toModelDirection","toModel","toDOM","a pply","unaryOperators","+","-","!","binaryOperators","*","/","%","<",">","<=","> =","==","!=","===","!==","&&","||","op","argument","test","ident","arr","kind"," obj","open","discardChanges","deliver","close","firstTime","firstValue","startRe set","getValue","finishReset","setValueFn","CompoundObserver","ObserverTransform ","count","random","toString","styleObject","parts","join","tokenList","tokens", "prepareInstancePositionChanged","template","templateInstance","PathObserver","p repareInstanceModel","scopeName","parentScope","exposeGetExpression","getExpress ion_","Polymer","version","extend","api","getOwnPropertyNames","pd","getOwnPrope rtyDescriptor","defineProperty","nom","job","wait","stop","Job","go","inContext" ,"boundComplete","complete","h","handle","cancelAnimationFrame","registry","HTML Element","tag","getPrototypeForTag","getPrototypeOf","originalStopPropagation"," Event","stopPropagation","cancelBubble","$super","arrayOfArgs","caller","_super" ,"nameInThis","memoizeSuper","__proto__","n$","method","proto","nextSuper","supe r","deserializeValue","currentValue","inferredType","typeHandlers","string","dat e","boolean","parseInt","JSON","function","declaration","instance","publish","ap is","utils","async","timeout","Platform","flush","cancelAsync","fire","onNode"," event","CustomEvent","asyncFire","classFollows","anew","old","className","classL ist","nop","nob","asyncMethod","log","logFlags","EVENT_PREFIX","addHostListeners ","eventDelegates","localName","methodName","getEventHandler","dispatchMethod"," group","groupEnd","copyInstanceAttributes","a$","_instanceAttributes","hasAttrib ute","setAttribute","takeAttributes","_publishLC","attributeToProperty","propert yForAttribute","search","bindPattern","stringValue","serializeValue","reflectPro pertyToAttribute","serializedValue","removeAttribute","bindProperties","observab le","Observer","bindToInstance","resolveBindingValue","createPropertyObserver"," _observeNames","o","_propertyObserver","registerObservers","observeArrayValue"," openPropertyObserver","notifyPropertyChanges","newValues","oldValues","paths","c alled","ov","nv","invokeMethod","deliverChanges","propertyChanged_","reflect","c allbackName","isArray","closeNamedObserver","ArrayObserver","registerNamedObserv er","bindProperty","observers","_observers","closeObservers","closeObserverArray ","observerArray","o$","_namedObservers","closeNamedObservers","mdv","instanceTe mplate","syntax","bindingDelegate","dom","createInstance","bindings_","enableBin dingsReflection","path_","_recordBinding","mixinSuper","bindFinished","makeEleme ntReady","asyncUnbindAll","_unbound","unbind","_unbindAllJob","unbindAll","cance lUnbindAll","mustachePattern","isBase","PolymerBase","base","created","ready","c reatedCallback","prepareElement","ownerDocument","isStagingDocument","_elementPr epared","shadowRoots","_readied","parseDeclarations","attachedCallback","attache d","enteredView","hasBeenAttached","domReady","detachedCallback","preventDispose ","detached","leftView","enteredViewCallback","leftViewCallback","enteredDocumen tCallback","leftDocumentCallback","parseDeclaration","elementElement","fetchTemp late","root","shadowFromTemplate","shadowRootReady","lightFromTemplate","refNode ","eventController","insertBefore","marshalNodeReferences","$","attributeChanged Callback","attributeChanged","onMutation","listener","disconnect","constructor", "Base","shimCssText","cssText","is","ShadowCSS","makeScopeSelector","STYLE_SCOPE _ATTRIBUTE","STYLE_CONTROLLER_SCOPE","installControllerStyles","findStyleScope", "scopeHasNamedStyle","cssTextForScope","installScopeCssText","installScopeStyle" ,"cssTextToScopeStyle","applyStyleToScope","_scopeStyles","script","_currentScri pt","getRegisteredPrototype","registerPrototype","notifyPrototype","waitingForPr ototype","client","waitPrototype","registerWhenReady","prototypesByName","declar ations","deliverDeclarations","resolveElementPaths","urlResolver","resolveDom"," addResolvePathApi","assetPath","URL","baseURI","resolvePath","urlPath","href","i mportRuleForSheet","sheet","baseUrl","createStyleElement","attr","firstElementCh ild","s$","nextElementSibling","cssTextFromSheet","__resource","matchesSelector" ,"inSelector","matches","STYLE_SELECTOR","STYLE_LOADABLE_MATCH","SHEET_SELECTOR" ,"STYLE_GLOBAL_SCOPE","SCOPE_ATTR","loadStyles","content","templateContent","con vertSheetsToStyles","findLoadableStyles","templateUrl","styleResolver","copyShee tAttributes","replaceChild","link","loadables","installSheets","cacheSheets","ca cheStyles","installLocalSheets","installGlobalStyles","sheets","findNodes","remo veChild","firstChild","matcher","nodes","array","templateNodes","styleForScope", "scopeDescriptor","webkitMatchesSelector","mozMatchesSelector","mixedCaseEventTy pes","parseHostEvents","delegates","addAttributeDelegates","hasEventPrefix","rem oveEventPrefix","trim","prefixLength","findController","controller","prepareEven tBinding","eventType","bindingValue","handler","inferObservers","explodeObserver s","exploded","ni","names","split","optimizePropertyMaps","_publishNames","publi shProperties","requireProperties","lowerCaseMap","propertyDescriptors","property Descriptor","reflects","reflectHintForDescriptor","valueForDescriptor","createPr opertyAccessors","createBindablePrototypeAccessor","ATTRIBUTES_ATTRIBUTE","ATTRI BUTES_REGEX","inheritAttributesObjects","inheritObject","publishAttributes","acc umulateInstanceAttributes","clonable","isInstanceAttribute","blackList","extends ","noscript","assetpath","cache-csstext","installBindingDelegate","ensurePrototy peTraversal","ancestor","extendeeName","buildPrototype","publishConstructor","ex tension","generateBasePrototype","desugarBeforeChaining","chainPrototypes","desu garAfterChaining","inheritMetaData","chained","chainObject","extendee","shimStyl ing","registerCallback","symbol","ctor","extnds","findBasePrototype","ensureBase Api","memoizedBases","extended","mixinMethod","info","typeExtension","findTypeEx tension","registerElement","inherited","queueForElement","mainQueue","importQueu e","nextQueued","whenPolymerReady","queue","waitToReady","CustomElements","HTMLI mports","whenImportsReady","addReadyCallback","check","shouldAdd","flushQueue"," __check","__go","useNative","readied","addToFlushQueue","shift","nextElement","c anReady","isEmpty","upgradeDocumentTree","flushReadyCallbacks","readyCallbacks", "importElements","elementOrFragment","importUrls","urls","url","frag","createDoc umentFragment","rel","import","isRegistered","isCustomTag","init","loadResources ","registered","waitingForQueue","waitingForResources","_register","handleNoScri pt","_needsResources","body","makeSyntax"],"mappings":";;;;;;;;;;AASAA,OAAOC,mBC AP,SAAUC,GACR,GAAIC,IACFC,OAAQ,SAASC,GACf,MAAIA,GACKA,EAAKC,YAAcD,EAAKE,iBADjC,Q AIFC,UAAW,SAASJ,GAClB,MAAOA,IAAUK,QAAQL,EAAOM,mBAElCC,gBAAiB,SAASN,GACxB,GAAIO,G AAIC,KAAKT,OAAOC,EACpB,OAAIQ,MAAKL,UAAUI,GACVA,EADT,QAIFE,YAAa,SAASV,GACpB,GAAIW ,GAAKX,EAAOY,eAChB,KAAKD,EAAI,CACP,GAAIE,GAAKb,EAAOc,cAAc,SAC1BD,KACFF,EAAKE,EAA GD,iBAGZ,MAAOD,IAETI,WAAY,SAASC,GAEnB,IADA,GAAIC,MAAcT,EAAIC,KAAKT,OAAOgB,GAC5BR ,GACJ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ASsD,cAAc,kBACrClE,GAAQiuB,aAAa,OAAQ,gBAC7BjuB,EAAQiuB,aAAa,UAAW,YAChCjuB,EAAQ uhC,OAER/Y,QAAQ,gBAENmK,gBAAiB,WACflzB,KAAK2xB,OAAS3xB,KAAK4xB,gBAAkB5xB,KAAKuiC ,aAG1CxZ,QAAQ8W,iBAAiB,WACvB7/B,KAAKgiB,MAAQhiB,KACbA,KAAKwuB,aAAa,OAAQ,IAG1BxuB ,KAAKusB,MAAM,WAITvsB,KAAKi1B,sBAAsBj1B,KAAKoB,YAGhCpB,KAAK4sB,KAAK,qBAEZvpB,KAA KrD,QAGTuiC,WAAY,WACV,GAAIv5B,GAAStD,OAAOC,OAAOojB,QAAQG,IAAIgD,YAAYljB,QAC/CsK, EAAOtT,IACXgJ,GAAOsyB,eAAiB,WAAa,MAAOhoB,GAAK0O,MAEjD,IAAI2P,GAAS,GAAInN,oBACbhD ,EAAiBmQ,EAAOnQ,cAK5B,OAJAmQ,GAAOnQ,eAAiB,SAAS6C,EAAYxb,EAAMhG,GACjD,MAAOmG,GAAO wyB,oBAAoBnX,EAAYxb,EAAMhG,IAC7C2e,EAAe1Z,KAAK6pB,EAAQtN,EAAYxb,EAAMhG,IAEhD8uB" ,"sourcesContent":["/**\n * @license\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of a uthors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * C ode distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */ \nwindow.PolymerGestures = {};\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD styl e license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete se t of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n * /\n\n(function(scope) {\n var target = {\n shadow: function(inEl) {\n i f (inEl) {\n return inEl.shadowRoot || inEl.webkitShadowRoot;\n }\n },\n canTarget: function(shadow) {\n return shadow && Boolean(shadow. elementFromPoint);\n },\n targetingShadow: function(inEl) {\n var s = this.shadow(inEl);\n if (this.canTarget(s)) {\n return s;\n }\ n },\n olderShadow: function(shadow) {\n var os = shadow.olderShadowR oot;\n if (!os) {\n var se = shadow.querySelector('shadow');\n if (se) {\n os = se.olderShadowRoot;\n }\n }\n retur n os;\n },\n allShadows: function(element) {\n var shadows = [], s = this.shadow(element);\n while(s) {\n shadows.push(s);\n s = t his.olderShadow(s);\n }\n return shadows;\n },\n searchRoot: fun ction(inRoot, x, y) {\n if (inRoot) {\n var t = inRoot.elementFromPo int(x, y);\n var st, sr, os;\n // is element a shadow host?\n sr = this.targetingShadow(t);\n while (sr) {\n // find the th e element inside the shadow root\n st = sr.elementFromPoint(x, y);\n if (!st) {\n // check for older shadows\n sr = this .olderShadow(sr);\n } else {\n // shadowed element may conta in a shadow root\n var ssr = this.targetingShadow(st);\n r eturn this.searchRoot(ssr, x, y) || st;\n }\n }\n // ligh t dom element is the target\n return t;\n }\n },\n owner: func tion(element) {\n if (!element) {\n return document;\n }\n var s = element;\n // walk up until you hit the shadow root or document\n while (s.parentNode) {\n s = s.parentNode;\n }\n // the ow ner element is expected to be a Document or ShadowRoot\n if (s.nodeType != Node.DOCUMENT_NODE && s.nodeType != Node.DOCUMENT_FRAGMENT_NODE) {\n s = document;\n }\n return s;\n },\n findTarget: function(inEvent) { \n var x = inEvent.clientX, y = inEvent.clientY;\n // if the listener is in the shadow root, it is much faster to start there\n var s = this.owne r(inEvent.target);\n // if x, y is not in this root, fall back to document search\n if (!s.elementFromPoint(x, y)) {\n s = document;\n }\n return this.searchRoot(s, x, y);\n },\n LCA: function(a, b) {\n if (a === b) {\n return a;\n }\n if (a && !b) {\n retur n a;\n }\n if (b && !a) {\n return b;\n }\n if (!b && !a) {\n return document;\n }\n // fast case, a is a direct des cendant of b or vice versa\n if (a.contains && a.contains(b)) {\n re turn a;\n }\n if (b.contains && b.contains(a)) {\n return b;\n }\n var adepth = this.depth(a);\n var bdepth = this.depth(b);\n var d = adepth - bdepth;\n if (d > 0) {\n a = this.walk(a, d);\n } else {\n b = this.walk(b, -d);\n }\n while(a && b && a !== b) {\n a = this.walk(a, 1);\n b = this.walk(b, 1);\n }\n return a;\n },\n walk: function(n, u) {\n for (var i = 0; n && ( i < u); i++) {\n n = n.parentNode || n.host;\n }\n return n;\n },\n depth: function(n) {\n var d = 0;\n while(n) {\n d++ ;\n n = n.parentNode || n.host;\n }\n return d;\n },\n de epContains: function(a, b) {\n var common = this.LCA(a, b);\n // if a is the common ancestor, it must \"deeply\" contain b\n return common === a; \n },\n insideNode: function(node, x, y) {\n var rect = node.getBound ingClientRect();\n return (rect.left <= x) && (x <= rect.right) && (rect.to p <= y) && (y <= rect.bottom);\n }\n };\n scope.targetFinding = target;\n /**\n * Given an event, finds the \"deepest\" node that could have been the or iginal target before ShadowDOM retargetting\n *\n * @param {Event} Event An event object with clientX and clientY properties\n * @return {Element} The pro bable event origninator\n */\n scope.findTarget = target.findTarget.bind(targ et);\n /**\n * Determines if the \"container\" node deeply contains the \"con tainee\" node, including situations where the \"containee\" is contained by one or more ShadowDOM\n * roots.\n *\n * @param {Node} container\n * @param {Node} containee\n * @return {Boolean}\n */\n scope.deepContains = target.d eepContains.bind(target);\n\n /**\n * Determines if the x/y position is insid e the given node.\n *\n * Example:\n *\n * function upHandler(event) {\n * var innode = PolymerGestures.insideNode(event.target, event.clien tX, event.clientY);\n * if (innode) {\n * // wait for tap?\n * } else {\n * // tap will never happen\n * }\n * }\n *\n * @param {Node} node\n * @param {Number} x Screen X position\n * @param {Number} y screen Y position\n * @return {Boolean}\n */\n scope.in sideNode = target.insideNode;\n\n})(window.PolymerGestures);\n","/*\n *\n * Copy right (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code m ay only be used under the BSD style license found at http://polymer.github.io/LI CENSE.txt\n * The complete set of authors may be found at http://polymer.github. io/AUTHORS.txt\n * The complete set of contributors may be found at http://polym er.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the poly mer project is also\n * subject to an additional IP rights grant found at http:/ /polymer.github.io/PATENTS.txt\n */\n\n(function() {\n function shadowSelector( v) {\n return 'body /deep/ ' + selector(v);\n }\n function selector(v) {\n return '[touch-action=\"' + v + '\"]';\n }\n function rule(v) {\n return '{ -ms-touch-action: ' + v + '; touch-action: ' + v + ';}';\n }\n var attrib2 css = [\n 'none',\n 'auto',\n 'pan-x',\n 'pan-y',\n {\n rule : 'pan-x pan-y',\n selectors: [\n 'pan-x pan-y',\n 'pan-y pan -x'\n ]\n }\n ];\n var styles = '';\n // only install stylesheet if t he browser has touch action support\n var head = document.head;\n var hasTouch Action = typeof document.head.style.touchAction === 'string';\n // only add sha dow selectors if shadowdom is supported\n var hasShadowRoot = !window.ShadowDOM Polyfill && document.head.createShadowRoot;\n\n if (hasTouchAction) {\n attr ib2css.forEach(function(r) {\n if (String(r) === r) {\n styles += se lector(r) + rule(r) + '\\n';\n if (hasShadowRoot) {\n styles += shadowSelector(r) + rule(r) + '\\n';\n }\n } else {\n styles += r.selectors.map(selector) + rule(r.rule) + '\\n';\n if (hasShadowRoot) {\n styles += r.selectors.map(shadowSelector) + rule(r.rule) + '\\n';\ n }\n }\n });\n\n var el = document.createElement('style');\n el.textContent = styles;\n document.head.appendChild(el);\n }\n})();\n"," /*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt\n * The complete set of authors may be found at http://poly mer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at h ttp://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant foun d at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This is the constructo r for new PointerEvents.\n *\n * New Pointer Events must be given a type, and an optional dictionary of\n * initialization properties.\n *\n * Due to certain pl atform requirements, events returned from the constructor\n * identify as MouseE vents.\n *\n * @constructor\n * @param {String} inType The type of the event to create.\n * @param {Object} [inDict] An optional dictionary of initial event pro perties.\n * @return {Event} A new PointerEvent of type `inType` and initialized with properties from `inDict`.\n */\n(function(scope) {\n\n var MOUSE_PROPS = [\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX', \n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\ n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n 'page X',\n 'pageY'\n ];\n\n var MOUSE_DEFAULTS = [\n false,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n false,\n false,\n fa lse,\n false,\n 0,\n null,\n 0,\n 0\n ];\n\n var NOP_FACTORY = function(){ return function(){}; };\n\n var eventFactory = {\n // TODO(dfree dm): this is overridden by tap recognizer, needs review\n preventTap: NOP_FAC TORY,\n makeBaseEvent: function(inType, inDict) {\n var e = document.cre ateEvent('Event');\n e.initEvent(inType, inDict.bubbles || false, inDict.ca ncelable || false);\n e.preventTap = eventFactory.preventTap(e);\n ret urn e;\n },\n makeGestureEvent: function(inType, inDict) {\n inDict = inDict || Object.create(null);\n\n var e = this.makeBaseEvent(inType, inDi ct);\n for (var i = 0, keys = Object.keys(inDict), k; i < keys.length; i++) {\n k = keys[i];\n e[k] = inDict[k];\n }\n return e;\n },\n makePointerEvent: function(inType, inDict) {\n inDict = inDict | | Object.create(null);\n\n var e = this.makeBaseEvent(inType, inDict);\n // define inherited MouseEvent properties\n for(var i = 0, p; i < MOUSE_ PROPS.length; i++) {\n p = MOUSE_PROPS[i];\n e[p] = inDict[p] || M OUSE_DEFAULTS[i];\n }\n e.buttons = inDict.buttons || 0;\n\n // S pec requires that pointers without pressure specified use 0.5 for down\n // state and 0 for up state.\n var pressure = 0;\n if (inDict.pressure) {\n pressure = inDict.pressure;\n } else {\n pressure = e.but tons ? 0.5 : 0;\n }\n\n // add x/y properties aliased to clientX/Y\n e.x = e.clientX;\n e.y = e.clientY;\n\n // define the properties o f the PointerEvent interface\n e.pointerId = inDict.pointerId || 0;\n e.width = inDict.width || 0;\n e.height = inDict.height || 0;\n e.pres sure = pressure;\n e.tiltX = inDict.tiltX || 0;\n e.tiltY = inDict.til tY || 0;\n e.pointerType = inDict.pointerType || '';\n e.hwTimestamp = inDict.hwTimestamp || 0;\n e.isPrimary = inDict.isPrimary || false;\n return e;\n }\n };\n\n scope.eventFactory = eventFactory;\n})(window.Polym erGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All righ ts reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be fou nd at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed b y Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This module implements an map of pointer states\n */\n(function(scope) {\n var USE_M AP = window.Map && window.Map.prototype.forEach;\n var POINTERS_FN = function() { return this.size; };\n function PointerMap() {\n if (USE_MAP) {\n var m = new Map();\n m.pointers = POINTERS_FN;\n return m;\n } else {\ n this.keys = [];\n this.values = [];\n }\n }\n\n PointerMap.prot otype = {\n set: function(inId, inEvent) {\n var i = this.keys.indexOf(i nId);\n if (i > -1) {\n this.values[i] = inEvent;\n } else {\n this.keys.push(inId);\n this.values.push(inEvent);\n }\n } ,\n has: function(inId) {\n return this.keys.indexOf(inId) > -1;\n }, \n 'delete': function(inId) {\n var i = this.keys.indexOf(inId);\n if (i > -1) {\n this.keys.splice(i, 1);\n this.values.splice(i, 1) ;\n }\n },\n get: function(inId) {\n var i = this.keys.indexOf(i nId);\n return this.values[i];\n },\n clear: function() {\n this .keys.length = 0;\n this.values.length = 0;\n },\n // return value, k ey, map\n forEach: function(callback, thisArg) {\n this.values.forEach(f unction(v, i) {\n callback.call(thisArg, v, this.keys[i], this);\n } , this);\n },\n pointers: function() {\n return this.keys.length;\n }\n };\n\n scope.PointerMap = PointerMap;\n})(window.PolymerGestures);\n","/ *\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * T his code may only be used under the BSD style license found at http://polymer.gi thub.io/LICENSE.txt\n * The complete set of authors may be found at http://polym er.github.io/AUTHORS.txt\n * The complete set of contributors may be found at ht tp://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part o f the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var CLONE _PROPS = [\n // MouseEvent\n 'bubbles',\n 'cancelable',\n 'view',\n 'detail',\n 'screenX',\n 'screenY',\n 'clientX',\n 'clientY',\n 'ctrlKey',\n 'altKey',\n 'shiftKey',\n 'metaKey',\n 'button',\n 'relatedTarget',\n // DOM Level 3\n 'buttons',\n // PointerEvent\n 'pointerId',\n 'width',\n 'height',\n 'pressure',\n 'tiltX',\n 't iltY',\n 'pointerType',\n 'hwTimestamp',\n 'isPrimary',\n // event i nstance\n 'type',\n 'target',\n 'currentTarget',\n 'which',\n 'pa geX',\n 'pageY',\n 'timeStamp',\n // gesture addons\n 'preventTap',\ n 'tapPrevented'\n ];\n\n var CLONE_DEFAULTS = [\n // MouseEvent\n fa lse,\n false,\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n fals e,\n false,\n false,\n false,\n 0,\n null,\n // DOM Level 3\n 0,\n // PointerEvent\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n '',\n 0,\n false,\n // event instance\n '',\n null,\n null,\n 0,\n 0,\n 0,\n 0,\n function(){},\n false\n ];\n\n var HAS_S VG_INSTANCE = (typeof SVGElementInstance !== 'undefined');\n\n var wrap = windo w.ShadowDOMPolyfill && ShadowDOMPolyfill.wrapIfNeeded || function(e){ return e; };\n\n var eventFactory = scope.eventFactory;\n /**\n * This module is for n ormalizing events. Mouse and Touch events will be\n * collected here, and fire PointerEvents that have the same semantics, no\n * matter the source.\n * E vents fired:\n * - pointerdown: a pointing is added\n * - pointerup: a p ointer is removed\n * - pointermove: a pointer is moved\n * - pointerove r: a pointer crosses into an element\n * - pointerout: a pointer leaves an e lement\n * - pointercancel: a pointer will no longer generate events\n */\ n var dispatcher = {\n pointermap: new scope.PointerMap(),\n eventMap: Ob ject.create(null),\n // Scope objects for native events.\n // This exists for ease of testing.\n eventSources: Object.create(null),\n eventSourceLis t: [],\n gestures: [],\n gestureQueue: [],\n /**\n * Add a new even t source that will generate pointer events.\n *\n * `inSource` must cont ain an array of event names named `events`, and\n * functions with the names specified in the `events` array.\n * @param {string} name A name for the ev ent source\n * @param {Object} source A new source of platform events.\n */\n registerSource: function(name, source) {\n var s = source;\n var newEvents = s.events;\n if (newEvents) {\n newEvents.forEach(fun ction(e) {\n if (s[e]) {\n this.eventMap[e] = s[e].bind(s);\ n }\n }, this);\n this.eventSources[name] = s;\n t his.eventSourceList.push(s);\n }\n },\n registerGesture: function(nam e, source) {\n this.gestures.push(source);\n },\n register: function( element) {\n // NOTE: Work around for #4, don't add listeners to individual Polymer elmenets in SD Polyfill\n if (window.ShadowDOMPolyfill && element !== document) {\n return;\n }\n var l = this.eventSourceList.le ngth;\n for (var i = 0, es; (i < l) && (es = this.eventSourceList[i]); i++) {\n // call eventsource register\n es.register.call(es, element); \n }\n },\n unregister: function(element) {\n var l = this.event SourceList.length;\n for (var i = 0, es; (i < l) && (es = this.eventSourceL ist[i]); i++) {\n // call eventsource register\n es.unregister.cal l(es, element);\n }\n },\n // EVENTS\n down: function(inEvent) {\n this.fireEvent('down', inEvent);\n },\n move: function(inEvent) {\n // pipe move events into gesture queue directly\n inEvent.type = 'move ';\n this.fillGestureQueue(inEvent);\n },\n up: function(inEvent) {\n this.fireEvent('up', inEvent);\n },\n cancel: function(inEvent) {\n inEvent.tapPrevented = true;\n this.fireEvent('up', inEvent);\n },\ n // LISTENER LOGIC\n eventHandler: function(inEvent) {\n // This is used to prevent multiple dispatch of events from\n // platform events. This can happen when two elements in different scopes\n // are set up to create pointer events, which is relevant to Shadow DOM.\n if (inEvent._handledByP G) {\n return;\n }\n var type = inEvent.type;\n var fn = t his.eventMap && this.eventMap[type];\n if (fn) {\n fn(inEvent);\n }\n inEvent._handledByPG = true;\n },\n // set up event listeners\ n listen: function(target, events) {\n events.forEach(function(e) {\n this.addEvent(target, e);\n }, this);\n },\n // remove event lis teners\n unlisten: function(target, events) {\n events.forEach(function( e) {\n this.removeEvent(target, e);\n }, this);\n },\n addEven t: function(target, eventName) {\n // NOTE: Work around for #4, use native event listener in SD Polyfill\n if (window.ShadowDOMPolyfill) {\n ta rget.addEventListener_(eventName, this.boundHandler);\n } else {\n t arget.addEventListener(eventName, this.boundHandler);\n }\n },\n remo veEvent: function(target, eventName) {\n // NOTE: Work around for #4, use n ative event listener in SD Polyfill\n if (window.ShadowDOMPolyfill) {\n target.removeEventListener_(eventName, this.boundHandler);\n } else {\n target.removeEventListener(eventName, this.boundHandler);\n }\n },\n // EVENT CREATION AND TRACKING\n /**\n * Creates a new Event of t ype `inType`, based on the information in\n * `inEvent`.\n *\n * @pa ram {string} inType A string representing the type of event to create\n * @p aram {Event} inEvent A platform event with a target\n * @return {Event} A Po interEvent of type `inType`\n */\n makeEvent: function(inType, inEvent) { \n var e = eventFactory.makePointerEvent(inType, inEvent);\n e.prevent Default = inEvent.preventDefault;\n e.tapPrevented = inEvent.tapPrevented;\ n e._target = e._target || inEvent.target;\n return e;\n },\n // make and dispatch an event in one call\n fireEvent: function(inType, inEvent ) {\n var e = this.makeEvent(inType, inEvent);\n return this.dispatchE vent(e);\n },\n /**\n * Returns a snapshot of inEvent, with writable p roperties.\n *\n * @param {Event} inEvent An event that contains propert ies to copy.\n * @return {Object} An object containing shallow copies of `in Event`'s\n * properties.\n */\n cloneEvent: function(inEvent) {\n var eventCopy = Object.create(null), p;\n for (var i = 0; i < CLONE_PR OPS.length; i++) {\n p = CLONE_PROPS[i];\n eventCopy[p] = inEvent[ p] || CLONE_DEFAULTS[i];\n // Work around SVGInstanceElement shadow tree\ n // Return the <use> element that is represented by the instance for Saf ari, Chrome, IE.\n // This is the behavior implemented by Firefox.\n if (p === 'target' || p === 'relatedTarget') {\n if (HAS_SVG_INSTANC E && eventCopy[p] instanceof SVGElementInstance) {\n eventCopy[p] = e ventCopy[p].correspondingUseElement;\n }\n eventCopy[p] = wrap (eventCopy[p]);\n }\n }\n // keep the semantics of preventDefau lt\n eventCopy.preventDefault = inEvent.preventDefault;\n return event Copy;\n },\n /**\n * Dispatches the event to its target.\n *\n * @param {Event} inEvent The event to be dispatched.\n * @return {Boolean} True if an event handler returns true, false otherwise.\n */\n dispatchEv ent: function(inEvent) {\n var t = inEvent._target;\n if (t) {\n t.dispatchEvent(inEvent);\n // clone the event for the gesture system t o process\n // clone after dispatch to pick up gesture prevention code\n var clone = this.cloneEvent(inEvent);\n clone.target = t;\n this.fillGestureQueue(clone);\n }\n },\n gestureTrigger: function() {\n // process the gesture queue\n for (var i = 0, e; i < this.gesture Queue.length; i++) {\n e = this.gestureQueue[i];\n for (var j = 0, g; j < this.gestures.length; j++) {\n g = this.gestures[j];\n if (g.events.indexOf(e.type) >= 0) {\n g[e.type].call(g, e);\n }\n }\n }\n this.gestureQueue.length = 0;\n },\n fill GestureQueue: function(ev) {\n // only trigger the gesture queue once\n if (!this.gestureQueue.length) {\n requestAnimationFrame(this.boundGest ureTrigger);\n }\n this.gestureQueue.push(ev);\n }\n };\n dispatc her.boundHandler = dispatcher.eventHandler.bind(dispatcher);\n dispatcher.bound GestureTrigger = dispatcher.gestureTrigger.bind(dispatcher);\n scope.dispatcher = dispatcher;\n scope.register = dispatcher.register.bind(dispatcher);\n scop e.unregister = dispatcher.unregister.bind(dispatcher);\n})(window.PolymerGesture s);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserv ed.\n * This code may only be used under the BSD style license found at http://p olymer.github.io/LICENSE.txt\n * The complete set of authors may be found at htt p://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be fo und at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights gr ant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This module us es Mutation Observers to dynamically adjust which nodes will\n * generate Pointe r Events.\n *\n * All nodes that wish to generate Pointer Events must have the a ttribute\n * `touch-action` set to `none`.\n */\n(function(scope) {\n var forEa ch = Array.prototype.forEach.call.bind(Array.prototype.forEach);\n var map = Ar ray.prototype.map.call.bind(Array.prototype.map);\n var toArray = Array.prototy pe.slice.call.bind(Array.prototype.slice);\n var filter = Array.prototype.filte r.call.bind(Array.prototype.filter);\n var MO = window.MutationObserver || wind ow.WebKitMutationObserver;\n var SELECTOR = '[touch-action]';\n var OBSERVER_I NIT = {\n subtree: true,\n childList: true,\n attributes: true,\n at tributeOldValue: true,\n attributeFilter: ['touch-action']\n };\n\n functio n Installer(add, remove, changed, binder) {\n this.addCallback = add.bind(bin der);\n this.removeCallback = remove.bind(binder);\n this.changedCallback = changed.bind(binder);\n if (MO) {\n this.observer = new MO(this.mutati onWatcher.bind(this));\n }\n }\n\n Installer.prototype = {\n watchSubtre e: function(target) {\n // Only watch scopes that can target find, as these are top-level.\n // Otherwise we can see duplicate additions and removals that add noise.\n //\n // TODO(dfreedman): For some instances with Sha dowDOMPolyfill, we can see\n // a removal without an insertion when a node is redistributed among\n // shadows. Since it all ends up correct in the do cument, watching only\n // the document will yield the correct mutations to watch.\n if (scope.targetFinding.canTarget(target)) {\n this.observ er.observe(target, OBSERVER_INIT);\n }\n },\n enableOnSubtree: functi on(target) {\n this.watchSubtree(target);\n if (target === document && document.readyState !== 'complete') {\n this.installOnLoad();\n } e lse {\n this.installNewSubtree(target);\n }\n },\n installNewS ubtree: function(target) {\n forEach(this.findElements(target), this.addEle ment, this);\n },\n findElements: function(target) {\n if (target.que rySelectorAll) {\n return target.querySelectorAll(SELECTOR);\n }\n return [];\n },\n removeElement: function(el) {\n this.removeCall back(el);\n },\n addElement: function(el) {\n this.addCallback(el);\n },\n elementChanged: function(el, oldValue) {\n this.changedCallback (el, oldValue);\n },\n concatLists: function(accum, list) {\n return accum.concat(toArray(list));\n },\n // register all touch-action = none no des on document load\n installOnLoad: function() {\n document.addEventLi stener('readystatechange', function() {\n if (document.readyState === 'co mplete') {\n this.installNewSubtree(document);\n }\n }.bind (this));\n },\n isElement: function(n) {\n return n.nodeType === Node .ELEMENT_NODE;\n },\n flattenMutationTree: function(inNodes) {\n // f ind children with touch-action\n var tree = map(inNodes, this.findElements, this);\n // make sure the added nodes are accounted for\n tree.push(f ilter(inNodes, this.isElement));\n // flatten the list\n return tree.r educe(this.concatLists, []);\n },\n mutationWatcher: function(mutations) { \n mutations.forEach(this.mutationHandler, this);\n },\n mutationHand ler: function(m) {\n if (m.type === 'childList') {\n var added = thi s.flattenMutationTree(m.addedNodes);\n added.forEach(this.addElement, thi s);\n var removed = this.flattenMutationTree(m.removedNodes);\n re moved.forEach(this.removeElement, this);\n } else if (m.type === 'attribute s') {\n this.elementChanged(m.target, m.oldValue);\n }\n }\n };\ n\n if (!MO) {\n Installer.prototype.watchSubtree = function(){\n conso le.warn('PolymerGestures: MutationObservers not found, touch-action will not be dynamically detected');\n };\n }\n\n scope.Installer = Installer;\n})(windo w.PolymerGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. A ll rights reserved.\n * This code may only be used under the BSD style license f ound at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contri butors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distri buted by Google as part of the polymer project is also\n * subject to an additio nal IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(funct ion (scope) {\n var dispatcher = scope.dispatcher;\n var pointermap = dispatch er.pointermap;\n // radius around touchend that swallows mouse events\n var DE DUP_DIST = 25;\n\n var WHICH_TO_BUTTONS = [0, 1, 4, 2];\n\n var HAS_BUTTONS = false;\n try {\n HAS_BUTTONS = new MouseEvent('test', {buttons: 1}).buttons === 1;\n } catch (e) {}\n\n // handler block for native mouse events\n var mo useEvents = {\n POINTER_ID: 1,\n POINTER_TYPE: 'mouse',\n events: [\n 'mousedown',\n 'mousemove',\n 'mouseup',\n ],\n register: fu nction(target) {\n dispatcher.listen(target, this.events);\n },\n unr egister: function(target) {\n dispatcher.unlisten(target, this.events);\n },\n lastTouches: [],\n // collide with the global mouse listener\n i sEventSimulatedFromTouch: function(inEvent) {\n var lts = this.lastTouches; \n var x = inEvent.clientX, y = inEvent.clientY;\n for (var i = 0, l = lts.length, t; i < l && (t = lts[i]); i++) {\n // simulated mouse events will be swallowed near a primary touchend\n var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);\n if (dx <= DEDUP_DIST && dy <= DEDUP_DIST) {\n return true;\n }\n }\n },\n prepareEvent: function(inE vent) {\n var e = dispatcher.cloneEvent(inEvent);\n e.pointerId = this .POINTER_ID;\n e.isPrimary = true;\n e.pointerType = this.POINTER_TYPE ;\n if (!HAS_BUTTONS) {\n e.buttons = WHICH_TO_BUTTONS[e.which] || 0 ;\n }\n return e;\n },\n mousedown: function(inEvent) {\n i f (!this.isEventSimulatedFromTouch(inEvent)) {\n var p = pointermap.has(t his.POINTER_ID);\n // TODO(dfreedman) workaround for some elements not se nding mouseup\n // http://crbug/149091\n if (p) {\n this. mouseup(inEvent);\n }\n var e = this.prepareEvent(inEvent);\n pointermap.set(this.POINTER_ID, e.target);\n dispatcher.down(e);\n }\n },\n mousemove: function(inEvent) {\n if (!this.isEventSimulate dFromTouch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n e.t arget = pointermap.get(this.POINTER_ID);\n dispatcher.move(e);\n }\n },\n mouseup: function(inEvent) {\n if (!this.isEventSimulatedFromTo uch(inEvent)) {\n var e = this.prepareEvent(inEvent);\n e.relatedT arget = e.target;\n e.target = pointermap.get(this.POINTER_ID);\n dispatcher.up(e);\n this.cleanupMouse();\n }\n },\n cleanupMou se: function() {\n pointermap['delete'](this.POINTER_ID);\n }\n };\n\n scope.mouseEvents = mouseEvents;\n})(window.PolymerGestures);\n","/*\n * Copyri ght (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICE NSE.txt\n * The complete set of authors may be found at http://polymer.github.io /AUTHORS.txt\n * The complete set of contributors may be found at http://polymer .github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polyme r project is also\n * subject to an additional IP rights grant found at http://p olymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var dispatcher = scop e.dispatcher;\n var allShadows = scope.targetFinding.allShadows.bind(scope.targ etFinding);\n var pointermap = dispatcher.pointermap;\n var touchMap = Array.p rototype.map.call.bind(Array.prototype.map);\n // This should be long enough to ignore compat mouse events made by touch\n var DEDUP_TIMEOUT = 2500;\n var CL ICK_COUNT_TIMEOUT = 200;\n var ATTRIB = 'touch-action';\n var INSTALLER;\n va r HAS_TOUCH_ACTION = typeof document.head.style.touchAction === 'string';\n\n / / handler block for native touch events\n var touchEvents = {\n events: [\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel'\n ],\n register: function(target) {\n if (HAS_TOUCH_ACTION) {\n dispatcher.listen(target, this.events);\n } else {\n INSTALLER.enab leOnSubtree(target);\n }\n },\n unregister: function(target) {\n if (HAS_TOUCH_ACTION) {\n dispatcher.unlisten(target, this.events);\n } else {\n // TODO(dfreedman): is it worth it to disconnect the MO?\n }\n },\n elementAdded: function(el) {\n var a = el.getAttribute( ATTRIB);\n var st = this.touchActionToScrollType(a);\n if (st) {\n el._scrollType = st;\n dispatcher.listen(el, this.events);\n / / set touch-action on shadows as well\n allShadows(el).forEach(function(s ) {\n s._scrollType = st;\n dispatcher.listen(s, this.events); \n }, this);\n }\n },\n elementRemoved: function(el) {\n el._scrollType = undefined;\n dispatcher.unlisten(el, this.events);\n // remove touch-action from shadow\n allShadows(el).forEach(function(s) {\n s._scrollType = undefined;\n dispatcher.unlisten(s, this.events); \n }, this);\n },\n elementChanged: function(el, oldValue) {\n v ar a = el.getAttribute(ATTRIB);\n var st = this.touchActionToScrollType(a); \n var oldSt = this.touchActionToScrollType(oldValue);\n // simply upd ate scrollType if listeners are already established\n if (st && oldSt) {\n el._scrollType = st;\n allShadows(el).forEach(function(s) {\n s._scrollType = st;\n }, this);\n } else if (oldSt) {\n this.elementRemoved(el);\n } else if (st) {\n this.elementAdded(el); \n }\n },\n scrollTypes: {\n EMITTER: 'none',\n XSCROLLER: 'pan-x',\n YSCROLLER: 'pan-y',\n SCROLLER: /^(?:pan-x pan-y)|(?:pan-y pan-x)|auto$/\n },\n touchActionToScrollType: function(touchAction) {\n var t = touchAction;\n var st = this.scrollTypes;\n if (t === 'none ') {\n return 'none';\n } else if (t === st.XSCROLLER) {\n re turn 'X';\n } else if (t === st.YSCROLLER) {\n return 'Y';\n } else if (st.SCROLLER.exec(t)) {\n return 'XY';\n }\n },\n POIN TER_TYPE: 'touch',\n firstTouch: null,\n isPrimaryTouch: function(inTouch) {\n return this.firstTouch === inTouch.identifier;\n },\n setPrimary Touch: function(inTouch) {\n // set primary touch if there no pointers, or the only pointer is the mouse\n if (pointermap.pointers() === 0 || (pointer map.pointers() === 1 && pointermap.has(1))) {\n this.firstTouch = inTouch .identifier;\n this.firstXY = {X: inTouch.clientX, Y: inTouch.clientY};\n this.scrolling = false;\n this.cancelResetClickCount();\n }\ n },\n removePrimaryPointer: function(inPointer) {\n if (inPointer.is Primary) {\n this.firstTouch = null;\n this.firstXY = null;\n this.resetClickCount();\n }\n },\n clickCount: 0,\n resetId: nu ll,\n resetClickCount: function() {\n var fn = function() {\n thi s.clickCount = 0;\n this.resetId = null;\n }.bind(this);\n this .resetId = setTimeout(fn, CLICK_COUNT_TIMEOUT);\n },\n cancelResetClickCou nt: function() {\n if (this.resetId) {\n clearTimeout(this.resetId); \n }\n },\n typeToButtons: function(type) {\n var ret = 0;\n if (type === 'touchstart' || type === 'touchmove') {\n ret = 1;\n }\n return ret;\n },\n findTarget: function(touch, id) {\n if (t his.currentTouchEvent.type === 'touchstart') {\n return scope.findTarget( touch);\n }\n // reuse target we found in touchstart\n return poi ntermap.get(id);\n },\n touchToPointer: function(inTouch) {\n var cte = this.currentTouchEvent;\n var e = dispatcher.cloneEvent(inTouch);\n // Spec specifies that pointerId 1 is reserved for Mouse.\n // Touch ident ifiers can start at 0.\n // Add 2 to the touch identifier for compatibility .\n var id = e.pointerId = inTouch.identifier + 2;\n e.target = this.f indTarget(inTouch, id);\n e.bubbles = true;\n e.cancelable = true;\n e.detail = this.clickCount;\n e.buttons = this.typeToButtons(cte.type); \n e.width = inTouch.webkitRadiusX || inTouch.radiusX || 0;\n e.height = inTouch.webkitRadiusY || inTouch.radiusY || 0;\n e.pressure = inTouch.we bkitForce || inTouch.force || 0.5;\n e.isPrimary = this.isPrimaryTouch(inTo uch);\n e.pointerType = this.POINTER_TYPE;\n // forward touch preventD efaults\n var self = this;\n e.preventDefault = function() {\n self.scrolling = false;\n self.firstXY = null;\n cte.preventDefaul t();\n };\n return e;\n },\n processTouches: function(inEvent, i nFunction) {\n var tl = inEvent.changedTouches;\n this.currentTouchEve nt = inEvent;\n for (var i = 0, t; i < tl.length; i++) {\n t = tl[i] ;\n inFunction.call(this, this.touchToPointer(t));\n }\n },\n // For single axis scrollers, determines whether the element should emit\n // pointer events or behave as a scroller\n shouldScroll: function(inEvent) {\n if (this.firstXY) {\n var ret;\n var scrollAxis = inEvent.cu rrentTarget._scrollType;\n if (scrollAxis === 'none') {\n // thi s element is a touch-action: none, should never scroll\n ret = false;\n } else if (scrollAxis === 'XY') {\n // this element should alwa ys scroll\n ret = true;\n } else {\n var t = inEvent.ch angedTouches[0];\n // check the intended scroll axis, and other axis\n var a = scrollAxis;\n var oa = scrollAxis === 'Y' ? 'X' : 'Y'; \n var da = Math.abs(t['client' + a] - this.firstXY[a]);\n var doa = Math.abs(t['client' + oa] - this.firstXY[oa]);\n // if delta in the scroll axis > delta other axis, scroll instead of\n // making event s\n ret = da >= doa;\n }\n this.firstXY = null;\n return ret;\n }\n },\n findTouch: function(inTL, inId) {\n for ( var i = 0, l = inTL.length, t; i < l && (t = inTL[i]); i++) {\n if (t.ide ntifier === inId) {\n return true;\n }\n }\n },\n // In some instances, a touchstart can happen without a touchend. This\n // leav es the pointermap in a broken state.\n // Therefore, on every touchstart, we remove the touches that did not fire a\n // touchend event.\n // To keep s tate globally consistent, we fire a\n // pointercancel for this \"abandoned\" touch\n vacuumTouches: function(inEvent) {\n var tl = inEvent.touches;\ n // pointermap.pointers() should be < tl.length here, as the touchstart ha s not\n // been processed yet.\n if (pointermap.pointers() >= tl.lengt h) {\n var d = [];\n pointermap.forEach(function(value, key) {\n // Never remove pointerId == 1, which is mouse.\n // Touch iden tifiers are 2 smaller than their pointerId, which is the\n // index in pointermap.\n if (key !== 1 && !this.findTouch(tl, key - 2)) {\n var p = value.out;\n d.push(p);\n }\n }, this);\ n d.forEach(this.cancelOut, this);\n }\n },\n touchstart: func tion(inEvent) {\n this.vacuumTouches(inEvent);\n this.setPrimaryTouch( inEvent.changedTouches[0]);\n this.dedupSynthMouse(inEvent);\n if (!th is.scrolling) {\n this.clickCount++;\n this.processTouches(inEvent , this.down);\n }\n },\n down: function(inPointer) {\n var p = p ointermap.set(inPointer.pointerId, inPointer.target);\n dispatcher.down(inP ointer);\n },\n touchmove: function(inEvent) {\n if (HAS_TOUCH_ACTION ) {\n this.processTouches(inEvent, this.move);\n } else {\n i f (!this.scrolling) {\n if (this.shouldScroll(inEvent)) {\n this.scrolling = true;\n this.touchcancel(inEvent);\n } else {\n inEvent.preventDefault();\n this.processTouches(inEve nt, this.move);\n }\n }\n }\n },\n move: function(inP ointer) {\n var pointer = pointermap.get(inPointer.pointerId);\n // a finger drifted off the screen, ignore it\n if (!pointer) {\n return; \n }\n dispatcher.move(inPointer);\n },\n touchend: function(inE vent) {\n this.dedupSynthMouse(inEvent);\n this.processTouches(inEvent , this.up);\n },\n up: function(inPointer) {\n if (!this.scrolling) { \n inPointer.relatedTarget = scope.findTarget(inPointer);\n dispat cher.up(inPointer);\n }\n this.cleanUpPointer(inPointer);\n },\n cancel: function(inPointer) {\n inPointer.relatedTarget = scope.findTarget (inPointer);\n dispatcher.cancel(inPointer);\n this.cleanUpPointer(inP ointer);\n },\n touchcancel: function(inEvent) {\n this.processTouche s(inEvent, this.cancel);\n },\n cleanUpPointer: function(inPointer) {\n pointermap['delete'](inPointer.pointerId);\n this.removePrimaryPointer(i nPointer);\n },\n // prevent synth mouse events from creating pointer even ts\n dedupSynthMouse: function(inEvent) {\n var lts = scope.mouseEvents. lastTouches;\n var t = inEvent.changedTouches[0];\n // only the primar y finger will synth mouse events\n if (this.isPrimaryTouch(t)) {\n / / remember x/y of last touch\n var lt = {x: t.clientX, y: t.clientY};\n lts.push(lt);\n var fn = (function(lts, lt){\n var i = lts .indexOf(lt);\n if (i > -1) {\n lts.splice(i, 1);\n }\n }).bind(null, lts, lt);\n setTimeout(fn, DEDUP_TIMEOUT);\n }\n }\n };\n\n if (!HAS_TOUCH_ACTION) {\n INSTALLER = new scope.Insta ller(touchEvents.elementAdded, touchEvents.elementRemoved, touchEvents.elementCh anged, touchEvents);\n }\n\n scope.touchEvents = touchEvents;\n})(window.Polym erGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All righ ts reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be fou nd at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed b y Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(sco pe) {\n var dispatcher = scope.dispatcher;\n var pointermap = dispatcher.point ermap;\n var HAS_BITMAP_TYPE = window.MSPointerEvent && typeof window.MSPointer Event.MSPOINTER_TYPE_MOUSE === 'number';\n var msEvents = {\n events: [\n 'MSPointerDown',\n 'MSPointerMove',\n 'MSPointerUp',\n 'MSPoin terCancel',\n ],\n register: function(target) {\n dispatcher.listen(t arget, this.events);\n },\n unregister: function(target) {\n dispatch er.unlisten(target, this.events);\n },\n POINTER_TYPES: [\n '',\n 'unavailable',\n 'touch',\n 'pen',\n 'mouse'\n ],\n prepa reEvent: function(inEvent) {\n var e = inEvent;\n if (HAS_BITMAP_TYPE) {\n e = dispatcher.cloneEvent(inEvent);\n e.pointerType = this.PO INTER_TYPES[inEvent.pointerType];\n }\n return e;\n },\n cleanup : function(id) {\n pointermap['delete'](id);\n },\n MSPointerDown: fu nction(inEvent) {\n var e = this.prepareEvent(inEvent);\n pointermap.s et(inEvent.pointerId, e.target);\n dispatcher.down(e);\n },\n MSPoint erMove: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e. target = pointermap.get(e.pointerId);\n dispatcher.move(e);\n },\n MS PointerUp: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = e.target;\n e.target = pointermap.get(e.pointerId);\n dispatcher.up(e);\n this.cleanup(inEvent.pointerId);\n },\n MSPoin terCancel: function(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = e.target;\n e.target = pointermap.get(e.pointerId);\n dispatcher.cancel(e);\n this.cleanup(inEvent.pointerId);\n }\n };\n\ n scope.msEvents = msEvents;\n})(window.PolymerGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may onl y be used under the BSD style license found at http://polymer.github.io/LICENSE. txt\n * The complete set of authors may be found at http://polymer.github.io/AUT HORS.txt\n * The complete set of contributors may be found at http://polymer.git hub.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer pr oject is also\n * subject to an additional IP rights grant found at http://polym er.github.io/PATENTS.txt\n */\n\n(function(scope) {\n var dispatcher = scope.di spatcher;\n var pointermap = dispatcher.pointermap;\n var pointerEvents = {\n events: [\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointercancel'\n ],\n prepareEvent: function(inEvent) {\n return dispatcher.cloneEvent(inEvent);\n },\n register: function(target) {\n dispatcher.listen(target, this.events);\n },\n unregister: function(targ et) {\n dispatcher.unlisten(target, this.events);\n },\n cleanup: fun ction(id) {\n pointermap['delete'](id);\n },\n pointerdown: function( inEvent) {\n var e = this.prepareEvent(inEvent);\n pointermap.set(e.po interId, e.target);\n dispatcher.down(e);\n },\n pointermove: functio n(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.target = pointe rmap.get(e.pointerId);\n dispatcher.move(e);\n },\n pointerup: functi on(inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = e.target;\n e.target = pointermap.get(e.pointerId);\n dispatcher.up( e);\n this.cleanup(inEvent.pointerId);\n },\n pointercancel: function (inEvent) {\n var e = this.prepareEvent(inEvent);\n e.relatedTarget = e.target;\n e.target = pointermap.get(e.pointerId);\n dispatcher.cance l(e);\n this.cleanup(inEvent.pointerId);\n }\n };\n\n scope.pointerEve nts = pointerEvents;\n})(window.PolymerGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * T he complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\ n * The complete set of contributors may be found at http://polymer.github.io/CO NTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github .io/PATENTS.txt\n */\n\n/**\n * This module contains the handlers for native pla tform events.\n * From here, the dispatcher is called to create unified pointer events.\n * Included are touch events (v1), mouse events, and MSPointerEvents.\n */\n(function(scope) {\n var dispatcher = scope.dispatcher;\n\n if (window.Po interEvent) {\n dispatcher.registerSource('pointer', scope.pointerEvents);\n } else if (window.navigator.msPointerEnabled) {\n dispatcher.registerSource( 'ms', scope.msEvents);\n } else {\n dispatcher.registerSource('mouse', scope .mouseEvents);\n if (window.ontouchstart !== undefined) {\n dispatcher.r egisterSource('touch', scope.touchEvents);\n }\n }\n\n dispatcher.register( document);\n})(window.PolymerGestures);\n","/*\n * Copyright (c) 2014 The Polyme r Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complet e set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The co mplete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS .txt\n * Code distributed by Google as part of the polymer project is also\n * s ubject to an additional IP rights grant found at http://polymer.github.io/PATENT S.txt\n */\n\n/**\n * This event denotes the beginning of a series of tracking e vents.\n *\n * @module PointerGestures\n * @submodule Events\n * @class tracksta rt\n */\n/**\n * Pixels moved in the x direction since trackstart.\n * @type Num ber\n * @property dx\n */\n/**\n * Pixes moved in the y direction since tracksta rt.\n * @type Number\n * @property dy\n */\n/**\n * Pixels moved in the x direct ion since the last track.\n * @type Number\n * @property ddx\n */\n/**\n * Pixle s moved in the y direction since the last track.\n * @type Number\n * @property ddy\n */\n/**\n * The clientX position of the track gesture.\n * @type Number\n * @property clientX\n */\n/**\n * The clientY position of the track gesture.\n * @type Number\n * @property clientY\n */\n/**\n * The pageX position of the trac k gesture.\n * @type Number\n * @property pageX\n */\n/**\n * The pageY position of the track gesture.\n * @type Number\n * @property pageY\n */\n/**\n * The sc reenX position of the track gesture.\n * @type Number\n * @property screenX\n */ \n/**\n * The screenY position of the track gesture.\n * @type Number\n * @prope rty screenY\n */\n/**\n * The last x axis direction of the pointer.\n * @type Nu mber\n * @property xDirection\n */\n/**\n * The last y axis direction of the poi nter.\n * @type Number\n * @property yDirection\n */\n/**\n * A shared object be tween all tracking events.\n * @type Object\n * @property trackInfo\n */\n/**\n * The element currently under the pointer.\n * @type Element\n * @property relat edTarget\n */\n/**\n * The type of pointer that make the track gesture.\n * @typ e String\n * @property pointerType\n */\n/**\n *\n * This event fires for all po inter movement being tracked.\n *\n * @class track\n * @extends trackstart\n */\ n/**\n * This event fires when the pointer is no longer being tracked.\n *\n * @ class trackend\n * @extends trackstart\n */\n\n (function(scope) {\n var dispa tcher = scope.dispatcher;\n var eventFactory = scope.eventFactory;\n var poi ntermap = new scope.PointerMap();\n var track = {\n events: [\n 'dow n',\n 'move',\n 'up',\n ],\n WIGGLE_THRESHOLD: 4,\n clam pDir: function(inDelta) {\n return inDelta > 0 ? 1 : -1;\n },\n ca lcPositionDelta: function(inA, inB) {\n var x = 0, y = 0;\n if (inA && inB) {\n x = inB.pageX - inA.pageX;\n y = inB.pageY - inA.pag eY;\n }\n return {x: x, y: y};\n },\n fireTrack: function(in Type, inEvent, inTrackingData) {\n var t = inTrackingData;\n var d = this.calcPositionDelta(t.downEvent, inEvent);\n var dd = this.calcPositio nDelta(t.lastMoveEvent, inEvent);\n if (dd.x) {\n t.xDirection = t his.clampDir(dd.x);\n }\n if (dd.y) {\n t.yDirection = this. clampDir(dd.y);\n }\n var e = eventFactory.makeGestureEvent(inType, {\n bubbles: true,\n cancelable: true,\n dx: d.x,\n dy: d.y,\n ddx: dd.x,\n ddy: dd.y,\n x: inEvent.x,\n y: inEvent.y,\n clientX: inEvent.clientX,\n clientY: in Event.clientY,\n pageX: inEvent.pageX,\n pageY: inEvent.pageY,\n screenX: inEvent.screenX,\n screenY: inEvent.screenY,\n xDirection: t.xDirection,\n yDirection: t.yDirection,\n trackIn fo: t.trackInfo,\n relatedTarget: inEvent.relatedTarget,\n point erType: inEvent.pointerType,\n pointerId: inEvent.pointerId\n });\ n t.downTarget.dispatchEvent(e);\n },\n down: function(inEvent) {\ n if (inEvent.isPrimary && (inEvent.pointerType === 'mouse' ? inEvent.butt ons === 1 : true)) {\n var p = {\n downEvent: inEvent,\n downTarget: inEvent.target,\n trackInfo: {},\n lastMove Event: null,\n xDirection: 0,\n yDirection: 0,\n t racking: false\n };\n pointermap.set(inEvent.pointerId, p);\n }\n },\n move: function(inEvent) {\n var p = pointermap.get(in Event.pointerId);\n if (p) {\n if (!p.tracking) {\n var d = this.calcPositionDelta(p.downEvent, inEvent);\n var move = d.x * d .x + d.y * d.y;\n // start tracking only if finger moves more than WIG GLE_THRESHOLD\n if (move > this.WIGGLE_THRESHOLD) {\n p.tr acking = true;\n this.fireTrack('trackstart', p.downEvent, p);\n this.fireTrack('track', inEvent, p);\n }\n } else {\n this.fireTrack('track', inEvent, p);\n }\n p.lastMove Event = inEvent;\n }\n },\n up: function(inEvent) {\n var p = pointermap.get(inEvent.pointerId);\n if (p) {\n if (p.tracking) {\n this.fireTrack('trackend', inEvent, p);\n }\n poin termap.delete(inEvent.pointerId);\n }\n }\n };\n dispatcher.regist erGesture('track', track);\n })(window.PolymerGestures);\n","/*\n * Copyright (c ) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.tx t\n * The complete set of authors may be found at http://polymer.github.io/AUTHO RS.txt\n * The complete set of contributors may be found at http://polymer.githu b.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer proj ect is also\n * subject to an additional IP rights grant found at http://polymer .github.io/PATENTS.txt\n */\n\n/**\n * This event is fired when a pointer is hel d down for 200ms.\n *\n * @module PointerGestures\n * @submodule Events\n * @cla ss hold\n */\n/**\n * Type of pointer that made the holding event.\n * @type Str ing\n * @property pointerType\n */\n/**\n * Screen X axis position of the held p ointer\n * @type Number\n * @property clientX\n */\n/**\n * Screen Y axis positi on of the held pointer\n * @type Number\n * @property clientY\n */\n/**\n * Type of pointer that made the holding event.\n * @type String\n * @property pointerT ype\n */\n/**\n * This event is fired every 200ms while a pointer is held down.\ n *\n * @class holdpulse\n * @extends hold\n */\n/**\n * Milliseconds pointer ha s been held down.\n * @type Number\n * @property holdTime\n */\n/**\n * This eve nt is fired when a held pointer is released or moved.\n *\n * @class released\n */\n\n(function(scope) {\n var dispatcher = scope.dispatcher;\n var eventFacto ry = scope.eventFactory;\n var hold = {\n // wait at least HOLD_DELAY ms bet ween hold and pulse events\n HOLD_DELAY: 200,\n // pointer can move WIGGLE _THRESHOLD pixels before not counting as a hold\n WIGGLE_THRESHOLD: 16,\n events: [\n 'down',\n 'move',\n 'up',\n ],\n heldPointer: n ull,\n holdJob: null,\n pulse: function() {\n var hold = Date.now() - this.heldPointer.timeStamp;\n var type = this.held ? 'holdpulse' : 'hold'; \n this.fireHold(type, hold);\n this.held = true;\n },\n cancel: function() {\n clearInterval(this.holdJob);\n if (this.held) {\n this.fireHold('release');\n }\n this.held = false;\n this.held Pointer = null;\n this.target = null;\n this.holdJob = null;\n },\n down: function(inEvent) {\n if (inEvent.isPrimary && !this.heldPointer) {\n this.heldPointer = inEvent;\n this.target = inEvent.target;\n this.holdJob = setInterval(this.pulse.bind(this), this.HOLD_DELAY);\n }\n },\n up: function(inEvent) {\n if (this.heldPointer && this.he ldPointer.pointerId === inEvent.pointerId) {\n this.cancel();\n }\n },\n move: function(inEvent) {\n if (this.heldPointer && this.heldPoi nter.pointerId === inEvent.pointerId) {\n var x = inEvent.clientX - this. heldPointer.clientX;\n var y = inEvent.clientY - this.heldPointer.clientY ;\n if ((x * x + y * y) > this.WIGGLE_THRESHOLD) {\n this.cancel ();\n }\n }\n },\n fireHold: function(inType, inHoldTime) {\n var p = {\n bubbles: true,\n cancelable: true,\n point erType: this.heldPointer.pointerType,\n pointerId: this.heldPointer.point erId,\n x: this.heldPointer.clientX,\n y: this.heldPointer.clientY \n };\n if (inHoldTime) {\n p.holdTime = inHoldTime;\n }\n var e = eventFactory.makeGestureEvent(inType, p);\n this.target.dispa tchEvent(e);\n }\n };\n dispatcher.registerGesture('hold', hold);\n})(windo w.PolymerGestures);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. A ll rights reserved.\n * This code may only be used under the BSD style license f ound at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contri butors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distri buted by Google as part of the polymer project is also\n * subject to an additio nal IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n/**\n * This event is fired when a pointer quickly goes down and up, and is used to\n * denote activation.\n *\n * Any gesture event can prevent the tap event from be ing created by calling\n * `event.preventTap`.\n *\n * Any pointer event can pre vent the tap by setting the `tapPrevented` property\n * on itself.\n *\n * @modu le PointerGestures\n * @submodule Events\n * @class tap\n */\n/**\n * X axis pos ition of the tap.\n * @property x\n * @type Number\n */\n/**\n * Y axis position of the tap.\n * @property y\n * @type Number\n */\n/**\n * Type of the pointer that made the tap.\n * @property pointerType\n * @type String\n */\n(function(sc ope) {\n var dispatcher = scope.dispatcher;\n var eventFactory = scope.eventFa ctory;\n var pointermap = new scope.PointerMap();\n var tap = {\n events: [ \n 'down',\n 'up'\n ],\n down: function(inEvent) {\n if (in Event.isPrimary && !inEvent.tapPrevented) {\n pointermap.set(inEvent.poin terId, {\n target: inEvent.target,\n buttons: inEvent.buttons, \n x: inEvent.clientX,\n y: inEvent.clientY\n });\n }\n },\n shouldTap: function(e, downState) {\n if (e.pointerType == = 'mouse') {\n // only allow left click to tap for mouse\n return downState.buttons === 1;\n }\n return !e.tapPrevented;\n },\n up : function(inEvent) {\n var start = pointermap.get(inEvent.pointerId);\n if (start && this.shouldTap(inEvent, start)) {\n // up.relatedTarget i s target currently under finger\n var t = scope.targetFinding.LCA(start.t arget, inEvent.relatedTarget);\n if (t) {\n var e = eventFactory .makeGestureEvent('tap', {\n bubbles: true,\n cancelable: true,\n x: inEvent.clientX,\n y: inEvent.clientY,\n detail: inEvent.detail,\n pointerType: inEvent.pointerType,\n pointerId: inEvent.pointerId,\n altKey: inEvent.altKey,\n ctrlKey: inEvent.ctrlKey,\n metaKey: inEvent.metaKey,\n shiftKey: inEvent.shiftKey\n });\n t.dispatchEvent(e);\ n }\n }\n pointermap.delete(inEvent.pointerId);\n }\n };\n // patch eventFactory to remove id from tap's pointermap for preventTap calls\n eventFactory.preventTap = function(e) {\n return function() {\n e.tapP revented = true;\n pointermap.delete(e.pointerId);\n };\n };\n dispatc her.registerGesture('tap', tap);\n})(window.PolymerGestures);\n","/*\n Copyrigh t (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>\n Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>\n Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@ gmail.com>\n Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>\n Copyright ( C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>\n Copyright (C) 2012 K ris Kowal <kris.kowal@cixar.com>\n Copyright (C) 2012 Yusuke Suzuki <utatane.te a@gmail.com>\n Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>\n Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitt ed provided that the following conditions are met:\n\n * Redistributions of s ource code must retain the above copyright\n notice, this list of condition s and the following disclaimer.\n * Redistributions in binary form must repro duce the above copyright\n notice, this list of conditions and the followin g disclaimer in the\n documentation and/or other materials provided with th e distribution.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONT RIBUTORS \"AS IS\"\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTI CULAR PURPOSE\n ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DA MAGES\n (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERV ICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TO RT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n*/\n\n(func tion (global) {\n 'use strict';\n\n var Token,\n TokenName,\n Syntax,\n Messages,\n source,\n index,\n length,\n delegate,\n lookahead,\n state;\n\n Token = {\n BooleanLiteral: 1,\n EOF: 2,\n Identifier: 3,\n Keyword: 4, \n NullLiteral: 5,\n NumericLiteral: 6,\n Punctuator: 7,\n StringLiteral: 8\n };\n\n TokenName = {};\n TokenName[Token.Bool eanLiteral] = 'Boolean';\n TokenName[Token.EOF] = '<end>';\n TokenName[Tok en.Identifier] = 'Identifier';\n TokenName[Token.Keyword] = 'Keyword';\n T okenName[Token.NullLiteral] = 'Null';\n TokenName[Token.NumericLiteral] = 'Nu meric';\n TokenName[Token.Punctuator] = 'Punctuator';\n TokenName[Token.St ringLiteral] = 'String';\n\n Syntax = {\n ArrayExpression: 'ArrayExpre ssion',\n BinaryExpression: 'BinaryExpression',\n CallExpression: 'CallExpression',\n ConditionalExpression: 'ConditionalExpression',\n EmptyStatement: 'EmptyStatement',\n ExpressionStatement: 'ExpressionS tatement',\n Identifier: 'Identifier',\n Literal: 'Literal',\n LabeledStatement: 'LabeledStatement',\n LogicalExpression: 'LogicalEx pression',\n MemberExpression: 'MemberExpression',\n ObjectExpress ion: 'ObjectExpression',\n Program: 'Program',\n Property: 'Proper ty',\n ThisExpression: 'ThisExpression',\n UnaryExpression: 'Unary Expression'\n };\n\n // Error messages should be identical to V8.\n Mes sages = {\n UnexpectedToken: 'Unexpected token %0',\n UnknownLabe l: 'Undefined label \\'%0\\'',\n Redeclaration: '%0 \\'%1\\' has already been declared'\n };\n\n // Ensure the condition is true, otherwise throw a n error.\n // This is only to have a better contract semantic, i.e. another s afety net\n // to catch a logic error. The condition shall be fulfilled in no rmal case.\n // Do NOT use this to enforce a certain condition on any user in put.\n\n function assert(condition, message) {\n if (!condition) {\n throw new Error('ASSERT: ' + message);\n }\n }\n\n functi on isDecimalDigit(ch) {\n return (ch >= 48 && ch <= 57); // 0..9\n } \n\n\n // 7.2 White Space\n\n function isWhiteSpace(ch) {\n return (ch === 32) || // space\n (ch === 9) || // tab\n (ch === 0xB) ||\n (ch === 0xC) ||\n (ch === 0xA0) ||\n (ch >= 0x1680 && '\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\ \u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\uFEFF'.indexOf(String.f romCharCode(ch)) > 0);\n }\n\n // 7.3 Line Terminators\n\n function isL ineTerminator(ch) {\n return (ch === 10) || (ch === 13) || (ch === 0x2028 ) || (ch === 0x2029);\n }\n\n // 7.6 Identifier Names and Identifiers\n\n function isIdentifierStart(ch) {\n return (ch === 36) || (ch === 95) | | // $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || // A..Z\n (ch >= 97 && ch <= 122); // a..z\n }\n\n function isIdentifierPart(ch) {\n return (ch === 36) || (ch === 95) || / / $ (dollar) and _ (underscore)\n (ch >= 65 && ch <= 90) || / / A..Z\n (ch >= 97 && ch <= 122) || // a..z\n (ch > = 48 && ch <= 57); // 0..9\n }\n\n // 7.6.1.1 Keywords\n\n fu nction isKeyword(id) {\n return (id === 'this')\n }\n\n // 7.4 Comm ents\n\n function skipWhitespace() {\n while (index < length && isWhit eSpace(source.charCodeAt(index))) {\n ++index;\n }\n }\n\n function getIdentifier() {\n var start, ch;\n\n start = index++; \n while (index < length) {\n ch = source.charCodeAt(index);\n if (isIdentifierPart(ch)) {\n ++index;\n } else {\n break;\n }\n }\n\n return sour ce.slice(start, index);\n }\n\n function scanIdentifier() {\n var s tart, id, type;\n\n start = index;\n\n id = getIdentifier();\n\n // There is no keyword or literal with only one character.\n // Thu s, it must be an identifier.\n if (id.length === 1) {\n type = Token.Identifier;\n } else if (isKeyword(id)) {\n type = Toke n.Keyword;\n } else if (id === 'null') {\n type = Token.NullLi teral;\n } else if (id === 'true' || id === 'false') {\n type = Token.BooleanLiteral;\n } else {\n type = Token.Identifier;\ n }\n\n return {\n type: type,\n value: id,\ n range: [start, index]\n };\n }\n\n\n // 7.7 Punctuator s\n\n function scanPunctuator() {\n var start = index,\n co de = source.charCodeAt(index),\n code2,\n ch1 = source[ind ex],\n ch2;\n\n switch (code) {\n\n // Check for most c ommon single-character punctuators.\n case 46: // . dot\n case 4 0: // ( open bracket\n case 41: // ) close bracket\n case 59: // ; semicolon\n case 44: // , comma\n case 123: // { open cu rly brace\n case 125: // } close curly brace\n case 91: // [\n case 93: // ]\n case 58: // :\n case 63: // ?\n ++index;\n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code),\n range: [start, index]\n };\n\n default:\n code2 = source.charCode At(index + 1);\n\n // '=' (char #61) marks an assignment or compariso n operator.\n if (code2 === 61) {\n switch (code) {\n case 37: // %\n case 38: // &\n c ase 42: // *:\n case 43: // +\n case 45: // -\n case 47: // /\n case 60: // <\n case 62: // >\n case 124: // |\n index += 2;\ n return {\n type: Token.Punctuator,\n value: String.fromCharCode(code) + String.fromCharCode(c ode2),\n range: [start, index]\n };\n\ n case 33: // !\n case 61: // =\n index += 2;\n\n // !== and ===\n if (so urce.charCodeAt(index) === 61) {\n ++index;\n }\n return {\n type: Token.Pun ctuator,\n value: source.slice(start, index),\n range: [start, index]\n };\n def ault:\n break;\n }\n }\n break;\n }\n\n // Peek more characters.\n\n ch2 = source[i ndex + 1];\n\n // Other 2-character punctuators: && ||\n\n if (ch1 === ch2 && ('&|'.indexOf(ch1) >= 0)) {\n index += 2;\n re turn {\n type: Token.Punctuator,\n value: ch1 + ch 2,\n range: [start, index]\n };\n }\n\n if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {\n ++index;\n retur n {\n type: Token.Punctuator,\n value: ch1,\n range: [start, index]\n };\n }\n\n throwErro r({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n // 7.8.3 Numeric Liter als\n function scanNumericLiteral() {\n var number, start, ch;\n\n ch = source[index];\n assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),\n 'Numeric literal must start with a decimal digit or a dec imal point');\n\n start = index;\n number = '';\n if (ch != = '.') {\n number = source[index++];\n ch = source[index]; \n\n // Hex number starts with '0x'.\n // Octal number sta rts with '0'.\n if (number === '0') {\n // decimal num ber starts with '0' such as '09' is illegal.\n if (ch && isDecima lDigit(ch.charCodeAt(0))) {\n throwError({}, Messages.Unexpec tedToken, 'ILLEGAL');\n }\n }\n\n while (is DecimalDigit(source.charCodeAt(index))) {\n number += source[inde x++];\n }\n ch = source[index];\n }\n\n if ( ch === '.') {\n number += source[index++];\n while (isDeci malDigit(source.charCodeAt(index))) {\n number += source[index++] ;\n }\n ch = source[index];\n }\n\n if (ch = == 'e' || ch === 'E') {\n number += source[index++];\n\n c h = source[index];\n if (ch === '+' || ch === '-') {\n number += source[index++];\n }\n if (isDecimalDigit(sourc e.charCodeAt(index))) {\n while (isDecimalDigit(source.charCodeAt (index))) {\n number += source[index++];\n }\n } else {\n throwError({}, Messages.UnexpectedToken, ' ILLEGAL');\n }\n }\n\n if (isIdentifierStart(source.cha rCodeAt(index))) {\n throwError({}, Messages.UnexpectedToken, 'ILLEGA L');\n }\n\n return {\n type: Token.NumericLiteral,\n value: parseFloat(number),\n range: [start, index]\n };\n }\n\n // 7.8.4 String Literals\n\n function scanStringLiteral() { \n var str = '', quote, start, ch, octal = false;\n\n quote = sour ce[index];\n assert((quote === '\\'' || quote === '\"'),\n 'St ring literal must starts with a quote');\n\n start = index;\n ++in dex;\n\n while (index < length) {\n ch = source[index++];\n\n if (ch === quote) {\n quote = '';\n bre ak;\n } else if (ch === '\\\\') {\n ch = source[index+ +];\n if (!ch || !isLineTerminator(ch.charCodeAt(0))) {\n switch (ch) {\n case 'n':\n str += '\\n';\n break;\n case 'r':\n str += '\\r';\n break;\n case 't':\n str += '\\t';\n break;\n case 'b':\n str += '\\b' ;\n break;\n case 'f':\n str += '\\f';\n break;\n cas e 'v':\n str += '\\x0B';\n break;\ n\n default:\n str += ch;\n break;\n }\n } else {\n if (ch === '\\r' && source[index] === '\\n') {\n ++index;\n }\n }\n } else if (is LineTerminator(ch.charCodeAt(0))) {\n break;\n } else {\n str += ch;\n }\n }\n\n if (quote !== '') {\n throwError({}, Messages.UnexpectedToken, 'ILLEGAL');\n }\n\n return {\n type: Token.StringLiteral,\n val ue: str,\n octal: octal,\n range: [start, index]\n };\n }\n\n function isIdentifierName(token) {\n return token.type = == Token.Identifier ||\n token.type === Token.Keyword ||\n token.type === Token.BooleanLiteral ||\n token.type === Token.NullLi teral;\n }\n\n function advance() {\n var ch;\n\n skipWhites pace();\n\n if (index >= length) {\n return {\n type: Token.EOF,\n range: [index, index]\n };\n }\n\n ch = source.charCodeAt(index);\n\n // Very common: ( and ) and ;\n if (ch === 40 || ch === 41 || ch === 58) {\n return s canPunctuator();\n }\n\n // String literal starts with single quot e (#39) or double quote (#34).\n if (ch === 39 || ch === 34) {\n return scanStringLiteral();\n }\n\n if (isIdentifierStart(ch)) {\n return scanIdentifier();\n }\n\n // Dot (.) char #4 6 can also start a floating-point number, hence the need\n // to check th e next character.\n if (ch === 46) {\n if (isDecimalDigit(sour ce.charCodeAt(index + 1))) {\n return scanNumericLiteral();\n }\n return scanPunctuator();\n }\n\n if (isDeci malDigit(ch)) {\n return scanNumericLiteral();\n }\n\n return scanPunctuator();\n }\n\n function lex() {\n var token;\n\n token = lookahead;\n index = token.range[1];\n\n lookahead = advance();\n\n index = token.range[1];\n\n return token;\n }\ n\n function peek() {\n var pos;\n\n pos = index;\n look ahead = advance();\n index = pos;\n }\n\n // Throw an exception\n\n function throwError(token, messageFormat) {\n var error,\n args = Array.prototype.slice.call(arguments, 2),\n msg = messageForm at.replace(\n /%(\\d)/g,\n function (whole, index) {\n assert(index < args.length, 'Message reference must be i n range');\n return args[index];\n }\n );\n\n error = new Error(msg);\n error.index = index;\n error.description = msg;\n throw error;\n }\n\n // Throw an except ion because of the token.\n\n function throwUnexpected(token) {\n thro wError(token, Messages.UnexpectedToken, token.value);\n }\n\n // Expect th e next token to match the specified punctuator.\n // If not, an exception wil l be thrown.\n\n function expect(value) {\n var token = lex();\n if (token.type !== Token.Punctuator || token.value !== value) {\n t hrowUnexpected(token);\n }\n }\n\n // Return true if the next token matches the specified punctuator.\n\n function match(value) {\n retur n lookahead.type === Token.Punctuator && lookahead.value === value;\n }\n\n // Return true if the next token matches the specified keyword\n\n function matchKeyword(keyword) {\n return lookahead.type === Token.Keyword && loo kahead.value === keyword;\n }\n\n function consumeSemicolon() {\n / / Catch the very common case first: immediately a semicolon (char #59).\n if (source.charCodeAt(index) === 59) {\n lex();\n return; \n }\n\n skipWhitespace();\n\n if (match(';')) {\n lex();\n return;\n }\n\n if (lookahead.type !== Toke n.EOF && !match('}')) {\n throwUnexpected(lookahead);\n }\n }\n\n // 11.1.4 Array Initialiser\n\n function parseArrayInitialiser() {\ n var elements = [];\n\n expect('[');\n\n while (!match(']' )) {\n if (match(',')) {\n lex();\n ele ments.push(null);\n } else {\n elements.push(parseExpr ession());\n\n if (!match(']')) {\n expect(',' );\n }\n }\n }\n\n expect(']');\n\n return delegate.createArrayExpression(elements);\n }\n\n // 11.1.5 Obje ct Initialiser\n\n function parseObjectPropertyKey() {\n var token;\n\ n skipWhitespace();\n token = lex();\n\n // Note: This func tion is called only from parseObjectProperty(), where\n // EOF and Punctu ator tokens are already filtered out.\n if (token.type === Token.StringLi teral || token.type === Token.NumericLiteral) {\n return delegate.cre ateLiteral(token);\n }\n\n return delegate.createIdentifier(token. value);\n }\n\n function parseObjectProperty() {\n var token, key;\ n\n token = lookahead;\n skipWhitespace();\n\n if (token.ty pe === Token.EOF || token.type === Token.Punctuator) {\n throwUnexpec ted(token);\n }\n\n key = parseObjectPropertyKey();\n expec t(':');\n return delegate.createProperty('init', key, parseExpression()); \n }\n\n function parseObjectInitialiser() {\n var properties = []; \n\n expect('{');\n\n while (!match('}')) {\n propertie s.push(parseObjectProperty());\n\n if (!match('}')) {\n expect(',');\n }\n }\n\n expect('}');\n\n retu rn delegate.createObjectExpression(properties);\n }\n\n // 11.1.6 The Grou ping Operator\n\n function parseGroupExpression() {\n var expr;\n\n expect('(');\n\n expr = parseExpression();\n\n expect(')');\n \n return expr;\n }\n\n\n // 11.1 Primary Expressions\n\n functi on parsePrimaryExpression() {\n var type, token, expr;\n\n if (mat ch('(')) {\n return parseGroupExpression();\n }\n\n typ e = lookahead.type;\n\n if (type === Token.Identifier) {\n exp r = delegate.createIdentifier(lex().value);\n } else if (type === Token.S tringLiteral || type === Token.NumericLiteral) {\n expr = delegate.cr eateLiteral(lex());\n } else if (type === Token.Keyword) {\n i f (matchKeyword('this')) {\n lex();\n expr = deleg ate.createThisExpression();\n }\n } else if (type === Token.Bo oleanLiteral) {\n token = lex();\n token.value = (token.va lue === 'true');\n expr = delegate.createLiteral(token);\n } e lse if (type === Token.NullLiteral) {\n token = lex();\n t oken.value = null;\n expr = delegate.createLiteral(token);\n } else if (match('[')) {\n expr = parseArrayInitialiser();\n } else if (match('{')) {\n expr = parseObjectInitialiser();\n }\ n\n if (expr) {\n return expr;\n }\n\n throwUnex pected(lex());\n }\n\n // 11.2 Left-Hand-Side Expressions\n\n function parseArguments() {\n var args = [];\n\n expect('(');\n\n if (!match(')')) {\n while (index < length) {\n args.pus h(parseExpression());\n if (match(')')) {\n br eak;\n }\n expect(',');\n }\n }\ n\n expect(')');\n\n return args;\n }\n\n function parseNonC omputedProperty() {\n var token;\n\n token = lex();\n\n if (!isIdentifierName(token)) {\n throwUnexpected(token);\n }\n\n return delegate.createIdentifier(token.value);\n }\n\n function pa rseNonComputedMember() {\n expect('.');\n\n return parseNonCompute dProperty();\n }\n\n function parseComputedMember() {\n var expr;\n \n expect('[');\n\n expr = parseExpression();\n\n expect('] ');\n\n return expr;\n }\n\n function parseLeftHandSideExpression() {\n var expr, property;\n\n expr = parsePrimaryExpression();\n\n while (match('.') || match('[')) {\n if (match('[')) {\n property = parseComputedMember();\n expr = delegate.cre ateMemberExpression('[', expr, property);\n } else {\n property = parseNonComputedMember();\n expr = delegate.createMem berExpression('.', expr, property);\n }\n }\n\n return expr;\n }\n\n // 11.3 Postfix Expressions\n\n var parsePostfixExpressio n = parseLeftHandSideExpression;\n\n // 11.4 Unary Operators\n\n function parseUnaryExpression() {\n var token, expr;\n\n if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {\n expr = parsePostfixExpression();\n } else if (match('+') || match('-') || match ('!')) {\n token = lex();\n expr = parseUnaryExpression(); \n expr = delegate.createUnaryExpression(token.value, expr);\n } else if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('type of')) {\n throwError({}, Messages.UnexpectedToken);\n } else { \n expr = parsePostfixExpression();\n }\n\n return expr ;\n }\n\n function binaryPrecedence(token) {\n var prec = 0;\n\n if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {\n return 0;\n }\n\n switch (token.value) {\n case '| |':\n prec = 1;\n break;\n\n case '&&':\n prec = 2;\n break;\n\n case '==':\n case '!=':\n case '===':\n case '!==':\n prec = 6;\n break;\n \n case '<':\n case '>':\n case '<=':\n case '>=':\n case 'instanceof':\n prec = 7;\n break;\n\n case 'in':\n prec = 7;\n break;\n\n case '+':\n case '-':\n prec = 9;\n break;\n\n case '*':\n case '/':\n case '%':\n prec = 11;\n break; \n\n default:\n break;\n }\n\n return prec;\n }\n\n // 11.5 Multiplicative Operators\n // 11.6 Additive Operators\n // 11.7 Bitwise Shift Operators\n // 11.8 Relational Operators\n // 11.9 E quality Operators\n // 11.10 Binary Bitwise Operators\n // 11.11 Binary Lo gical Operators\n\n function parseBinaryExpression() {\n var expr, tok en, prec, stack, right, operator, left, i;\n\n left = parseUnaryExpressio n();\n\n token = lookahead;\n prec = binaryPrecedence(token);\n if (prec === 0) {\n return left;\n }\n token.prec = prec;\n lex();\n\n right = parseUnaryExpression();\n\n st ack = [left, token, right];\n\n while ((prec = binaryPrecedence(lookahead )) > 0) {\n\n // Reduce: make a binary expression from the three topm ost entries.\n while ((stack.length > 2) && (prec <= stack[stack.leng th - 2].prec)) {\n right = stack.pop();\n operator = stack.pop().value;\n left = stack.pop();\n expr = delegate.createBinaryExpression(operator, left, right);\n stac k.push(expr);\n }\n\n // Shift.\n token = lex() ;\n token.prec = prec;\n stack.push(token);\n e xpr = parseUnaryExpression();\n stack.push(expr);\n }\n\n // Final reduce to clean-up the stack.\n i = stack.length - 1;\n expr = stack[i];\n while (i > 1) {\n expr = delegate.createB inaryExpression(stack[i - 1].value, stack[i - 2], expr);\n i -= 2;\n }\n\n return expr;\n }\n\n\n // 11.12 Conditional Operator\n \n function parseConditionalExpression() {\n var expr, consequent, alt ernate;\n\n expr = parseBinaryExpression();\n\n if (match('?')) {\ n lex();\n consequent = parseConditionalExpression();\n expect(':');\n alternate = parseConditionalExpression();\n\n expr = delegate.createConditionalExpression(expr, consequent, altern ate);\n }\n\n return expr;\n }\n\n // Simplification since w e do not support AssignmentExpression.\n var parseExpression = parseCondition alExpression;\n\n // Polymer Syntax extensions\n\n // Filter ::\n // Identifier\n // Identifier \"(\" \")\"\n // Identifier \"(\" FilterArg uments \")\"\n\n function parseFilter() {\n var identifier, args;\n\n identifier = lex();\n\n if (identifier.type !== Token.Identifier) {\n throwUnexpected(identifier);\n }\n\n args = match(' (') ? parseArguments() : [];\n\n return delegate.createFilter(identifier. value, args);\n }\n\n // Filters ::\n // \"|\" Filter\n // Filte rs \"|\" Filter\n\n function parseFilters() {\n while (match('|')) {\n lex();\n parseFilter();\n }\n }\n\n // TopLe vel ::\n // LabelledExpressions\n // AsExpression\n // InExpressi on\n // FilterExpression\n\n // AsExpression ::\n // FilterExpressi on as Identifier\n\n // InExpression ::\n // Identifier, Identifier in F ilterExpression\n // Identifier in FilterExpression\n\n // FilterExpress ion ::\n // Expression\n // Expression Filters\n\n function parseTo pLevel() {\n skipWhitespace();\n peek();\n\n var expr = par seExpression();\n if (expr) {\n if (lookahead.value === ',' || lookahead.value == 'in' &&\n expr.type === Syntax.Identif ier) {\n parseInExpression(expr);\n } else {\n parseFilters();\n if (lookahead.value === 'as') {\n parseAsExpression(expr);\n } else {\n delegate.createTopLevel(expr);\n }\n }\n }\n\n if (lookahead.type !== Token.EOF) {\n throwUnexpected(lo okahead);\n }\n }\n\n function parseAsExpression(expr) {\n l ex(); // as\n var identifier = lex().value;\n delegate.createAsEx pression(expr, identifier);\n }\n\n function parseInExpression(identifier) {\n var indexName;\n if (lookahead.value === ',') {\n lex();\n if (lookahead.type !== Token.Identifier)\n th rowUnexpected(lookahead);\n indexName = lex().value;\n }\n\n lex(); // in\n var expr = parseExpression();\n parseFilters ();\n delegate.createInExpression(identifier.name, indexName, expr);\n }\n\n function parse(code, inDelegate) {\n delegate = inDelegate;\n source = code;\n index = 0;\n length = source.length;\n lookahead = null;\n state = {\n labelSet: {}\n };\n\ n return parseTopLevel();\n }\n\n global.esprima = {\n parse : parse\n };\n})(this);\n","// Copyright (c) 2014 The Polymer Project Authors . All rights reserved.\n// This code may only be used under the BSD style licens e found at http://polymer.github.io/LICENSE.txt\n// The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n// The complete set of con tributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n// Code dis tributed by Google as part of the polymer project is also\n// subject to an addi tional IP rights grant found at http://polymer.github.io/PATENTS.txt\n\n(functio n (global) {\n 'use strict';\n\n function prepareBinding(expressionText, name, node, filterRegistry) {\n var expression;\n try {\n expression = get Expression(expressionText);\n if (expression.scopeIdent &&\n (node .nodeType !== Node.ELEMENT_NODE ||\n node.tagName !== 'TEMPLATE' ||\n (name !== 'bind' && name !== 'repeat'))) {\n throw Error('as an d in can only be used within <template bind/repeat>');\n }\n } catch (ex ) {\n console.error('Invalid expression syntax: ' + expressionText, ex);\n return;\n }\n\n return function(model, node, oneTime) {\n var bi nding = expression.getBinding(model, filterRegistry, oneTime);\n if (expres sion.scopeIdent && binding) {\n node.polymerExpressionScopeIdent_ = expre ssion.scopeIdent;\n if (expression.indexIdent)\n node.polymerExp ressionIndexIdent_ = expression.indexIdent;\n }\n\n return binding;\n }\n }\n\n // TODO(rafaelw): Implement simple LRU.\n var expressionParseCac he = Object.create(null);\n\n function getExpression(expressionText) {\n var expression = expressionParseCache[expressionText];\n if (!expression) {\n var delegate = new ASTDelegate();\n esprima.parse(expressionText, delega te);\n expression = new Expression(delegate);\n expressionParseCache[e xpressionText] = expression;\n }\n return expression;\n }\n\n function L iteral(value) {\n this.value = value;\n this.valueFn_ = undefined;\n }\n\ n Literal.prototype = {\n valueFn: function() {\n if (!this.valueFn_) { \n var value = this.value;\n this.valueFn_ = function() {\n return value;\n }\n }\n\n return this.valueFn_;\n }\n }\ n\n function IdentPath(name) {\n this.name = name;\n this.path = Path.get (name);\n }\n\n IdentPath.prototype = {\n valueFn: function() {\n if ( !this.valueFn_) {\n var name = this.name;\n var path = this.path;\ n this.valueFn_ = function(model, observer) {\n if (observer)\n observer.addPath(model, path);\n\n return path.getValueFrom( model);\n }\n }\n\n return this.valueFn_;\n },\n\n setVal ue: function(model, newValue) {\n if (this.path.length == 1);\n mode l = findScope(model, this.path[0]);\n\n return this.path.setValueFrom(model , newValue);\n }\n };\n\n function MemberExpression(object, property, acces sor) {\n this.dynamicDeps = typeof object == 'function' ||\n object.dynamicDeps ||\n (accessor == '[' && !(proper ty instanceof Literal));\n\n // convert literal computed property access wher e literal value is a value\n // path to ident dot-access.\n if (accessor = = '[' &&\n property instanceof Literal &&\n Path.get(property.valu e).valid) {\n accessor = '.';\n property = new IdentPath(property.valu e);\n }\n\n this.simplePath =\n !this.dynamicDeps &&\n prope rty instanceof IdentPath &&\n (object instanceof MemberExpression || obje ct instanceof IdentPath);\n\n this.object = this.simplePath ? object : getFn( object);\n this.property = accessor == '.' ? property : getFn(property);\n } \n\n MemberExpression.prototype = {\n get fullPath() {\n if (!this.full Path_) {\n var last = this.object instanceof IdentPath ?\n thi s.object.name : this.object.fullPath;\n this.fullPath_ = Path.get(last + '.' + this.property.name);\n }\n\n return this.fullPath_;\n },\n\n valueFn: function() {\n if (!this.valueFn_) {\n var object = this .object;\n\n if (this.simplePath) {\n var path = this.fullPath;\ n\n this.valueFn_ = function(model, observer) {\n if (observ er)\n observer.addPath(model, path);\n\n return path.get ValueFrom(model);\n };\n } else if (this.property instanceof Ide ntPath) {\n var path = Path.get(this.property.name);\n\n this. valueFn_ = function(model, observer) {\n var context = object(model, observer);\n\n if (observer)\n observer.addPath(context, path);\n\n return path.getValueFrom(context);\n }\n } else {\n // Computed property.\n var property = this.propert y;\n\n this.valueFn_ = function(model, observer) {\n var con text = object(model, observer);\n var propName = property(model, obse rver);\n if (observer)\n observer.addPath(context, propN ame);\n\n return context ? context[propName] : undefined;\n };\n }\n }\n return this.valueFn_;\n },\n\n setValue: fun ction(model, newValue) {\n if (this.simplePath) {\n this.fullPath.se tValueFrom(model, newValue);\n return newValue;\n }\n\n var obj ect = this.object(model);\n var propName = this.property instanceof IdentPa th ? this.property.name :\n this.property(model);\n return object[ propName] = newValue;\n }\n };\n\n function Filter(name, args) {\n this. name = name;\n this.args = [];\n for (var i = 0; i < args.length; i++) {\n this.args[i] = getFn(args[i]);\n }\n }\n\n Filter.prototype = {\n transform: function(value, toModelDirection, filterRegistry, model,\n observer) {\n var fn = filterRegistry[this.name];\n var c ontext = model;\n if (fn) {\n context = undefined;\n } else {\n fn = context[this.name];\n if (!fn) {\n console.error('C annot find filter: ' + this.name);\n return;\n }\n }\n\n // If toModelDirection is falsey, then the \"normal\" (dom-bound) direction\n // is used. Otherwise, it looks for a 'toModel' property function on the\n // object.\n if (toModelDirection) {\n fn = fn.toModel;\n } else if (typeof fn.toDOM == 'function') {\n fn = fn.toDOM;\n }\n\ n if (typeof fn != 'function') {\n console.error('No ' + (toModelDir ection ? 'toModel' : 'toDOM') +\n ' found on' + this.name); \n return;\n }\n\n var args = [value];\n for (var i = 0; i < this.args.length; i++) {\n args[i + 1] = getFn(this.args[i])(model, ob server);\n }\n\n return fn.apply(context, args);\n }\n };\n\n fun ction notImplemented() { throw Error('Not Implemented'); }\n\n var unaryOperato rs = {\n '+': function(v) { return +v; },\n '-': function(v) { return -v; },\n '!': function(v) { return !v; }\n };\n\n var binaryOperators = {\n '+': function(l, r) { return l+r; },\n '-': function(l, r) { return l-r; },\n '*': function(l, r) { return l*r; },\n '/': function(l, r) { return l/r; },\n '%': function(l, r) { return l%r; },\n '<': function(l, r) { return l <r; },\n '>': function(l, r) { return l>r; },\n '<=': function(l, r) { ret urn l<=r; },\n '>=': function(l, r) { return l>=r; },\n '==': function(l, r) { return l==r; },\n '!=': function(l, r) { return l!=r; },\n '===': fun ction(l, r) { return l===r; },\n '!==': function(l, r) { return l!==r; },\n '&&': function(l, r) { return l&&r; },\n '||': function(l, r) { return l||r ; },\n };\n\n function getFn(arg) {\n return typeof arg == 'function' ? arg : arg.valueFn();\n }\n\n function ASTDelegate() {\n this.expression = null ;\n this.filters = [];\n this.deps = {};\n this.currentPath = undefined ;\n this.scopeIdent = undefined;\n this.indexIdent = undefined;\n this. dynamicDeps = false;\n }\n\n ASTDelegate.prototype = {\n createUnaryExpress ion: function(op, argument) {\n if (!unaryOperators[op])\n throw Err or('Disallowed operator: ' + op);\n\n argument = getFn(argument);\n\n return function(model, observer) {\n return unaryOperators[op](argument(m odel, observer));\n };\n },\n\n createBinaryExpression: function(op, left, right) {\n if (!binaryOperators[op])\n throw Error('Disallowed operator: ' + op);\n\n left = getFn(left);\n right = getFn(right);\n\ n return function(model, observer) {\n return binaryOperators[op](le ft(model, observer),\n right(model, observer)) ;\n };\n },\n\n createConditionalExpression: function(test, consequen t, alternate) {\n test = getFn(test);\n consequent = getFn(consequent) ;\n alternate = getFn(alternate);\n\n return function(model, observer) {\n return test(model, observer) ?\n consequent(model, observ er) : alternate(model, observer);\n }\n },\n\n createIdentifier: func tion(name) {\n var ident = new IdentPath(name);\n ident.type = 'Identi fier';\n return ident;\n },\n\n createMemberExpression: function(acce ssor, object, property) {\n var ex = new MemberExpression(object, property, accessor);\n if (ex.dynamicDeps)\n this.dynamicDeps = true;\n return ex;\n },\n\n createLiteral: function(token) {\n return new Lit eral(token.value);\n },\n\n createArrayExpression: function(elements) {\n for (var i = 0; i < elements.length; i++)\n elements[i] = getFn(elem ents[i]);\n\n return function(model, observer) {\n var arr = []\n for (var i = 0; i < elements.length; i++)\n arr.push(elements[i](m odel, observer));\n return arr;\n }\n },\n\n createProperty: f unction(kind, key, value) {\n return {\n key: key instanceof IdentPa th ? key.name : key.value,\n value: value\n };\n },\n\n create ObjectExpression: function(properties) {\n for (var i = 0; i < properties.l ength; i++)\n properties[i].value = getFn(properties[i].value);\n\n return function(model, observer) {\n var obj = {};\n for (var i = 0; i < properties.length; i++)\n obj[properties[i].key] = properties[i] .value(model, observer);\n return obj;\n }\n },\n\n createFilt er: function(name, args) {\n this.filters.push(new Filter(name, args));\n },\n\n createAsExpression: function(expression, scopeIdent) {\n this.e xpression = expression;\n this.scopeIdent = scopeIdent;\n },\n\n crea teInExpression: function(scopeIdent, indexIdent, expression) {\n this.expre ssion = expression;\n this.scopeIdent = scopeIdent;\n this.indexIdent = indexIdent;\n },\n\n createTopLevel: function(expression) {\n this. expression = expression;\n },\n\n createThisExpression: notImplemented\n }\n\n function ConstantObservable(value) {\n this.value_ = value;\n }\n\n ConstantObservable.prototype = {\n open: function() { return this.value_; },\ n discardChanges: function() { return this.value_; },\n deliver: function( ) {},\n close: function() {},\n }\n\n function Expression(delegate) {\n this.scopeIdent = delegate.scopeIdent;\n this.indexIdent = delegate.indexIden t;\n\n if (!delegate.expression)\n throw Error('No expression found.');\ n\n this.expression = delegate.expression;\n getFn(this.expression); // fo rces enumeration of path dependencies\n\n this.filters = delegate.filters;\n this.dynamicDeps = delegate.dynamicDeps;\n }\n\n Expression.prototype = {\n getBinding: function(model, filterRegistry, oneTime) {\n if (oneTime)\n return this.getValue(model, undefined, filterRegistry);\n\n var obs erver = new CompoundObserver();\n // captures deps.\n var firstValue = this.getValue(model, observer, filterRegistry);\n var firstTime = true;\n var self = this;\n\n function valueFn() {\n // deps cannot have changed on first value retrieval.\n if (firstTime) {\n firstTim e = false;\n return firstValue;\n }\n\n if (self.dynamicD eps)\n observer.startReset();\n\n var value = self.getValue(mode l,\n self.dynamicDeps ? observer : undefined,\n filterRegistry);\n if (self.dynamicDeps )\n observer.finishReset();\n\n return value;\n }\n\n function setValueFn(newValue) {\n self.setValue(model, newValue, filterRe gistry);\n return newValue;\n }\n\n return new ObserverTransfor m(observer, valueFn, setValueFn, true);\n },\n\n getValue: function(model, observer, filterRegistry) {\n var value = getFn(this.expression)(model, ob server);\n for (var i = 0; i < this.filters.length; i++) {\n value = this.filters[i].transform(value, false, filterRegistry, model,\n observer);\n }\n\n return value;\n },\n\ n setValue: function(model, newValue, filterRegistry) {\n var count = th is.filters ? this.filters.length : 0;\n while (count-- > 0) {\n newV alue = this.filters[count].transform(newValue, true, filterRegistry,\n model);\n }\n\n if (this.expres sion.setValue)\n return this.expression.setValue(model, newValue);\n } \n }\n\n /**\n * Converts a style property name to a css property name. For example:\n * \"WebkitUserSelect\" to \"-webkit-user-select\"\n */\n functio n convertStylePropertyName(name) {\n return String(name).replace(/[A-Z]/g, fu nction(c) {\n return '-' + c.toLowerCase();\n });\n }\n\n var parentSc opeName = '@' + Math.random().toString(36).slice(2);\n\n // Single ident paths must bind directly to the appropriate scope object.\n // I.e. Pushed values in two-bindings need to be assigned to the actual model\n // object.\n function f indScope(model, prop) {\n while (model[parentScopeName] &&\n !Objec t.prototype.hasOwnProperty.call(model, prop)) {\n model = model[parentScope Name];\n }\n\n return model;\n }\n\n function isLiteralExpression(pathSt ring) {\n switch (pathString) {\n case '':\n return false;\n\n case 'false':\n case 'null':\n case 'true':\n return true;\n }\n\n if (!isNaN(Number(pathString)))\n return true;\n\n return f alse;\n };\n\n function PolymerExpressions() {}\n\n PolymerExpressions.protot ype = {\n // \"built-in\" filters\n styleObject: function(value) {\n var parts = [];\n for (var key in value) {\n parts.push(convertStyle PropertyName(key) + ': ' + value[key]);\n }\n return parts.join('; '); \n },\n\n tokenList: function(value) {\n var tokens = [];\n for (var key in value) {\n if (value[key])\n tokens.push(key);\n }\n return tokens.join(' ');\n },\n\n // binding delegate API\n prepareInstancePositionChanged: function(template) {\n var indexIdent = tem plate.polymerExpressionIndexIdent_;\n if (!indexIdent)\n return;\n\n return function(templateInstance, index) {\n templateInstance.model [indexIdent] = index;\n };\n },\n\n prepareBinding: function(pathStri ng, name, node) {\n var path = Path.get(pathString);\n\n if (!isLitera lExpression(pathString) && path.valid) {\n if (path.length == 1) {\n return function(model, node, oneTime) {\n if (oneTime)\n return path.getValueFrom(model);\n\n var scope = findScope(mode l, path[0]);\n return new PathObserver(scope, path);\n };\n }\n return; // bail out early if pathString is simple path.\n }\n\n return prepareBinding(pathString, name, node, this);\n },\n\n prepareInstanceModel: function(template) {\n var scopeName = template.polym erExpressionScopeIdent_;\n if (!scopeName)\n return;\n\n var pa rentScope = template.templateInstance ?\n template.templateInstance.mod el :\n template.model;\n\n var indexName = template.polymerExpress ionIndexIdent_;\n\n return function(model) {\n var scope = Object.cr eate(parentScope);\n scope[scopeName] = model;\n scope[indexName] = undefined;\n scope[parentScopeName] = parentScope;\n return scop e;\n };\n }\n };\n\n global.PolymerExpressions = PolymerExpressions;\n if (global.exposeGetExpression)\n global.getExpression_ = getExpression;\n\ n})(this);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at h ttp://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors ma y be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP ri ghts grant found at http://polymer.github.io/PATENTS.txt\n */\nPolymer = {\n ve rsion: '0.3.1-604ba08'\n};\n","/*\n * Copyright (c) 2014 The Polymer Project Aut hors. All rights reserved.\n * This code may only be used under the BSD style li cense found at http://polymer.github.io/LICENSE.txt\n * The complete set of auth ors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\ n// TODO(sorvell): this ensures Polymer is an object and not a function\n// Plat form is currently defining it as a function to allow for async loading\n// of po lymer; once we refine the loading process this likely goes away.\nif (typeof win dow.Polymer === 'function') {\n Polymer = {};\n}\n\n","/*\n * Copyright (c) 201 4 The Polymer Project Authors. All rights reserved.\n * This code may only be us ed under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.tx t\n * The complete set of contributors may be found at http://polymer.github.io/ CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project i s also\n * subject to an additional IP rights grant found at http://polymer.gith ub.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // copy own properties from 'a pi' to 'prototype, with name hinting for 'super'\n function extend(prototype, a pi) {\n if (prototype && api) {\n // use only own properties of 'api'\n Object.getOwnPropertyNames(api).forEach(function(n) {\n // acquire p roperty descriptor\n var pd = Object.getOwnPropertyDescriptor(api, n);\n if (pd) {\n // clone property via descriptor\n Object.d efineProperty(prototype, n, pd);\n // cache name-of-method for 'super' engine\n if (typeof pd.value == 'function') {\n // hint the 'super' engine\n pd.value.nom = n;\n }\n }\n }); \n }\n return prototype;\n }\n \n // exports\n\n scope.extend = extend ;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license fou nd at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may b e found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contribu tors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distribu ted by Google as part of the polymer project is also\n * subject to an additiona l IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(functio n(scope) {\n \n // usage\n \n // invoke cb.call(this) in 100ms, unless the j ob is re-registered,\n // which resets the timer\n // \n // this.myJob = this .job(this.myJob, cb, 100)\n //\n // returns a job handle which can be used to re-register a job\n\n var Job = function(inContext) {\n this.context = inCon text;\n this.boundComplete = this.complete.bind(this)\n };\n Job.prototype = {\n go: function(callback, wait) {\n this.callback = callback;\n var h;\n if (!wait) {\n h = requestAnimationFrame(this.boundComplete );\n this.handle = function() {\n cancelAnimationFrame(h);\n }\n } else {\n h = setTimeout(this.boundComplete, wait);\n this.handle = function() {\n clearTimeout(h);\n }\n }\n },\n stop: function() {\n if (this.handle) {\n this.handle();\n this.handle = null;\n }\n },\n complete: function() {\n if (this.handle) {\n this.stop();\n this.callback.call(this.contex t);\n }\n }\n };\n \n function job(job, callback, wait) {\n if (jo b) {\n job.stop();\n } else {\n job = new Job(this);\n }\n jo b.go(callback, wait);\n return job;\n }\n \n // exports \n\n scope.job = job;\n \n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors . All rights reserved.\n * This code may only be used under the BSD style licens e found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of con tributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code dis tributed by Google as part of the polymer project is also\n * subject to an addi tional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(fu nction(scope) {\n\n var registry = {};\n\n HTMLElement.register = function(tag , prototype) {\n registry[tag] = prototype;\n }\n\n // get prototype mapped to node <tag>\n HTMLElement.getPrototypeForTag = function(tag) {\n var prot otype = !tag ? HTMLElement.prototype : registry[tag];\n // TODO(sjmiles): cre ating <tag> is likely to have wasteful side-effects\n return prototype || Obj ect.getPrototypeOf(document.createElement(tag));\n };\n\n // we have to flag p ropagation stoppage for the event dispatcher\n var originalStopPropagation = Ev ent.prototype.stopPropagation;\n Event.prototype.stopPropagation = function() { \n this.cancelBubble = true;\n originalStopPropagation.apply(this, argumen ts);\n };\n \n // TODO(sorvell): remove when we're sure imports does not need \n // to load stylesheets\n /*\n HTMLImports.importer.preloadSelectors += \n ', polymer-element link[rel=stylesheet]';\n */\n})(Polymer);\n","/*\r\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\r\n * This code may only be used under the BSD style license found at http://polymer.github .io/LICENSE.txt\r\n * The complete set of authors may be found at http://polymer .github.io/AUTHORS.txt\r\n * The complete set of contributors may be found at ht tp://polymer.github.io/CONTRIBUTORS.txt\r\n * Code distributed by Google as part of the polymer project is also\r\n * subject to an additional IP rights grant f ound at http://polymer.github.io/PATENTS.txt\r\n */\r\n\r\n (function(scope) {\r \n // super\r\n\r\n // `arrayOfArgs` is an optional array of args like one might pass\r\n // to `Function.apply`\r\n\r\n // TODO(sjmiles):\r\n // $super must be installed on an instance or prototype chain\r\n // as ` super`, and invoked via `this`, e.g.\r\n // `this.super();`\r\n\r\n / / will not work if function objects are not unique, for example,\r\n // when using mixins.\r\n // The memoization strategy assumes each function exists on only one \r\n // prototype chain i.e. we use the function object for memoizing)\r\n // perhaps we can bookkeep on the prototype itself ins tead\r\n function $super(arrayOfArgs) {\r\n // since we are thunking a m ethod call, performance is important here: \r\n // memoize all lookups, onc e memoized the fast path calls no other \r\n // functions\r\n //\r\n // find the caller (cannot be `strict` because of 'caller')\r\n var cal ler = $super.caller;\r\n // memoized 'name of method' \r\n var nom = c aller.nom;\r\n // memoized next implementation prototype\r\n var _supe r = caller._super;\r\n if (!_super) {\r\n if (!nom) {\r\n n om = caller.nom = nameInThis.call(this, caller);\r\n }\r\n if (!no m) {\r\n console.warn('called super() on a method not installed declara tively (has no .nom property)');\r\n }\r\n // super prototype is e ither cached or we have to find it\r\n // by searching __proto__ (at the 'top')\r\n // invariant: because we cache _super on fn below, we never re ach \r\n // here from inside a series of calls to super(), so it's ok to \r\n // start searching from the prototype of 'this' (at the 'top')\r\n // we must never memoize a null super for this reason\r\n _super = memoizeSuper(caller, nom, getPrototypeOf(this));\r\n }\r\n // our supe r function\r\n var fn = _super[nom];\r\n if (fn) {\r\n // memoi ze information so 'fn' can call 'super'\r\n if (!fn._super) {\r\n // must not memoize null, or we lose our invariant above\r\n memoizeS uper(fn, nom, _super);\r\n }\r\n // invoke the inherited method\r\ n // if 'fn' is not function valued, this will throw\r\n return fn .apply(this, arrayOfArgs || []);\r\n }\r\n }\r\n\r\n function nameInT his(value) {\r\n var p = this.__proto__;\r\n while (p && p !== HTMLEle ment.prototype) {\r\n // TODO(sjmiles): getOwnPropertyNames is absurdly e xpensive\r\n var n$ = Object.getOwnPropertyNames(p);\r\n for (var i=0, l=n$.length, n; i<l && (n=n$[i]); i++) {\r\n var d = Object.getOwn PropertyDescriptor(p, n);\r\n if (typeof d.value === 'function' && d.va lue === value) {\r\n return n;\r\n }\r\n }\r\n p = p.__proto__;\r\n }\r\n }\r\n\r\n function memoizeSuper(method, n ame, proto) {\r\n // find and cache next prototype containing `name`\r\n // we need the prototype so we can do another lookup\r\n // from here\r\ n var s = nextSuper(proto, name, method);\r\n if (s[name]) {\r\n // `s` is a prototype, the actual method is `s[name]`\r\n // tag super method with it's name for quicker lookups\r\n s[name].nom = name;\r\n }\r\n return method._super = s;\r\n }\r\n\r\n function nextSuper(pr oto, name, caller) {\r\n // look for an inherited prototype that implements name\r\n while (proto) {\r\n if ((proto[name] !== caller) && proto[ name]) {\r\n return proto;\r\n }\r\n proto = getPrototype Of(proto);\r\n }\r\n // must not return null, or we lose our invariant above\r\n // in this case, a super() call was invoked where no superclass\ r\n // method exists\r\n // TODO(sjmiles): thow an exception?\r\n return Object;\r\n }\r\n\r\n // NOTE: In some platforms (IE10) the protot ype chain is faked via \r\n // __proto__. Therefore, always get prototype via __proto__ instead of\r\n // the more standard Object.getPrototypeOf.\r\n function getPrototypeOf(prototype) {\r\n return prototype.__proto__;\r\n }\r\n\r\n // utility function to precompute name tags for functions\r\n / / in a (unchained) prototype\r\n function hintSuper(prototype) {\r\n // tag functions with their prototype name to optimize\r\n // super call invoc ations\r\n for (var n in prototype) {\r\n var pd = Object.getOwnProp ertyDescriptor(prototype, n);\r\n if (pd && typeof pd.value === 'function ') {\r\n pd.value.nom = n;\r\n }\r\n }\r\n }\r\n\r\n // exports\r\n\r\n scope.super = $super;\r\n\r\n})(Polymer);\r\n","/*\n * Cop yright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/L ICENSE.txt\n * The complete set of authors may be found at http://polymer.github .io/AUTHORS.txt\n * The complete set of contributors may be found at http://poly mer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the pol ymer project is also\n * subject to an additional IP rights grant found at http: //polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n var typeHandlers = {\n string: function(value) {\n return value;\n },\n date: func tion(value) {\n return new Date(Date.parse(value) || Date.now());\n },\n boolean: function(value) {\n if (value === '') {\n return true;\ n }\n return value === 'false' ? false : !!value;\n },\n number: function(value) {\n var n = parseFloat(value);\n // hex values like \ "0xFFFF\" parseFloat as 0\n if (n === 0) {\n n = parseInt(value);\n }\n return isNaN(n) ? value : n;\n // this code disabled because encoded values (like \"0xFFFF\")\n // do not round trip to their original f ormat\n //return (String(floatVal) === value) ? floatVal : value;\n },\n object: function(value, currentValue) {\n if (currentValue === null) {\ n return value;\n }\n try {\n // If the string is an obj ect, we can parse is with the JSON library.\n // include convenience repl ace for single-quotes. If the author omits\n // quotes altogether, parse will fail.\n return JSON.parse(value.replace(/'/g, '\"'));\n } catch (e) {\n // The object isn't valid JSON, return the raw value\n ret urn value;\n }\n },\n // avoid deserialization of functions\n 'fun ction': function(value, currentValue) {\n return currentValue;\n }\n }; \n\n function deserializeValue(value, currentValue) {\n // attempt to infer type from default value\n var inferredType = typeof currentValue;\n // inv ent 'date' type value for Date\n if (currentValue instanceof Date) {\n i nferredType = 'date';\n }\n // delegate deserialization via type string\n return typeHandlers[inferredType](value, currentValue);\n }\n\n // exports\ n\n scope.deserializeValue = deserializeValue;\n\n})(Polymer);\n","/*\n * Copyr ight (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code ma y only be used under the BSD style license found at http://polymer.github.io/LIC ENSE.txt\n * The complete set of authors may be found at http://polymer.github.i o/AUTHORS.txt\n * The complete set of contributors may be found at http://polyme r.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polym er project is also\n * subject to an additional IP rights grant found at http:// polymer.github.io/PATENTS.txt\n */\n(function(scope) {\n\n // imports\n\n var extend = scope.extend;\n\n // module\n\n var api = {};\n\n api.declaration = {};\n api.instance = {};\n\n api.publish = function(apis, prototype) {\n fo r (var n in apis) {\n extend(prototype, apis[n]);\n }\n };\n\n // expo rts\n\n scope.api = api;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Poly mer Project Authors. All rights reserved.\n * This code may only be used under t he BSD style license found at http://polymer.github.io/LICENSE.txt\n * The compl ete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTO RS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATE NTS.txt\n */\n\n(function(scope) {\n\n var utils = {\n /**\n * Invokes a function asynchronously. The context of the callback\n * function is boun d to 'this' automatically.\n * @method async\n * @param {Function|Stri ng} method\n * @param {any|Array} args\n * @param {number} timeout\n */\n async: function(method, args, timeout) {\n // when polyfilling Object.observe, ensure changes \n // propagate before executing the async m ethod\n Platform.flush();\n // second argument to `apply` must be an a rray\n args = (args && args.length) ? args : [args];\n // function to invoke\n var fn = function() {\n (this[method] || method).apply(this , args);\n }.bind(this);\n // execute `fn` sooner or later\n var handle = timeout ? setTimeout(fn, timeout) :\n requestAnimationFrame(fn );\n // NOTE: switch on inverting handle to determine which time is used.\n return timeout ? handle : ~handle;\n },\n cancelAsync: function(hand le) {\n if (handle < 0) {\n cancelAnimationFrame(~handle);\n } else {\n clearTimeout(handle);\n }\n },\n /**\n * Fire an event.\n * @method fire\n * @returns {Object} event\n * @param { string} type An event name.\n * @param {any} detail\n * @param {Node} onNode Target node.\n */\n fire: function(type, detail, onNode, bubbles, cancelable) {\n var node = onNode || this;\n var detail = detail || { };\n var event = new CustomEvent(type, {\n bubbles: (bubbles !== und efined ? bubbles : true), \n cancelable: (cancelable !== undefined ? canc elable : true), \n detail: detail\n });\n node.dispatchEvent(ev ent);\n return event;\n },\n /**\n * Fire an event asynchronousl y.\n * @method asyncFire\n * @param {string} type An event name.\n * @param detail\n * @param {Node} toNode Target node.\n */\n asyn cFire: function(/*inType, inDetail*/) {\n this.async(\"fire\", arguments);\ n },\n /**\n * Remove class from old, add class to anew, if they exis t\n * @param classFollows\n * @param anew A node.\n * @param old A node\n * @param className\n */\n classFollows: function(anew, old , className) {\n if (old) {\n old.classList.remove(className);\n }\n if (anew) {\n anew.classList.add(className);\n }\n }\n };\n\n // no-operation function for handy stubs\n var nop = function() {};\n \n // null-object for handy stubs\n var nob = {};\n\n // deprecated\n\n util s.asyncMethod = utils.async;\n\n // exports\n\n scope.api.instance.utils = uti ls;\n scope.nop = nop;\n scope.nob = nob;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may on ly be used under the BSD style license found at http://polymer.github.io/LICENSE .txt\n * The complete set of authors may be found at http://polymer.github.io/AU THORS.txt\n * The complete set of contributors may be found at http://polymer.gi thub.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer p roject is also\n * subject to an additional IP rights grant found at http://poly mer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imports\n\n var lo g = window.logFlags || {};\n var EVENT_PREFIX = 'on-';\n\n // instance events api\n var events = {\n // read-only\n EVENT_PREFIX: EVENT_PREFIX,\n // event listeners on host\n addHostListeners: function() {\n var events = this.eventDelegates;\n log.events && (Object.keys(events).length > 0) && c onsole.log('[%s] addHostListeners:', this.localName, events);\n // NOTE: ho st events look like bindings but really are not;\n // (1) we don't want the attribute to be set and (2) we want to support\n // multiple event listene rs ('host' and 'instance') and Node.bind\n // by default supports 1 thing b eing bound.\n for (var type in events) {\n var methodName = events[t ype];\n this.addEventListener(type, this.element.getEventHandler(this, th is,\n methodName ));\n }\n },\n // call 'method' or function method on 'obj' with 'arg s', if the method exists\n dispatchMethod: function(obj, method, args) {\n if (obj) {\n log.events && console.group('[%s] dispatch [%s]', obj.loc alName, method);\n var fn = typeof method === 'function' ? method : obj[m ethod];\n if (fn) {\n fn[args ? 'apply' : 'call'](obj, args);\n }\n log.events && console.groupEnd();\n Platform.flush();\n }\n }\n };\n\n // exports\n\n scope.api.instance.events = events;\n\ n})(Polymer);\n","/*\r\n * Copyright (c) 2014 The Polymer Project Authors. All r ights reserved.\r\n * This code may only be used under the BSD style license fou nd at http://polymer.github.io/LICENSE.txt\r\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\r\n * The complete set of cont ributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\r\n * Code di stributed by Google as part of the polymer project is also\r\n * subject to an a dditional IP rights grant found at http://polymer.github.io/PATENTS.txt\r\n */\r \n\r\n(function(scope) {\r\n\r\n // instance api for attributes\r\n\r\n var at tributes = {\r\n copyInstanceAttributes: function () {\r\n var a$ = this ._instanceAttributes;\r\n for (var k in a$) {\r\n if (!this.hasAttri bute(k)) {\r\n this.setAttribute(k, a$[k]);\r\n }\r\n }\r\n },\r\n // for each attribute on this, deserialize value to property as ne eded\r\n takeAttributes: function() {\r\n // if we have no publish looku p table, we have no attributes to take\r\n // TODO(sjmiles): ad hoc\r\n if (this._publishLC) {\r\n for (var i=0, a$=this.attributes, l=a$.lengt h, a; (a=a$[i]) && i<l; i++) {\r\n this.attributeToProperty(a.name, a.v alue);\r\n }\r\n }\r\n },\r\n // if attribute 'name' is mapped to a property, deserialize\r\n // 'value' into that property\r\n attribut eToProperty: function(name, value) {\r\n // try to match this attribute to a property (attributes are\r\n // all lower-case, so this is case-insensiti ve search)\r\n var name = this.propertyForAttribute(name);\r\n if (nam e) {\r\n // filter out 'mustached' values, these are to be\r\n // replaced with bound-data and are not yet values\r\n // themselves\r\n if (value && value.search(scope.bindPattern) >= 0) {\r\n return;\r\ n }\r\n // get original value\r\n var currentValue = this[n ame];\r\n // deserialize Boolean or Number values from attribute\r\n var value = this.deserializeValue(value, currentValue);\r\n // only ac t if the value has changed\r\n if (value !== currentValue) {\r\n // install new value (has side-effects)\r\n this[name] = value;\r\n }\r\n }\r\n },\r\n // return the published property matching nam e, or undefined\r\n propertyForAttribute: function(name) {\r\n var match = this._publishLC && this._publishLC[name];\r\n //console.log('propertyFor Attribute:', name, 'matches', match);\r\n return match;\r\n },\r\n // convert representation of 'stringValue' based on type of 'currentValue'\r\n deserializeValue: function(stringValue, currentValue) {\r\n return scope.de serializeValue(stringValue, currentValue);\r\n },\r\n serializeValue: func tion(value, inferredType) {\r\n if (inferredType === 'boolean') {\r\n return value ? '' : undefined;\r\n } else if (inferredType !== 'object' & & inferredType !== 'function'\r\n && value !== undefined) {\r\n return value;\r\n }\r\n },\r\n reflectPropertyToAttribute: function(n ame) {\r\n var inferredType = typeof this[name];\r\n // try to intelli gently serialize property value\r\n var serializedValue = this.serializeVal ue(this[name], inferredType);\r\n // boolean properties must reflect as boo lean attributes\r\n if (serializedValue !== undefined) {\r\n this.se tAttribute(name, serializedValue);\r\n // TODO(sorvell): we should remove attr for all properties\r\n // that have undefined serialization; howeve r, we will need to\r\n // refine the attr reflection system to achieve th is; pica, for example,\r\n // relies on having inferredType object proper ties not removed as\r\n // attrs.\r\n } else if (inferredType === 'b oolean') {\r\n this.removeAttribute(name);\r\n }\r\n }\r\n };\r\ n\r\n // exports\r\n\r\n scope.api.instance.attributes = attributes;\r\n\r\n}) (Polymer);\r\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All righ ts reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be fou nd at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed b y Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(sco pe) {\n\n // imports\n\n var log = window.logFlags || {};\n\n // magic words\ n\n var OBSERVE_SUFFIX = 'Changed';\n\n // element api\n\n var empty = [];\n\ n var properties = {\n createPropertyObserver: function() {\n var n$ = this._observeNames;\n if (n$ && n$.length) {\n var o = this._propert yObserver = new CompoundObserver(true);\n this.registerObservers([o]);\n // TODO(sorvell): may not be kosher to access the value here (this[n]);\n // previously we looked at the descriptor on the prototype\n // t his doesn't work for inheritance and not for accessors without \n // a va lue property\n for (var i=0, l=n$.length, n; (i<l) && (n=n$[i]); i++) {\n o.addPath(this, n);\n this.observeArrayValue(n, this[n], null );\n }\n }\n },\n openPropertyObserver: function() {\n if (this._propertyObserver) {\n this._propertyObserver.open(this.notifyProp ertyChanges, this);\n }\n },\n notifyPropertyChanges: function(newVal ues, oldValues, paths) {\n var name, method, called = {};\n for (var i in oldValues) {\n // note: paths is of form [object, path, object, path] \n name = paths[2 * i + 1];\n method = this.observe[name];\n if (method) {\n var ov = oldValues[i], nv = newValues[i];\n // observes the value if it is an array\n this.observeArrayValue(name, nv, ov);\n if (!called[method]) {\n // only invoke change me thod if one of ov or nv is not (undefined | null)\n if ((ov !== undef ined && ov !== null) || (nv !== undefined && nv !== null)) {\n call ed[method] = true;\n // TODO(sorvell): call method with the set of values it's expecting;\n // e.g. 'foo bar': 'invalidate' expects th e new and old values for\n // foo and bar. Currently we give only o ne of these and then\n // deliver all the arguments.\n this.invokeMethod(method, [ov, nv, arguments]);\n }\n }\n }\n }\n },\n deliverChanges: function() {\n if (this._prop ertyObserver) {\n this._propertyObserver.deliver();\n }\n },\n propertyChanged_: function(name, value, oldValue) {\n if (this.reflect[nam e]) {\n this.reflectPropertyToAttribute(name);\n }\n },\n obse rveArrayValue: function(name, value, old) {\n // we only care if there are registered side-effects\n var callbackName = this.observe[name];\n if (callbackName) {\n // if we are observing the previous value, stop\n if (Array.isArray(old)) {\n log.observe && console.log('[%s] observe ArrayValue: unregister observer [%s]', this.localName, name);\n this.cl oseNamedObserver(name + '__array');\n }\n // if the new value is a n array, being observing it\n if (Array.isArray(value)) {\n log. observe && console.log('[%s] observeArrayValue: register observer [%s]', this.lo calName, name, value);\n var observer = new ArrayObserver(value);\n observer.open(function(value, old) {\n this.invokeMethod(callba ckName, [old]);\n }, this);\n this.registerNamedObserver(name + '__array', observer);\n }\n }\n },\n bindProperty: function( property, observable, oneTime) {\n if (oneTime) {\n this[property] = observable;\n return;\n }\n return bindProperties(this, proper ty, observable);\n },\n invokeMethod: function(method, args) {\n var fn = this[method] || method;\n if (typeof fn === 'function') {\n fn. apply(this, args);\n }\n },\n registerObservers: function(observers) {\n this._observers = this._observers || [];\n this._observers.push(ob servers);\n },\n // observer array items are arrays of observers.\n clo seObservers: function() {\n if (!this._observers) {\n return;\n }\n for (var i=0, l=this._observers.length; i<l; i++) {\n this.clos eObserverArray(this._observers[i]);\n }\n this._observers = [];\n } ,\n closeObserverArray: function(observerArray) {\n for (var i=0, l=obse rverArray.length, o; i<l; i++) {\n o = observerArray[i];\n if (o & & o.close) {\n o.close();\n }\n }\n },\n // bookkeepi ng observers for memory management\n registerNamedObserver: function(name, ob server) {\n var o$ = this._namedObservers || (this._namedObservers = {});\n o$[name] = observer;\n },\n closeNamedObserver: function(name) {\n var o$ = this._namedObservers;\n if (o$ && o$[name]) {\n o$[name ].close();\n o$[name] = null;\n return true;\n }\n },\n closeNamedObservers: function() {\n if (this._namedObservers) {\n f or (var i in this._namedObservers) {\n this.closeNamedObserver(i);\n }\n this._namedObservers = {};\n }\n }\n };\n\n // propert y binding\n // bind a property in A to a path in B by converting A[property] to a\n // getter/setter pair that accesses B[...path...]\n function bindProperti es(a, property, observable) {\n // apply Polymer two-way reference binding\n return Observer.bindToInstance(a, property, observable, resolveBindingValue); \n }\n\n // capture A's value if B's value is null or undefined,\n // otherwi se use B's value\n function resolveBindingValue(oldValue, value) {\n if (val ue === undefined && oldValue === null) {\n return value;\n }\n return (value === null || value === undefined) ? oldValue : value;\n }\n\n // loggin g\n var LOG_OBSERVE = '[%s] watching [%s]';\n var LOG_OBSERVED = '[%s#%s] watc h: [%s] now [%s] was [%s]';\n var LOG_CHANGED = '[%s#%s] propertyChanged: [%s] now [%s] was [%s]';\n\n // exports\n\n scope.api.instance.properties = propert ies;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors ma y be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contr ibutors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distr ibuted by Google as part of the polymer project is also\n * subject to an additi onal IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(func tion(scope) {\n\n // imports\n\n var log = window.logFlags || 0;\n\n // eleme nt api supporting mdv\n var mdv = {\n instanceTemplate: function(template) { \n // ensure a default bindingDelegate\n var syntax = this.syntax || ( !template.bindingDelegate &&\n this.element.syntax);\n var dom = t emplate.createInstance(this, syntax);\n this.registerObservers(dom.bindings _);\n return dom;\n },\n bind: function(name, observable, oneTime) {\ n var property = this.propertyForAttribute(name);\n if (!property) {\n // TODO(sjmiles): this mixin method must use the special form\n / / of `super` installed by `mixinMethod` in declaration/prototype.js\n ret urn this.mixinSuper(arguments);\n } else {\n // use n-way Polymer bi nding\n var observer = this.bindProperty(property, observable, oneTime);\ n // NOTE: reflecting binding information is typically required only for\ n // tooling. It has a performance cost so it's opt-in in Node.bind.\n if (Platform.enableBindingsReflection && observer) {\n observer.pa th = observable.path_;\n this._recordBinding(property, observer);\n }\n if (this.reflect[property]) {\n this.reflectPropertyToAt tribute(property);\n }\n return observer;\n }\n },\n bi ndFinished: function() {\n this.makeElementReady();\n },\n _recordBin ding: function(name, observer) {\n this.bindings_ = this.bindings_ || {};\n this.bindings_[name] = observer;\n },\n // TODO(sorvell): unbind/unb indAll has been removed, as public api, from\n // TemplateBinding. We still n eed to close/dispose of observers but perhaps\n // we should choose a more ex plicit name.\n asyncUnbindAll: function() {\n if (!this._unbound) {\n log.unbind && console.log('[%s] asyncUnbindAll', this.localName);\n this._unbindAllJob = this.job(this._unbindAllJob, this.unbindAll, 0);\n }\n },\n unbindAll: function() {\n if (!this._unbound) {\n this.c loseObservers();\n this.closeNamedObservers();\n this._unbound = t rue;\n }\n },\n cancelUnbindAll: function() {\n if (this._unboun d) {\n log.unbind && console.warn('[%s] already unbound, cannot cancel un bindAll', this.localName);\n return;\n }\n log.unbind && consol e.log('[%s] cancelUnbindAll', this.localName);\n if (this._unbindAllJob) {\ n this._unbindAllJob = this._unbindAllJob.stop();\n }\n }\n };\n \n function unbindNodeTree(node) {\n forNodeTree(node, _nodeUnbindAll);\n } \n\n function _nodeUnbindAll(node) {\n node.unbindAll();\n }\n\n function forNodeTree(node, callback) {\n if (node) {\n callback(node);\n for (var child = node.firstChild; child; child = child.nextSibling) {\n forN odeTree(child, callback);\n }\n }\n }\n\n var mustachePattern = /\\{\\ {([^{}]*)}}/;\n\n // exports\n\n scope.bindPattern = mustachePattern;\n scope .api.instance.mdv = mdv;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polym er Project Authors. All rights reserved.\n * This code may only be used under th e BSD style license found at http://polymer.github.io/LICENSE.txt\n * The comple te set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The c omplete set of contributors may be found at http://polymer.github.io/CONTRIBUTOR S.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt\n */\n\n(function(scope) {\n\n var base = {\n PolymerBase: true,\n job: function(job, callback, wait) {\n if (typeof job === 'string') {\n var n = '___' + job;\n this[n] = Polymer.job.call(this, this[n], cal lback, wait);\n } else {\n return Polymer.job.call(this, job, callba ck, wait);\n }\n },\n super: Polymer.super,\n // user entry point for element has had its createdCallback called\n created: function() {\n } ,\n // user entry point for element has shadowRoot and is ready for\n // a pi interaction\n ready: function() {\n },\n createdCallback: function() {\n if (this.templateInstance && this.templateInstance.model) {\n c onsole.warn('Attributes on ' + this.localName + ' were data bound ' +\n 'prior to Polymer upgrading the element. This may result in ' +\n 'incorrect binding types.');\n }\n this.created();\n this.prepare Element();\n // TODO(sorvell): replace when ShadowDOMPolyfill issue is corr ected\n // https://github.com/Polymer/ShadowDOM/issues/420\n if (!this .ownerDocument.isStagingDocument || window.ShadowDOMPolyfill) {\n this.ma keElementReady();\n }\n },\n // system entry point, do not override\n prepareElement: function() {\n if (this._elementPrepared) {\n co nsole.warn('Element already prepared', this.localName);\n return;\n }\n this._elementPrepared = true;\n // storage for shadowRoots info\n this.shadowRoots = {};\n // install property observers\n this.cre atePropertyObserver();\n // TODO (sorvell): temporarily open observer when created\n this.openPropertyObserver();\n // install boilerplate attrib utes\n this.copyInstanceAttributes();\n // process input attributes\n this.takeAttributes();\n // add event listeners\n this.addHostLis teners();\n },\n makeElementReady: function() {\n if (this._readied) {\n return;\n }\n this._readied = true;\n // TODO(sorvell) : We could create an entry point here\n // for the user to compute property values.\n // process declarative resources\n this.parseDeclarations(t his.__proto__);\n // TODO(sorvell): CE polyfill uses unresolved attribute t o simulate\n // :unresolved; remove this attribute to be compatible with na tive\n // CE.\n this.removeAttribute('unresolved');\n // user ent ry point\n this.ready();\n // TODO (sorvell): temporarily open observe r when created\n // turn on property observation and take any initial chang es\n //this.openPropertyObserver();\n },\n attachedCallback: function () {\n this.cancelUnbindAll();\n // invoke user action\n if (this .attached) {\n this.attached();\n }\n // TODO(sorvell): bc\n if (this.enteredView) {\n this.enteredView();\n }\n // NOTE: domReady can be used to access elements in dom (descendants, \n // ancesto rs, siblings) such that the developer is enured to upgrade\n // ordering. I f the element definitions have loaded, domReady\n // can be used to access upgraded elements.\n if (!this.hasBeenAttached) {\n this.hasBeenAtta ched = true;\n if (this.domReady) {\n this.async('domReady');\n }\n }\n },\n detachedCallback: function() {\n if (!this.p reventDispose) {\n this.asyncUnbindAll();\n }\n // invoke user action\n if (this.detached) {\n this.detached();\n }\n // TODO(sorvell): bc\n if (this.leftView) {\n this.leftView();\n } \n },\n // TODO(sorvell): bc\n enteredViewCallback: function() {\n this.attachedCallback();\n },\n // TODO(sorvell): bc\n leftViewCallbac k: function() {\n this.detachedCallback();\n },\n // TODO(sorvell): b c\n enteredDocumentCallback: function() {\n this.attachedCallback();\n },\n // TODO(sorvell): bc\n leftDocumentCallback: function() {\n th is.detachedCallback();\n },\n // recursive ancestral <element> initializat ion, oldest first\n parseDeclarations: function(p) {\n if (p && p.elemen t) {\n this.parseDeclarations(p.__proto__);\n p.parseDeclaration.c all(this, p.element);\n }\n },\n // parse input <element> as needed, override for custom behavior\n parseDeclaration: function(elementElement) {\n var template = this.fetchTemplate(elementElement);\n if (template) {\ n var root = this.shadowFromTemplate(template);\n this.shadowRoots [elementElement.name] = root;\n }\n },\n // return a shadow-root temp late (if desired), override for custom behavior\n fetchTemplate: function(ele mentElement) {\n return elementElement.querySelector('template');\n },\n // utility function that creates a shadow root from a <template>\n shadow FromTemplate: function(template) {\n if (template) {\n // make a sha dow root\n var root = this.createShadowRoot();\n // stamp template \n // which includes parsing and applying MDV bindings before being \n // inserted (to avoid {{}} in attribute values)\n // e.g. to prevent <img src=\"images/{{icon}}\"> from generating a 404.\n var dom = this.in stanceTemplate(template);\n // append to shadow dom\n root.appendC hild(dom);\n // perform post-construction initialization tasks on shadow root\n this.shadowRootReady(root, template);\n // return the creat ed shadow root\n return root;\n }\n },\n // utility function t hat stamps a <template> into light-dom\n lightFromTemplate: function(template , refNode) {\n if (template) {\n // TODO(sorvell): mark this element as an eventController so that\n // event listeners on bound nodes inside it will be called on it.\n // Note, the expectation here is that events on all descendants \n // should be handled by this element.\n this .eventController = this;\n // stamp template\n // which includes p arsing and applying MDV bindings before being \n // inserted (to avoid {{ }} in attribute values)\n // e.g. to prevent <img src=\"images/{{icon}}\" > from generating a 404.\n var dom = this.instanceTemplate(template);\n // append to shadow dom\n if (refNode) {\n this.insertBefo re(dom, refNode); \n } else {\n this.appendChild(dom);\ n }\n // perform post-construction initialization tasks on ahem, l ight root\n this.shadowRootReady(this);\n // return the created sh adow root\n return dom;\n }\n },\n shadowRootReady: function(r oot) {\n // locate nodes with id and store references to them in this.$ has h\n this.marshalNodeReferences(root);\n // set up polymer gestures\n PolymerGestures.register(root);\n },\n // locate nodes with id and sto re references to them in this.$ hash\n marshalNodeReferences: function(root) {\n // establish $ instance variable\n var $ = this.$ = this.$ || {};\ n // populate $ from nodes with ID from the LOCAL tree\n if (root) {\n var n$ = root.querySelectorAll(\"[id]\");\n for (var i=0, l=n$.le ngth, n; (i<l) && (n=n$[i]); i++) {\n $[n.id] = n;\n };\n } \n },\n attributeChangedCallback: function(name, oldValue) {\n // TOD O(sjmiles): adhoc filter\n if (name !== 'class' && name !== 'style') {\n this.attributeToProperty(name, this.getAttribute(name));\n }\n if (this.attributeChanged) {\n this.attributeChanged.apply(this, arguments) ;\n }\n },\n onMutation: function(node, listener) {\n var observ er = new MutationObserver(function(mutations) {\n listener.call(this, obs erver, mutations);\n observer.disconnect();\n }.bind(this));\n observer.observe(node, {childList: true, subtree: true});\n }\n };\n\n // t rue if object has own PolymerBase api\n function isBase(object) {\n return o bject.hasOwnProperty('PolymerBase') \n }\n\n // name a base constructor for de v tools\n\n function PolymerBase() {};\n PolymerBase.prototype = base;\n base .constructor = PolymerBase;\n \n // exports\n\n scope.Base = PolymerBase;\n scope.isBase = isBase;\n scope.api.instance.base = base;\n \n})(Polymer);\n"," /*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt\n * The complete set of authors may be found at http://poly mer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at h ttp://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant foun d at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imp orts\n\n var log = window.logFlags || {};\n \n // magic words\n \n var STYL E_SCOPE_ATTRIBUTE = 'element';\n var STYLE_CONTROLLER_SCOPE = 'controller';\n \n var styles = {\n STYLE_SCOPE_ATTRIBUTE: STYLE_SCOPE_ATTRIBUTE,\n /**\n * Installs external stylesheets and <style> elements with the attribute \n * polymer-scope='controller' into the scope of element. This is intended\n * to be a called during custom element construction.\n */\n installCont rollerStyles: function() {\n // apply controller styles, but only if they a re not yet applied\n var scope = this.findStyleScope();\n if (scope && !this.scopeHasNamedStyle(scope, this.localName)) {\n // allow inherited controller styles\n var proto = getPrototypeOf(this), cssText = '';\n while (proto && proto.element) {\n cssText += proto.element.cssText ForScope(STYLE_CONTROLLER_SCOPE);\n proto = getPrototypeOf(proto);\n }\n if (cssText) {\n this.installScopeCssText(cssText, scop e);\n }\n }\n },\n installScopeStyle: function(style, name, sc ope) {\n var scope = scope || this.findStyleScope(), name = name || '';\n if (scope && !this.scopeHasNamedStyle(scope, this.localName + name)) {\n var cssText = '';\n if (style instanceof Array) {\n for (var i=0, l=style.length, s; (i<l) && (s=style[i]); i++) {\n cssText += s .textContent + '\\n\\n';\n }\n } else {\n cssText = sty le.textContent;\n }\n this.installScopeCssText(cssText, scope, nam e);\n }\n },\n installScopeCssText: function(cssText, scope, name) {\ n scope = scope || this.findStyleScope();\n name = name || '';\n if (!scope) {\n return;\n }\n if (window.ShadowDOMPolyfill) {\n cssText = shimCssText(cssText, scope.host);\n }\n var style = this.element.cssTextToScopeStyle(cssText,\n STYLE_CONTROLLER_SCOPE);\n Polymer.applyStyleToScope(style, scope);\n // cache that this style ha s been applied\n scope._scopeStyles[this.localName + name] = true;\n },\ n findStyleScope: function(node) {\n // find the shadow root that contai ns this element\n var n = node || this;\n while (n.parentNode) {\n n = n.parentNode;\n }\n return n;\n },\n scopeHasNamedStyle: function(scope, name) {\n scope._scopeStyles = scope._scopeStyles || {};\n return scope._scopeStyles[name];\n }\n };\n \n // NOTE: use raw prot otype traversal so that we ensure correct traversal\n // on platforms where the protoype chain is simulated via __proto__ (IE10)\n function getPrototypeOf(pro totype) {\n return prototype.__proto__;\n }\n\n function shimCssText(cssTex t, host) {\n var name = '', is = false;\n if (host) {\n name = host.l ocalName;\n is = host.hasAttribute('is');\n }\n var selector = Platfo rm.ShadowCSS.makeScopeSelector(name, is);\n return Platform.ShadowCSS.shimCss Text(cssText, selector);\n }\n\n // exports\n\n scope.api.instance.styles = s tyles;\n \n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Autho rs. All rights reserved.\n * This code may only be used under the BSD style lice nse found at http://polymer.github.io/LICENSE.txt\n * The complete set of author s may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of c ontributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code d istributed by Google as part of the polymer project is also\n * subject to an ad ditional IP rights grant found at http://polymer.github.io/PATENTS.txt\n */\n\n( function(scope) {\n\n // imports\n\n var extend = scope.extend;\n var api = s cope.api;\n\n // imperative implementation: Polymer()\n\n // specify an 'own' prototype for tag `name`\n function element(name, prototype) {\n if (argumen ts.length === 1 && typeof arguments[0] !== 'string') {\n prototype = name;\ n var script = document._currentScript;\n name = script && script.pare ntNode && script.parentNode.getAttribute ?\n script.parentNode.getAttri bute('name') : '';\n if (!name) {\n throw 'Element name could not be inferred.';\n }\n }\n if (getRegisteredPrototype[name]) {\n thr ow 'Already registered (Polymer) prototype for element ' + name;\n }\n // cache the prototype\n registerPrototype(name, prototype);\n // notify the registrar waiting for 'name', if any\n notifyPrototype(name);\n }\n\n // as ync prototype source\n\n function waitingForPrototype(name, client) {\n wait Prototype[name] = client;\n }\n\n var waitPrototype = {};\n\n function notify Prototype(name) {\n if (waitPrototype[name]) {\n waitPrototype[name].reg isterWhenReady();\n delete waitPrototype[name];\n }\n }\n\n // utility and bookkeeping\n\n // maps tag names to prototypes, as registered with\n // Polymer. Prototypes associated with a tag name\n // using document.registerElem ent are available from\n // HTMLElement.getPrototypeForTag().\n // If an eleme nt was fully registered by Polymer, then\n // Polymer.getRegisteredPrototype(na me) === \n // HTMLElement.getPrototypeForTag(name)\n\n var prototypesByName = {};\n\n function registerPrototype(name, prototype) {\n return prototypesB yName[name] = prototype || {};\n }\n\n function getRegisteredPrototype(name) { \n return prototypesByName[name];\n }\n\n // exports\n\n scope.getRegister edPrototype = getRegisteredPrototype;\n scope.waitingForPrototype = waitingForP rototype;\n\n // namespace shenanigans so we can expose our scope on the regist ration \n // function\n\n // make window.Polymer reference `element()`\n\n wi ndow.Polymer = element;\n\n // TODO(sjmiles): find a way to do this that is les s terrible\n // copy window.Polymer properties onto `element()`\n\n extend(Pol ymer, scope);\n\n // Under the HTMLImports polyfill, scripts in the main docume nt\n // do not block on imports; we want to allow calls to Polymer in the main\ n // document. Platform collects those calls until we can process them, which\n // we do here.\n\n var declarations = Platform.deliverDeclarations();\n if ( declarations) {\n for (var i=0, l=declarations.length, d; (i<l) && (d=declara tions[i]); i++) {\n element.apply(null, d);\n }\n }\n\n})(Polymer);\n", "/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer. github.io/LICENSE.txt\n * The complete set of authors may be found at http://pol ymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant fou nd at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\nvar pat h = {\n resolveElementPaths: function(node) {\n Platform.urlResolver.resolve Dom(node);\n },\n addResolvePathApi: function() {\n // let assetpath attrib ute modify the resolve path\n var assetPath = this.getAttribute('assetpath') || '';\n var root = new URL(assetPath, this.ownerDocument.baseURI);\n this .prototype.resolvePath = function(urlPath, base) {\n var u = new URL(urlPat h, base || root);\n return u.href;\n };\n }\n};\n\n// exports\nscope.ap i.declaration.path = path;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Pol ymer Project Authors. All rights reserved.\n * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The comp lete set of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUT ORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.github.io/PAT ENTS.txt\n */\n\n(function(scope) {\n\n // imports\n\n var log = window.logFla gs || {};\n var api = scope.api.instance.styles;\n var STYLE_SCOPE_ATTRIBUTE = api.STYLE_SCOPE_ATTRIBUTE;\n\n // magic words\n\n var STYLE_SELECTOR = 'style ';\n var STYLE_LOADABLE_MATCH = '@import';\n var SHEET_SELECTOR = 'link[rel=st ylesheet]';\n var STYLE_GLOBAL_SCOPE = 'global';\n var SCOPE_ATTR = 'polymer-s cope';\n\n var styles = {\n // returns true if resources are loading\n lo adStyles: function(callback) {\n var template = this.fetchTemplate();\n var content = template && this.templateContent();\n if (content) {\n this.convertSheetsToStyles(content);\n var styles = this.findLoadableS tyles(content);\n if (styles.length) {\n var templateUrl = templ ate.ownerDocument.baseURI;\n return Platform.styleResolver.loadStyles(s tyles, templateUrl, callback);\n }\n }\n if (callback) {\n callback();\n }\n },\n convertSheetsToStyles: function(root) {\n var s$ = root.querySelectorAll(SHEET_SELECTOR);\n for (var i=0, l=s$.le ngth, s, c; (i<l) && (s=s$[i]); i++) {\n c = createStyleElement(importRul eForSheet(s, this.ownerDocument.baseURI),\n this.ownerDocument);\n this.copySheetAttributes(c, s);\n s.parentNode.replaceChild(c, s);\n }\n },\n copySheetAttributes: function(style, link) {\n for (va r i=0, a$=link.attributes, l=a$.length, a; (a=a$[i]) && i<l; i++) {\n if (a.name !== 'rel' && a.name !== 'href') {\n style.setAttribute(a.name, a.value);\n }\n }\n },\n findLoadableStyles: function(root) {\ n var loadables = [];\n if (root) {\n var s$ = root.querySelect orAll(STYLE_SELECTOR);\n for (var i=0, l=s$.length, s; (i<l) && (s=s$[i]) ; i++) {\n if (s.textContent.match(STYLE_LOADABLE_MATCH)) {\n loadables.push(s);\n }\n }\n }\n return loadables;\n },\n /**\n * Install external stylesheets loaded in <polymer-element> elements into the \n * element's template.\n * @param elementElement Th e <element> element to style.\n */\n installSheets: function() {\n t his.cacheSheets();\n this.cacheStyles();\n this.installLocalSheets();\ n this.installGlobalStyles();\n },\n /**\n * Remove all sheets fr om element and store for later use.\n */\n cacheSheets: function() {\n this.sheets = this.findNodes(SHEET_SELECTOR);\n this.sheets.forEach(func tion(s) {\n if (s.parentNode) {\n s.parentNode.removeChild(s);\n }\n });\n },\n cacheStyles: function() {\n this.styles = this.findNodes(STYLE_SELECTOR + '[' + SCOPE_ATTR + ']');\n this.styles.for Each(function(s) {\n if (s.parentNode) {\n s.parentNode.removeCh ild(s);\n }\n });\n },\n /**\n * Takes external stylesheet s loaded in an <element> element and moves\n * their content into a <style> element inside the <element>'s template.\n * The sheet is then removed from the <element>. This is done only so \n * that if the element is loaded in th e main document, the sheet does\n * not become active.\n * Note, ignores sheets with the attribute 'polymer-scope'.\n * @param elementElement The <e lement> element to style.\n */\n installLocalSheets: function () {\n var sheets = this.sheets.filter(function(s) {\n return !s.hasAttribute(S COPE_ATTR);\n });\n var content = this.templateContent();\n if (c ontent) {\n var cssText = '';\n sheets.forEach(function(sheet) {\n cssText += cssTextFromSheet(sheet) + '\\n';\n });\n if ( cssText) {\n var style = createStyleElement(cssText, this.ownerDocument );\n content.insertBefore(style, content.firstChild);\n }\n }\n },\n findNodes: function(selector, matcher) {\n var nodes = this .querySelectorAll(selector).array();\n var content = this.templateContent() ;\n if (content) {\n var templateNodes = content.querySelectorAll(se lector).array();\n nodes = nodes.concat(templateNodes);\n }\n r eturn matcher ? nodes.filter(matcher) : nodes;\n },\n /**\n * Promotes external stylesheets and <style> elements with the attribute \n * polymer-s cope='global' into global scope.\n * This is particularly useful for definin g @keyframe rules which \n * currently do not function in scoped or shadow s tyle elements.\n * (See wkb.ug/72462)\n * @param elementElement The <ele ment> element to style.\n */\n // TODO(sorvell): remove when wkb.ug/72462 is addressed.\n installGlobalStyles: function() {\n var style = this.sty leForScope(STYLE_GLOBAL_SCOPE);\n applyStyleToScope(style, document.head);\ n },\n cssTextForScope: function(scopeDescriptor) {\n var cssText = ' ';\n // handle stylesheets\n var selector = '[' + SCOPE_ATTR + '=' + s copeDescriptor + ']';\n var matcher = function(s) {\n return matches Selector(s, selector);\n };\n var sheets = this.sheets.filter(matcher) ;\n sheets.forEach(function(sheet) {\n cssText += cssTextFromSheet(s heet) + '\\n\\n';\n });\n // handle cached style elements\n var s tyles = this.styles.filter(matcher);\n styles.forEach(function(style) {\n cssText += style.textContent + '\\n\\n';\n });\n return cssText; \n },\n styleForScope: function(scopeDescriptor) {\n var cssText = th is.cssTextForScope(scopeDescriptor);\n return this.cssTextToScopeStyle(cssT ext, scopeDescriptor);\n },\n cssTextToScopeStyle: function(cssText, scope Descriptor) {\n if (cssText) {\n var style = createStyleElement(cssT ext);\n style.setAttribute(STYLE_SCOPE_ATTRIBUTE, this.getAttribute('name ') +\n '-' + scopeDescriptor);\n return style;\n }\n } \n };\n\n function importRuleForSheet(sheet, baseUrl) {\n var href = new UR L(sheet.getAttribute('href'), baseUrl).href;\n return '@import \\'' + href + '\\';';\n }\n\n function applyStyleToScope(style, scope) {\n if (style) {\n if (scope === document) {\n scope = document.head;\n }\n if (window.ShadowDOMPolyfill) {\n scope = document.head;\n }\n // TODO(sorvell): necessary for IE\n // see https://connect.microsoft.com/I E/feedback/details/790212/\n // cloning-a-style-element-and-adding-to-docum ent-produces\n // -unexpected-result#details\n // var clone = style.cl oneNode(true);\n var clone = createStyleElement(style.textContent);\n var attr = style.getAttribute(STYLE_SCOPE_ATTRIBUTE);\n if (attr) {\n clone.setAttribute(STYLE_SCOPE_ATTRIBUTE, attr);\n }\n // TODO(sorve ll): probably too brittle; try to figure out \n // where to put the element .\n var refNode = scope.firstElementChild;\n if (scope === document.he ad) {\n var selector = 'style[' + STYLE_SCOPE_ATTRIBUTE + ']';\n v ar s$ = document.head.querySelectorAll(selector);\n if (s$.length) {\n refNode = s$[s$.length-1].nextElementSibling;\n }\n }\n scope.insertBefore(clone, refNode);\n }\n }\n\n function createStyleElement (cssText, scope) {\n scope = scope || document;\n scope = scope.createElem ent ? scope : scope.ownerDocument;\n var style = scope.createElement('style') ;\n style.textContent = cssText;\n return style;\n }\n\n function cssTex tFromSheet(sheet) {\n return (sheet && sheet.__resource) || '';\n }\n\n fun ction matchesSelector(node, inSelector) {\n if (matches) {\n return matc hes.call(node, inSelector);\n }\n }\n var p = HTMLElement.prototype;\n var matches = p.matches || p.matchesSelector || p.webkitMatchesSelector \n || p.mozMatchesSelector;\n \n // exports\n\n scope.api.declaration.styles = styl es;\n scope.applyStyleToScope = applyStyleToScope;\n \n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This c ode may only be used under the BSD style license found at http://polymer.github. io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.gi thub.io/AUTHORS.txt\n * The complete set of contributors may be found at http:// polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at h ttp://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imports\n \n var log = window.logFlags || {};\n var api = scope.api.instance.events;\n var EVENT_PREFIX = api.EVENT_PREFIX;\n // polymer-element declarative api: even ts feature\n\n var mixedCaseEventTypes = {};\n [\n 'webkitAnimationStart',\ n 'webkitAnimationEnd',\n 'webkitTransitionEnd',\n 'DOMFocusOut',\n 'DOMFocusIn',\n 'DOMMouseScroll'\n ].forEach(function(e) {\n mixedCaseEve ntTypes[e.toLowerCase()] = e;\n });\n\n var events = {\n parseHostEvents: f unction() {\n // our delegates map\n var delegates = this.prototype.ev entDelegates;\n // extract data from attributes into delegates\n this. addAttributeDelegates(delegates);\n },\n addAttributeDelegates: function(d elegates) {\n // for each attribute\n for (var i=0, a; a=this.attribut es[i]; i++) {\n // does it have magic marker identifying it as an event d elegate?\n if (this.hasEventPrefix(a.name)) {\n // if so, add th e info to delegates\n delegates[this.removeEventPrefix(a.name)] = a.val ue.replace('{{', '')\n .replace('}}', '').trim();\n }\n }\n },\n // starts with 'on-'\n hasEventPrefix: function (n) {\n return n && (n[0] === 'o') && (n[1] === 'n') && (n[2] === '-');\n },\n rem oveEventPrefix: function(n) {\n return n.slice(prefixLength);\n },\n findController: function(node) {\n while (node.parentNode) {\n if (n ode.eventController) {\n return node.eventController;\n }\n node = node.parentNode;\n }\n return node.host;\n },\n getEve ntHandler: function(controller, target, method) {\n var events = this;\n return function(e) {\n if (!controller || !controller.PolymerBase) {\n controller = events.findController(target);\n }\n\n var args = [e, e.detail, e.currentTarget];\n controller.dispatchMethod(contro ller, method, args);\n };\n },\n prepareEventBinding: function(pathSt ring, name, node) {\n if (!this.hasEventPrefix(name))\n return;\n\n var eventType = this.removeEventPrefix(name);\n eventType = mixedCaseE ventTypes[eventType] || eventType;\n\n var events = this;\n\n return f unction(model, node, oneTime) {\n var handler = events.getEventHandler(un defined, node, pathString);\n node.addEventListener(eventType, handler);\ n\n if (oneTime)\n return;\n\n // TODO(rafaelw): This is really pointless work. Aside from the cost\n // of these allocations, Nod eBind is going to setAttribute back to its\n // current value. Fixing thi s would mean changing the TemplateBinding\n // binding delegate API.\n function bindingValue() {\n return '{{ ' + pathString + ' }}';\n }\n\n return {\n open: bindingValue,\n discardCha nges: bindingValue,\n close: function() {\n node.removeEvent Listener(eventType, handler);\n }\n };\n };\n }\n };\n\ n var prefixLength = EVENT_PREFIX.length;\n\n // exports\n scope.api.declarat ion.events = events;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer P roject Authors. All rights reserved.\n * This code may only be used under the BS D style license found at http://polymer.github.io/LICENSE.txt\n * The complete s et of authors may be found at http://polymer.github.io/AUTHORS.txt\n * The compl ete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.tx t\n * Code distributed by Google as part of the polymer project is also\n * subj ect to an additional IP rights grant found at http://polymer.github.io/PATENTS.t xt\n */\n\n(function(scope) {\n\n // element api\n\n var properties = {\n i nferObservers: function(prototype) {\n // called before prototype.observe i s chained to inherited object\n var observe = prototype.observe, property;\ n for (var n in prototype) {\n if (n.slice(-7) === 'Changed') {\n if (!observe) {\n observe = (prototype.observe = {});\n }\n property = n.slice(0, -7)\n observe[property] = observ e[property] || n;\n }\n }\n },\n explodeObservers: function(pr ototype) {\n // called before prototype.observe is chained to inherited obj ect\n var o = prototype.observe;\n if (o) {\n var exploded = {} ;\n for (var n in o) {\n var names = n.split(' ');\n fo r (var i=0, ni; ni=names[i]; i++) {\n exploded[ni] = o[n];\n }\n }\n prototype.observe = exploded;\n }\n },\n optim izePropertyMaps: function(prototype) {\n if (prototype.observe) {\n // construct name list\n var a = prototype._observeNames = [];\n f or (var n in prototype.observe) {\n var names = n.split(' ');\n for (var i=0, ni; ni=names[i]; i++) {\n a.push(ni);\n }\n }\n }\n if (prototype.publish) {\n // construct name lis t\n var a = prototype._publishNames = [];\n for (var n in prototyp e.publish) {\n a.push(n);\n }\n }\n },\n publishPrope rties: function(prototype, base) {\n // if we have any properties to publis h\n var publish = prototype.publish;\n if (publish) {\n // tran scribe `publish` entries onto own prototype\n this.requireProperties(publ ish, prototype, base);\n // construct map of lower-cased property names\n prototype._publishLC = this.lowerCaseMap(publish);\n }\n },\n // sync prototype to property descriptors; \n // desriptor format contains d efault value and optionally a \n // hint for reflecting the property to an at tribute.\n // e.g. {foo: 5, bar: {value: true, reflect: true}}\n // reflec t: {foo: true} is also supported\n // \n requireProperties: function(prope rtyDescriptors, prototype, base) {\n // reflected properties\n prototy pe.reflect = prototype.reflect || {};\n // ensure a prototype value for eac h property\n // and update the property's reflect to attribute status \n for (var n in propertyDescriptors) {\n var propertyDescriptor = proper tyDescriptors[n];\n var reflects = this.reflectHintForDescriptor(property Descriptor);\n if (prototype.reflect[n] === undefined && reflects !== und efined) {\n prototype.reflect[n] = reflects;\n }\n if (pr ototype[n] === undefined) {\n prototype[n] = this.valueForDescriptor(pr opertyDescriptor); \n }\n }\n },\n valueForDescriptor: functio n(propertyDescriptor) {\n var value = typeof propertyDescriptor === 'object ' && \n propertyDescriptor ? propertyDescriptor.value : propertyDescrip tor;\n return value !== undefined ? value : null;\n },\n // returns t he value of the descriptor's 'reflect' property or undefined\n reflectHintFor Descriptor: function(propertyDescriptor) {\n if (typeof propertyDescriptor === 'object' &&\n propertyDescriptor && propertyDescriptor.reflect !== undefined) {\n return propertyDescriptor.reflect;\n }\n },\n l owerCaseMap: function(properties) {\n var map = {};\n for (var n in pr operties) {\n map[n.toLowerCase()] = n;\n }\n return map;\n },\n createPropertyAccessors: function(prototype) {\n var n$ = prototype ._publishNames;\n if (n$ && n$.length) {\n for (var i=0, l=n$.length , n, fn; (i<l) && (n=n$[i]); i++) {\n Observer.createBindablePrototypeA ccessor(prototype, n);\n }\n }\n }\n };\n\n // exports\n\n sco pe.api.declaration.properties = properties;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may on ly be used under the BSD style license found at http://polymer.github.io/LICENSE .txt\n * The complete set of authors may be found at http://polymer.github.io/AU THORS.txt\n * The complete set of contributors may be found at http://polymer.gi thub.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer p roject is also\n * subject to an additional IP rights grant found at http://poly mer.github.io/PATENTS.txt\n */\n(function(scope) {\n\n // magic words\n\n var ATTRIBUTES_ATTRIBUTE = 'attributes';\n var ATTRIBUTES_REGEX = /\\s|,/;\n\n // attributes api\n\n var attributes = {\n \n inheritAttributesObjects: func tion(prototype) {\n // chain our lower-cased publish map to the inherited v ersion\n this.inheritObject(prototype, 'publishLC');\n // chain our in stance attributes map to the inherited version\n this.inheritObject(prototy pe, '_instanceAttributes');\n },\n\n publishAttributes: function(prototype , base) {\n // merge names from 'attributes' attribute\n var attribute s = this.getAttribute(ATTRIBUTES_ATTRIBUTE);\n if (attributes) {\n / / get properties to publish\n var publish = prototype.publish || (prototy pe.publish = {});\n // names='a b c' or names='a,b,c'\n var names = attributes.split(ATTRIBUTES_REGEX);\n // record each name for publishin g\n for (var i=0, l=names.length, n; i<l; i++) {\n // remove exc ess ws\n n = names[i].trim();\n // do not override explicit en tries\n if (n && publish[n] === undefined && base[n] === undefined) {\n // supply an empty 'descriptor' object and let the publishProperties \n // code determine a default\n publish[n] = Polymer.nob; \n }\n }\n }\n },\n\n // record clonable attributes f rom <element>\n accumulateInstanceAttributes: function() {\n // inherit instance attributes\n var clonable = this.prototype._instanceAttributes;\n // merge attributes from element\n var a$ = this.attributes;\n fo r (var i=0, l=a$.length, a; (i<l) && (a=a$[i]); i++) { \n if (this.isIns tanceAttribute(a.name)) {\n clonable[a.name] = a.value;\n }\n }\n },\n\n isInstanceAttribute: function(name) {\n return !this.bl ackList[name] && name.slice(0,3) !== 'on-';\n },\n\n // do not clone these attributes onto instances\n blackList: {\n name: 1,\n 'extends': 1 ,\n constructor: 1,\n noscript: 1,\n assetpath: 1,\n 'cache- csstext': 1\n }\n \n };\n\n // add ATTRIBUTES_ATTRIBUTE to the blacklist \n attributes.blackList[ATTRIBUTES_ATTRIBUTE] = 1;\n\n // exports\n\n scope.a pi.declaration.attributes = attributes;\n\n})(Polymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may only b e used under the BSD style license found at http://polymer.github.io/LICENSE.txt \n * The complete set of authors may be found at http://polymer.github.io/AUTHOR S.txt\n * The complete set of contributors may be found at http://polymer.github .io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer proje ct is also\n * subject to an additional IP rights grant found at http://polymer. github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imports\n var events = scope.api.declaration.events;\n\n var syntax = new PolymerExpressions();\n va r prepareBinding = syntax.prepareBinding;\n\n // Polymer takes a first crack at the binding to see if it's a declarative\n // event handler.\n syntax.prepare Binding = function(pathString, name, node) {\n return events.prepareEventBind ing(pathString, name, node) ||\n prepareBinding.call(syntax, pathStrin g, name, node);\n };\n\n // declaration api supporting mdv\n var mdv = {\n syntax: syntax,\n fetchTemplate: function() {\n return this.querySelect or('template');\n },\n templateContent: function() {\n var template = this.fetchTemplate();\n return template && Platform.templateContent(templa te);\n },\n installBindingDelegate: function(template) {\n if (templa te) {\n template.bindingDelegate = this.syntax;\n }\n }\n };\n\n // exports\n scope.api.declaration.mdv = mdv;\n\n})(Polymer);\n","/*\n * Copy right (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code m ay only be used under the BSD style license found at http://polymer.github.io/LI CENSE.txt\n * The complete set of authors may be found at http://polymer.github. io/AUTHORS.txt\n * The complete set of contributors may be found at http://polym er.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the poly mer project is also\n * subject to an additional IP rights grant found at http:/ /polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imports\n \n var api = scope.api;\n var isBase = scope.isBase;\n var extend = scope.extend ;\n\n // prototype api\n\n var prototype = {\n\n register: function(name, e xtendeeName) {\n // build prototype combining extendee, Polymer base, and n amed api\n this.buildPrototype(name, extendeeName);\n // register our custom element with the platform\n this.registerPrototype(name, extendeeNam e);\n // reference constructor in a global named by 'constructor' attribute \n this.publishConstructor();\n },\n\n buildPrototype: function(name, extendeeName) {\n // get our custom prototype (before chaining)\n var extension = scope.getRegisteredPrototype(name);\n // get basal prototype\n var base = this.generateBasePrototype(extendeeName);\n // implement d eclarative features\n this.desugarBeforeChaining(extension, base);\n / / join prototypes\n this.prototype = this.chainPrototypes(extension, base); \n // more declarative features\n this.desugarAfterChaining(name, exte ndeeName);\n },\n\n desugarBeforeChaining: function(prototype, base) {\n // back reference declaration element\n // TODO(sjmiles): replace `elem ent` with `elementElement` or `declaration`\n prototype.element = this;\n // transcribe `attributes` declarations onto own prototype's `publish`\n this.publishAttributes(prototype, base);\n // `publish` properties to the prototype and to attribute watch\n this.publishProperties(prototype, base) ;\n // infer observers for `observe` list based on method names\n this .inferObservers(prototype);\n // desugar compound observer syntax, e.g. 'a b c' \n this.explodeObservers(prototype);\n },\n\n chainPrototypes: f unction(prototype, base) {\n // chain various meta-data objects to inherite d versions\n this.inheritMetaData(prototype, base);\n // chain custom api to inherited\n var chained = this.chainObject(prototype, base);\n // x-platform fixup\n ensurePrototypeTraversal(chained);\n return chai ned;\n },\n\n inheritMetaData: function(prototype, base) {\n // chain observe object to inherited\n this.inheritObject('observe', prototype, bas e);\n // chain publish object to inherited\n this.inheritObject('publi sh', prototype, base);\n // chain reflect object to inherited\n this.i nheritObject('reflect', prototype, base);\n // chain our lower-cased publis h map to the inherited version\n this.inheritObject('_publishLC', prototype , base);\n // chain our instance attributes map to the inherited version\n this.inheritObject('_instanceAttributes', prototype, base);\n // chain our event delegates map to the inherited version\n this.inheritObject('eve ntDelegates', prototype, base);\n },\n\n // implement various declarative features\n desugarAfterChaining: function(name, extendee) {\n // build s ide-chained lists to optimize iterations\n this.optimizePropertyMaps(this.p rototype);\n this.createPropertyAccessors(this.prototype);\n // instal l mdv delegate on template\n this.installBindingDelegate(this.fetchTemplate ());\n // install external stylesheets as if they are inline\n this.in stallSheets();\n // adjust any paths in dom from imports\n this.resolv eElementPaths(this);\n // compile list of attributes to copy to instances\n this.accumulateInstanceAttributes();\n // parse on-* delegates declar ed on `this` element\n this.parseHostEvents();\n //\n // install a helper method this.resolvePath to aid in \n // setting resource urls. e.g .\n // this.$.image.src = this.resolvePath('images/foo.png')\n this.ad dResolvePathApi();\n // under ShadowDOMPolyfill, transforms to approximate missing CSS features\n if (window.ShadowDOMPolyfill) {\n Platform.Sh adowCSS.shimStyling(this.templateContent(), name, extendee);\n }\n // allow custom element access to the declarative context\n if (this.prototype .registerCallback) {\n this.prototype.registerCallback(this);\n }\n },\n\n // if a named constructor is requested in element, map a reference\ n // to the constructor to the given symbol\n publishConstructor: function () {\n var symbol = this.getAttribute('constructor');\n if (symbol) {\ n window[symbol] = this.ctor;\n }\n },\n\n // build prototype combining extendee, Polymer base, and named api\n generateBasePrototype: func tion(extnds) {\n var prototype = this.findBasePrototype(extnds);\n if (!prototype) {\n // create a prototype based on tag-name extension\n var prototype = HTMLElement.getPrototypeForTag(extnds);\n // insert ba se api in inheritance chain (if needed)\n prototype = this.ensureBaseApi( prototype);\n // memoize this base\n memoizedBases[extnds] = proto type;\n }\n return prototype;\n },\n\n findBasePrototype: functi on(name) {\n return memoizedBases[name];\n },\n\n // install Polymer instance api into prototype chain, as needed \n ensureBaseApi: function(proto type) {\n if (prototype.PolymerBase) {\n return prototype;\n }\ n var extended = Object.create(prototype);\n // we need a unique copy of base api for each base prototype\n // therefore we 'extend' here instead of simply chaining\n api.publish(api.instance, extended);\n // TODO(s jmiles): sharing methods across prototype chains is\n // not supported by ' super' implementation which optimizes\n // by memoizing prototype relations hips.\n // Probably we should have a version of 'extend' that is \n // share-aware: it could study the text of each function,\n // look for usage of 'super', and wrap those functions in\n // closures.\n // As of now , there is only one problematic method, so \n // we just patch it manually. \n // To avoid re-entrancy problems, the special super method\n // ins talled is called `mixinSuper` and the mixin method\n // must use this metho d instead of the default `super`.\n this.mixinMethod(extended, prototype, a pi.instance.mdv, 'bind');\n // return buffed-up prototype\n return ext ended;\n },\n\n mixinMethod: function(extended, prototype, api, name) {\n var $super = function(args) {\n return prototype[name].apply(this, a rgs);\n };\n extended[name] = function() {\n this.mixinSuper = $super;\n return api[name].apply(this, arguments);\n }\n },\n\n // ensure prototype[name] inherits from a prototype.prototype[name]\n inher itObject: function(name, prototype, base) {\n // require an object\n v ar source = prototype[name] || {};\n // chain inherited properties onto a n ew object\n prototype[name] = this.chainObject(source, base[name]);\n }, \n\n // register 'prototype' to custom element 'name', store constructor \n registerPrototype: function(name, extendee) { \n var info = {\n pr ototype: this.prototype\n }\n // native element must be specified in e xtends\n var typeExtension = this.findTypeExtension(extendee);\n if (t ypeExtension) {\n info.extends = typeExtension;\n }\n // regist er the prototype with HTMLElement for name lookup\n HTMLElement.register(na me, this.prototype);\n // register the custom type\n this.ctor = docum ent.registerElement(name, info);\n },\n\n findTypeExtension: function(name ) {\n if (name && name.indexOf('-') < 0) {\n return name;\n } e lse {\n var p = this.findBasePrototype(name);\n if (p.element) {\n return this.findTypeExtension(p.element.extends);\n }\n }\ n }\n\n };\n\n // memoize base prototypes\n var memoizedBases = {};\n\n / / implementation of 'chainObject' depends on support for __proto__\n if (Object .__proto__) {\n prototype.chainObject = function(object, inherited) {\n if (object && inherited && object !== inherited) {\n object.__proto__ = i nherited;\n }\n return object;\n }\n } else {\n prototype.chain Object = function(object, inherited) {\n if (object && inherited && object !== inherited) {\n var chained = Object.create(inherited);\n objec t = extend(chained, object);\n }\n return object;\n }\n }\n\n // On platforms that do not support __proto__ (versions of IE), the prototype\n // chain of a custom element is simulated via installation of __proto__.\n // Alt hough custom elements manages this, we install it here so it's\n // available d uring desugaring.\n function ensurePrototypeTraversal(prototype) {\n if (!Ob ject.__proto__) {\n var ancestor = Object.getPrototypeOf(prototype);\n prototype.__proto__ = ancestor;\n if (isBase(ancestor)) {\n ancesto r.__proto__ = Object.getPrototypeOf(ancestor);\n }\n }\n }\n\n // expo rts\n\n api.declaration.prototype = prototype;\n\n})(Polymer);\n","/*\n * Copyr ight (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code ma y only be used under the BSD style license found at http://polymer.github.io/LIC ENSE.txt\n * The complete set of authors may be found at http://polymer.github.i o/AUTHORS.txt\n * The complete set of contributors may be found at http://polyme r.github.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polym er project is also\n * subject to an additional IP rights grant found at http:// polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n /*\n\n Elements are added to a registration queue so that they register in \n the proper ord er at the appropriate time. We do this for a few reasons:\n\n * to enable ele ments to load resources (like stylesheets) \n asynchronously. We need to do t his until the platform provides an efficient\n alternative. One issue is that remote @import stylesheets are \n re-fetched whenever stamped into a shadowR oot.\n\n * to ensure elements loaded 'at the same time' (e.g. via some set of \n imports) are registered as a batch. This allows elements to be enured from \n upgrade ordering as long as they query the dom tree 1 task after\n upgr ade (aka domReady). This is a performance tradeoff. On the one hand,\n elemen ts that could register while imports are loading are prevented from \n doing so. On the other, grouping upgrades into a single task means less\n increment al work (for example style recalcs), Also, we can ensure the \n document is in a known state at the single quantum of time when \n elements upgrade.\n\n */\n var queue = {\n // tell the queue to wait for an element to be ready\n wait: function(element, check, go) {\n var shouldAdd = (this.indexOf(el ement) === -1 && \n flushQueue.indexOf(element) === -1);\n if (sho uldAdd) {\n this.add(element);\n element.__check = check;\n element.__go = go;\n }\n return (this.indexOf(element) !== 0);\n } ,\n add: function(element) {\n //console.log('queueing', element.name);\ n queueForElement(element).push(element);\n },\n indexOf: function(el ement) {\n var i = queueForElement(element).indexOf(element);\n if (i >= 0 && document.contains(element)) {\n i += (HTMLImports.useNative || HT MLImports.ready) ? \n importQueue.length : 1e9;\n }\n return i; \n },\n // tell the queue an element is ready to be registered\n go : function(element) {\n var readied = this.remove(element);\n if (read ied) {\n this.addToFlushQueue(readied);\n this.check();\n }\n },\n remove: function(element) {\n var i = this.indexOf(element);\n if (i !== 0) {\n //console.warn('queue order wrong', i);\n re turn;\n }\n return queueForElement(element).shift();\n },\n chec k: function() {\n // next\n var element = this.nextElement();\n i f (element) {\n element.__check.call(element);\n }\n if (this.c anReady()) {\n this.ready();\n return true;\n }\n },\n nextElement: function() {\n return nextQueued();\n },\n canReady: fun ction() {\n return !this.waitToReady && this.isEmpty();\n },\n isEmpt y: function() {\n return !importQueue.length && !mainQueue.length;\n },\ n addToFlushQueue: function(element) {\n flushQueue.push(element); \n },\n flush: function() {\n var element;\n while (flushQueue.lengt h) {\n element = flushQueue.shift();\n element.__go.call(element); \n element.__check = element.__go = null;\n }\n },\n ready: fu nction() {\n this.flush();\n // TODO(sorvell): As an optimization, tur n off CE polyfill upgrading\n // while registering. This way we avoid havin g to upgrade each document\n // piecemeal per registration and can instead register all elements\n // and upgrade once in a batch. Without this optimi zation, upgrade time\n // degrades significantly when SD polyfill is used. This is mainly because\n // querying the document tree for elements is slow under the SD polyfill.\n if (CustomElements.ready === false) {\n Cu stomElements.upgradeDocumentTree(document);\n CustomElements.ready = true ;\n }\n Platform.flush();\n requestAnimationFrame(this.flushReady Callbacks);\n },\n addReadyCallback: function(callback) {\n if (callb ack) {\n readyCallbacks.push(callback);\n }\n },\n flushReadyC allbacks: function() {\n if (readyCallbacks) {\n var fn;\n wh ile (readyCallbacks.length) {\n fn = readyCallbacks.shift();\n fn();\n }\n }\n },\n waitToReady: true\n };\n\n var flushQu eue = [];\n\n var importQueue = [];\n var mainQueue = [];\n var readyCallback s = [];\n\n function queueForElement(element) {\n return document.contains(e lement) ? mainQueue : importQueue;\n }\n\n function nextQueued() {\n return importQueue.length ? importQueue[0] : mainQueue[0];\n }\n\n var polymerReadie d = false; \n\n document.addEventListener('WebComponentsReady', function() {\n CustomElements.ready = false;\n });\n \n function whenPolymerReady(callbac k) {\n queue.waitToReady = true;\n CustomElements.ready = false;\n HTML Imports.whenImportsReady(function() {\n queue.addReadyCallback(callback);\n queue.waitToReady = false;\n queue.check();\n });\n }\n\n // exp orts\n scope.queue = queue;\n scope.whenPolymerReady = whenPolymerReady;\n})(P olymer);\n","/*\n * Copyright (c) 2014 The Polymer Project Authors. All rights r eserved.\n * This code may only be used under the BSD style license found at htt p://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found a t http://polymer.github.io/AUTHORS.txt\n * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\n * Code distributed by Go ogle as part of the polymer project is also\n * subject to an additional IP righ ts grant found at http://polymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n var whenPolymerReady = scope.whenPolymerReady;\n\n function importElemen ts(elementOrFragment, callback) {\n if (elementOrFragment) {\n document. head.appendChild(elementOrFragment);\n whenPolymerReady(callback);\n } e lse if (callback) {\n callback();\n }\n }\n\n function importUrls(urls , callback) {\n if (urls && urls.length) {\n var frag = document.creat eDocumentFragment();\n for (var i=0, l=urls.length, url, link; (i<l) && ( url=urls[i]); i++) {\n link = document.createElement('link');\n link.rel = 'import';\n link.href = url;\n frag.appendChild(l ink);\n }\n importElements(frag, callback);\n } else if (callba ck) {\n callback();\n }\n }\n\n // exports\n scope.import = importUrl s;\n scope.importElements = importElements;\n\n})(Polymer);\n","/*\n * Copyrigh t (c) 2014 The Polymer Project Authors. All rights reserved.\n * This code may o nly be used under the BSD style license found at http://polymer.github.io/LICENS E.txt\n * The complete set of authors may be found at http://polymer.github.io/A UTHORS.txt\n * The complete set of contributors may be found at http://polymer.g ithub.io/CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://pol ymer.github.io/PATENTS.txt\n */\n\n(function(scope) {\n\n // imports\n\n var e xtend = scope.extend;\n var api = scope.api;\n var queue = scope.queue;\n var whenPolymerReady = scope.whenPolymerReady;\n var getRegisteredPrototype = scop e.getRegisteredPrototype;\n var waitingForPrototype = scope.waitingForPrototype ;\n\n // declarative implementation: <polymer-element>\n\n var prototype = ext end(Object.create(HTMLElement.prototype), {\n\n createdCallback: function() { \n if (this.getAttribute('name')) {\n this.init();\n }\n },\ n\n init: function() {\n // fetch declared values\n this.name = thi s.getAttribute('name');\n this.extends = this.getAttribute('extends');\n // initiate any async resource fetches\n this.loadResources();\n // register when all constraints are met\n this.registerWhenReady();\n },\ n\n registerWhenReady: function() {\n if (this.registered\n || this .waitingForPrototype(this.name)\n || this.waitingForQueue()\n || thi s.waitingForResources()) {\n return;\n }\n // TODO(sorvell): ends up calling '_register' by virtue\n // of `waitingForQueue` (see below) \n queue.go(this);\n },\n\n // TODO(sorvell): refactor, this method i s private-ish, but it's being\n // called by the queue object.\n _register : function() {\n //console.log('registering', this.name);\n //console. group('registering', this.name);\n // warn if extending from a custom eleme nt not registered via Polymer\n if (isCustomTag(this.extends) && !isRegiste red(this.extends)) {\n console.warn('%s is attempting to extend %s, an un registered element ' +\n 'or one that was not registered with Polymer .', this.name,\n this.extends);\n }\n this.register(this.na me, this.extends);\n this.registered = true;\n //console.groupEnd();\n },\n\n waitingForPrototype: function(name) {\n if (!getRegisteredPro totype(name)) {\n // then wait for a prototype\n waitingForPrototy pe(name, this);\n // emulate script if user is not supplying one\n this.handleNoScript(name);\n // prototype not ready yet\n return true;\n }\n },\n\n handleNoScript: function(name) {\n // if expl icitly marked as 'noscript'\n if (this.hasAttribute('noscript') && !this.no script) {\n this.noscript = true;\n // TODO(sorvell): CustomElemen ts polyfill awareness:\n // noscript elements should upgrade in logical o rder\n // script injection ensures this under native custom elements;\n // under imports + ce polyfills, scripts run before upgrades.\n // dependencies should be ready at upgrade time so register\n // prototype a t this time.\n if (window.CustomElements && !CustomElements.useNative) {\ n Polymer(name);\n } else {\n var script = document.cre ateElement('script');\n script.textContent = 'Polymer(\\'' + name + '\\ ');';\n this.appendChild(script);\n }\n }\n },\n\n wa itingForResources: function() {\n return this._needsResources;\n },\n\n // NOTE: Elements must be queued in proper order for inheritance/composition\ n // dependency resolution. Previously this was enforced for inheritance,\n // and by rule for composition. It's now entirely by rule.\n waitingForQueu e: function() {\n return queue.wait(this, this.registerWhenReady, this._reg ister);\n },\n\n loadResources: function() {\n this._needsResources = true;\n this.loadStyles(function() {\n this._needsResources = false ;\n this.registerWhenReady();\n }.bind(this));\n }\n\n });\n\n // semi-pluggable APIs \n\n // TODO(sjmiles): should be fully pluggable (aka de coupled, currently\n // the various plugins are allowed to depend on each other directly)\n api.publish(api.declaration, prototype);\n\n // utility and bookk eeping\n\n function isRegistered(name) {\n return Boolean(HTMLElement.getPro totypeForTag(name));\n }\n\n function isCustomTag(name) {\n return (name && name.indexOf('-') >= 0);\n }\n\n // boot tasks\n\n whenPolymerReady(function () {\n document.body.removeAttribute('unresolved');\n document.dispatchEve nt(\n new CustomEvent('polymer-ready', {bubbles: true})\n );\n });\n\n // register polymer-element with document\n\n document.registerElement('polyme r-element', {prototype: prototype});\n\n})(Polymer);\n","/*\n * Copyright (c) 20 14 The Polymer Project Authors. All rights reserved.\n * This code may only be u sed under the BSD style license found at http://polymer.github.io/LICENSE.txt\n * The complete set of authors may be found at http://polymer.github.io/AUTHORS.t xt\n * The complete set of contributors may be found at http://polymer.github.io /CONTRIBUTORS.txt\n * Code distributed by Google as part of the polymer project is also\n * subject to an additional IP rights grant found at http://polymer.git hub.io/PATENTS.txt\n */\n\n/**\n * The `auto-binding` element extends the templa te element. It provides a quick \n * and easy way to do data binding without the need to setup a model. \n * The `auto-binding` element itself serves as the mod el and controller for the \n * elements it contains. Both data and event handler s can be bound. \n *\n * The `auto-binding` element acts just like a template th at is bound to \n * a model. It stamps its content in the dom adjacent to itself . When the \n * content is stamped, the `template-bound` event is fired.\n *\n * Example:\n *\n * <template is=\"auto-binding\">\n * <div>Say somethin g: <input value=\"{{value}}\"></div>\n * <div>You said: {{value}}</div>\n * <button on-tap=\"{{buttonTap}}\">Tap me!</button>\n * </template>\n * <script>\n * var template = document.querySelector('template');\n * template.value = 'something';\n * template.buttonTap = function() {\ n * console.log('tap!');\n * };\n * </script>\n *\n * @module Polymer\n * @status stable\n*/\n\n(function() {\n\n var element = document.crea teElement('polymer-element');\n element.setAttribute('name', 'auto-binding');\n element.setAttribute('extends', 'template');\n element.init();\n\n Polymer(' auto-binding', {\n\n createdCallback: function() {\n this.syntax = this. bindingDelegate = this.makeSyntax();\n // delay stamping until polymer-read y so that auto-binding is not\n // required to load last.\n Polymer.wh enPolymerReady(function() {\n this.model = this;\n this.setAttribu te('bind', '');\n // we don't bother with an explicit signal here, we cou ld ust a MO\n // if necessary\n this.async(function() {\n // note: this will marshall *all* the elements in the parentNode\n // rather than just stamped ones. We'd need to use createInstance\n // to fix this or something else fancier.\n this.marshalNodeReferences(this.p arentNode);\n // template stamping is asynchronous so stamping isn't co mplete\n // by polymer-ready; fire an event so users can use stamped el ements\n this.fire('template-bound');\n });\n }.bind(this)) ;\n },\n\n makeSyntax: function() {\n var events = Object.create(Poly mer.api.declaration.events);\n var self = this;\n events.findControlle r = function() { return self.model; };\n\n var syntax = new PolymerExpressi ons();\n var prepareBinding = syntax.prepareBinding; \n syntax.prepar eBinding = function(pathString, name, node) {\n return events.prepareEven tBinding(pathString, name, node) ||\n prepareBinding.call(syntax, pathString, name, node);\n };\n return syntax;\n }\n\n });\n\n})() ;\n"]}
OLDNEW
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.concat.js.map ('k') | pkg/polymer/lib/src/loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698